This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Is cache disabling necessary during flash programming/erase cycles?
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Lars Povlsen <lpovlsen at vitesse dot com>
- Cc: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 30 Mar 2007 07:44:37 -0600
- Subject: Re: [ECOS] Is cache disabling necessary during flash programming/erase cycles?
- References: <376637F07F8A9242AD11921B15FA17DC1E6382@mx-dk.vsc.vitesse.com>
Lars Povlsen wrote:
Hello folks,
Many of the flash_XXX() functions in
.../packages/io/flash/current/src/flash.c have the caches disabled while
accessing the flash.
According to flash.h - and I quote -
"Execution of flash code must be done inside a
HAL_FLASH_CACHES_OFF/HAL_FLASH_CACHES_ON region - disabling the cache on
unified cache systems is necessary to prevent burst access to the flash
area being programmed. With Harvard style caches, only the data cache
needs to be disabled, but the instruction cache is disabled for
consistency".
In our case we have a Harvard style cache running on an ARM9. The
address space covered by the flash is uncached and unbuffered (We're
running ROMRAM), so my question is:
Is disabling of the DCache really needed on such a system?
Probably not, but not doing so will probably not affect the
performance greatly since you'll still be stuck in those loops
waiting for the device to do its thing.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss