2022-03-14 01: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?
2022-03-14 01: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
2022-03-14 06:24 AM
start1 = HAL_GetTick();
...
duration1 = HAL_GetTick() - start;
etc...