STMicroelectronics / STM32CubeU5

Full Firmware Package for the STM32U5 series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects (examples and demos) running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits).
Other
124 stars 67 forks source link

stm32u5xx_hal_timebase_tim_template.c: Incorrect timer period #12

Closed a-wilhelm closed 1 year ago

a-wilhelm commented 2 years ago

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;
HBOSTM commented 2 years ago

ST Internal Reference: 135743