Renesas H8SX/1520 Series Hardware Manual page 649

32-bit cisc microcomputer
Hide thumbs Also See for H8SX/1520 Series:
Table of Contents

Advertisement

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 17.8.4, On-Chip Program and Storable Area for Program Data. For the
downloaded on-chip program area, see figure 17.10.
One erasure processing erases one block. For details on block divisions, refer to figure 17.4. To
erase two or more blocks, update the erase block number and repeat the erasing processing for
each block.
1. Select the on-chip program to be downloaded and the download destination. When the PPVS
bit in FPCS is set to 1, the programming program is selected. Several programming/erasing
programs cannot be selected at one time. If several programs are selected, a download error is
returned to the SS bit in the DPFR parameter. The on-chip RAM start address of the download
destination is specified by FTDAR.
For the procedures to be carried out after setting FKEY, see section 17.8.2 (2), Programming
Procedure in User Program Mode.
2. Set the FEBS parameter necessary for erasure. Set the erase block number (FEBS parameter)
of the user MAT in general register ER0. If a value other than an erase block number of the
user MAT is set, no block is erased even though the erasing program is executed, and an error
is returned to the FPFR parameter.
3. Erasure is executed. As in programming, the entry point of the erasing program is at the
address which is 16 bytes after #DLTOP (start address of the download destination specified
by FTDAR). Call the subroutine to execute erasure by using the following steps.
MOV.L #DLTOP+16, ER2
JSR
@ER2
NOP
The general registers other than ER0 and ER1 are held in the erasing program.
R0L is a return value of the FPFR parameter.
Since the stack area is used in the erasing program, a stack area of 128 bytes at the
maximum must be allocated in RAM.
4. The return value in the erasing program, the FPFR parameter is determined.
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 2 to 5.
6. After erasure completes, clear FKEY and specify software protection. If this LSI is restarted by
a power-on reset immediately after erasure has finished, secure the reset input period (period
of RES = 0) of at least 100 µs.
Downloaded from
Elcodis.com
electronic components distributor
Section 17 Flash Memory (0.18-(m F-ZTAT Version)
; Set entry address to ER2
; Call erasing routine
Rev. 3.00 Mar. 14, 2006 Page 611 of 804
REJ09B0104-0300

Advertisement

Table of Contents
loading

Table of Contents