How can i clear RESET STATUS BITS in RSTSTAT REG

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Mmmmmm
Level 3
Level 3
50 sign-ins 25 sign-ins 25 replies posted

How can i clear RESET STATUS BITS in RSTSTAT REG which it (rh) bits , and the only bits can i clear those which mentioned in photoScreenshot 2022-12-21 015127.png

Screenshot 2022-12-21 015524.png

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

 

IFX_INLINE void IfxScuRcu_clearColdResetStatus(void)
{
    uint16 password;

    password = IfxScuWdt_getCpuWatchdogPasswordInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()]);
    IfxScuWdt_clearCpuEndinitInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()], password);
    /* Clear Cold Reset status */
    MODULE_SCU.RSTCON2.B.CLRC = 1U;
    IfxScuWdt_setCpuEndinitInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()], password);
}

 

Please refer to above code sample for clear RSTCON2.CLRC

View solution in original post

0 Likes
3 Replies
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

 

IFX_INLINE void IfxScuRcu_clearColdResetStatus(void)
{
    uint16 password;

    password = IfxScuWdt_getCpuWatchdogPasswordInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()]);
    IfxScuWdt_clearCpuEndinitInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()], password);
    /* Clear Cold Reset status */
    MODULE_SCU.RSTCON2.B.CLRC = 1U;
    IfxScuWdt_setCpuEndinitInline(&MODULE_SCU.WDTCPU[IfxCpu_getCoreIndex()], password);
}

 

Please refer to above code sample for clear RSTCON2.CLRC

0 Likes
Mmmmmm
Level 3
Level 3
50 sign-ins 25 sign-ins 25 replies posted

this bit to clear only status bits for cold reset what about the other status bits ?

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Please refer to RSTCON2 in user manual.

0 Likes