AW: Re: Some thoughts about the flash device driver and the flashdisk block driver

Astrid Hanssen Astrid.Hanssen at ghipsystems.com
Tue Jan 29 13:16:07 UTC 2008


Hi Chris,
> Ian Caddy wrote:
> > 
> > One thing to be aware of is that most NOR type flash chips do not 
allow
> > you to read from them while writing to them.  This would mean that 
you
> > can't run RTEMS from the flash while programming another area of the
> > same flash chip.
> 
> Yes this is a good point.

To avoid this, I have made the mcf5208 BSP copy itself from flash into
ram after boot und run there, when using lnkcmdsflash.
This is not really necessary here because the flash chip on this board 
has a
special splitted design that allows running from one part while writing 
to
the other one; but as the second section is small and the design 
probably
does not meet the typical case (and because in the long term write 
access
to the whole device will be desirable anyway) I ignored that feature.

> > There are normally two solutions to this problem, copy everything 
into 
> > RAM and run from there, allowing full access to the flash, or have a 

> > separate flash chip for your file system.
> 
> The other solution is to have RAM based handlers for the flash and 
disable 
> interrupts during the writing. I consider this a last resort type 
function
> and very specific system in use. Disabling interrupts for this period 
of
> time is not nice.

This is the way dBug handles it (at least on the preconfigured 5208 
evaluation
board). But for a multithreading os that must always be able to react 
timely on
interrupts, it did not seem the right choice to me.

Regards 
Astrid



More information about the users mailing list