Timestamp with RTC on LPC1769

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

Timestamp with RTC on LPC1769

2,974 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manjan4487 on Wed Feb 08 04:17:49 MST 2012
Hello,


is it possible to generate a timestamp with the on board RTC  of the LPC1769 with an accuracy of milli- or microseconds? Actually i am  only get the time with an accuracy of seconds in the format YYYY:MM:DD  HH:mm:ss. But i need YYYY:MM:DD HH:mm:ss:[ms]:[µs].
  So is there any way to realize that?
 

Thanks
0 项奖励
回复
9 回复数

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manjan4487 on Thu Feb 09 07:28:26 MST 2012
So i see you have a lot of fun :D
And i ve success to generate a timestamp with a resolution of ms with your tips and an example about RIT from CooCox:
http://www.coocox.org/show_comp.php?id=c28313f1-96ed-11df-80ae-001d7d723e56

So i will say a very big thanks

... and all will be happy :D
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Thu Feb 09 01:40:44 MST 2012
Is this it?


Quote:
[B]MISRA C[/B] is a software development standard for the C programming language developed by MISRA (Motor Industry Software Reliability Association). Its aims are to facilitate code safety, portability and reliability in the context of embedded systems, specifically those systems programmed in ISO C.


:D
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Wed Feb 08 11:02:17 MST 2012
The [B]M[/B]inistry of [B]I[/B]nhibition of [B]S[/B]ome [B]R[/B]edundant ch[B]A[/B]racters?
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Feb 08 09:07:43 MST 2012

Quote: OXO
...any size of code can be fit into 20 lines. :D



Heard of MISRA already :eek:
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Wed Feb 08 08:49:38 MST 2012

Quote: Zero

Nice task to get experience now: write this code in < 20 lines :rolleyes:



Now then 0

.. you know that C doesn't care about line feeds and CRs.. any size of code can be fit into 20 lines. :D
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manjan4487 on Wed Feb 08 07:48:05 MST 2012
Okay thanks, then i will try it soon and will give feedback :)
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Feb 08 07:39:08 MST 2012

Quote: manjan4487
And how can it looks like with a combination of a systemtick timer or RIT?



#1 Init RIT to count with 100MHz clock
#2 Init RTC
#3 Init 1 sec interrupt of RTC
#4 Reset RIT counter in 1 sec ISR of RTC

Result: RTC synchronized RIT :)


Quote: manjan4487
I am not so experienced in it.



Nice task to get experience now: write this code in < 20 lines :rolleyes:
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by manjan4487 on Wed Feb 08 04:40:18 MST 2012
okay thanks, thats very sad.

And how can it looks like with a combination of a systemtick timer or RIT? I am not so experienced in it.

Are there some examples about it? Or have anyone try it , too?
0 项奖励
回复

2,665 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Feb 08 04:25:22 MST 2012
No :(

UM:
Quote:
On the LPC17xx, the RTC is clocked by a separate 32 kHz oscillator that produces a 1 Hz internal time reference.

If you need a higher resolution you could combine it with System Tick Timer or RIT :)
0 项奖励
回复