Open Zaltora opened 6 years ago
Perhaps the function sdk_wdt_init()
in app_main.c
would give some clues. There is a hardware wdt and one of the mac timers is used for a soft wdt. Perhaps the following keep both fed:
WDT.FEED = WDT_FEED_MAGIC;
sdk_wDev_MacTim1Arm(1600000);
it did not work. I added these two lines in the loop and add the include. FreeRTOS must do it with the idle task or the tick hook. I did not find where exactly FreeRTOS manages the watchdog.
FreeRTOS does not appear to have anything to do with the wdt. The wdt appears to be fed from the wifi binary, the soft wdt from the mac counter. Perhaps the wifi layer is failing and hitting some assertion, e.g. if the NMI is disabled for too long it asserts. Perhaps try some of the following:
WDT.CTRL &= ~WDT_CTRL_ENABLE;
DPORT.INT_ENABLE &= ~DPORT_INT_ENABLE_WDT;
pp_soft_wdt_count = 0;
i try this without succes:
while(1)
{
WDT.FEED = WDT_FEED_MAGIC;
sdk_wDev_MacTim1Arm(1600000);
sdk_pp_soft_wdt_feed();
WDT.CTRL &= ~WDT_CTRL_ENABLE;
DPORT.INT_ENABLE &= ~DPORT_INT_ENABLE_WDT;
//pp_soft_wdt_count = 0;
}
pp_soft_wdt_count seem unknow ?
Is not FreeRTOS taking care of the watchdog? How can the wifi binary take the hand to reset the watchdog? I assumed that FreeRTOS was doing it because when I did a task without delay, it reboot.
PS: And it is reboot (wdt rst) when you disable all RTOS task.
PS2: the code above make the system break;
while(1)
{
// WDT.FEED = WDT_FEED_MAGIC;
// sdk_wDev_MacTim1Arm(1600000);
// sdk_pp_soft_wdt_feed();
WDT.CTRL &= ~WDT_CTRL_ENABLE;
DPORT.INT_ENABLE &= ~DPORT_INT_ENABLE_WDT;
//pp_soft_wdt_count = 0;
}
don't work too. Automatic reset after some seconds
i will try to enter in deep sleep mode to work around the problem. I hope the gpio16 pin does not change state during the transition. (state: 0 logic)
Did you find a way to stop
This issue has been resolved because flash SPI speed
How can i stop watchdog or feed him in a infinite loop ?
I want shutdown my device properly. In a function, i suspend FreeRTOS, set some level pin and i want finish by a infinite loop until the device is off.