is on-chip RTC in LPC1769 accurate?

cancel
Showing results for 
Search instead for 
Did you mean: 

is on-chip RTC in LPC1769 accurate?

679 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by karuna on Wed May 18 01:11:24 MST 2011
I am using LPC1769 controller. I need a perfect time reference. Is it preferable to use on-chip RTC?
  Because I am using external crystal of 32.768KHz. But its loosing 5 to 7 minutes a day. Is it because I'm using wrong crystal (32KHz in datasheet)?
  Should I need to do calibration for 32.768KHz crystal? Pls help.
  
  Thanks in advance
0 Kudos
20 Replies

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by elef on Mon Jul 16 23:17:30 MST 2012
sorry to resurrect an old thread. Is there a way to check the RTC for calibration without using CLKOUT. Reason is, 80 pin devices LPC17xx don't have CLKOUT :(
0 Kudos

60 Views
Contributor I

The 32kHz oscillator uses RTCX1 as input and RTCX2 as output, so you can also scope/calibrate the RTC frequency on RTCX2.

0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Thu Oct 06 10:10:07 MST 2011

Quote: Luis Digital
I have the latest version of LPCXpresso and still shows the same error:



NXP told us they'll make sure the change goes in the next release - they mean CMSIS.
The LPCXpresso release is managed by CodeRed - not NXP.
As long as there is no new version of CMSIS this will not be changed (CodeRed is correctly not changing this on their own account :rolleyes:)

Rob
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Thu Oct 06 07:33:06 MST 2011

Quote: NXP_Europe
Hello Rob,

[COLOR=black][FONT=Arial]It will be addressed in the next release.[/FONT][/COLOR]




I have the latest version of LPCXpresso and still shows the same error:
#define RTC_CLK     (   32000UL)        /* RTC oscillator frequency           */
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon Jun 27 15:59:07 MST 2011
Hello Rob,

[COLOR=black][FONT=Arial]It will be addressed in the next release.[/FONT][/COLOR]
[COLOR=black][FONT=Arial][/FONT][/COLOR]
[COLOR=black][FONT=Arial][/FONT][/COLOR]
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Fri Jun 24 01:42:24 MST 2011
Hi NXP,


Quote: NXP_Europe
I think you are right ... we should change the value to 32.768 kHz all the time.



when you are going to change the crystal value in the manual, you should consider also updating the #define RTC_CLK in the system_LPC17xx.c file in the CMSIS. There the value is 32000UL, this should be 32768UL.

Rob
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon May 30 05:38:37 MST 2011
Thanks,

another related question: what about crystal type and capacitors?

In the data sheet there is a section on clocking containing a table with crystal and capacitor values. This is only for the main oscillator, I could not find any reference to crystal types, load capacitance or capacitors to be used for the RTC's crystal.

I took the 'standard' route to match my capacitors with the load capacitance of the crystal but while 'stealig' some ideas from the LPCXpresso board I noticed that Embedded Artists placed a 100k resistor in series with the crystal on the RTCX2 (output) pin. I placed a 0 ohm resistor in series, but some guidelines from NXP's side would be nice.

Rob
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon May 23 08:38:23 MST 2011
Hello Rob,

I think you are right ... we should change the value to 32.768 kHz all the time.
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon May 23 02:40:16 MST 2011

Quote: NXP_Europe

According datasheet crystal should be 32.768 kHz.

http://ics.nxp.com/products/lpc1000/datasheet/lpc1763.lpc1764.lpc1765.lpc1766.lpc1767.lpc1768.lpc176...
see table 11.



Indeed and the user manual shows that the RTC has a "dedicated 32 kHz ultra low power oscillator.".
It would be wise to show here also 32.768 - different values in different places are misleading.
AN10849 first shows it is a 32 kHz oscillator and the next sentence hints that it is 32.768 kHz.

