English
Language : 

SH7059 Datasheet, PDF (765/1042 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
24. ROM (SH7058S)
(3.3) Erasure
Similar to as in programming, there is an entry point of the erasing program in the area from (download start address
set by FTDAR) + 16 bytes of on-chip RAM. The subroutine is called and erasing is executed by using the following
steps.
MOV.L #DLTOP+16,R1
; Set entry address to R1
JSR @R1
; Call erasing routine
NOP
⎯ The general registers other than R0L are saved in the erasing program.
⎯ R0 is a return value of the FPFR parameter.
⎯ Since the stack area is used in the erasing program, a stack area of maximum 128 bytes must be reserved in RAM.
(3.4) The return value in the erasing program, FPFR (general register R0) is judged.
(3.5) Determine whether erasure of the necessary blocks has finished.
If more than one block is to be erased, update the FEBS parameter and repeat steps (3.2) to (3.5). Blocks that have
already been erased can be erased again.
(3.6) After erasure finishes, clear FKEY and specify software protection.
If this LSI is restarted by a power-on reset immediately after user MAT programming has finished, secure a reset
period (period of RES = 0) that is at least as long as the normal 100 μs.
(4) Erasing and Programming Procedure in User Program Mode
By changing the on-chip RAM address of the download destination in FTDAR, the erasing program and programming
program can be downloaded to separate on-chip RAM areas.
Figure 24.13 shows an example of repetitively executing RAM emulation, erasing, and programming.
1
Start procedure program
Set FTDAR to H'02
(Specify H'FFFF1000 as
download destination)
Download erasing program
Initialize erasing program
Enter RAM emulation mode and
tune data in on-chip RAM
Cancel RAM emulation mode
Erase relevant block
(execute erasing program)
Set FTDAR to H'04
(Specify H'FFFF2000 as
download destination)
Set FMPDR to H'FFFF0000 to
program relevant block
(execute programming program)
Download programming
program
Initialize programming
program
1
Confirm operation
End?
No
Yes
End procedure program
Figure 24.13 Sample Procedure of Repeating RAM Emulation, Erasing, and Programming (Overview)
Rev.3.00 Mar. 12, 2008 Page 675 of 948
REJ09B0177-0300