After TBM interrupt actice, can't return to mainloop

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

After TBM interrupt actice, can't return to mainloop

1,876 次查看
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 回复数

880 次查看
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 项奖励
回复

880 次查看
Simen
Contributor I
Thanks a lot for your help,I have solved it! 
0 项奖励
回复