Re: Confused about Flash
- From: Rene Tschaggelar <none@xxxxxxxx>
- Date: Sat, 04 Nov 2006 14:22:46 +0100
John Larkin wrote:
This thing has an ST flash chip, M29W400BB, which is 4M bits, used in
256kx16 mode. The data*** is typically confusing. So please check me
on this:
If I write a secret combination of words to a secret list of addresses
in the chip, six writes total, I can tell it to erase one of its 11
sub-blocks of memory. Apparently I can't do normal reads during erase,
so I can't run the code out of the same flash I'm erasing. I have to
erase a block (to all 1's, like an eprom) before I can program it. A
block erase can take up to 6 seconds, but I can poll it to see when
it's done. Apparently I select which block is to be erased by writing
0x30 into any address of that block, as the last operation of the
erase command.
It sounds like here, once I erase a whole block, I can program any
addresses within that block, as many or as few as I like, at any
desired addresses, at any time. There seems to be no time constraints
on how long it takes me to do this.
During erase or program, I again can't execute code out of flash, so
I'll have to relocate the flash erase and write routines into CPU ram
and run them from there.
John,
yes, the hard part is to have the Code in the RAM while
doing the flash and hope the power stays on. Copy the
code from Flash to the RAM, jump to it, and when it is
done, whatever was done, do a clean reset. Since the code
copied from the flash to the RAM is on a different adress,
the code shouldn't contain any absolute jumps. Hmm, yes,
the interrupts... This procedure used be done 20 years ago.
Perhaps there is a data line that reflects the (busy-)
state.
Nowadays the controllers have boot code sections in the
flash from where the application code flash can be handled.
I know you already checked whether a redesign with modern
hardware would make sense. Apparently it didn't.
Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
.
- Follow-Ups:
- Re: Confused about Flash
- From: Arlet
- Re: Confused about Flash
- References:
- Confused about Flash
- From: John Larkin
- Confused about Flash
- Prev by Date: Re: Confused about Flash
- Next by Date: Re: Confused about Flash
- Previous by thread: Re: Confused about Flash
- Next by thread: Re: Confused about Flash
- Index(es):