Let it be known that I only had doubts about my choice of 32.768 after reading the initial messages in this thread :(

Would be nice to know if Jhn's problem is due to the '-' version of the lpc1769 or not. I just reworked my design from an lpc1342 + external RTC towards an lpc1754 (both because it saves components & I need more memory).

I'm going to test my suppliers to see which versions they have on stock ...

Rob
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Thu May 19 14:24:14 MST 2011

Quote: Zero
My 1768/1769 RTC circuits (uncalibrated,'-' Revision) are running with +-2 Hz accuracy, so that's a few seconds per day.

For my more precise time information like missile control I use GPS with accuracy < 1µs  :)



I think these microcontrollers were destined for the "axis of evil", but accidentally sold within the United States.

In this world there are funny things, like the Cuban government using Windows '98. lol
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu May 19 08:59:09 MST 2011
My 1768/1769 RTC circuits (uncalibrated,'-' Revision) are running with +-2 Hz accuracy, so that's a few seconds per day.

For my more precise time information like missile control I use GPS with accuracy < 1µs  :)
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Thu May 19 08:18:09 MST 2011
Bad luck:

Quote:
ZSD1107-



As I recently bought these chips, I think everyone has bad chips.

Worst of all is that the shops are full of these chips. I just hope that the calibration work, because otherwise the RTC is not usable.

Thank you.
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Thu May 19 08:02:05 MST 2011
From the erratasheet:

Quote:
The LPC176x devices typically have the following top-side marking:
LPC176xxxx
xxxxxxx
xxYYWWR[x]
The last/second to last letter in the third line (field &#8216;R&#8217;) will identify the device revision.



The RTC.1 errata is specified to apply to the '-' revision, so supposedly if you have 'A' revision then it's fixed.
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Thu May 19 07:22:42 MST 2011
Hello NXP,

I want to know if my chips (LPC1764) are affected. Can you publish the list of all the chips in trouble?

Thank you.
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Thu May 19 03:03:55 MST 2011
Hello jhn,

there are problems with the temperature w.r.t. the RTC and it may happen that the RTC starts and stops many times dependant on the temperature ... so the loss of 5-7 minutes is possible.

To find out if this part is affectedby the 'Errata', we need to get the package markings/data code.

[COLOR=black][FONT=Arial]Check the following AN: [/FONT][/COLOR][FONT=Calibri]AN10849 LPC1700 RTC hardware auto calibration [/FONT]
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Wed May 18 10:24:13 MST 2011

Quote: Zero

I would suggest to check your hardware (or kick your hardware engineer in the a..) :)



Anymore it's getting harder for me to kick myself.  I guess I should hire a trainee to do it for me.:)

Thanks I needed some humor today.  Burned up a board yesterday.:(
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 18 09:09:02 MST 2011
Did you use CLKOUT (UM chapter 4.10) to scope/measure your real RTC frequency?

If I recalculate your values right (-6min/day), your frequency is 32631 Hz (0.4% too slow) :mad:

I would suggest to check your hardware (or kick your hardware engineer in the a..) :)

Otherwise you can use Calibration register to use auto calibration (UM Chapter 27.6.4.2).

See: NXP - AN10849
http://www.nxp.com/documents/application_note/AN10849.pdf
http://www.nxp.com/documents/other/rtc_calibration_project.zip
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Wed May 18 08:26:00 MST 2011
hello jhn

Can you show us your rtc_init-part.

According datasheet crystal should be 32.768 kHz.

http://ics.nxp.com/products/lpc1000/datasheet/lpc1763.lpc1764.lpc1765.lpc1766.lpc1767.lpc1768.lpc176...
see table 11.
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by Polux rsv on Wed May 18 03:22:21 MST 2011
Read LPC176X errata. RTC doesn't work reliably within the temperature spec.

http://ics.nxp.com/support/documents/microcontrollers/pdf/errata.lpc176x.pdf

Angelo
0 Kudos

63 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by martinho on Wed May 18 03:17:07 MST 2011

Quote: jhn

  Because I am using external crystal of 32.768MHz.



Yes You need to use a 32KHz crystal for exact RTC time (there is no 32.768kHz  mode on the LPC17xx).
0 Kudos