wakeup from rtc

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

wakeup from rtc

1,845 次查看
IlConte
Contributor IV

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

0 项奖励
回复
5 回复数

1,653 次查看
tonyp
Senior Contributor II

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.)

0 项奖励
回复

1,653 次查看
IlConte
Contributor IV

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

0 项奖励
回复

1,653 次查看
tonyp
Senior Contributor II

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.

0 项奖励
回复

1,653 次查看
IlConte
Contributor IV

Ok try, but, what is the correct register configuration for go in 1KHz internal clock ?

0 项奖励
回复

1,653 次查看
IlConte
Contributor IV

Yes, unfortunately it wakeup only from 1KHz LPO clock, than i cannot go in stop mode .

:-(

Thanks

Stefano

0 项奖励
回复