20.1.3 Features................................................................................................................. 438
20.1.4 Block Diagram...................................................................................................... 439
20.1.5 Input/Output Pins.................................................................................................. 440
20.1.6 Register Configuration.......................................................................................... 440
20.2 Flash Memory Register Descriptions................................................................................. 441
20.2.1 Flash Memory Control Register (FLMCR).......................................................... 441
20.2.2 Erase Block Register 1 (EBR1)............................................................................ 442
20.2.3 Erase Block Register 2 (EBR2)............................................................................ 443
20.2.4 Wait-State Control Register (WSCR)................................................................... 444
20.3 On-Board Programming Modes......................................................................................... 447
20.3.1 Boot Mode ............................................................................................................ 448
20.3.2 User Programming Mode...................................................................................... 454
20.4 Programming and Erasing Flash Memory ......................................................................... 456
20.4.1 Program Mode ...................................................................................................... 456
20.4.2 Program-Verify Mode .......................................................................................... 457
20.4.3 Programming Flowchart and Sample Program..................................................... 458
20.4.4 Erase Mode ........................................................................................................... 460
20.4.5 Erase-Verify Mode................................................................................................ 460
20.4.6 Erasing Flowchart and Sample Program .............................................................. 461
20.4.7 Prewrite Verify Mode ........................................................................................... 474
20.4.8 Protect Modes ....................................................................................................... 474
20.4.9 Interrupt Handling during Flash Memory Programming and Erasing.................. 475
20.5 Flash Memory Emulation by RAM ................................................................................... 477
20.6 Flash Memory Writer Mode (H8/3437F) .......................................................................... 480
20.6.1 Writer Mode Setting ............................................................................................. 480
20.6.2 Socket Adapter and Memory Map........................................................................ 480
20.6.3 Operation in Writer Mode .................................................................................... 482
20.7 Flash Memory Programming and Erasing Precautions...................................................... 490
Section 21 ROM (60-kbyte Single-Power-Supply Flash Memory Version)...... 499
21.1 Flash Memory Overview ................................................................................................... 499
21.1.1 Mode Pin Settings and ROM Space...................................................................... 499
21.1.2 Features................................................................................................................. 500
21.1.3 Block Diagram...................................................................................................... 501
21.1.4 Input/Output Pins.................................................................................................. 502
21.1.5 Register Configuration.......................................................................................... 502
21.1.6 Mode Control Register (MDCR).......................................................................... 503
21.1.7 Flash Memory Operating Modes.......................................................................... 504
21.2 Flash Memory Register Descriptions................................................................................. 508
21.2.1 Flash Memory Control Register 1 (FLMCR1) ..................................................... 508
21.2.2 Flash Memory Control Register 2 (FLMCR2) ..................................................... 510
21.2.3 Erase Block Register 2 (EBR2)............................................................................ 511
21.2.4 Wait-State Control Register (WSCR)................................................................... 512
x