AnsweredAssumed Answered

STM32CubeMX generating bad code for TIM3

Question asked by frisk.jan on Nov 24, 2016
Latest reply on Jan 6, 2017 by Jeanne Joly
When generating code for MDK-ARM v5 with STM32CubeMX v4.17.0 for TIM3 Ch3 you get:"GPIO_InitStruct.Alternate = GPIO_AF0_TIM3;"
in "void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)" (stm32f0xx_hal_msp.c)

The correct code would be: ... = GPIO_AF1_TIM3;

Have not tested generating for other IDEs.

Not a big deal, you get an error when compiling and easy to correct.

Outcomes