RTEMS | stm32h7/bspstart: avoid overflow in HAL_GetTick calculation (!1144)
Mohamed Ayman (@mohamedayman23)
gitlab at rtems.org
Sat Mar 21 04:55:38 UTC 2026
Mohamed Ayman commented on a discussion on bsps/arm/stm32h7/start/bspstart.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1144#note_146612
> /* Get number of milliseconds elapsed since startup */
> uint32_t HAL_GetTick(void)
> {
> - return rtems_clock_get_ticks_since_boot() *
I've updated HAL_GetTick() to use rtems_clock_get_uptime() as suggested, i think tthis avoids the tick arithmetic entirely and gets the elapsed time directly.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1144#note_146612
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260321/65b3239b/attachment.htm>
More information about the bugs
mailing list