RTC alarm functionality not working as intended !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RTC alarm functionality not working as intended !

757 Views
Saitej_Chinthala
Contributor II

Hello NXP 

Am using PCA21125 RTC and i would like use the Alarm functionality, after the configuring the control-2 register as stated in data sheet still am not able to see INT signal generated.

Attached logic analyzer log file as well here the brief info about what we have loaded to the concern register's and also some screen shots of the data sheet statements related to alarm functionality.

One more weird behavior observed is that by default and all the time INT pin is low, by default it should be high. But if we read the control 2 register no flags has been set, Do we need to verify anything else also ?.

Control-1 : 0b00000000 - Normal operation

Control-2: 0b00000010 - AIE bit set INT pin to follow AF 

command to write into alarm minutes register (0b00011001) and data sent to register 0x09h is 0b00000001 - Enabling and alarm interrupt for every minute

Saitej_Chinthala_0-1684734499832.png

Saitej_Chinthala_0-1684740051014.png

 

Thanks in Advance !

 

0 Kudos
7 Replies

738 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Saitej,

Two remarks:

  1. Did you try to enable a minute interrupt by setting the MI bit in the Control_2 register?
  2. If you want to write to the Minute_alarm register, please make sure you are using its correct address. Unless it is a typo, you are using the address of 0b00011001 = 0x19h, while the correct address is 0x09h.

Otherwise it seems that you are doing everything right. There is an example for the Alarm function in the UM10301, chapter 12.2.

Best regards,

Tomas

0 Kudos

733 Views
Saitej_Chinthala
Contributor II

Hello @TomasVaverka 

Thanks for the reply 

From the example in document UM10301 it says to disable all other alarms while setting minute alarm is that mandate to do ?

Do we need to need to set the MI bit in control 2 register for using alarm functionality ?

It's not the typo 0x19 is the command to write into the register address 0x09h

Also any idea on default INT line state ?, it suppose to be high by default but in my case it is low.

 

Saitej_Chinthala_0-1684831284291.png

 

0 Kudos

718 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Saitej,

By default both the day and weekday alarms are disabled ("1"), so that is not mandatory.

Since you write 0x01h to the Minute_alarm register, you can also use the minute interrupt (MI = 1) as an alternative way to achieve one minute interrupt.

Yes, you are right with 0x19, my mistake and apologies for that.

No idea right now why the INT pin is low, is the GPIO of your MCU the INT pin is connected to properly configured as an interrupt input?

Best regards,

Tomas

0 Kudos

633 Views
Saitej_Chinthala
Contributor II

Hello @TomasVaverka

Sorry for the late reply , for having INT pin Low all the because of the hardware issue pull up resistor.

After correcting still am not able to see INT generated for alarm functionality but minute alarm is working properly.

Can you please take look into both attached logic analyzer logs (you need logic2 software from saleae to view it).

Please help me in identifying what am missing to configure to generate alarm functionality. 

Saitej_Chinthala_0-1685629509117.png

 

 

 

 

Tags (1)
0 Kudos

624 Views
Saitej_Chinthala
Contributor II

Hello @TomasVaverka 

One more strange behaviour observed after recycling the power with out coin cell, the data in the register 09 is not holding .. even after writing to register 09 on after immediate power cycle. please take a look into the logs attached. 

0 Kudos

581 Views
Saitej_Chinthala
Contributor II

Hello @TomasVaverka  

Did you got a chance to look into the logs. Do we have any updates ?.

0 Kudos

712 Views
Saitej_Chinthala
Contributor II

Hello @TomasVaverka 

Once again Thanks for the quick reply 

You are right alternatively we can MI bit for minute interrupt but we wish configure for 2 or 3 minutes so we would like to use alarm functionality.

For my testing purpose configured alarm INT for 1 minute.

0 Kudos