English
Language : 

ST10F272M_12 Datasheet, PDF (42/176 Pages) STMicroelectronics – 16-bit MCU with 256 Kbyte Flash memory and 20 Kbyte RAM
Internal Flash memory
ST10F272M
5.7
Write operation summary
In general, each write operation is started through a sequence of three steps:
1. The first instruction is used to select the desired operation by setting its corresponding
selection bit in the Flash control register 0.
2. The second step is the definition of the address and data for programming or the
sectors or banks to erase.
3. The last instruction is used to start the write operation, by setting the start bit WMS in
the FCR0.
Once selected, but not yet started, one operation can be canceled by resetting the operation
selection bit.
Available Flash module write operations are summarized in the following Table 25.
Table 25. Flash write operations
Operation
Select bit
Word program (32-bit)
WPG
Double word program (64-bit)
Sector erase
Set protection
Program/erase suspend
DWPG
SER
SPR
SUSP
Address and data
FARL/FARH
FDR0L/FDR0H
FARL/FARH
FDR0L/FDR0H
FDR1L/FDR1H
FCR1L/FCR1H
FDR0L/FDR0H
None
Start bit
WMS
WMS
WMS
WMS
None
Figure 6 shows the complete flow needed for a write operation.
Figure 6. Write operation control flow
3TARTWRITEOPERATION
&#2,,/#+
9ES
7RITEOPERATIONFINISHED
#HECKRELATEDBITS
9ES
#HECKERRORSTATUS
.O
.O
.OERROR
0ROCEEDWITHAPPLICATION
%RROR
%RRORHANDLER 
2ESTARTOPERATION
1. The following bits must be checked:
- Corresponding BSYx bit in FCR0L register
- WMS bit in FCR0H register
- Related command bit in FCR0H register"
'!0'2)
42/176
Doc ID 12968 Rev 3