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
@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.
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.
Hello,
you must ackknowledgetheinterrupt by writing to the RTIACK bit in the SRTISC Register
Eckhard