0
0
Embedded Cprogramming~10 mins

Window watchdog concept in Embedded C - Interactive Code Practice

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

Complete the code to enable the window watchdog timer.

Embedded C
WWDG->CR = [1];
Drag options to blanks, or click blank then click option'
A0x7F
B0x40
C0x80
D0x00
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0x00 disables the watchdog.
Using 0x7F sets the counter but does not enable it.
2fill in blank
medium

Complete the code to set the window value for the watchdog timer.

Embedded C
WWDG->CFR = ([1] << 0);
Drag options to blanks, or click blank then click option'
A0x80
B0x7F
C0x40
D0x3F
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0x7F sets the window too high, disabling the window effect.
Using 0x80 sets a bit outside the window value field.
3fill in blank
hard

Fix the error in the code to refresh the watchdog counter correctly.

Embedded C
WWDG->CR = [1];
Drag options to blanks, or click blank then click option'
A0x7F
B0x80
C0x3F
D0x40
Attempts:
3 left
💡 Hint
Common Mistakes
Writing 0x3F lowers the counter incorrectly.
Writing 0x80 disables the watchdog.
4fill in blank
hard

Fill both blanks to configure the prescaler and enable the watchdog interrupt.

Embedded C
WWDG->CFR = ([1] << 7) | (1 << [2]);
Drag options to blanks, or click blank then click option'
A3
B6
C5
D7
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong bit positions disables features.
Confusing prescaler and interrupt bits.
5fill in blank
hard

Fill all three blanks to initialize the watchdog with prescaler, window, and refresh.

Embedded C
WWDG->CFR = ([1] << 7) | [2];
WWDG->CR = [3];
Drag options to blanks, or click blank then click option'
A2
B0x3F
C0x7F
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing prescaler and window values.
Using refresh value outside allowed range.