STM32CubeU5
STM32CubeU5 copied to clipboard
stm32u5xx_hal_timebase_tim_template.c: Incorrect timer period
Timer clock is set to 100KHz, but when computing the timer period the value 1e6 is used: https://github.com/STMicroelectronics/STM32CubeU5/blob/0eedae3d2a7997a2b5fbfdb57f54c7201e0827c8/Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_timebase_tim_template.c#L104-L110 resulting in the tick rate set to 10ms, not 1ms.
Should be changed to
TimHandle.Init.Period = (100000U / 1000U) - 1U;
ST Internal Reference: 135743