AnsweredAssumed Answered

Why clearing RTIF bit will cause PORF, LVRF bit cleared also for S12 MCU?

Question asked by dp h on Nov 17, 2014
Latest reply on Nov 19, 2014 by dp h

Hello, I found a strange problem on S12G also on S12XE MCU. In our bootloader code, it will clear the RTIF bit (CPMUFLG_RTIF on S12G, CRGFLG_RTIF on S12XE), but I found other bits in the register also were cleared. PORF is used for power on reset judgement in my code, it can't be scratched.

 

My code is below:

S12G128 MCU:

CPMUFLG_RTIF = 1   // after this code, PORF is cleared.

 

S12XE256 MCU

CRGFLG_RTIF = 1     // after this code, PORF is cleared.

 

But if the code is as below, the PORF bit was not affected.

CPMUFLG = ~(U8)CPMUFLG_PORF_MASK;        /* Clear CMPMU int flags - not needed but good practice */

Outcomes