This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

using periodical interrupt (every minute) with RTC of TPS65930/20

Hello,

one question where I didn't find an answer elsewhere:

I want to use the RTC to issue periodically an interrupt (every minute), therefore I wrote the value 0x05 to the RTC_INTERRUPTS_REG. But the interrupt rises every second, even if I write 0x06 to the RTC_INTERRUPTS_REG (every hour).

The only difference I see, is that when I write
       0x05 into  the RTC_INTERRUPTS_REG the RTC_STATUS_REG reads 0x0e (1M_EVENT + 1S_EVENT + RTC_RUNNING)
       0x06 into the RTC_INTERRUPTS_REG the RTC_STATUS_REG reads 0x1e (1H_EVENT + 1M_EVENT + 1S_EVENT + RTC_RUNNING)

How can I accomplish an one Minute periodic interrupt?

Another question is: How can I clear the event timer bits of the RTC_STATUS_REG? The TRM tells to write 0 to that bits, but on the other side these bits are stated as readonly.

Thanks for your help

Hubert

  • For all, that want to know, how the periodical interrupt every has to be estabished, here's the solution:

    For initialization:

    1) read PWR_ISR1 and write it back.

    2) write 0xf7 to PWR_IMR1 (masking all isrs but RTC_IT)

    3) set COR in PWR_SIH_CTRL (or with 0x04)

    4) set RTC_IT_RISING in PWR_EDR1 by writing 0x80

    5) write 0x40 to RTC_STATUS_REG

    6) write 0x05 (IT_TIMER +EVERY_MIN) to RTC_INTERRUPTS_REG

     

    to acknowledge and clear that interrupt do:

    1) write 0x40 to RTC_STATUS_REG

    2) read PWR_ISR1 and write it back.

     

    for that you need i2c functions that can be called at isr-level.

     

    Hope that helps

    Hubert