RTIC Dispatchers - Do I need to use any free interrupt for a software task?

Hello,

I am currently learning Rust for embedded devices and one thing that isn't clear to me in the Rust RTIC handbook is what exactly is a dispatcher for a software task.

According to the Rust RTIC book :
" All software tasks at the same priority level share an interrupt handler acting as an async executor dispatching the software tasks. This list of dispatchers, dispatchers = [FreeInterrupt1, FreeInterrupt2, ...] is an argument to the #[app] attribute, where you define the set of free and usable interrupts."

If I understand that correctly, I need to assign an unused Cortex-M hardware interrupt to my software task so that it can be used as the dispatcher. Am I understanding that correctly?

So in other words, I should assign an interrupt I don't use elsewhere in my app to be used as my interrupt handler for my same priority level task?

Thanks

mostly, that's correct.

you are not limited to single dispatcher, you may have multiple interrupt handlers used as software task dispatchers, but how many would actually get used depends on how many different priority levels are assigned to software tasks.

no, you don't need to assign interrupts manually to your software tasks.

you simply list which interrupts are available for the dispatcher in the #[app(dispatchers = [...])] macro, and rtic will take care of the scheduling, based on assigned priorities of software tasks. if you need more priorities than the number of available dispatcher interrupts, you should get a compile time error.

Ok thanks,

my understanding was kinda correct, but being new to the language, your added information is really helpful.

Thank you very much for the information.