Immediate preemption / Task switch when return from a ISR
nicolas lantz <nicolas.lantz@...>
I trying to have a task waiting to put a message in a queue to be immediatly rescheduled when return from an ISR getting this msg.
For now, the Task is set as Ready (when the ISR get the msg in the queue), but the system return in Idle Task for a long time before the Task is being executed again to prepare another msg.
The consequence is that next msg is not ready on time, while the system spent a long time in IDLE task.
I tried a lot of chosen but nothing that works.
Does somenone have a solution todo that ?
My_Task as a priority of 2
Simple example code :
K_MSGQ_DEFINE(p_msgq , sizeof(msg_t), 1, 4);
k_msgq_put(p_msgq, &msg, K_FOREVER);
k_msgq_get(p_msgq, &msg, K_NO_WAIT);
Nicolas Nicolas LANTZ M : +33 (0)6 19 07 43 43 T : +33 (0)9 52 96 81 86 www.ubicore.net