Challenge - 5 Problems
Standby Mode Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output when MCU enters standby mode?
Consider the following embedded C code snippet for a microcontroller. What will be the output on the debug console before the MCU enters standby mode?
Embedded C
#include <stdio.h> #include "mcu.h" // hypothetical MCU header int main() { printf("System initializing...\n"); MCU_EnterStandbyMode(); printf("This line after standby\n"); return 0; }
Attempts:
2 left
💡 Hint
Think about what happens to the CPU after entering standby mode.
✗ Incorrect
When the MCU enters standby mode, it stops executing code until a wake-up event occurs. Therefore, the line after entering standby mode is never reached, so only the first print appears.
🧠 Conceptual
intermediate1:30remaining
Which event wakes the MCU from standby mode?
In embedded systems, what kind of event typically wakes the microcontroller from standby mode?
Attempts:
2 left
💡 Hint
Think about what can physically interrupt the MCU when it is in low power.
✗ Incorrect
Standby mode stops the CPU until a wake-up event occurs. Usually, this is an external interrupt or a specific internal event configured as a wake-up source.
🔧 Debug
advanced2:30remaining
Why does the MCU not wake up after standby mode?
Given this code snippet, the MCU never wakes up from standby mode. Identify the bug.
Embedded C
#include "mcu.h" int main() { MCU_EnableWakeupPin(); MCU_EnterStandbyMode(); while(1) { // MCU should wake up and run here } return 0; }
Attempts:
2 left
💡 Hint
Enabling a pin alone may not be enough to wake the MCU.
✗ Incorrect
Enabling the wakeup pin without configuring it as an interrupt or wake-up source means the MCU will not detect the event to wake up.
📝 Syntax
advanced1:30remaining
Identify the syntactically correct standby mode code
Which option does NOT contain a syntax error preventing compilation?
Embedded C
void enter_standby() {
MCU_EnterStandbyMode()
printf("Entered standby\n");
}Attempts:
2 left
💡 Hint
Check for missing semicolons.
✗ Incorrect
Option A is correct with proper semicolons. Options B and C miss semicolons causing syntax errors. Option A uses MCU_EnterStandbyMode without parentheses, which is invalid.
🚀 Application
expert2:00remaining
How many bytes of RAM remain powered in standby mode?
An MCU has 64KB RAM. In standby mode, only the backup SRAM of 4KB remains powered. How many bytes of RAM are lost (powered off) during standby?
Attempts:
2 left
💡 Hint
Remember 1KB = 1024 bytes.
✗ Incorrect
64KB = 64 * 1024 = 65,536 bytes. Backup SRAM = 4KB = 4 * 1024 = 4,096 bytes. Powered off RAM = 65,536 - 4,096 = 61,440 bytes (B). This tests understanding of memory units and subtraction.