[ECOS] accurate ms delay
Jesper Skov
jskov@redhat.com
Thu Apr 4 01:58:00 GMT 2002
On Thu, 2002-04-04 at 11:36, Jani Monoses wrote:
> On Wed, 3 Apr 2002, Jonathan Larmour wrote:
>
> > Jesper Skov wrote:
> > >
> > > On Fri, 2002-03-08 at 12:26, Jani Monoses wrote:
> > > >
> > > > Is it OK to use hal_delay_us in a generic .inl driver instead of the
> > > > not-too-accurate for loops?
> > >
> > > Yes, it's always a preference over for loops. Just be carefull to not
> > > delay with the interrupts disabled.
> >
> > And obviously it can be no more accurate than the resolution of the clock
> > device feeding it.
>
> I was thinking about waiting for erase completion in flash drivers.I hope
> interrupts are enabled at that time.
No, they cannot be: with interrupts enabled there can be no guarantee
that (a) the (timing of the) flash programming protocol is followed by
the driver and (b) there's no ISR that tries to accesses the flash
during the erase/programming of the flash.
That's why the eCos flash drivers run from RAM and disable both cache
and interrupts.
Jesper
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list