B. SLEEPDEEP bit is cleared, so device does not enter deep sleep
C. __WFI() is the wrong instruction to enter standby
D. Missing enabling of power clock before setting registers
Solution
Step 1: Check SLEEPDEEP bit usage
SLEEPDEEP bit must be set to enter deep sleep (standby). Clearing it disables deep sleep.
Step 2: Verify other settings
PDDS bit is set correctly; __WFI() is correct; power clock enabling is not shown but not always mandatory here.
Final Answer:
SLEEPDEEP bit is cleared, so device does not enter deep sleep -> Option B
Quick Check:
SLEEPDEEP cleared = no deep sleep [OK]
Hint: SLEEPDEEP bit must be set for standby mode [OK]
Common Mistakes:
Clearing SLEEPDEEP bit disables standby
Confusing __WFI() with __WFE()
Forgetting to set PDDS bit
5. You want to configure a microcontroller to enter standby mode but wake up only when a specific external interrupt occurs. Which sequence correctly achieves this behavior?
hard
A. Enable external interrupt line; configure wake-up pin; set PDDS and SLEEPDEEP bits; call __WFI()
B. Set PDDS and SLEEPDEEP bits; call __WFI(); enable external interrupt after wake-up
C. Call __WFI(); then set PDDS and SLEEPDEEP bits; enable external interrupt
D. Enable external interrupt; call __WFE(); clear PDDS bit; set SLEEPDEEP bit
Solution
Step 1: Configure wake-up source before standby
External interrupt line and wake-up pin must be enabled before entering standby.
Step 2: Set standby mode bits and enter sleep
Set PDDS and SLEEPDEEP bits to enable standby, then call __WFI() to enter standby mode.
Final Answer:
Enable external interrupt line; configure wake-up pin; set PDDS and SLEEPDEEP bits; call __WFI() -> Option A
Quick Check:
Setup wake-up + set bits + __WFI() = standby with wake-up [OK]
Hint: Setup wake-up source before standby, then set bits and __WFI() [OK]
Common Mistakes:
Enabling interrupts after entering standby
Clearing PDDS bit disables standby
Using __WFE() without proper wake-up config
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.