----- Original Message -----
From: "hus_kalydonios"
To:
Sent: Thursday, May 31, 2007 2:12 PM
Subject: [lpc2000] Re: LPC2138 performance timer question > Hey Leon,
>
> I tried with the Tasking Library, but I'm not familiar with it. It
> seems incompatible with freeRTOS?
>
> I tried some of the ctl functions but got compiler errors (linker)
> despite the includes. I don't know Crossworks well enough...
I've only used it for a timer function, here are the relevant bits of code
extracted from my program:
#include
//---------------------- Timer 0 interrupt every second -----------------//
I tried with the Tasking Library, but I'm not familiar with it. It
seems incompatible with freeRTOS?
I tried some of the ctl functions but got compiler errors (linker)
despite the includes. I don't know Crossworks well enough... >
> You could use the CrossWorks Tasking Library.
>
> Leon
>
Reply by hus_kalydonios●May 31, 20072007-05-31
Interesting. Thanks for that. Using that code, can I do this:
--- In l..., "hus_kalydonios"
wrote: >
> Hi,
>
> I'd like to measure the performance of some code I'm using, but this > doesn't seem very easy to do with the LPC2138.
(using freeRTOS and
> Rowley).
>
> In windows I'd use QueryPerformanceCounter() to get a time stamp before > and after. Is there an way to do this with the LPC?
Or do I need to set > up a timer interrupt every 1s or something to
increment a counter?
>
> Thanks.
>
You could use the CrossWorks Tasking Library.
Leon
Reply by "FreeRTOS.org Info"●May 31, 20072007-05-31
> -----Original Message-----
> From: l...
> [mailto:l...] On Behalf Of hus_kalydonios
> Sent: 31 May 2007 12:31
> To: l...
> Subject: [lpc2000] LPC2138 performance timer question
>
> Hi,
>
> I'd like to measure the performance of some code I'm using, but this
> doesn't seem very easy to do with the LPC2138. (using freeRTOS and
> Rowley).
>
> In windows I'd use QueryPerformanceCounter() to get a time
> stamp before
> and after. Is there an way to do this with the LPC? Or do I
> need to set
> up a timer interrupt every 1s or something to increment a counter?
>
> Thanks. You don't need your timer to generate an interrupt, just use a free
running
timer with a known frequency. Choose the maximum frequency you can that
will not cause more than a single overflow between two time measurements,
then read the timer count value directly.
FreeRTOS.org V4.3.0 (out next week) has some demos that do exactly this.
+ http://www.SafeRTOS.com
An IEC 61508 certified real time kernel for safety related systems.
Reply by hus_kalydonios●May 31, 20072007-05-31
Hi,
I'd like to measure the performance of some code I'm using, but this
doesn't seem very easy to do with the LPC2138. (using freeRTOS and
Rowley).
In windows I'd use QueryPerformanceCounter() to get a time stamp before
and after. Is there an way to do this with the LPC? Or do I need to set
up a timer interrupt every 1s or something to increment a counter?