0
0
ARM Architectureknowledge~10 mins

Deep sleep mode in ARM Architecture - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enter deep sleep mode on an ARM processor.

ARM Architecture
SCB->SCR |= [1];
Drag options to blanks, or click blank then click option'
ASCB_SCR_SLEEP_Msk
BSCB_SCR_SLEEPONEXIT_Msk
CSCB_SCR_SEVONPEND_Msk
DSCB_SCR_SLEEPDEEP_Msk
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong SCR bit like SLEEPONEXIT which controls sleep on ISR exit.
Confusing deep sleep with normal sleep bits.
2fill in blank
medium

Complete the code to execute the WFI (Wait For Interrupt) instruction to enter sleep.

ARM Architecture
__[1]();
Drag options to blanks, or click blank then click option'
AWFI
BWFE
CSEV
DNOP
Attempts:
3 left
💡 Hint
Common Mistakes
Using WFE (Wait For Event) instead of WFI.
Using NOP which does nothing.
3fill in blank
hard

Fix the error in the code that attempts to clear the deep sleep bit.

ARM Architecture
SCB->SCR &= ~[1];
Drag options to blanks, or click blank then click option'
ASCB_SCR_SLEEPONEXIT_Msk
BSCB_SCR_SLEEPDEEP_Msk
CSCB_SCR_SEVONPEND_Msk
DSCB_SCR_SLEEP_Msk
Attempts:
3 left
💡 Hint
Common Mistakes
Clearing the wrong bit mask.
Forgetting to use the bitwise NOT operator.
4fill in blank
hard

Fill both blanks to create a dictionary that maps power modes to their descriptions.

ARM Architecture
power_modes = {"sleep": [1], "deep_sleep": [2]
Drag options to blanks, or click blank then click option'
A"Low power mode"
B"Processor halts until interrupt"
C"Processor halts until reset"
D"Lowest power consumption state"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing descriptions of sleep and deep sleep modes.
Using incorrect descriptions that don't match the mode.
5fill in blank
hard

Fill all three blanks to complete the code that sets the processor to deep sleep, executes WFI, and then clears the deep sleep bit.

ARM Architecture
SCB->SCR |= [1];
__[2]();
SCB->SCR &= ~[3];
Drag options to blanks, or click blank then click option'
ASCB_SCR_SLEEPDEEP_Msk
BWFI
DWFE
Attempts:
3 left
💡 Hint
Common Mistakes
Using WFE instead of WFI.
Not clearing the deep sleep bit after waking.