2014-08-11 05:27 AM
To avoid
glitches
at the output
,we
initialize
in
the following order
:1. GPIOx
clock
enable
2. Set output
registers
to
defined value
3. Perform
initialization
Now we would
like to use
STM32CubeMX
.Is it
possible
when initializing the
GPIO
to initialize the
output level
?Example of
implementation:
2014-08-29 02:09 AM
Hello,
STM32CubeMX manages the GPIO initialization settings only. The GPIO level is not part of the GPIO init structure (from HAL GPIO driver). The following need to be used to set the GPIO level: /** * @brief GPIO Bit SET and Bit RESET enumeration */ typedef enum { GPIO_PIN_RESET = 0, GPIO_PIN_SET }GPIO_PinState; #define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET)) I have logged a ticket for your request (on STM32CubeMX and requesting the possibility to go beyond the basic GPIO initialization). Best Regards2016-02-09 03:21 AM
Dear user,
Please note your request is now implemented in STM32CubeMX 4.13. Thank you