Watchdog Timer (WDT)
The Watchdog timer is a component used to enhance reliability and ensure that the system is notified if the SEP subsystem is ``hanging''. The SEP CPU must periodically visit the WDT and reset its counter, proving that the CPU is still alive and well i.e. not hanging. If the WDT timer counts up to its bark threshold it fires an external interrupt, and if it counts up to its bite threshold it requests a reset, both indicating a timeout has expired and there is a problem within the SEP.
1. Bus Interface
The sep_wdt_wrap module integrates the OpenTitan aon_timer IP as the watchdog timer. The 64-bit AXI slave port from the system crossbar is narrowed to 32-bit AXI through an axi_dw_converter. The address path subtracts the WDT base address so that the internal TL-UL decoder sees zero-based offsets. After axi_to_axi_lite and axi_lite_to_tlul conversion, the TL-UL bus drives the standard aon_timer register block.
2. Clock, Reset, and Debug Behavior
The wrapper provides a dedicated watchdog clock input (clk_wdt_i) that is synchronized through a prim_sync_reset to produce the rst_aon_ni reset for the always-on timer domain. The wdt_debug_sleep_mode_i input controls whether the timer continues to count during debug halt. Life-cycle escalation is tied to its inactive state. Alert receivers are initialized to the idle encoding to avoid spurious integrity errors; alert outputs are left unconnected since the SEP aggregates watchdog events through the interrupt path.
3. Bark Interrupt and Bite Reset
The wrapper exports two signals: intr_wdog_timer_bark_o, the watchdog bark interrupt that fires when the first timeout stage expires, and wdt_timer_rst_req_o, the bite reset request that fires when the second timeout stage expires and the system failed to respond to the bark.
4. Programming Reference
Consult the OpenTitan Always-On Timer documentation for the authoritative core functionality of the IP. The Programmer’s Guide gives the programming guidance for this block. The register map follows below.
5. Memory Map and Register Reference
5.1. Memory Map
Register offsets are relative to the block base in the subsystem memory map. The detailed map below defines each register and its fields.
5.2. Detailed Register Map
Always-On Timer
Wakeup and watchdog timers running on a low-power, always-on clock
Register List:
| Address | Name | Access | Description |
|---|---|---|---|
| 0x0 | ALERT_TEST | W | - |
| 0x4 | WKUP_CTRL | RW | - |
| 0x8 | WKUP_THOLD_HI | RW | - |
| 0xC | WKUP_THOLD_LO | RW | - |
| 0x10 | WKUP_COUNT_HI | RW | - |
| 0x14 | WKUP_COUNT_LO | RW | - |
| 0x18 | WDOG_REGWEN | RW | - |
| 0x1C | WDOG_CTRL | RW | - |
| 0x20 | WDOG_BARK_THOLD | RW | - |
| 0x24 | WDOG_BITE_THOLD | RW | - |
| 0x28 | WDOG_COUNT | RW | - |
| 0x2C | INTR_STATE | RW | - |
| 0x30 | INTR_TEST | W | - |
| 0x34 | WKUP_CAUSE | RW | - |
Register Details:
ALERT_TEST
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:1 | Reserved | - | - | Reserved |
| 0 | fatal_fault | W | 0x0 | Write 1 to trigger one alert event of this kind. |
WKUP_CTRL
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:13 | Reserved | - | - | Reserved |
| 12:1 | prescaler | RW | 0x0 | Pre-scaler value for wakeup timer count |
| 0 | enable | RW | 0x0 | When set to 1, the wakeup timer will count |
WKUP_THOLD_HI
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | threshold_hi | RW | 0x0 | The count at which a wakeup interrupt should be generated, top 32 bits. |
WKUP_THOLD_LO
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | threshold_lo | RW | 0x0 | The count at which a wakeup interrupt should be generated, bottom 32 bits. |
WKUP_COUNT_HI
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | count_hi | RW | 0x0 | The current wakeup counter value, top 32 bits. |
WKUP_COUNT_LO
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | count_lo | RW | 0x0 | The current wakeup counter value, bottom 32 bits. |
WDOG_REGWEN
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:1 | Reserved | - | - | Reserved |
| 0 | regwen | RW0C | 0x1 | Once cleared, the watchdog configuration will be locked until the next reset. |
WDOG_CTRL
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:2 | Reserved | - | - | Reserved |
| 1 | pause_in_sleep | RW | 0x0 | When set to 1, the watchdog timer will not count during sleep. |
| 0 | enable | RW | 0x0 | When set to 1, the watchdog timer will count. |
WDOG_BARK_THOLD
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | threshold | RW | 0x0 | The count at which a watchdog bark interrupt should be generated. |
WDOG_BITE_THOLD
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | threshold | RW | 0x0 | The count at which a watchdog bite reset should be generated. |
WDOG_COUNT
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:0 | count | RW | 0x0 | The current watchdog counter value. |
INTR_STATE
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:2 | Reserved | - | - | Reserved |
| 1 | wdog_timer_bark | RW1C | 0x0 | Raised if the watchdog timer has hit the bark threshold. |
| 0 | wkup_timer_expired | RW1C | 0x0 | Raised if the wakeup timer has hit the specified threshold. |
INTR_TEST
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:2 | Reserved | - | - | Reserved |
| 1 | wdog_timer_bark | W | - | Write 1 to force wdog_timer_bark interrupt. |
| 0 | wkup_timer_expired | W | - | Write 1 to force wkup_timer_expired interrupt. |
WKUP_CAUSE
| Bits | Field | Access | Reset | Description |
|---|---|---|---|---|
| 31:1 | Reserved | - | - | Reserved |
| 0 | cause | RW0C | 0x0 | AON timer requested wakeup, write 0 to clear. |