STM32CubeU5 icon indicating copy to clipboard operation
STM32CubeU5 copied to clipboard

stm32u5xx_hal_timebase_tim_template.c: Incorrect timer period

Open a-wilhelm opened this issue 2 years ago • 1 comments

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;

a-wilhelm avatar Jun 23 '22 11:06 a-wilhelm

ST Internal Reference: 135743

HBOSTM avatar Sep 29 '22 16:09 HBOSTM