
ML62Q1000 Series User's Manual
Chapter 25 Flash Memory
FEUL62Q1000
25-18
25.3.3 Programming Data Flash Area
In the data flash area (flash memory), block erase in units of 2 Kbytes (ML62Q1300 group) or 4 Kbytes
(ML62Q1500/1700 group), sector erase in units of 128 bytes, and programming in units of 1 byte can be executed.
During block/sector erase or program in the data flash area, the CPU continues program processing using the background
operation (BGO) function.
Figure 25-3 shows the flow diagram for erasing the data flash area.
Figure 25-3 Flow Diagram for Erasing Data Flash Area
[Note]
Ÿ
The CPU continues program processing even while data flash erase is in progress. Do not enter the
STOP mode, STOP-D mode or HALT-H mode during the erase. In addition, set the FSELF bit of the
FLASHSLF register to "0" after the erase is completed.
Ÿ
The data flash area is unreadable during erasing.
Ÿ
For block/sector erase, place two NOP instructions following the instruction used to set FERS/FSERS
bits of the FLASHCON register to "1".
FSELF = 1
Start data flash erase
FLASHACP = 0xFA
FLASHACP = 0xF5
End
FLASHSEG = 0x1F
FLASHAR = Address to be erased
Enable programming flash
Flash acceptor setting
Flash address setting
Set the high-speed clock for the system clock through the
FCON register
If using interrupts, execute MCINTEL.2=1, IE2.2=1, and EI.
System clock setting
Interrupt setting
FERS = 1 (block erase)/FSERS = 1 (sector erase)
__asm(
"
NOP
"
);
__asm(
"
NOP
"
);
Block/sector erase
Start erasing in background
Continue
programming?
YES
NO
FSELF = 0
Disable programming flash
Go to (2) in
Figure 25-4
FLASHSTA=0x00?
YES
NO
Confirm the data flash state
Go to (3)
When interrupt not used
When interrupt used (MCSINT)
Interrupt wait
Confirm interrupt source
by using MCISTATL
(3)
See Chapter 5 "Interrupts" and
Sections 29.2.7 to 2.9 in Chapter 29
"Safety Function" for using
interrupts.
Clear interrupt source by
using MCISTATL
MCINTEL:MCU status interrupt enable register
MCISTATL:MCU status interrupt register
MCINTCL: MCU status interrupt clear register
IE2: Interrupt enable register 2
Содержание ML62Q1000 Series
Страница 17: ...Chapter 1 Overview...
Страница 112: ...Chapter 2 CPU and Memory Space...
Страница 154: ...Chapter 3 Reset Function...
Страница 166: ...Chapter 4 Power Management...
Страница 196: ...Chapter 5 Interrupts...
Страница 248: ...Chapter 6 Clock generation Circuit...
Страница 274: ...Chapter 7 Low Speed Time Base Counter...
Страница 291: ...Chapter 8 16 Bit Timer...
Страница 320: ...Chapter 9 Functional Timer FTM...
Страница 382: ...Chapter 10 Watchdog Timer...
Страница 402: ...Chapter 11 Serial Communication Unit...
Страница 456: ...Chapter 12 I2 C Bus Unit...
Страница 491: ...Chapter 13 I2 C Master...
Страница 512: ...Chapter 14 DMA Controller...
Страница 531: ...Chapter 15 Buzzer...
Страница 550: ...Chapter 16 Simplified RTC...
Страница 559: ...Chapter 17 GPIO...
Страница 594: ...Chapter 18 External Interrupt Function...
Страница 612: ...Chapter 19 CRC Generator...
Страница 632: ...Chapter 20 Analog Comparator...
Страница 644: ...Chapter 21 D A Converter...
Страница 655: ...Chapter 22 Voltage Level Supervisor...
Страница 676: ...Chapter 23 Successive Approximation Type A D Converter...
Страница 709: ...Chapter 24 Regulator...
Страница 714: ...Chapter 25 Flash Memory...
Страница 743: ...Chapter 26 Code Option...
Страница 750: ...Chapter 27 LCD Driver...
Страница 788: ...Chapter 28 On Chip Debug Function...
Страница 795: ...Chapter 29 Safety Function...
Страница 813: ...Appendix A...
Страница 881: ...Revision History...