AnsweredAssumed Answered

How to clear MCZF flag?

Question asked by li cang on Nov 10, 2010
Latest reply on Nov 10, 2010 by Daniel Lundin

MCU:9s12xep100.

I want to clear MCZF flag in ISR,just like here:

#pragma TRAP_PROC
void  
CPU_Modulus_Counter_ISR(void)
{
          ECT_MCFLG_MCZF = 1;//The first way to clear MCZF flag.
          // ECT_MCFLG &= 0x80;  //The second way to clear MCZF flag.

          //ECT_MCCNT = 0x30;//The third way to clear MCZF flag.

          ECT_MCCTL = 0x00;
}
I find that the first and the second can not clear MCZF flag,but only the third way can clear MCZF flag.

According to the datasheet,

"The flag indicates when interrupt conditions have occurred. The flag can be cleared via the normal flag clearing
mechanism (writing a one to the flag) or via the fast flag clearing mechanism (Reference TFFCA bit in
Section 14.3.2.6, “Timer System Control Register 1 (TSCR1)”).",this is to say we can clear it by  ECT_MCFLG_MCZF = 1;

I am  puzzled here,how to understand it?

Thanks.

 

 

Outcomes