Bug: STM32CubeMX 6.8.1 STM32G431 TIM1 LL init code generation
how to reproduce:
- generate a new C project for Nucleo-G431RB with all default settings.
- enable TIM1 with internal clock source
- set the prescaler to 170-1
- set code generation for TIM to LL
generated code:
/* USER CODE END TIM1_Init 1 */
TIM_InitStruct.Prescaler = 170-LL_TIM_ETR_FILTER_FDIV1_N2;
which is incorrect (and finally killed a motor driver). For HAL code generation, everything looks fine:
/* USER CODE END TIM1_Init 1 */
htim1.Instance = TIM1;
htim1.Init.Prescaler = 170-1;
Fun fact: Attaching the .ioc, .zip or .tar failed:
The attachment's tim1_bug.tar content type (application/x-tar) does not match its file extension and has been removed.
KnarfB

