RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches

Overview

Structs used by the driver.

Note
This is an example show how to instantiate WatchDog with watchdog_instance_t,
watchdog_heartbeat_t, and watchdog_hwreg_t.
#define WDG_0 ((watchdog_hwreg_t *)SYSTEM_WATCHDOG_CTRL)
// Hardware Register Map
.hwreg = WDG_0,
// Enable counter 0 to trigger first (interrupt)
// Enable counter 1 to trigger the hardware reset of the SoC (Handled outside the SoC)
.enable = {0x1U, 0x1U},
.prescaler = WATCHDOG_PRESCALER_CYCLE_PER_MS-1,
// The counter Limit 0 -> Set Limit Value for counter 0
// The counter Limit 1 -> Set Limit Value for counter 1
.counterLimit = {WATCHDOG_TIMEOUT_MS, 2*WATCHDOG_TIMEOUT_MS},
// Heartbeat Config: WDG_TIMER_CLEAR, WDG_TIMER_UNLOCK , WDG_TIMER_LOCK
.heartbeat = 0x0U,
};
void watchdog_applyConfig(watchdog_instance_t *inst)
Apply the software configuration to the hardware.
Definition watchdog.c:81
Watchdog instance. Holds the software registers and hardware pointer.
Definition watchdog.h:175

Data Structures

struct  watchdog_hwreg_t
 Watchdog hardware register map. More...
struct  watchdog_instance_t
 Watchdog instance. Holds the software registers and hardware pointer. More...