AnsweredAssumed Answered

STM32CubeMX for STM32F4 configures inputs as outputs

Question asked by Wilko Lunenburg on May 28, 2018
Latest reply on May 28, 2018 by Wilko Lunenburg

Inputs for (at least) Timers and U(s)arts are being configured as PushPull outputs. There is no option to change this, so it produces the code below.

I'm using a STM32F407VET and all the lastest STM32CubeMX software.

(and I know how to fix it, in my code, not STM32CubeMX :-) )

 

GPIO_InitStruct.Pin = LL_GPIO_PIN_9|LL_GPIO_PIN_10;
GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;
GPIO_InitStruct.Alternate = LL_GPIO_AF_7;
LL_GPIO_Init(GPIOA, &GPIO_InitStruct);

 

 

GPIO_InitStruct.Pin = LL_GPIO_PIN_7|LL_GPIO_PIN_9;
GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
GPIO_InitStruct.Alternate = LL_GPIO_AF_1;
LL_GPIO_Init(GPIOE, &GPIO_InitStruct);

Outcomes