Timer malfunction 9S12DP512

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Timer malfunction 9S12DP512

ソリューションへジャンプ
1,169件の閲覧回数
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?

ラベル(1)
0 件の賞賛
返信
1 解決策
968件の閲覧回数
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 件の賞賛
返信
1 返信
969件の閲覧回数
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 件の賞賛
返信