Complete the code to enter deep sleep mode on an ARM processor.
SCB->SCR |= [1];The SCB_SCR_SLEEPDEEP_Msk bit in the System Control Block's SCR register enables deep sleep mode on ARM processors.
Complete the code to execute the WFI (Wait For Interrupt) instruction to enter sleep.
__[1]();The WFI instruction tells the processor to wait for an interrupt, entering sleep mode until an interrupt occurs.
Fix the error in the code that attempts to clear the deep sleep bit.
SCB->SCR &= ~[1];To clear the deep sleep bit, you must use the SCB_SCR_SLEEPDEEP_Msk mask with bitwise NOT and AND operations.
Fill both blanks to create a dictionary that maps power modes to their descriptions.
power_modes = {"sleep": [1], "deep_sleep": [2]"sleep" mode means the processor halts until an interrupt, while "deep_sleep" is the lowest power consumption state.
Fill all three blanks to complete the code that sets the processor to deep sleep, executes WFI, and then clears the deep sleep bit.
SCB->SCR |= [1]; __[2](); SCB->SCR &= ~[3];
First, set the deep sleep bit with SCB_SCR_SLEEPDEEP_Msk, then execute the WFI instruction to enter sleep, and finally clear the deep sleep bit.