rtic-rs / rtic

Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers

Home Page:https://rtic.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systick software dispatch

thepperson opened this issue · comments

Can the SysTick handler be used for dispatching software tasks? I see it cannot be directly specified as a dispatcher in the app macro, but I see a lot of examples use systick-monotonic. Is the monotonic timer different that the software task dispatcher?

The SysTick is an exception handler, they act a bit differently from the interrupts. Interrupts can be pended by setting a bit in a pending register, that is how we use them as dispatchers (pended when a message is to be dispatched/running a task).

You cannot use the SysTick this way, however you can use the SysTick to manually spawn other tasks or pend interrupts (e.g., in periodic fashion).
/Per

If something still is unclear, feel free to reopen