English
Language : 

H8S2172 Datasheet, PDF (441/572 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer H8S Family/H8S/2100 Series
Programming Procedure in User Program Mode: The procedures for download, initialization,
and programming are shown in figure 14.11.
Start programming
procedure program
Select on-chip program
to be downloaded and
specify download
1.
destination by FTDAR
Set FKEY to H'A5
2.
1
Disable interrupts and bus
master operation
9.
other than CPU
Set FKEY to H'5A
10.
Set SCO to 1 and
execute download
3.
Clear FKEY to 0
4.
DPFR = 0?
5.
No
Yes Download error processing
Set the FPEFEQ
parameter
6.
Initialization
7.
JSR FTDAR setting + 32
FPFR = 0?
8.
No
Yes Initialization error processing
1
Set parameters to ER1
and ER0
(FMPAR and FMPDR)
11.
Programming
JSR FTDAR setting + 16
12.
FPFR = 1?
13.
No
Yes
Clear FKEY and
programming
error processing
No
Required data
programming is
completed?
14.
Yes
Clear FKEY to 0
15.
End programming
procedure program
Figure 14.11 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 14.4.4, 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.
Rev. 2.00, 03/04, page 407 of 534