0
0
Embedded Cprogramming~10 mins

Configuring watchdog timeout in Embedded C - Interactive Practice

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

Complete the code to set the watchdog timeout to 2 seconds.

Embedded C
WDT->CONFIG = [1];
Drag options to blanks, or click blank then click option'
AWDT_CONFIG_TIMEOUT_500MS
BWDT_CONFIG_TIMEOUT_1S
CWDT_CONFIG_TIMEOUT_2S
DWDT_CONFIG_TIMEOUT_4S
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a timeout value that is too short or too long for the requirement.
Using a constant that does not exist in the watchdog configuration.
2fill in blank
medium

Complete the code to enable the watchdog timer after configuring the timeout.

Embedded C
WDT->CTRL = [1];
Drag options to blanks, or click blank then click option'
AWDT_CTRL_ENABLE
BWDT_CTRL_DISABLE
CWDT_CTRL_PAUSE
DWDT_CTRL_RESET
Attempts:
3 left
💡 Hint
Common Mistakes
Using the disable constant instead of enable.
Confusing reset with enable.
3fill in blank
hard

Fix the error in the code to correctly reload the watchdog timer counter.

Embedded C
WDT->RELOAD = [1];
Drag options to blanks, or click blank then click option'
A0x00
BWDT_RELOAD_MAX
C0xFF
DWDT_RELOAD_VALUE
Attempts:
3 left
💡 Hint
Common Mistakes
Setting the reload register to zero, which does not reset the timer.
Using an undefined constant.
4fill in blank
hard

Fill both blanks to configure the watchdog timeout and enable it.

Embedded C
WDT->CONFIG = [1];
WDT->CTRL = [2];
Drag options to blanks, or click blank then click option'
AWDT_CONFIG_TIMEOUT_1S
BWDT_CTRL_DISABLE
CWDT_CTRL_ENABLE
DWDT_CONFIG_TIMEOUT_4S
Attempts:
3 left
💡 Hint
Common Mistakes
Using disable instead of enable for the control register.
Choosing the wrong timeout constant.
5fill in blank
hard

Fill all three blanks to set a 4-second timeout, enable the watchdog, and reload the counter.

Embedded C
WDT->CONFIG = [1];
WDT->CTRL = [2];
WDT->RELOAD = [3];
Drag options to blanks, or click blank then click option'
AWDT_CONFIG_TIMEOUT_2S
BWDT_CTRL_ENABLE
CWDT_RELOAD_VALUE
DWDT_CONFIG_TIMEOUT_4S
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to reload the watchdog counter after enabling.
Choosing the wrong timeout duration.