English
Language : 

SH7211 Datasheet, PDF (954/1228 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer SuperHTM RISC engine Family
Section 21 Flash Memory
(2.8) The return value of the initialization program, FPFR (general register R0) is checked.
(2.9) FKEY must be set to H'5A and the user MAT must be prepared for programming.
(2.10) The parameter which is required for programming is set.
The start address of the programming destination of the user MAT (FMPAR) is set to general
register R5. The start address of the program data storage area (FMPDR) is set to general
register R4.
1. FMPAR setting
FMPAR specifies the programming destination start address. When an address other than
one in the user MAT area is specified, even if the programming program is executed,
programming is not executed and an error is returned to the return value parameter FPFR.
Since the unit is 256 bytes, the lower eight bits (MOA7 to MOA0) must be in the 256-byte
boundary of H'00.
2. FMPDR setting
If the storage destination of the program data is flash memory, even when the program
execution routine is executed, programming is not executed and an error is returned to the
FPFR parameter. In this case, the program data must be transferred to on-chip RAM and
then programming must be executed.
(2.11) Programming
There is an entry point of the programming program in the area from (download start address
set by FTDAR) + 16 bytes of on-chip RAM. The subroutine is called and programming is
executed by using the following steps.
MOV.L #DLTOP+16,R1
JSR @R1
NOP
; Set entry address to R1
; Call programming routine
1. The general registers other than R0 are saved in the programming program.
2. R0 is a return value of the FPFR parameter.
3. Since the stack area is used in the programming program, a stack area of maximum 128
bytes must be reserved in RAM.
Rev. 2.00 May. 08, 2008 Page 930 of 1200
REJ09B0344-0200