Hi jingpan,
This thread is old, this year the project changed and didn't need the watchdog anymore, but I started a new project and the problem came again.
In the new project I'm using a custom board based on MK66, MCUXpresso 11.0.0 and SDK 2.6 and Freertos 10.2.0.
I've made some further tests and I have some news: if I use the main function of your project, WDOG_Init() is executed with no problem. So I inserted the wdog init in different position of my code: it works until WDOG_Init() is called before the os start, but it doesn't work it's called at the beginning of the first task.
------------------------ This example works -------------------------------
void main( void )
{
...
xTaskCreate( ... ); //create first task
InitWDOG(); //init wdog
vTaskStartScheduler();
}
------------------------------------------------------------------------------------
------------------------ This example doesn't work -------------------------------
void main( void )
{
...
xTaskCreate( ... ); //create first task
vTaskStartScheduler();
}
void FirstTask( void * )
{
InitWDOG(); //init wdog
...
}
------------------------------------------------------------------------------------
Do you have any advice to test?
Many thanks
Biafra