Getting a time marker LPC55

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

Getting a time marker LPC55

Jump to solution
1,179 Views
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.

Labels (1)
0 Kudos
1 Solution
1,147 Views
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.

View solution in original post

0 Kudos
4 Replies
1,160 Views
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 Kudos
1,153 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

It can generate 1ms resolution:

Alice_Yang_0-1659513668996.png

 

BR

Alice

 

0 Kudos
1,148 Views
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 Kudos
1,165 Views
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 Kudos