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:

AddressNameAccessDescription
0x0ALERT_TESTW-
0x4WKUP_CTRLRW-
0x8WKUP_THOLD_HIRW-
0xCWKUP_THOLD_LORW-
0x10WKUP_COUNT_HIRW-
0x14WKUP_COUNT_LORW-
0x18WDOG_REGWENRW-
0x1CWDOG_CTRLRW-
0x20WDOG_BARK_THOLDRW-
0x24WDOG_BITE_THOLDRW-
0x28WDOG_COUNTRW-
0x2CINTR_STATERW-
0x30INTR_TESTW-
0x34WKUP_CAUSERW-

Register Details:

ALERT_TEST

BitsFieldAccessResetDescription
31:1Reserved--Reserved
0fatal_faultW0x0Write 1 to trigger one alert event of this kind.

WKUP_CTRL

BitsFieldAccessResetDescription
31:13Reserved--Reserved
12:1prescalerRW0x0Pre-scaler value for wakeup timer count
0enableRW0x0When set to 1, the wakeup timer will count

WKUP_THOLD_HI

BitsFieldAccessResetDescription
31:0threshold_hiRW0x0The count at which a wakeup interrupt should be generated, top 32 bits.

WKUP_THOLD_LO

BitsFieldAccessResetDescription
31:0threshold_loRW0x0The count at which a wakeup interrupt should be generated, bottom 32 bits.

WKUP_COUNT_HI

BitsFieldAccessResetDescription
31:0count_hiRW0x0The current wakeup counter value, top 32 bits.

WKUP_COUNT_LO

BitsFieldAccessResetDescription
31:0count_loRW0x0The current wakeup counter value, bottom 32 bits.

WDOG_REGWEN

BitsFieldAccessResetDescription
31:1Reserved--Reserved
0regwenRW0C0x1Once cleared, the watchdog configuration will be locked until the next reset.

WDOG_CTRL

BitsFieldAccessResetDescription
31:2Reserved--Reserved
1pause_in_sleepRW0x0When set to 1, the watchdog timer will not count during sleep.
0enableRW0x0When set to 1, the watchdog timer will count.

WDOG_BARK_THOLD

BitsFieldAccessResetDescription
31:0thresholdRW0x0The count at which a watchdog bark interrupt should be generated.

WDOG_BITE_THOLD

BitsFieldAccessResetDescription
31:0thresholdRW0x0The count at which a watchdog bite reset should be generated.

WDOG_COUNT

BitsFieldAccessResetDescription
31:0countRW0x0The current watchdog counter value.

INTR_STATE

BitsFieldAccessResetDescription
31:2Reserved--Reserved
1wdog_timer_barkRW1C0x0Raised if the watchdog timer has hit the bark threshold.
0wkup_timer_expiredRW1C0x0Raised if the wakeup timer has hit the specified threshold.

INTR_TEST

BitsFieldAccessResetDescription
31:2Reserved--Reserved
1wdog_timer_barkW-Write 1 to force wdog_timer_bark interrupt.
0wkup_timer_expiredW-Write 1 to force wkup_timer_expired interrupt.

WKUP_CAUSE

BitsFieldAccessResetDescription
31:1Reserved--Reserved
0causeRW0C0x0AON timer requested wakeup, write 0 to clear.