0down votefavorite | I am trying to use gettimeofday on an embedded ARM device, however it seems as though I am unable to use it:
| ||||
|
up vote2down vote | What I usually do, is to have a timer running at 1khz, so it will generate an interrupt every millisecond, in the interrupt handler I increment a global var by one, say
| ||||
|
up vote2down vote | Use one of the timers in the chip...
| ||
add a comment |
up vote1down vote | What you need to do is create your own _gettimeofday() function to get it to link properly. This function could use the appropriate code to get the time for your processor, assuming you have a free-running system timer available.
| ||||||||
|
up vote0down vote | You could use the performance timer as shown in the accepted answer of this question... How to measure program execution time in ARM Cortex-A8 processor?
| ||
add a comment |
up vote0down vote | It looks like you are using the Econotag which is based on the MC13224v from Freescale. The MACA_CLK register provides a very good timebase (assuming the radio is running). You can also use the the RTC with CRM->RTC_COUNT. The RTC may or may not be very good depending on if you have an external 32kHz crystal or not (the econotag does NOT). e.g. with MACA_CLK:
| |||
add a comment |
up vote-1down vote | I've done this before in one of my applications. Just use :
|
0down votefavorite | I am trying to use gettimeofday on an embedded ARM device, however it seems as though I am unable to use it:
| ||||
|
up vote2down vote | What I usually do, is to have a timer running at 1khz, so it will generate an interrupt every millisecond, in the interrupt handler I increment a global var by one, say
| ||||
|
up vote2down vote | Use one of the timers in the chip...
| ||
add a comment |
up vote1down vote | What you need to do is create your own _gettimeofday() function to get it to link properly. This function could use the appropriate code to get the time for your processor, assuming you have a free-running system timer available.
| ||||||||
|
up vote0down vote | You could use the performance timer as shown in the accepted answer of this question... How to measure program execution time in ARM Cortex-A8 processor?
| ||
add a comment |
up vote0down vote | It looks like you are using the Econotag which is based on the MC13224v from Freescale. The MACA_CLK register provides a very good timebase (assuming the radio is running). You can also use the the RTC with CRM->RTC_COUNT. The RTC may or may not be very good depending on if you have an external 32kHz crystal or not (the econotag does NOT). e.g. with MACA_CLK:
| |||
add a comment |
up vote-1down vote | I've done this before in one of my applications. Just use :
|
新闻热点
疑难解答