SWT_0 on MPC5746C is not doing the reset

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

SWT_0 on MPC5746C is not doing the reset

1,026 Views
medhedibasly
Contributor III

Hello,

I'm currently working on the internal watchdog timer, iwant to perform an internal reset request when timeout is reached.

i configured my SWT_0 as follows:

// Unlock SW configuration bits
SWT_0.SR.B.WSC = 0xC520;
SWT_0.SR.B.WSC = 0xD928;

// Wait for soft-lock bit to be cleared

while (SWT_0.CR.B.SLK == 0x1);

// Write Timeout Period
SWT_0.TO.B.WTO = TimeOutValue; // 0x190

// Enable Internal WDG
SWT_0.CR.B.WEN = 1U;

i'm not doing a timeout reload on my code but the SWT_0 is not doing resets, am i missing some thing.

Thanks for help.

0 Kudos
4 Replies

845 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

The SWT is connected to FCCU directly and FCCU is connected to Reset module.

So if you want your SWT to perform reset make sure that FCCU is configured to do so.

See FCCU fault input table in reference manual and then make sure your fault is set to trigger reset in FCCU.

Peter

845 Views
medhedibasly
Contributor III

i Configured the FCCu to do a reset when SWT expires but no luck of getting this work.

/* Unlock configuration */
FCCU.TRANS_LOCK.B.TRANSKEY = 0xBC;

/* provide Config state key */
FCCU.CTRLK.R = 0x913756AF;

/* enter config state - OP1 */
FCCU.CTRL.R = 0x01;

/* Verify if state change was sucessful */
while (FCCU.CTRL.B.OPS != 0x03); //operation status successful

/* Configure FCCU to react on NCF with short reset */
FCCU.NCFS_CFG[0].B.NCFSC14 = 0x02;

//set up the NOMAL mode of FCCU
FCCU.CTRLK.R = 0x825A132B; //key for OP2
FCCU.CTRL.R = 0x02; //set the OP2 - set up FCCU into the NORMAL mode
while (FCCU.CTRL.B.OPS != 0x03); //operational status succesfull

am i missing somthing !?

0 Kudos

845 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

It looks OK, but you forget to enable fault 14.

That is necessary if you need your device to trigger action (reset) on SWT_0 timeout.

Set NCFE for fault 14.

Peter

845 Views
medhedibasly
Contributor III

Thanks, It worked ☺

0 Kudos