cancel
Showing results for 
Search instead for 
Did you mean: 

Software Watchdog Timer does not perform reset in SPC58

Farah
Associate

I configured the SWT to Generate an interrupt on an initial time-out, reset on a second consecutive time-out.

The interrupt is well raised on the initial time-out.

The problem is that the reset is not occurred in the next time-out.

here the initialisation sequence of SWT :

/* Disable Software Lock */

SWT_2->SR.B.WSC = 0xC520U;

SWT_2->SR.B.WSC = 0xD928U;

 

/* Wait until Software Lock is disabled */

while (1U == SWT_2->CR.B.SLK) {/* Empty while */}

 

/* disable the SWT */

SWT_2->CR.B.WEN = 0U;

 

SWT_2->CR.B.FRZ = 0U;

SWT_2->CR.B.SMD = 0U;

SWT_2->CR.B.WND = 0U;

SWT_2->CR.B.STP = 1U;

SWT_2->CR.B.RIA = 0U;

SWT_2->IR.B.TIF = 1U;

SWT_2->TO.B.WTO = 0x00088B80U;

 

/* Enable the SWT */

SWT_2->CR.B.WEN = 1U;

 

I tried also Generate a reset on a time-out(without interrupt) but also the CPU does not reset

PS: To have the time out I'm in empty while(1) {};

 

I missed something in configuration ? Thank you for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Farah
Associate

Issue resolved by configuring FCCU to request a functional  reset when the SWT2 triggers the fault 18 to the
FCCU by code below :

 

/* enter the CONFIG mode */
FCCU.TRANS_LOCK.R = 0x000000BCU; /* write the TRANSKEY */
/* configure the CONFIG timeout */
FCCU.CFG_TO.R = 0x00000006U;
FCCU.CTRLK.R = 0x913756AFU; /* key for OPERATION 1 */
/* set the FCCU into the CONFIG state OP1 */
FCCU.CTRL.R = 0x00000001U;
/* wait for operation finalization */
while (FCCU.CTRL.B.OPS != FCCU_OPS_SUCCESS);
/* enable HW recoverable fault to generate Reset on SWT_2 fault */
FCCU.RF_CFG[0].B.RFC18 = 0x0U;
/* long Functional Reset as reaction to the SWT_2 refresh fault */
FCCU.RFS_CFG[1].B.RFSC2 = 0x2U;
/* move to FAULT state when SWT_2 expires to generate Reset */
FCCU.RF_E[0].B.RFE18 = 0x1U;
/* enter back to the NORMAL mode */
FCCU.CTRLK.R = 0x825A132BU; /* key for OPERATION 2 */
/* set the FCCU into the NORMAL state OP2 */
FCCU.CTRL.R = 0x00000002U;
/* wait for operation finalization */
while (FCCU.CTRL.B.OPS != FCCU_OPS_SUCCESS);

 

View solution in original post

1 REPLY 1
Farah
Associate

Issue resolved by configuring FCCU to request a functional  reset when the SWT2 triggers the fault 18 to the
FCCU by code below :

 

/* enter the CONFIG mode */
FCCU.TRANS_LOCK.R = 0x000000BCU; /* write the TRANSKEY */
/* configure the CONFIG timeout */
FCCU.CFG_TO.R = 0x00000006U;
FCCU.CTRLK.R = 0x913756AFU; /* key for OPERATION 1 */
/* set the FCCU into the CONFIG state OP1 */
FCCU.CTRL.R = 0x00000001U;
/* wait for operation finalization */
while (FCCU.CTRL.B.OPS != FCCU_OPS_SUCCESS);
/* enable HW recoverable fault to generate Reset on SWT_2 fault */
FCCU.RF_CFG[0].B.RFC18 = 0x0U;
/* long Functional Reset as reaction to the SWT_2 refresh fault */
FCCU.RFS_CFG[1].B.RFSC2 = 0x2U;
/* move to FAULT state when SWT_2 expires to generate Reset */
FCCU.RF_E[0].B.RFE18 = 0x1U;
/* enter back to the NORMAL mode */
FCCU.CTRLK.R = 0x825A132BU; /* key for OPERATION 2 */
/* set the FCCU into the NORMAL state OP2 */
FCCU.CTRL.R = 0x00000002U;
/* wait for operation finalization */
while (FCCU.CTRL.B.OPS != FCCU_OPS_SUCCESS);