ST92F124/F150/F250 - SINGLE VOLTAGE FLASH & E3 TM (EMULATED EEPROM)
3.4 WRITE OPERATION EXAMPLE
Each operation (both Flash and E3 TM) is activated
by a sequence of instructions like the following:
The load instructions are used to set the address-
es (in the Flash or in the E3 TM memory space) and
the data to be modified.
The last instruction is used to start the write oper-
ation, by setting the start bit (FWMS for Flash op-
erations, EWMS for E3 TM operation) in the Control
register.
OR
LD
LD
..
LD
FCR, #OPMASK ;Operation selection
ADD1, #DATA1 ;1st Add and Data
ADD2, #DATA2 ;2nd Add and Data
...., ......
Once selected, but not yet started, one operation
can be cancelled by resetting the operation selec-
tion bit. Any latched address and data will be reset.
ADDn, #DATAn ;nth Add and Data
;n range = (1 to 16)
OR
FCR, #80h
;Operation start
3
Warning: during the Flash Page Program or the E
TM Page Update operation it is forbidden to change
the page address: only the last page address is ef-
fectively kept and all programming will effect only
that page.
The first instruction is used to select the desired
operation by setting its corresponding selection bit
in the Control Register (FCR for Flash operations,
ECR for E3 TM operations).
3 TM
A summary of the available Flash and E
operations are shown in the following tables:
write
Table 11. Flash Write Operations
Operation
Byte Program
Page Program
Sector Erase
Selection bit
FBYTE
Addresses and Data
1 byte
Start bit
FWMS
FWMS
FWMS
None
Typical Duration
10 µs
160 µs (16 bytes)
1.5 s (1 sector)
15 µs
FPAGE
FSECT
FSUSP
FCHIP
From 1 to 16 bytes
From 1 to 4 sectors
None
Sector Erase Suspend
Chip Erase
None
FWMS
FWMS
3 s
Set Protection
PROT
From 1 to 4 bytes
40 µs (4 bytes)
Table 12. E3 TM Write Operations
Operation
Page Update
Chip Erase
Selection bit
Addresses and Data
From 1 to 16 bytes
None
Start bit
EWMS
EWMS
Typical Duration
EPAGE
ECHIP
30 ms
59/426
9