Hi,
We are using LPC4357 and configured RTC to generate an interrupt every minute by writing 0x2 into Counter Interrupt Register . It has been running for a while as expected. Yesterday, we removed the board and put it back on (the same board) and date and time got disturbed – mentioned something like year 2047. So, we set the time correctly. After that RTC interrupt was occurring every second despite of configuring that occur every minute. Today morning we had single stepped and CIR register contain 0x2, we are clearing interrupt etc. Then it automatically got fixed. However, we would like to know the reason. Any idea?
Thanks
When we first enable interrupt every second and then change the code to enable minute interrupt the CIIR register contains the value 0x3 . So, we reset that register by writing 0 first and then enabling the second bit or (0x2). However, that register still contain -x3. When we single step, then that register value gets modified to whatever we write.
Hi,
There is an RTC errata for this device, could you confirm that this issue is not related to the errata?
Regards
Soledad
Thanks Soledad,
However that is not our problem. It looks like RTC register retains old
configuration. Is there any status bit we need to read and find out whether
RTC is ready to be initialized?
Looked over the manual, we couldn't find any. We would like to find out why
it retains previous configuration depute of rewriting. it.
Thanks
Hi,
I tested the LPCOpen RTC example using the LPCXpresso46s67 board and I cannot to reproduce the issue,
is it possible you can reproduce the issue in a NXP board?
Regards
Sol
We don’t have NXP board. We are using LPC4357.
Regards
Hi,
I want to isolate the issue, I want to confirm if there is a hardware or a software issue. Could you please try using
the LPCOpen RTC example provided in the MCUXpresso installation folder?
Please let me know if you have issues with this example.
Have a great day,
Sol
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Is this one LPCOpen v3.02 LPCXpresso ?
Thanks
No, it is LPCOpen 2.19. Could you please try with this version.
Have a nice day!
Still same problem even with LPCOpen V2.19. RTC CIIR register retains
previous value, For example - first set this register ti get interrupt
every minute - we get interrupt ever minute and CIIR contains 0x2. Then
change the code to get interrupt every second, the register should contain
0x1 but it retains the previous value and it will be 0x3.
Did you try to reproduce this ?
Thanks
Hello,
Let´s try to review if the power supply of the board, specific VBAT and VDD it is stable during the time, the interrupt it is happening. I am thinking that the consuming it is affecting the counter of the RTC and it is having the delay.
Since it is not reproduced in the NXP board. with the same Software.
Best Regards,
Further debugging indicates that when we initialize RTC to generate an interrupt every second and then change the code to generate an interrupt every minute for sometime it still generates interrupt every second. Looks like old configuration is retained despite we load new code and run (in debug environment). Any idea?