English
Language : 

SH7014 Datasheet, PDF (546/754 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
18. 128 kB Flash Memory (F-ZTAT)
Start
Set SWE-bit of FLMCR1
Wait 10 μs
Data writes must be performed in the memory-
erased state. Do not write additional data to an
address to which data is already written.
*5
Store 32 bytes write data in write
*4
data area and rewrite data area
n=1
m=0
Successively write 32-byte data in rewrite data *1
area in RAM to flash memory
Enable WDT
Set PSU bit in FLMCR1(2)
Wait 50 μs
Set PSU bit in FLMCR1(2)
Wait 200 μs
Set PSU bit in FLMCR1(2)
Wait 10 μs
*5
Write start
*5
Write end
*5
Set PSU bit in FLMCR1(2)
Wait 10 μs
*5
n←n+1
Disable WDT
Set PSU bit in FLMCR1(2)
Wait 4 μs
*5
Perform dummy-write of H'FF to verify address
Increment address
Wait 2 μs
Read verify data
*3
Write data = Verify data?
OK
*5
*2
NG
m=1
Operate rewrite data
*3
Transfer rewrite data to rewrite data area *4
32 byte data
NG
verify complete?
OK
Set PSU bit in FLMCR1(2)
RAM
Write data storage area
(32 byte)
Rewrite data storage area
(32 byte)
Wait 4 μs
m = 0?
OK
Clear SWE bit of FLMCR1
*5
NG
n ≥ 1000?
*5
NG
OK
Clear SWE bit of FLMCR1
Write end
Write failure
Notes: 1. Transfer data in a byte unit. The lower eight bits of the start address to which data is written must be H'00, H'20, H'40, H'60, H'80, H'A0, H'C0, or
H'E0. Transfer 32-byte data even when writing fewer than 32 bytes. In this case, Set H'FF in unused addresses.
2. Read verify data in logword form (32 bits).
3. Already programmed bits are not reprogrammed. Reprogram data is determined by the computation shown below.
4. The write data storage area (32 bytes) and rewrite data storage area (32 bytes) must be located in RAM. The contents of the rewrite data storage
area are rewritten as writing progresses.
5. Set the values of x, y, z, α, β, γ, ε, η, and N to match the characteristics of the memory device.
Previous write data
0
0
1
1
Verify data (V) Rewrite data (X)
0
1
1
0
0
1
1
1
Description
Rewrite should not be performed to bits already written to.
Write is incomplete; rewrite should be performed.
⎯
Left in the erased state.
Figure 18.13 Program/Program-Verify Flowchart
Rev.5.00 Sep. 27, 2007 Page 512 of 716
REJ09B0398-0500