to the CNT register. Both methods must occur before the WDG timeout; otherwise, the
watchdog resets the MCU.
Note
Before starting the refresh sequence, disable the global
interrupts. Otherwise, an interrupt could effectively invalidate
the refresh sequence, if the interrupt occurs before the refresh
writes finish. After the sequence finishes, restore the global
interrupt control state.
The example codes can be found at the end of this chapter.
Configuring the Watchdog
21.4.3.1 Configuring the Watchdog Once
All watchdog control bits, timeout value, and window value are write-once after
reset . This means that after a write has occurred they cannot be changed unless a
reset occurs. This is guaranteed by the user configuring the window and timeout value
first, followed by the other control bits, and ensuring that CS[UPDATE] is also set to 0.
This provides a robust mechanism to configure the watchdog and ensure that a runaway
condition cannot mistakenly disable or modify the watchdog configuration after
configured.
The new configuration takes effect only after all registers except CNT are written after
reset. Otherwise, the WDOG uses the reset values by default. If window mode is not used
(CS[WIN] is 0), writing to WIN is not required to make the new configuration take
effect.
21.4.3.2 Reconfiguring the Watchdog
In some cases (like when supporting a bootloader function), you may want to reconfigure
or disable the watchdog, without forcing a reset first.
• By setting CS[UPDATE] to 1 on the initial configuration of the watchdog after a
reset, you can reconfigure the watchdog at any time by executing an unlock
sequence.
• Conversely, if CS[UPDATE] remains 0, the only way to reconfigure the watchdog is
by initiating a reset.
The unlock sequence is similar to the refresh sequence but uses different values.
21.4.3
Configuring the Watchdog
MWCT101xS Series Reference Manual, Rev. 3, 07/2019
466
NXP Semiconductors
Summary of Contents for MWCT101 S Series
Page 2: ...MWCT101xS Series Reference Manual Rev 3 07 2019 2 NXP Semiconductors...
Page 42: ...MWCT101xS Series Reference Manual Rev 3 07 2019 42 NXP Semiconductors...
Page 50: ...Conventions MWCT101xS Series Reference Manual Rev 3 07 2019 50 NXP Semiconductors...
Page 70: ...Aliased bit band regions MWCT101xS Series Reference Manual Rev 3 07 2019 70 NXP Semiconductors...
Page 78: ...Pinout diagrams MWCT101xS Series Reference Manual Rev 3 07 2019 78 NXP Semiconductors...
Page 96: ...WCT101xS safety concept MWCT101xS Series Reference Manual Rev 3 07 2019 96 NXP Semiconductors...
Page 130: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 130 NXP Semiconductors...
Page 284: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 284 NXP Semiconductors...
Page 430: ...Functional Description MWCT101xS Series Reference Manual Rev 3 07 2019 430 NXP Semiconductors...
Page 472: ...Application Information MWCT101xS Series Reference Manual Rev 3 07 2019 472 NXP Semiconductors...
Page 528: ...Module clocks MWCT101xS Series Reference Manual Rev 3 07 2019 528 NXP Semiconductors...
Page 634: ...SRAM configuration MWCT101xS Series Reference Manual Rev 3 07 2019 634 NXP Semiconductors...
Page 818: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 818 NXP Semiconductors...
Page 960: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 960 NXP Semiconductors...
Page 992: ...ADC calibration scheme MWCT101xS Series Reference Manual Rev 3 07 2019 992 NXP Semiconductors...
Page 1348: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1348 NXP Semiconductors...
Page 1366: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1366 NXP Semiconductors...
Page 1514: ...Functional description MWCT101xS Series Reference Manual Rev 3 07 2019 1514 NXP Semiconductors...
Page 1726: ...Debug and security MWCT101xS Series Reference Manual Rev 3 07 2019 1726 NXP Semiconductors...
Page 1760: ...MWCT101xS Series Reference Manual Rev 3 07 2019 1760 NXP Semiconductors...