Set current date and time in LPC1769

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

Set current date and time in LPC1769

443 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arturn on Tue May 28 08:02:24 MST 2013

Hi!


My LPC1769 its in 2090-01-18T03:25:35, how Can I set current date and time?


 


Also,Is there any way to sync board clock ?


Thnks!

Labels (1)
0 Kudos
1 Reply

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arturn on Tue May 28 09:22:19 MST 2013

Hi other time...


 


I'm setting current date and time with this registers :


<code>    LPC_RTC-&gt;YEAR = atoi(year);
    LPC_RTC-&gt;MONTH = atoi(month)+1;
    LPC_RTC-&gt;DOM = atoi(day) +1;
    LPC_RTC-&gt;HOUR = atoi(hour);
    LPC_RTC-&gt;MIN = atoi(minute);
    LPC_RTC-&gt;SEC = atoi(second);</code>


But after setting mote hangs out...


Its the right way to set time? I'm lost something?


 


Thnks!<code>
</code>

0 Kudos