Query regarding HAL_GetTick() - what happens when SysTick timer rolls over through zero?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-06 2:10 AM
Hi - I'm using HAL_GetTick(), and then subtracting one value from another to determine a GPIO input pulse width.
What happens if I happen to to call HAL_GetTick() around the point where the SysTick timer rolls over through zero.
Do I need to watch out for this situation generally?
Regards, John.
Solved! Go to Solution.
- Labels:
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-06 2:25 AM
Yes, you have to consider this problem. Typically, this is only used to determine time differences to a previously saved value, which eliminates the problem, as discussed here, for example.
Hope that helps?
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-06 2:25 AM
Yes, you have to consider this problem. Typically, this is only used to determine time differences to a previously saved value, which eliminates the problem, as discussed here, for example.
Hope that helps?
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-06 2:44 AM
Many thanks.
