After TBM interrupt actice, can't return to mainloop

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

After TBM interrupt actice, can't return to mainloop

1,833件の閲覧回数
Simen
Contributor I
Dear ALL,
 
I use CodeWarrior to design MC68HC908GR4.
But I have a problem about using its TBM interrupt.
After the isrTBM active,it can't return to mainloop.
The program always run in isrTBM.
 
Any suggestion ?
 
Thanks a lot for help!
 
Attach file is Demo project,it can show the problem.
 
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

837件の閲覧回数
rocco
Senior Contributor II
Hi Simen, and welcome to the forum.

You need to clear the TBM interrupt, as it won't go away on its own.

To clear the interrupt flag, TBIF, you need to write a one to the TACK bit from within your interrupt service routine. Both of these bits are in the TBCR register.
0 件の賞賛
返信

837件の閲覧回数
Simen
Contributor I
Thanks a lot for your help,I have solved it! 
0 件の賞賛
返信