How to create many software timer in STM32 using single hardware timer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-14 1:21 AM
I want to create many(20) software timer using​ single hardware timer of STM32.Timer accuracy in Mili second.
​
Example:
Timer = T
​T1 start > T1 over & T2 start > T2 over &T3 start....> T(n-1) over & Tn start.
​
Sequence of timer or sequential timer
​Timer is expired can be start over again when pin goes high.
​​
How can I achieve this?​
- Labels:
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-14 1:59 AM
Keep a sorted list (priority queue) of next event's time points and callbacks. FreeRTOS has an implementation you can study, as well as almost every (RT)OS scheduler.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-14 6:24 AM
start1 = HAL_GetTick();
...
duration1 = HAL_GetTick() - start;
etc...
