iMXRT1176 has a WDOG peripheral with a WCR register. Among its bits are the following (according to Reference Manual IMXRT1170RM, Rev. 2, 06/2023):
WDZST: Watchdog Low Power [...]
0 - Continue timer operation (Default).
1 - Suspend the watchdog timer.
WDBG: Watchdog DEBUG Enable. [...]
0 - Continue WDOG timer operation (Default).
1 - Suspend the watchdog timer.
WDW: Watchdog Disable for Wait. [...]
0 - Continue WDOG timer operation (Default).
1 - Suspend WDOG timer operation.
So, these bit are "set to 1 to freeze the WDOG counter", which is in line with the "Watchdog Disable for Wait" description, but it's the opposite of what "Watchdog DEBUG Enable" suggests.
In "Config Tools | Peripherals | Peripheral drivers (Device specific) | WDOG | Watchdog configuration | Work mode", these bits are described as:
Enabled in wait mode
Enabled in stop mode
Enabled in debug mode
Which again is exactly the opposite of what they are supposed to do (at least according to the RM).
The SDK has this data structure:
typedef struct _wdog_work_mode
{
bool enableWait; /*!< continue or suspend WDOG in wait mode */
bool enableStop; /*!< continue or suspend WDOG in stop mode */
bool enableDebug; /*!< continue or suspend WDOG in debug mode */
} wdog_work_mode_t;
again suggesting a behavior opposite to that of the RM.
What is the actual intended behavior for those bits? Is it actually "suspend the timer if the bit is 1"? In this case, Config Tools and SDK should be updated to use less confusing names; otherwise, the RM is wrong in its description of the bit values.
The RTWDOG peripheral has similar names, except that the RM seems to indicate an "enable the timer if the bit is 1" behavior, so in this case RM/ConfigTools/SDK seem to be all consistent.
For instance, in the CS register:
DBG: Debug Enable [...]
0 - Watchdog disabled in chip debug mode.
1 - Watchdog enabled in chip debug mode.
Is this the intended behavior for RTWDOG (i.e. the opposite of that of WDOG)?
I'm using:
iMXRT1176 chip
Config Tools integrated in MCUXpresso IDE v11.7.0 [Build 9198] [2023-01-17]
SDK 2.13.1