Recommended kernel / tasks / alarms setup for my system?
Posted: Wed Sep 04, 2013 7:49 am
Dear EE-ers,
I am coming from a system where I used a so-called time-trigger-task, which got fired every 1 ms.
This trigger-task would then send messages to 3 other "regular" threads (having different priorities), when they should execute a series of tasks.
The regular threads were blocking on a receive_msg(), until they got one,
then checked the content of the message, to see which series of functions should be executed. (e.g. 4ms tasks series, a 10ms task series, and so on)
Additionally, we have a lot of interrupts (for timers, dma, PWM, ...). Some of these are _very_ time critical, others are not. Therefor, at least for these time-critical ISRs, I need the least overhead and jitter possible.
I was thinking about following set-up:
- FP kernel
- An ALARM or counter ISR that will send messages to the regular TASKS
- Waiting for these messages in the TASKS threads. => Are there blocking variants of the ReceiveMessage() primitives? (i.e. the TASK should yield)
- Use ISR1 for the time-critical ISRs
- Use ISR2 for the other ISRs
- System timer set to the STM module of my MPC5643L (EE uses this as system tick then, right? needs to be an ISR2 to it re-schedules?)
Thanks for your suggestions!
I am coming from a system where I used a so-called time-trigger-task, which got fired every 1 ms.
This trigger-task would then send messages to 3 other "regular" threads (having different priorities), when they should execute a series of tasks.
The regular threads were blocking on a receive_msg(), until they got one,
then checked the content of the message, to see which series of functions should be executed. (e.g. 4ms tasks series, a 10ms task series, and so on)
Additionally, we have a lot of interrupts (for timers, dma, PWM, ...). Some of these are _very_ time critical, others are not. Therefor, at least for these time-critical ISRs, I need the least overhead and jitter possible.
I was thinking about following set-up:
- FP kernel
- An ALARM or counter ISR that will send messages to the regular TASKS
- Waiting for these messages in the TASKS threads. => Are there blocking variants of the ReceiveMessage() primitives? (i.e. the TASK should yield)
- Use ISR1 for the time-critical ISRs
- Use ISR2 for the other ISRs
- System timer set to the STM module of my MPC5643L (EE uses this as system tick then, right? needs to be an ISR2 to it re-schedules?)
Thanks for your suggestions!