Why STOP mode can execute once only in MC9RS08KA2?

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

Why STOP mode can execute once only in MC9RS08KA2?

1,344 次查看
JohnFM
Contributor II
I want my MC9RS08KA2 to go to STOP mode, get out by KBI, do something and loop bak to STOP mode again continuously.
I configured my MCU so that it went to STOP mode and was taken out by KBI. Everything was fine the first time STOP instruction was executed, i.e. it really stopped there at the STOP instruction, when there is a KBI, it continued with the next instruction. However, if I let it execute another STOP instruction after successfully getting out (by KBI), the second STOP instruction was ignored, i.e. it didn't stop there at this second STOP instruction but immediately continued with the next instruction. Could someone tell me why?
 
John
标签 (1)
0 项奖励
回复
2 回复数

437 次查看
BasePointer
Contributor II
I think you can't handle keyboard interrupt properly. Show your interrupt handler.
Be sure that KBI interrupt flag was cleared before stop instruction.
0 项奖励
回复

437 次查看
JohnFM
Contributor II
Yes, it works now by clearing KBI interrupt flag. Thanks a lot!
0 项奖励
回复