Reg Watchdog implementation in mpc5777c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reg Watchdog implementation in mpc5777c

922 Views
vignesh_v
Contributor III

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

Labels (1)
0 Kudos
1 Reply

783 Views
petervlna
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

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

0 Kudos