I'm using an MK10MK10DN512LVQ10 with the SDK v2.2.0 in Mcuxpresso 11.3.0
I'm having problems with the watchdog module. I don't know if it is the configuration or what is really happening. I added the watchdog peripheral driver and I have the following configuration for it:

The generated code for initializing it looks like this:
const wdog_config_t Watchdog_config = {
.clockSource = kWDOG_LpoClockSource,
.prescaler = kWDOG_ClockPrescalerDivide1,
.timeoutValue = 1000UL,
.enableWindowMode = false,
.windowValue = 0UL,
.enableUpdate = true,
.enableWdog = true,
.workMode = {
.enableWait = true,
.enableStop = false,
.enableDebug = false
},
.enableInterrupt = false
};
static void Watchdog_init(void) {
/* WDOG peripheral initialization */
WDOG_Init(WATCHDOG_PERIPHERAL, &Watchdog_config);
}
The code is executing that initialization correctly.
I have the following in main:
int main(void)
{
if (RCM_GetPreviousResetSources(RCM) & kRCM_SourceWdog)
{
while (1);
}
/* Init board hardware. */
BOARD_InitBootPins ();
BOARD_InitBootClocks ();
BOARD_InitBootPeripherals ();
#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL
/* Init FSL debug console. */
BOARD_InitDebugConsole ();
#endif
PRINTF ("Hello World\n");
/* Force the counter to be placed into memory. */
volatile static int i = 0;
/* Enter an infinite loop, just incrementing a counter. */
while (1)
{
WDOG_Refresh(WATCHDOG_PERIPHERAL);
i++;
/* 'Dummy' NOP to allow source level single stepping of
tight while() loop */
__asm volatile ("nop");
}
return 0;
}
I let the code run and put a breakpoint inside the if (RCM_GetPreviousResetSources(RCM) & kRCM_SourceWdog) then after 1 second, which is my watchdog timeout, the execution hits my breakpoint despite calling WDOG_Refresh(WATCHDOG_PERIPHERAL); inside the while loop.
Also, I can verify that the watchdog timed out by looking at the peripheral view:

I also noticed that the watchdog value is not changing when running the code. It stays at 0x3e8 (1000) all the time.

But that doesn't make sense, shouldn't it be decrementing and then resetting the board when it reaches 0? Or does that register only holds the value that the watchdog timer references to?
What am I missing?