I have an own pcb with the MKM34 on it. My software is running well so now I want to implement the WDOG. However, I found out that after a power on reset the WDOG behaves different to what I expected with the default settings described in the manual.
According to the reset values the WDOG is enabled with the clock source from LPO and a timeout value of 0x4C4B40 which should be a timeout of 83 minutes.
But with this small piece of code which is executed immedeately after reset without any other code in between I found out that the WDOG generates a reset 200 µs after power on reset.
// configure Port B3 as output
SIM->SCGC5 |= SIM_SCGC5_PORTB_MASK;
PORTB->PCR = 0x100;
GPIOB->PDDR |= 0x8;
// set Port B3
GPIOB->PSOR |= 0x8;
while (TRUE) ;
I confirmed that it is really a WDOG by setting port B3 only if RCM_SSRS0_SWDOG_MASK was set.
Does anybody have an explanation for this?