Subject:
|
Re: sys_time (long post)
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 16 Dec 2002 11:57:25 GMT
|
Viewed:
|
2964 times
|
| |
| |
Only a suggestion,
In any processor architecture (with or without disabling or recursive
interrupts) when I need to read timers with more than 1 single instruction I
do the following:
Read the timer (both low and high value) until I get 2 times the same readings.
These approach have some performance drawbacks, but it works ever, with any
language and with any processor.
Hope this help,
Paulo Tesche
|
|
Message is in Reply To:
| | Re: sys_time (long post)
|
| (...) It turns out that the nature of the glitch depends on the order you read the upper and lower 16-bits of sys_time. If the compiler generates code that reads the high word first (which it seems to do), then your example will work. However, if (...) (22 years ago, 13-Dec-02, to lugnet.robotics.rcx.legos)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|