Hi Alice, et al.,
I have been working with the KDS1.1.1+KSDK1.0.0 wdog_reset_frdmk64f120m example.
It does a good job of resetting the device when the WDOG times out do to lack of refresh (i.e. kicking the dog).
What I seem to not be able to do is generate a watchdog ISR.
After setting up the NVIC and WDOG to enable interrupt, I can issue a software generated interrupt to the WDOG isr using the STIR register.
But I cannot every see the WDOG isr fire. But I do get a device reset.
If you or anyone else would like to play with the project, I'm attaching it with extra files I modified in the platform code to allow software to configure the WDOG for interrupt mode (it was hard coded to have WDOG interrupt disabled).
Here are notes I took as well.
Looking at the ksdk_platform_lib_K64F12 project the system_MK64F12.h header has the following at line 100:
#define DISABLE_WDOG 1 //DES 1=WDOG is disabled, 0=WDOG is enabled. WDOG can be enabled in application code to over ride this setting.
Also in the platform code is fsl_wdog_driver.c that by default sets the WDOG interrupt to the disabled state at line 107.
wdogCommonConfig.commonConfig.interruptEnable = (uint8_t)false; //DES not sure why this is hard-coded this way...
In the hello_world_frdmk64f120m example code the system_MK64F12.c has code to disable the WDOG based on the DISABLE_WDOG #define.
Lastly, with the DISABLE_WDOG in the default state, I was able to load the wdog_reset_frdmk64f120m project without any issue. Then I noticed that it is not using the WDOG interrupt.
I've updated my line 107 code above with the following to allow my application to control the interrupt enable rather than have it hard-coded.
wdogCommonConfig.commonConfig.interruptEnable = (uint8_t)false; //DES not sure why this is hard-coded this way...
I've also tried getting the WDOG ISR to fire in MQX for TWR-K60D100M and TWR-K70F120M unsuccessfully.
Regards,
David