we want to use the 28F128J3 flash memory with an infineon 80C167
microcontroller.
My question is, if it is possible to store the programm in the first
block of the flash memory and to erase und programm the other blocks
while the microcontroller works with the programm in the first block?
Georg
No. The whole chip is unreadable during the programming or erasing phase.
Copy the core of the code (relocating if needed) to RAM and run it from
there.
HTH
Tauno Voipio
tauno voipio @ iki fi
It's even worse: you won't get to the programming or erasing state since the
code fetches screw up the programming sequences.
Meindert
By the way you have phrased the question, the answer is NO. However it
is possible to program the remaining sectors of your Flash in-situ
with the first sector block intact. The way we do it is to have the
embedded application run a bootstrap program in RAM which erases and
programs the remaining sectors. We've done it so that the bootstrap
accepts the new code in Motorola S-Record format via the serial comms.
By running the bootstrap from RAM, the various data signatures that
the Flash requires are not interrupted. However some compromises are
required in the System Architecture. If the chosen micro has a
hard-coded Interrupt Vector Table, which cannot be relocated to RAM,
then the interrupts would have to be disabled during this operation.
Also if you have 100's of Kbytes to program via the serial comms, then
this will take minutes to perform. This implies that the normal
operation of the device would be suspended until the Flash programming
is complete. Also one has to ensure that system integrity services
such that Watchdog timer are properly maintained during the program
operation.
Ken.
+====================================+
I hate junk email. Please direct any
genuine email to: kenlee at hotpop.com
postm...@noname.com (Ken Lee) wrote in message news:<3d7e722e....@News.CIS.DFN.DE>...
You might want to get a 8051+CPLD core, or add a CPLD to your
circuitry and use the CPLD to switch memory modes; (1) PSEN = FLASH,
READ/WRITE = XRAM, (2) PSEN = XRAM, READ = XRAM, WRITE = FLASH, (3)
PSEN = XRAM, READ = FLASH, WRITE = XRAM, and PSEN = XRAM, READ/WRITE =
FLASH. This way, you can use these modes to (a) Copy Code to XRAM,
(b) switch to XRAM (I do this by having program memory start at FFFF
and grow downwards, and then copying code into free XRAM -- hence
seamless switching) (c) switch between the other modes as required;
you want to be able to stream data from XRAM to the FLASH, and
vice-versa. You do not want to give up your interrupt vectors; you
want to be able to still use your serial ports, timers, etc. The
other response where Motorola EXORMacs 87 format files could be read
was apt.
FYI, some of the more advanced Dallas CPUs (eg, 80C490?) allow the
processor to run code in its internal XRAM for the duration of a FLASH
write cycle. You can't execute code from the FLASH (ie, PSEN=FLASH)
while the FLASH pins are toggling as it saves its sector data. We've
found that using a CPLD possibly may be the most elegant method
available for low-cost CPUs, and may allow the most secure environment
in which to operate.
Matt
m00...@SkpAMGuardatt.net
L.
http://www.amd.com/us-en/FlashMemory/ProductInformation/0,,37_1447_1453,00.html