Dear all, I have a S08PT16 microcontroller and i have try to go in stop and wake up from rtc interrupt.
But don't wake up never !
The code is :
lda #%00001101
sta SYS_SOPT1 ; Enable stop
lda #%01000000
sta RTC_SC1 ; Enable interrupt
...........
stop
I have try to wakeup from keyb interrupt and all is ok, don't work only if i try to wake-up from rtc timer !
Can help me ?
Thanks
Stefano
What is the the setting of RTC_SC2?
You may not be able to exit with an RTC interrupt depending on your clock source.
I believe 1KHz internal oscillator can get you out of STOP.
(From section 3.2.2 of PT60 Reference Manual: The LPO (≈1 kHz) for the real-time counter clock allows a wakeup from stop3 mode with no external components.)
The rtc_SC2 and ISC register have this value :
lda #%10000100
sta RTC_SC2 ; System RTI Status and Control Register
lda #%00000100
sta ICS_C1
lda #%00100000
sta ICS_C2
So, your RTC clock source is the bus which is supposedly stopped in STOP mode, right?
Try using the 1KHz internal clock and see if you can get it to work this way.
Ok try, but, what is the correct register configuration for go in 1KHz internal clock ?
Yes, unfortunately it wakeup only from 1KHz LPO clock, than i cannot go in stop mode .
:-(
Thanks
Stefano