Why STOP mode can execute once only in MC9RS08KA2?

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

Why STOP mode can execute once only in MC9RS08KA2?

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

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

276 Views
JohnFM
Contributor II
Yes, it works now by clearing KBI interrupt flag. Thanks a lot!
0 Kudos