The following error dialog pops up when I download a program to the internal Flash ROM using the E10A-USB emulator for SH MCUs and click GO (execute program), even though I haven't exceeded the guaranteed number of rewrites for the internal Flash ROM.
Error: "Flash memory write error! Change device"
This error occurs when a write (or erase) event to the internal Flash ROM fails. The cause of the error is most likely one of the following.
- The "system clock" or "clock" value input when the E10A-USB emulator was started was incorrect.
SH7047F, SH7144F or SH7145F: input the "system clock" value.
The "system clock" value is the CPU operating frequency. For example, if a 10MHz clock is input and the CPU is run at 4 times the clock speed, the "system clock" should be 40MHz.
For all other MCUs: input the "clock" value that was input to the MCU.
- The state of the FWP pin (hardware protect pin for internal flash memory write/erase) is incorrect.
SH7047F: Make sure the FWP pin is set to low.
All other MCUs: FWP and FWE (hardware enable pin for internal flash memory write/erase) can be set to either high or low.
- The settings of pins MD0 and MD1 are incorrect.
SH7047F, SH7144F or SH7145F: Set A and B as shown in the table below.
MD1 MD0 A 1 0 B 1 1