RTC Calibration and Date time to seconds conversion procedure in LPC4367

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

RTC Calibration and Date time to seconds conversion procedure in LPC4367

2,240 Views
gauravmore
Contributor III

Hi,

I am using LPC 4367 controller for one of my product development. There I am facing issue with RTC. I want to convert date and time into seconds, but  no such functions are available in MCU Xpresso.

Also I want to understand the calibration procedure for RTC for the controller. Is there any reference code available which explains both the issues.

 

Thanks

Gaurav More

Labels (2)
0 Kudos
Reply
8 Replies

2,213 Views
frank_m
Senior Contributor III

I guess we had slightly different use cases then.

Mine was calculate an epoch value from a current date relative to an arbitrary reference date, which was stored as a timestamp in a small event recorder memory. Mainly for size reasons. 

0 Kudos
Reply

2,233 Views
frank_m
Senior Contributor III

Look for conversion functions between date/time and epochs (seconds since 1970/01/01). There are plenty of examples available in the Unix/Linux world. Just swap in your own date/time structs, or port the Linux one's.

I did similar functions some while ago for my company, thus I cannott share it here. But it is mostly based on such example code.

0 Kudos
Reply

2,132 Views
gauravmore
Contributor III

Hi,

Thanks for the reply,

I did the modifications and it is working with respect to RTC validation while updating through the external device .

But it is observed the after setting the RTC there is lag in the time which is about 8 Min in 2 days. What is the process of calibration of internal RTC for LPC4367.

Please provide the solution since we have completed Phase 2 of our development and need to initiate with phase 3. Now this is the issue we are facing.

Thanks 

Gaurav More

 

0 Kudos
Reply

2,127 Views
frank_m
Senior Contributor III

> Please provide the solution since we have completed Phase 2 of our development and need to initiate with phase 3. Now this is the issue we are facing.

Then better ask NXP for technical support.

You cannot expect volunteers on a public forum to solve your commercial problems for free.

0 Kudos
Reply

2,120 Views
gauravmore
Contributor III

Hi Frank,

"You cannot expect volunteers on a public forum to solve your commercial problems for free"

If this is the problem then should I raise the ticket for the same? since this is one of the problem for the same.

Expecting the reply instead .. since considering the discussion in the forum,

https://community.nxp.com/t5/LPC-Microcontrollers/RTC-calibration-in-LPC54608J512BD208/m-p/1243233#M...

is it the same case for the LPC4367 series?

Thanks 

Gaurav More 

0 Kudos
Reply

2,095 Views
frank_m
Senior Contributor III

> is it the same case for the LPC4367 series?

I suppose not. From my perspective, both series are quite a bit different. I am using a LPC54628, for a hobbyist project. My company does not use NXP MCUs in it's current projects.

Perhaps the NXP staff here can assist you.

0 Kudos
Reply

2,230 Views
converse
Senior Contributor V

The newlib library supplied with MCUXpresso includes all of the <time.h> functions found in standard C, so you should not need to write any code yourself (I am not sure about redlib, but it may include them as well).

0 Kudos
Reply

2,039 Views
gauravmore
Contributor III

Hi Con Verse,

While searching for the document related to the calibration procedure of RTC for LPC 43xx i found the application note which is having similar approach as it is mentioned in the user manual of the LPC4367 controller.

Application name "AN10849". It is for 1700 controller but is similar to the procedure mentioned in the user manual UM10503 for LPC43xx.

I have attached the Application note. please confirm whether same can be used for the calibration of RTC.

Thanks,

Gaurav More

 

0 Kudos
Reply