AnsweredAssumed Answered

Initialization of Software Watchdog Timer in MPC5748G failed!

Question asked by Shuo Hou on Mar 30, 2016
Latest reply on Jul 16, 2018 by Dhiraj Bennadi

     Here is my SWT initialization code, which cannot run correctly. I don't know if my code is correct. Anyone can help me?

void SWT_Init(void)

{

    SWT_0_CR &= ~SWT_CR_WEN_MASK;         /* disable SWT */

    SWT_0_SR = 0xC520;                                        /* unlock SWT */

    SWT_0_SR = 0xD928;

    SWT_0_TO = 0x0000FFFF;                               /* timeout */

    SWT_0_CR &= ~SWT_CR_FRZ_MASK;          /* enable SWT in debug mode */

    SWT_0_CR |= SWT_CR_WEN_MASK;            /* enable SWT */

}

Outcomes