This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: FLASH API v.2 and interrupts


>>>>> "Iris" == Iris Lindner <ilindner@logopak.de> writes:

    Iris> Dear Stanislav, dear Bart, dear Paul,
    Iris> thank you very much for your detailed and helpful response!

    <snip>

    >> On other hardware the flash driver has to disable the cache
    >> before it can talk directly to the flash chip. You do not want
    >> interrupts or context switches while the cache is disabled, the
    >> resulting system performance would be terrible. The
    >> LEAVE_INTERRUPTS_ENABLED option is not available on hardware
    >> like this.
    
    Iris> I couldn't find disabling of cache in sources or chip
    Iris> documentation.

http://ecos.sourceware.org/docs-latest/ref/am29xxxxx-instance.html
Then scroll down to the bottom, the last section describes Cache
Management. In the current sources look at am29xxxxx.c, especially
line 260 onwards.

    >> So, switching to the V2 API would prevent the crashes. It would
    >> no longer be necessary to disable interrupts in your own code,
    >> instead that happens in the driver. However, a switch would not
    >> address the performance problems unless the hardware supports
    >> LEAVE_INTERRUPTS_ENABLED and you can guarantee that its
    >> requirements are satisfied.
    >> 
    >> There is a more advanced version of the AMD V2 driver which
    >> disables interrupts for shorter periods of time. Writes happen
    >> in burst with interrupts briefly reenabled between bursts.
    >> Similarly erases happen in bursts, using the erase
    >> suspend/resume facilities available in most NOR chips.
    >> Interrupt latency is much improved but still not great - if the
    >> erase bursts are too short then the chip may never make any
    >> progress. The details vary between flash chips. This more
    >> advanced driver is currently only available from eCosCentric.
    
    Iris> So I think I could try to use the driver with interrupts
    Iris> left enabled and making sure that flash is not accessed from
    Iris> somewhere else, right? But when the machine is running it is
    Iris> absolutely necessary to keep the can bus working. Anything
    Iris> which has to do with flash (transferring a new file e.g.) is
    Iris> of lower priority, so your last proposition of the advanced
    Iris> AMD V2 driver sounds like a good solution, especially with
    Iris> using suspend/resume functionality. (Does one have to
    Iris> purchase it from eCosCentric?)

Yes. http://www.ecoscentric.com/cgi/info.cgi, or email
info@ecoscentric.com 

Bart

-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
       >>>> Visit us at ESC-UK  http://www.embedded.co.uk <<<<
       >>>> Oct 7-8 on Stand 433 at FIVE ISC, Farnborough <<<<

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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