0

In real time systems using an RTOS, what how would the RTOS handle an idle period? Would it run nop instructions at the lowest frequency supported by a Dynamic Voltage Scaling capable processor? or would it turn to a sleep state? Can anyone refer me to actual practical implementations. Thanks

The Byzantine
  • 619
  • 1
  • 6
  • 21
  • In his blog, Nigel Jones suggested [What to do in the Idle Task](http://embeddedgurus.com/stack-overflow/2013/04/idling-along/). – kkrambo May 15 '14 at 12:52

1 Answers1

1

It will depend entirely on the target hardware and possibly the needs and design of the application. For example on ARM Cortex-M you would typically invoke the WFI instruction which shuts down the core until the occurrence of an interrupt.

In many microcontroller/SoC cases, reducing the PLL clock frequency would affect the on-chip peripherals from which hardware interrupts might occur, so that is less likely. It would affect baud rates and timer resolution, and is perhaps hard to manage easily. There is a paper here on a tickless idle power management method on FreeRTOS/Cortex-M3.

In most cases the idle loop source is provided as part of the board-support, so you can customise it to your needs.

Clifford
  • 88,407
  • 13
  • 85
  • 165