IWDG is enabled by system firmware. It is also kicked in the system tick function. I have done some tests on P1 with system firmware V0.5.0, and it seems to me that the Kick works in system tick function only if the loop time is very short, for example do nothing. and if the execution time of loop is a little bit long, then IWDG reset.
My question is:
Why the kick in system tick does not work if the execution time in loop is long?
If kick is in system tick, so the IWDG is used to protect the system tick?
I also believe the IWDG is used as peakay123 described. There is a plan to expand the use in a future system firmware version to help reduce the need to include an external hardware watchdog, but I don’t know the specifics of how that will be implemented.
Independent watchdog (IWDG): the IWDG is started by writing to its Key register or by hardware option. Once started it cannot be stopped except by a Reset. See Section 17.3 in Section 17: Independent watchdog (IWDG).
So, again, if all this IWDG stuff is in YOUR application and you modified the system firmware (systick), then I’m not sure what your question is. What I can tell you is that if you don’t start the IWDG, it won’t run. Once you start it, the only way to stop it is with a reset, assuming you don’t start again in your application.
Yes, I think I can remove the IWDG from my application. Does the IWDG have any effect on the OTA firmware update? I mean IWDG enabled in my application helps to reset when my application firmware update fails. or this is taken cared of by the system firmware.
@JS2017, if IWDG is running in your application then it could interrupt OTA depending on how often you bump the IDWG. You may want to put the P1 into safe mode, bypassing your application so that the OTA can work without interference from the IWDG.
My application runs on P1 with sytem firmware V0.5.0. I removed the IDWG and even enabled the application watchdog and debug output. The P1 is frozen. My serial output and the Particle console output are as follows. At the same time:
1 My P1 LED does not change, solid cyan
2.the last message on the Particle Console shows that the device is offline
3. Serial output is frozen, my application loop ended perfectly, the system firmware did sock_send, but there is no read_packet_and_dispose calling like in the normal situation.