Timer malfunction 9S12DP512

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timer malfunction 9S12DP512

Jump to solution
634 Views
astro_goto
Contributor III

My application also uses the Modulus system which generates an interrupt when downcounter reaches zero. The counter automatically reloads. This may or may not be related to the following problem.

 

The ECT_16B8C Block User Guide V01.02 states "When TFFCA bit in TSCR register is set, a read from an input capture channel ($10-$1F) will cause the corresponding channel flag CnF to be cleared".

 

The Timer oscillator in this application freeruns and is used for input capture interrupts.  If the TFFCA bit in TSCR1 is set to provide fast interrupt flag clearing on input capture, then the micro will hang up. A better solution, but which takes more time, is to clear the TFLG1 interrupt flag in the interrupt service routine.

 

Does anyone know if this is a defect in the chip?

Labels (1)
0 Kudos
1 Solution
433 Views
kef
Specialist I

When fast flag clear is set you can't clear timer flags and modulus down counter flag writing ones to flag bits. I guess this is your case. It's not eenough to clear timer flags reading capture registers you also need to read MCCNT to clear MCZF.

View solution in original post

0 Kudos
1 Reply
434 Views
kef
Specialist I

When fast flag clear is set you can't clear timer flags and modulus down counter flag writing ones to flag bits. I guess this is your case. It's not eenough to clear timer flags reading capture registers you also need to read MCCNT to clear MCZF.

0 Kudos