5.1.6.1.1. Informational requirements
STMF2F411 microcontroller has 6 ports: A, B, C, D, E, and H |
Each port in STMF2F411 consists of 16 pins, altough some pins may not be available for use |
RCC register is used to configure the system clock source, manage peripheral clocks, control resets, adjust voltage regulator settings |
|
Without enabling the clock, no access to the GPIO configuration registers is possible. |
MODER register is used to configure the mode of each GPIO pin, allowing them to function as input, output, analog, or alternate function. |
Modes need to be chosen based on the use case: input (00), output (01), alternate function (10), or analog (11) |
Possible output types for GPIO pins are: Push-Pull and open-drain |
OTYPER is used to configure the output type of each GPIO pin |
Push-pull is needed for standard output signals |
Open-Drain is needed for interfaces like I2C. |
The OSPEEDR register needs to be configured to set the output speed of a pin. |
Speed settings has options for low, medium, high, and very high speeds. |
PUPDR is used to configure internal pull-up and pull-down resistors for each GPIO pin. |
Pull-up is needed to keep the pin high, pull-down is needed to keep it low |
For pins configured in alternate function mode, there is a need to use the AFR register to assign the correct peripheral function. |
Each pins alternate function needs to be carefully mapped to its intended peripheral |
The output state of GPIO pins needs to be controlled through the ODR or BSRR |
The use of atomic operations in the BSRR register is needed to avoid conflicts in multitasking systems. |
Electrical characteristics like voltage levels, current limits, and protection mechanisms need to be considered during GPIO configuration. |
Status codes shall be 0x01(Invalid pin), 0x02(incorrect mode), 0x03(Operation timeout), 0x04(Unsupported function), 0x05(General error) |
Communication protocols are: UART, SPI, I2C, CAN, USB. |