Watchdog Timer
1. Overview
The watchdog monitors system/software faults. If the watchdog is not fed before timeout, it resets the system.
See: WDT Driver Guide
Note
Only one WDT hardware instance exists and is managed on CP—configure
cp/middleware/soc/bk7258/bk7258.defconfig.Feeding occurs on CP; missing a timeout triggers reset.
AP lacks WDT—it is monitored via inter-core heartbeat.
AP applications may reboot via
bk_reboot.
2. Code Path
CLI:
components/bk_cli/cli_wdt.cDriver:
ap/middleware/driver/wdt/wdt_driver.cAPI reference: WDT API
3. Configuration
Macros such as CONFIG_INT_WDT (hardware watchdog), period settings, CONFIG_TASK_WDT (software watchdog), and CONFIG_NMI_WDT_EN.
4. CLI Commands
Command |
Param |
Description |
|---|---|---|
|
none |
Initialize or release driver resources |
|
start watchdog |
Start the watchdog with the configured timeout |
|
stop watchdog |
Stop the watchdog |
|
feed watchdog |
Feed the watchdog |
|
enable/disable |
Enable or disable watchdog debug output |
|
loop feeding test |
Continuously feed the watchdog in a loop |
5. Demo
Example sequence:
wdt start 1000wdt feedwdt stopwdt enable(debug)wdt disable
CLI logs show start/feed/stop actions.