Subject:
|
Re: Interesting BrickOS Timing Results
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 15 Jan 2003 19:29:20 GMT
|
Viewed:
|
3478 times
|
| |
| |
Hi Marc,
> Yes, the OCRA interrupt will cause the sample flow
> to stutter a little bit (because the OCRB interrupt won't
> be acknowledged until the OCRA handler finishes), but
> if this is a concern, it could be avoided if you use sample
> rates that are a multiple of the general 1ms general
> interrupt (like 4 KHz) and sychronizing appropriately.
Nice idea, but wouldn't that result in at least one of four cycles beeing
blocked by OCRA? or is our system interrupt finished within less than 250msec?
> OCRA_TICK_COUNT = 500 ;1ms
>
> mov @OCRA,r0
> add #OCRA_TICK_COUNT & 0xff,r0l
> addx #(OCRA_TICK_COUNT >> 8) & 0xff,r0h
> mov r0,@OCRA
>
> Using this technique, both OCRA and OCRB can be
> used independantly for arbitrary intervals.
Right, that was what I did for my Lepomux patch - works fine.
Gunther
|
|
Message has 2 Replies: | | Re: Interesting BrickOS Timing Results
|
| Mark Riley wrote: > Actually, if we move the sys_time > handler back to OCRA (instead of the watchdog NMI), > then we could just check if bit 0 of sys_time is zero to > determine if the subsystem handler should be called (plus > this will get (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| | | Re: Interesting BrickOS Timing Results
|
| (...) 250msec? Not blocked entirely, but delayed. That's what I meant by "stutter". I've measured the general interrupt handler to take anywhere from 70-150us. So, the higher the sample rate the more significant the disruption. Anything faster than (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Re: Interesting BrickOS Timing Results
|
| (...) My thought was that the OCRA interrupt could be used as the general 1ms interrupt and the subsystem handler (which is currently using OCRB) could be called every other time from the OCRA handler by using a flag (toggled every 1ms). Actually, (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
|
19 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|