Hi,
I need to implement watchdog for my application. With reference to datasheet/ref manual of MPC5777C
i understand that software watchdog can be used for the same. The objective is to load a timer in case of any stuck or error due to some indefinite call of loop (mainly while) or any other segmentation faults. the timer configurable of any say 5-10 secs after that it shall try to clear or exit out of that or reset the entire system. The sw/application uses indefinite while loop and no OS. Can anyone suggest me how to proceed with implementation specific for mpc5777c.
Regards,
Vignesh
Hi,
Yes SWT is what you need. The implementation is very simple. Just configure desired timeout base of system clock source an in regular intervals update SWT Service Register (SWT_SR) before the counter expires.
If expire then interrupt or reset is performed on first timeout, on second only the reset.
SWT_A default it is enabled after reset. SWT_B is by default disabled.
Each core implements its own SWT.
Please read chapter 34.5 Functional description of reference manual for implementation hints.
You can also have a look at our example SW:
Example MPC5777C-PinToggleStationery GHS714
regards,
Peter