MPC5744p SWT reset flag

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5744p SWT reset flag

737 Views
jefferson_ll
Contributor III

Hi,

 

I have asked SWT (software watchdog timer) a few months ago.

 

Now there is another question happened about SWT reset flag.

 

In my application needs to check SWT reset flag after system startup.

 

Does there exist an easy method to accomplish?

Labels (1)
Tags (2)
2 Replies

418 Views
petervlna
NXP Employee
NXP Employee

Hi,

There is no direct flag for SWT reset.
SWT reset is reported via FCCU into RGM. Depending on setting of reset reaction on SWT in FCCU, you can read in RGM flags (FCCU_soft and FCCU_hard).
If the reset was triggered by FCCU then you must evaluate FCCU NCFS status register in order to verify if the SWT fault triggered reset.

FCCU - fault collecting and control unit
RGM - reset generation module

Peter

418 Views
jefferson_ll
Contributor III

Hi Peter,

Thanks for your reply.

According to your suggestion, I have read FCCU.NCF_S[0~2].R after swt reset happened but always get 0.

The reading steps as following:

void main(void)
{
xcptn_xmpl (); /* Configure and Enable Interrupts */
Sys_Init();
#if ( SWT_DEBUG == ON )


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

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

/* enter config state - OP10 */
FCCU.CTRL.R = 0xA;

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

ntemp = FCCU.NCF_S[0].R ;
Drv_Cprintf("SWT1 0x%X \r\n", ntemp );

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

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

/* enter config state - OP10 */
FCCU.CTRL.R = 0xA;

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

ntemp = FCCU.NCF_S[1].R
Drv_Cprintf("SWT2 0x%X \r\n", ntemp );

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

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

/* enter config state - OP10 */
FCCU.CTRL.R = 0xA;

/* Verify if state change was sucessful */
while (FCCU.CTRL.B.OPS != 0x3); //operation status successful
#endif
ntemp = FCCU.NCF_S[2].R ;
Drv_Cprintf("SWT3 0x%X \r\n", ntemp );

Drv_Cprintf("RGM_FES 0x%X \r\n", MC_RGM.FES.R );


FCCU_clear_faults();
FCCU_Init();
SWT_Init();
while(1);
}


Could you please give me sample code or flow?

0 Kudos