WDT — Watchdog timer

A countdown watchdog timer using the low-frequency clock source (LFCLK) offers configurable and robust protection against application lock-up.

The watchdog timer is started by triggering the START task.

The watchdog can be paused during long CPU sleep periods for low power applications and when the debugger has halted the CPU. The watchdog is implemented as a down-counter that generates a TIMEOUT event when it wraps over after counting down to 0. When the watchdog timer is started through the START task, the watchdog counter is loaded with the value specified in the CRV register. This counter is also reloaded with the value specified in the CRV register when a reload request is granted.

The watchdog’s timeout period is given by the following equation:


      timeout [s] = ( CRV + 1 ) / 32768
    

When started, the watchdog will automatically force the 32.768 kHz RC oscillator on as long as no other 32.768 kHz clock source is running and generating the 32.768 kHz system clock, see chapter CLOCK — Clock control.

Reload criteria

The watchdog has eight separate reload request registers, which shall be used to request the watchdog to reload its counter with the value specified in the CRV register. To reload the watchdog counter, the special value 0x6E524635 needs to be written to all enabled reload registers.

One or more RR registers can be individually enabled through the RREN register.

Temporarily pausing the watchdog

By default, the watchdog will be active counting down the down-counter while the CPU is sleeping and when it is halted by the debugger. It is possible to configure the watchdog to automatically pause while the CPU is sleeping as well as when it is halted by the debugger.

Watchdog reset

A TIMEOUT event will automatically lead to a watchdog reset.

See Reset for more information about reset sources. If the watchdog is configured to generate an interrupt on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending watchdog reset will always be effectuated.

The watchdog must be configured before it is started. After it is started, the watchdog’s configuration registers, which comprise registers CRV, RREN, and CONFIG, will be blocked for further configuration.

The watchdog can be reset from several reset sources, see Reset behavior.

When the device starts running again, after a reset, or waking up from OFF mode, the watchdog configuration registers will be available for configuration again.

Registers

Instances

InstanceBase addressDescription
WDT0x40010000Watchdog timer

Register overview

RegisterOffsetDescription
TASKS_START0x000Start the watchdog
EVENTS_TIMEOUT0x100Watchdog timeout
INTENSET0x304Enable interrupt
INTENCLR0x308Disable interrupt
RUNSTATUS0x400Run status
REQSTATUS0x404Request status
CRV0x504Counter reload value
RREN0x508Enable register for reload request registers
CONFIG0x50CConfiguration register
RR[0]0x600Reload request 0
RR[1]0x604Reload request 1
RR[2]0x608Reload request 2
RR[3]0x60CReload request 3
RR[4]0x610Reload request 4
RR[5]0x614Reload request 5
RR[6]0x618Reload request 6
RR[7]0x61CReload request 7

TASKS_START

Address offset: 0x000

Start the watchdog

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWTASKS_STARTStart the watchdog
Trigger1Trigger task

EVENTS_TIMEOUT

Address offset: 0x100

Watchdog timeout

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWEVENTS_TIMEOUTWatchdog timeout
NotGenerated0Event not generated
Generated1Event generated

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWTIMEOUTWrite '1' to enable interrupt for event TIMEOUT
Set1Enable
Disabled0Read: Disabled
Enabled1Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARWTIMEOUTWrite '1' to disable interrupt for event TIMEOUT
Clear1Disable
Disabled0Read: Disabled
Enabled1Read: Enabled

RUNSTATUS

Address offset: 0x400

Run status

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
ARRUNSTATUSIndicates whether or not the watchdog is running
NotRunning0Watchdog not running
Running1Watchdog is running

REQSTATUS

Address offset: 0x404

Request status

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEDCBA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARRR0Request status for RR[0] register
DisabledOrRequested0RR[0] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[0] register is enabled, and is not yet requesting reload
BRRR1Request status for RR[1] register
DisabledOrRequested0RR[1] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[1] register is enabled, and is not yet requesting reload
CRRR2Request status for RR[2] register
DisabledOrRequested0RR[2] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[2] register is enabled, and is not yet requesting reload
DRRR3Request status for RR[3] register
DisabledOrRequested0RR[3] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[3] register is enabled, and is not yet requesting reload
ERRR4Request status for RR[4] register
DisabledOrRequested0RR[4] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[4] register is enabled, and is not yet requesting reload
FRRR5Request status for RR[5] register
DisabledOrRequested0RR[5] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[5] register is enabled, and is not yet requesting reload
GRRR6Request status for RR[6] register
DisabledOrRequested0RR[6] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[6] register is enabled, and is not yet requesting reload
HRRR7Request status for RR[7] register
DisabledOrRequested0RR[7] register is not enabled, or is already requesting reload
EnabledAndUnrequested1RR[7] register is enabled, and is not yet requesting reload

CRV

Address offset: 0x504

Counter reload value

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
ARWCRV[0xF..0xFFFFFFFF]Counter reload value in number of cycles of the 32.768 kHz clock

RREN

Address offset: 0x508

Enable register for reload request registers

Bit number313029282726252423222120191817161514131211109876543210
IDHGFEDCBA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARWRR0Enable or disable RR[0] register
Disabled0Disable RR[0] register
Enabled1Enable RR[0] register
BRWRR1Enable or disable RR[1] register
Disabled0Disable RR[1] register
Enabled1Enable RR[1] register
CRWRR2Enable or disable RR[2] register
Disabled0Disable RR[2] register
Enabled1Enable RR[2] register
DRWRR3Enable or disable RR[3] register
Disabled0Disable RR[3] register
Enabled1Enable RR[3] register
ERWRR4Enable or disable RR[4] register
Disabled0Disable RR[4] register
Enabled1Enable RR[4] register
FRWRR5Enable or disable RR[5] register
Disabled0Disable RR[5] register
Enabled1Enable RR[5] register
GRWRR6Enable or disable RR[6] register
Disabled0Disable RR[6] register
Enabled1Enable RR[6] register
HRWRR7Enable or disable RR[7] register
Disabled0Disable RR[7] register
Enabled1Enable RR[7] register

CONFIG

Address offset: 0x50C

Configuration register

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000100000000000000000000000000000001
IDR/WFieldValue IDValueDescription
ARWSLEEPConfigure the watchdog to either be paused, or kept running, while the CPU is sleeping
Pause0Pause watchdog while the CPU is sleeping
Run1Keep the watchdog running while the CPU is sleeping
BRWHALTConfigure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger
Pause0Pause watchdog while the CPU is halted by the debugger
Run1Keep the watchdog running while the CPU is halted by the debugger

RR[0]

Address offset: 0x600

Reload request 0

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[1]

Address offset: 0x604

Reload request 1

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[2]

Address offset: 0x608

Reload request 2

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[3]

Address offset: 0x60C

Reload request 3

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[4]

Address offset: 0x610

Reload request 4

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[5]

Address offset: 0x614

Reload request 5

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[6]

Address offset: 0x618

Reload request 6

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

RR[7]

Address offset: 0x61C

Reload request 7

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
AWRRReload request register
Reload0x6E524635Value to request a reload of the watchdog timer

Electrical specification

Watchdog Timer Electrical Specification

SymbolDescriptionMin.Typ.Max.Units
tWDTTime out interval458 µs36 h