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

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

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

1,291 Views
rafael_barbosa
Contributor IV

Hello,

 

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.

TEST:

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

mariuslucianandrei

abhishek.kumar@chassisbrakes.com

0 Kudos
1 Reply

1,102 Views
dumitru-daniel_
NXP Employee
NXP Employee

mariuslucianandrei

Can you please have a look over this scenario.

0 Kudos