Getting a time marker LPC55

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

Getting a time marker LPC55

跳至解决方案
2,172 次查看
randylee
Contributor V

I'm doing a bare metal project on an LPC5512 using MCUexpresso and SDK 2.11 using only internal OSC (no external Xtals), 96MHz.

Since I'm doing a loop to check on everything my self (as opposed to FreeRTOS sort of thing), I would like to know what time it is at any given point to a mS (or so) resolution.

Is there a way to just grab a time off the part somehow? Maybe have to run a timer or something or is there like a systick counter or cycle counter somewhere I can grab.

I'm just interested in relative time so nothing fancy like an RTC.

标签 (1)
0 项奖励
回复
1 解答
2,140 次查看
randylee
Contributor V

Figured it out... what I wanted was OSTIMER which will get me what I need with a shade over 30uS resolution.

Hard to see how to use any of this stuff tho... I hate Doxygen generated documentation; it's really not very useful at all.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,153 次查看
randylee
Contributor V

RTC runs to the second.. I need mS resolution.  Or even uS would work as long as I have a 32bit value to play with...

0 项奖励
回复
2,146 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

It can generate 1ms resolution:

Alice_Yang_0-1659513668996.png

 

BR

Alice

 

0 项奖励
回复
2,141 次查看
randylee
Contributor V

Figured it out... what I wanted was OSTIMER which will get me what I need with a shade over 30uS resolution.

Hard to see how to use any of this stuff tho... I hate Doxygen generated documentation; it's really not very useful at all.

0 项奖励
回复
2,158 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

 

There is RTC demo , you can refer to:

The RTC project is a simple demonstration program of the SDK RTC driver. It sets up the RTC
hardware block to trigger an alarm after a user specified time period. The test will set the current
date and time to a predefined value. The alarm will be set with reference to this predefined date
and time.

Download from  https://mcuxpresso.nxp.com/en/select  

 

BR

Alice

0 项奖励
回复