LPC15xx RTC not counting correctly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC15xx RTC not counting correctly

1,547 次查看
ronalddaris
Contributor I

Inside our application but also with the LPCXpresso1549 evaluation board (OM13056) we see the RTC clock is sometimes incremented by 2 seconds.

This happens about 30 times a day so the RTC is getting very inaccurate.

We couldn't pinpoint the reason why our application was not working as expected so we made a small program that only reads the RTC counter and compares it with the previous value and there we see the counter sometimes is incorrectly incremented. 

Is there some kind of way to prevent this is happening?

标签 (2)
标记 (2)
0 项奖励
回复
3 回复数

1,222 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Ronald,

Have you tried using the periph_rtc example from the LPCOpen package to see if the same error happens? The example shows how to setup and use the RTC and to use the alarm to wake up the device from a sleep mode. You can download the LPCOpen 15xx package from this page:


http://www.nxp.com/products/software-and-tools/hardware-development-tools/lpcxpresso-boards/lpcopen-...


Let me know the result!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 项奖励
回复

1,222 次查看
ronalddaris
Contributor I

We also used the lpcopen 2.2 software, we made some small modifications and removed the sleep to test if it increments correctly. Also with this code we see it's not counting correctly now and then. 

0 项奖励
回复

1,222 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Ronald,

 

After further investigation we have confirmed this issue, it will be written in errata sheet.  The results were the following:

- RTC COUNT can increment by one but take two steps (updated twice) within one second.
- RTC COUNT can increment by two in one step within one second.   Both cases (1) and (2) could lead to accumulated error. We don’t have the work around for this yet. The issue seems to be related to some glitch when the internal 16-bit ripple count wraps from 0x7FFF to 0x8000 and from 0xFFFF to 0x0000.


 

Best Regards!
Carlos Mendoza
Technical Support Engineer

0 项奖励
回复