Watchdog Recovery Logic

Hard C Control
Solve this problem

Implement watchdog recovery logic in C for a safety-critical embedded system. The handler should log the cause, reinitialize core subsystems, and trigger a safe reboot.

Constraints

  • watchdog_isr() called on timeout.
  • Access hardware reset registers.
  • Clear watchdog flags.
  • Log to non-volatile memory.
  • Restart system via reset vector.
  • No return.
Starter codeC
1void watchdog_isr(void);