This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AW: Some newbie questions


Hi Andreas,

> > In practice, regardless of the APIs eCos provides, you can
> > put whatever hardware is connected to the CAN controller on a
> > high-priority interrupt
> > and disable every other interrupt as soon as you get into that ISR.
>
>But what can I do if I must perform a task "exactly" 123us from now or
>if I want to perform periodic tasks with very low jitter? Can I do this
>with eCos or do I need a hard realtime OS?

eCos isn't guaranteed to provide services of this type. In such an 
application, if I was using eCos (for cost/ease of use/other reasons) again 
I would subvert the OS for this functionality. I would steal the ISR for 
the main periodic timer and install my own ISR for it to provide the kind 
of high-resolution timed events you require, then give the eCos scheduler a 
lower-priority timer. This would require a lot of care about what your 
"magic" periodic task is doing, since it would be dancing on the hardware 
without the OS's direct knowledge.

You might not be gaining anything useful from using eCos in such a 
situation. It depends what other tasks you have to run apart from your 
exotic hard realtime task.

If for instance you wanted eCos's TCP/IP stack, that would be a good 
reason. Essentially what I'm talking about is establishing a hard realtime 
layer that can preempt eCos at any time, and eCos becomes conceptually 
almost a "background task" of the hard realtime layer.

I have something vaguely like this in one product, when it detects a USB 
attached host attempting to upload new firmware, it halts the OS and 
disables all interrupts, performs the firmware update and reboots. Lower 
level of complexity than your application though.


-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Work: http://www.digi-frame.com/
Tel (914) 937-4090 9am-6:30pm M-F ET
Personal: http://www.larwe.com/ http://www.zws.com/

"Far better it is to dare mighty things, to win glorious triumphs, even 
though checkered by failure, than to rank with those poor spirits who 
neither enjoy much nor suffer much, because they live in the gray twilight 
that knows not victory nor defeat."
(Theodore Roosevelt)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]