Dears:
Could you kindly help to check the below issue? Could you kindly help give some advice?
Customer recently found that the TM4C1294 chip crash probability increased when the system was powered on. Our previous practice was to turn on the watchdog during the system initialization phase. After the power-on, start to enter the main loop, close the watchdog. Before, it was able to power on normally. Now there is a crash. We initially thought it happened after closing the watchdog. Because we no longer close the watchdog, although there is still a crash, we can reset it ourselves. Restart. But before we shut down the watchdog, it actually took up to 30 seconds, so it is reasonable to have such a long buffer time, the impact of the starting current and other factors should be no longer.
At power-on, if the system does not crash, the system will never crash, so we believe that the crash should be related to power-on.
This kind of crash, after testing, we think that the MCU hardware crashes, instead of the program running away, enters an infinite loop, that is to say, the MCU stops working and no longer executes the instructions. Because we found that after opening the internal watchdog, the system will not reset even if the dog is not executed. The system will reset if the MCU stops executing the command (by debugging).
We are always turning on the watchdog, although there is still a boot failure, but it can reset itself after the crash.
During the test of the watchdog, we found that after opening the watchdog, the dog does not perform the operation, for example, the code that artificially makes it enter the endless loop, the system will not reset, only the execution of the instruction is stopped. Will reset, we want to implement, is this phenomenon normal.
Open watchdog code:
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG1);
IntEnable(INT_WATCHDOG);
WatchdogReloadSet(WATCHDOG1_BASE, wdgtime);
WatchdogResetEnable(WATCHDOG1_BASE);
WatchdogEnable(WATCHDOG1_BASE);
Closed Code:
WatchdogIntClear(WATCHDOG1_BASE);
IntDisable(INT_WATCHDOG);
WatchdogResetDisable(WATCHDOG1_BASE);
Feed the dog code:
WatchdogReloadSet(WATCHDOG1_BASE, wdgtime);
And we found that even if the code to close the watchdog is executed, if the code for feeding the dog still exists, it will reset itself after the crash.