Datasheet

Section 22 Flash Memory
Rev. 3.00 Sep. 28, 2009 Page 713 of 910
REJ09B0350-0300
(3) Erasing Procedure in User Program Mode
The procedures for download of the on-chip program, initialization, and erasing are shown in
figure 22.13.
Set FKEY to H'A5
Set SCO to 1 and execute
download
DPFR = 0?
Yes
No
Download error processing
Set the FPEFEQ
parameter
Yes
End erasing
procedure program
FPFR = 0 ?
No
Initialization error processing
Disable interrupts and
bus master operation
other than CPU
Clear FKEY to 0
Set FEBS parameter
Yes
FPFR = 1 ?
No
Clear FKEY and erasing
error processing
Yes
Required block
erasing is
completed?
No
Set FKEY to H'5A
Clear FKEY to 0
1.
2.
3.
4.
5.
6.
Download
Initialization
Erasing
Initialization
JSR FTDAR setting
+ 32
Erasing
JSR
FTDAR setting
+ 16
Select on-chip program
to be downloaded and
specify download
destination by FTDAR
Start erasing procedure
program
1
1
Figure 22.13 Erasing Procedure in User Program Mode
The procedure program must be executed in an area other than the user MAT to be erased. Setting
the SCO bit in FCCS to 1 to request download must be executed in the on-chip RAM. The area
that can be executed in the steps of the procedure program (on-chip RAM and user MAT) is
shown in section 22.8.4, Storable Areas for On-Chip Program and Program Data. For the
downloaded on-chip program area, see figure 22.11.