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
Thanks in Advance !
Hello Saitej,
Two remarks:
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
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.
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
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.
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.
Hello @TomasVaverka
Did you got a chance to look into the logs. Do we have any updates ?.
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.