RTC Interrupt handling on HC08-LK24

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTC Interrupt handling on HC08-LK24

1,857件の閲覧回数
lc_hc
Contributor I

Hi there,

 

i use the RTC to generate a periodic 1 second interrupt. Everythings fine, but the ISR itself dosen´t seem to work correct. I run the code in the Simulator from CW for HC08 and then the cursor is stuck into  the RTC isr, until i disable RTIE bit. Do I need to Acknowledge the RTC interrupt ? And if yes, then how ? I searched thru www and the datasheet, up to now without success.

 

hanks for your help in advance.

 

 

greetings,

 

Simon

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

432件の閲覧回数
lc_hc
Contributor I

@Eckhard:

 

 

thanks for your comment. Unfortunately theres no RTIACK Bit and even no RTI Status Register. But this one ( RTCSR ):

 

SECF — Second Flag

This clearable, read-only bit is set on every increment of the second

counter. When the SECIE bit in RTCCR1 is set, SECF generates a

CPU interrupt request. In normal operation, clear the SECF bit by

reading RTCSR with SECF set and then reading the second register

(SECR). Reset clears SECF.

1 = Second counter incremented

0 = No second counter incremented

 

Is this used to acknowledge the irq from the ISR ?

 

thanks.

 

 

0 件の賞賛
返信

432件の閲覧回数
peg
Senior Contributor IV

Hello and welcome to the fora, lc-hc

 

If you are generating interrupts by having the SECIE bit set in the RTCCR1 register, then yes, this is what you have to do to clear the SECF flag which is the source of that interrupt.

 

Like Eckard, on first read of your post I was thinking of the RTI too.

 

0 件の賞賛
返信

432件の閲覧回数
eckhard
Contributor V

Hello,

 

you must ackknowledgetheinterrupt by writing to the RTIACK bit in the SRTISC Register

 

Eckhard

0 件の賞賛
返信