Question: Q: Watch Dog Timer Programming a) What should the timer counter setting be for an interrupt every 55msec? Counter = ________________ b) Write a Timer
Q: Watch Dog Timer Programming
a) What should the timer counter setting be for an interrupt every 55msec?
Counter = ________________
b) Write a Timer ISR in C for a watch dog timer that will call a reboot function. The timer ISR will go off every 55 msec. Prototype for the reboot function is:
void reboot(void);
c) Write a main program in C so that it will, in an infinite loop, monitor some sensor and perform some action if the monitor returns 1 as follows:
int main() {
..........
if (monitor() )
action();
.........
}
You need to include code to reset the watch dog timer("kick the dog") so that it does not go off the reboot the system in normal cases. If the monitor() and/or the action() function takes too long to finish (e.g. in an infinite loop), the ISR program will reboot the system.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
