The flight controller was restarted by its watchdog
What ArduPilot says:
- Forcing safety off for watchdog
- WDG: TN SLN FLN FTN FA0x… FTPN FLR0x… FICSRN MMN MCN IEN IECN TN:…
The watchdog is a hardware timer that restarts the processor when the main loop stops running. It has just done so. The “WDG:” line is what was saved a moment before: T the scheduler task running (-1 between tasks, -3 waiting for an IMU sample, -4 inside a wait), SL the source line of the lock it was waiting on, FL, FT, FA, FTP, FLR and FICSR a processor fault if there was one (line, type, address, thread priority, return address, interrupt state), MM and MC the last MAVLink message and command handled, IE and IEC the internal-error bits and count, TN the thread's name.
What to do, most likely first
It happened in flight.
FixLand at once if it still flies. A copter comes back from the restart disarmed and falls. A plane glides on with its motor cut and can be armed again at once: after a watchdog restart of an armed plane the arming checks are skipped. Do not fly again before the cause is known.
It happened on the bench after a parameter change, a script, or a new device.
CheckT names the task, and MM and MC what the ground station had just asked for.
FixUndo the last change and see whether it comes back. A Lua script or a driver for a device that does not answer are the usual suspects.
A fault in the firmware or the board.
CheckFT is not 0: the processor itself faulted.
FixLoad the current stable firmware. If it happens again, send the whole “WDG:” line, the firmware banner and the log to the ArduPilot forum; the log holds the same data as a WDOG message.
After a watchdog restart ArduPilot tries to carry on: it puts the safety lock back where it was (“Forcing safety off for watchdog”), restores home and attitude, skips the barometer calibration, and raises the internal error “watchdog_rst”, which keeps a copter from arming until a clean restart. The watchdog itself is bit 0 of BRD_OPTIONS; leave it on.
Parameters to look at
| Parameter | What it is |
|---|---|
BRD_OPTIONS | Board options |
Where to do it:Setup & Tuning Guide
The code that sends it
Forcing safety off for watchdog
libraries/AP_BoardConfig/board_drivers.cpp AP_BoardConfig::board_init_safety() · Open in ArduPilot Copter-4.7.1
WDG: TN SLN FLN FTN FA0x… FTPN FLR0x… FICSRN MMN MCN IEN IECN TN:…
libraries/AP_Vehicle/AP_Vehicle.cpp AP_Vehicle::send_watchdog_reset_statustext() · Open in ArduPilot Copter-4.7.1