Greetings.
We want to sleep if there is nothing to do. Most of the work is handled by a task queue that may be revised by an interrupt handler. The race we'd like to avoid is
1) Disable IRQs 2) Task queue is empty, so we decide to sleep 3) Enable IRQs 4) Interrupt taken an a new task is added to the queue. 5) WFI (because we think that we have nothing more to do.)
On the MSP403, the IRQ enable and sleep can be done with a single register write. Is there something in the Coretex-m3 that functions the same way? Are we supposed to use another mechanism?
Cheers.