Using Low-Power Features in Programming

This chapter discusses various aspects of the use of the low-power features in a Cortex-M0 microcontroller. The Cortex-M0 processor supports normal sleep and deep sleep modes. The sleep modes can be entered using WFE or WFI instructions, or using Sleep-on-Exit feature. The actual differences between normal sleep mode and deep sleep mode on a microcontroller depend on the system level design of the chip. It is found that in the System Control Block of the Cortex-M0 processor, there is a programmable register called the System Control Register. It is observed that when the Cortex-M0 enters sleep using the Sleep-on-Exit feature, it is just like executing WFI immediately after the exception exit. One of the wakeup sources for the WFE sleep operation is the external event signal. The event signal could be generated by on-chip peripherals or by another processor on the same chip. It is found that the event communication and WFE can be used together to reduce power in polling loops.