* AW: [ECOS] Problem found with flash driver
@ 2006-03-02 11:08 Neundorf, Alexander
0 siblings, 0 replies; only message in thread
From: Neundorf, Alexander @ 2006-03-02 11:08 UTC (permalink / raw)
To: Retallack, Mark, ecos-discuss
Hi,
> Von: ecos-discuss-owner@ecos.sourceware.org
>
> Hello everyone, I think I have found a minor problem with the io layer
> of the flash driver and before I continue with my fix, I just thought
> that I would ask if anyone else has seen it.
>
> I am using JFFS2 over a flash bank that I am not running code from, so
> interrupts can be enabled during flash access. The processor is an
> MPC850.
>
> With the virgin eCos flash.c code (from CVS), the system
> crashes with a
> random memory corruption, I have tracked it down to a context switch
> within the flash_program function in flash.c. After looking
> through the
> file and the eCos mailing list I found that the HAL_FLASH_CACHES_OFF
> define states that interrupts must be disabled.
I had also crashes when interrupts occured during flash_program(). But since we don't write often on the flash, I simply disabled interrupts when calling flash_program(). This is not optimal, but was good enough for our purpose.
> After modding the code to disable interrupts before flushing and
> disabling the cache, the system works correctly with no problems.
Sounds good :-)
There is also a different flash branch, maybe this is fixed there, I don't know.
> I have not created a patch because the HAL_FLASH_CACHES_OFF define in
> flash.h looks very generic and I cannot test the mod. But
> this is what I
> have done:
Can you please send it as a patch ?
Bye
Alex
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-02 11:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-02 11:08 AW: [ECOS] Problem found with flash driver Neundorf, Alexander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).