Datasheet

Section 17 ROM
Rev.7.00 Feb. 14, 2007 page 726 of 1108
REJ09B0089-0700
Programming Procedure in User Program Mode: The procedures for download, initialization,
and programming are shown in figure 17.70.
Select on-chip program
to be downloaded and
set download destination
by FTDAR
Set FKEY to H'A5
Set SCO to 1 and
execute download
DFPR=0?
Yes
No
Download error processing
Set the FPEFEQ and
FUBRA parameters
Initialization
JSR FTDAR setting+32
Yes
End programming
procedure program
FPFR=0?
No
Initialization error processing
Disable interrupts and bus
master operation other
than CPU
Clear FKEY to 0
Set parameter to ER0 and
ER1 (FMPAR and FMPDR)
Programming
JSR FTDAR setting+16
Yes
FPFR=0?
No
Clear FKEY and
programming
error processing
Yes
Required data
programming is
completed?
No
Set FKEY to H'5A
Clear FKEY to 0
(a)
(b)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
1
1
(c)
Download
Initialization
Programming
Start programming
procedure program
Figure 17.70 Programming Procedure
The procedure program must be executed in an area other than the flash memory to be
programmed. Especially the part where the SCO bit in FCCS is set to 1 for downloading must be
executed in the on-chip RAM.
The area that can be executed in the steps of the user procedure program (on-chip RAM, user
MAT, and external space) is shown in section 17.29.3, Procedure Program and Storable Area for
Programming Data.
The following description assumes the area to be programmed on the user MAT is erased and
program data is prepared in the consecutive area. When erasing is not executed, erasing is
executed before writing.
128-byte programming is performed in one program processing. When more than 128-byte
programming is performed, programming destination address/program data parameter is updated
in 128-byte units and programming is repeated.