
Section 17 Flash Memory (0.18-(m F-ZTAT Version)
Rev. 3.00 Mar. 14, 2006 Page 609 of 804
REJ09B0104-0300
12. Programming is executed. The entry point of the programming program is a the address which
is 16 bytes after #DLTOP (start address of the download destination specified by FTDAR).
Call the subroutine to execute programming by using the following steps.
MOV.L
#DLTOP+16,ER2
; Set entry address to ER2
JSR
@ER2
; Call programming routine
NOP
The general registers other than ER0 and ER1 are held in the programming program.
R0L is a return value of the FPFR parameter.
Since the stack area is used in the programming program, a stack area of 128 bytes at the
maximum must be allocated in RAM.
13. The return value in the programming program, the FPFR parameter is determined.
14. Determine whether programming of the necessary data has finished. If more than 128 bytes of
data are to be programmed, update the FMPAR and FMPDR parameters in 128-byte units, and
repeat steps 11 to 14. Increment the programming destination address by 128 bytes and update
the programming data pointer correctly. If an address which has already been programmed is
written to again, not only will a programming error occur, but also flash memory will be
damaged.
15. After programming finishes, clear FKEY and specify software protection. If this LSI is
restarted by a reset immediately after programming has finished, secure the reset input period
(period of
RES
= 0) of at least 100
µ
s.
electronic components distributor