English
Language : 

AN2061 Datasheet, PDF (9/15 Pages) STMicroelectronics – External EEPROMs are often used in automotive applications
AN2061
4 EMBEDDED APPLICATION ASPECTS
This chapter is giving advises for embedded applications where the ST10 embedded-Flash
memory is the only non volatile memory available.
4.1 Reading the Flash while erasing or programming
Depending on which ST10F2xx variant is used, the entire Flash may not be visible to the CPU
when a Flash bank is erased or programmed. When a given ST10F2xx does not support
Read-While-Write, the EEPROM emulation software should:
– disable all interrupts: as during erasing and programming, it is not possible to have access
to ST10 interrupt vector table;
– copy into the RAM few routines: before erasing and programming, few software routines
shall be copied from the Flash into the on-chip RAM; this should include at least the routines
to generate erasing and programming and the routines waiting for the end of erasing or pro-
gramming;
– temporarily disable code protection: if code protection is activated, it should be tempo-
rary disabled before executing the code copied into the on-chip RAM.
To cope with application constraints, users may be obliged to support communication during
the programming / erasing. This requires that:
– more software is copied into the on-chip RAM,
– the software loop polling the Flash status register is modified to handle the communication
process,
– the minimum communication handler (used during polling) is not using interrupts,
– program / erase suspend command is used.
4.1.1 Suspend and resume commands
As stand-alone Flash memories, ST10F2xx embedded-Flash controller supports suspend and
resume commands; this allows to suspend at any time the erasing or the programming pro-
cess and resume it later on.
Once suspend command is completed, ST10F2xx can access to the software routines that
may be needed (ex: communication driver) and that were not relocated into the on-chip RAM.
Note: the total time for which the Flash is not available is unchanged but this gives the possi-
bility to suspend the process to run specific routines during Flash erasing or programming (ex:
communication protocol).
4.1.2 Minimum software to be copied into the on-chip RAM
The minimum software to be copied into the on-chip RAM is:
– functions issuing the erasing and or programming commands to the ST10 embedded-Flash
controller,
– functions polling the Flash status register for detecting the completion of the command and
for error detection (see detailed specification),
– watchdog refresh (if activated).
9/15