AnsweredAssumed Answered

How to enable the software watchdog timer (SWT) properly - MBD toolbox - MPC5744P?

Question asked by Rafael Castro Barbosa on Nov 25, 2019
Latest reply on Feb 10, 2020 by dumitru-daniel.popa



I am using the Devkit MPC5744P and the Model Based Design Toolbox 3.0.0.


I am trying to use the SWT, but aparently the device is not recovering after going to the reset state.
First I initialize the SWT_0_CR register with the default values.
After the FCCU configuration is performed (going to the config state, enabling the NCFS_CFG0 register field in order to reset the micro in case of watchdog timeout, and finally putting the micro back to the normal mode).

Also I am configuring the SWT_0 registers.


Attached follows the example model and the freemaster file where I would expect the watchdog timer to work out.


Please consider the model inputs SWT_0_CR_WEN and DisableWdgCounter as stated below:


SWT_0_CR_WEN = 0 ---> Disabled WDT

SWT_0_CR_WEN = 1 ---> Enabled WDT

DisableWdgCounter = 0 ---> WDT reset counter before the timeout

DisableWdgCounter = 1 ---> Disable the counter, it means that the watchdog interrupt triggers if SWT_0_CR_WEN==1.



First, enable the SWT_0_CR_WEN input.

After, make DisableWdgCounter = 1 (Disable the counter).


Expected RESULT:

The microcontroller reset, input reset and leds blinking.


Current RESULT:

The microcontroller is going to a reset or off state and stucks there. No leds blinking and no serial communication.



Can you look this example and support me on how to make the WDT works properly?



Regards, Rafael


Marius-lucian Andrei

Abhishek Kumar