After TBM interrupt actice, can't return to mainloop

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

After TBM interrupt actice, can't return to mainloop

1,347 Views
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.
 
Labels (1)
0 Kudos
2 Replies

351 Views
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 Kudos

351 Views
Simen
Contributor I
Thanks a lot for your help,I have solved it! 
0 Kudos