Question
Variable not initialized in STM32 LL MX_GPIO_Init()
Posted on April 13, 2018 at 09:24
STM32CubeMX v4.0
STM32CubeF1 Firmware Package v1.6.1
The following is the code generated by STM32CubeMX.
void MX_GPIO_Init(void)
{
LL_GPIO_InitTypeDef GPIO_InitStruct;
// ...
GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
LL_GPIO_Init(GPIOC, &GPIO_InitStruct);
//...
}
ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStruct)
{
//...
assert_param(IS_LL_GPIO_PULL(GPIO_InitStruct->Pull));
//...
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
The memberPullis notinitialized that leads to the program may be blocked atassert_param().
Hope to improve.Thanks !
#ll-gpio