Question
CubeMX bug report: error in generated stm32f2xx_hal_msp.c
Posted on February 04, 2018 at 08:16
Hello!
I found a problem with initialization code generated for TIM2 when you select Clock source as ETR2. The bug is with pin initialization for alternate function: GPIO_InitStruct.Alternate is not set to any value (let alone the desired one):
Inside function HAL_TIM_Base_MspInit:
/**TIM2 GPIO Configuration
PA0-WKUP ------> TIM2_ETR
*/
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
The version of CubeMX is 4.0
The problem is only with TIM2, all other timers generate proper code.
Regards,
Maciej
#cubemx-bug #cubemx-bug-report