On forcibly terminating High-performance Embedded Workshop and re-launching it after that, an ID code is requested. Even though the correct ID code is entered, "ID code error" is displayed.
There is a possibility that the value of block 0 area has become an undefined value because rewriting flash memory by a download operation is halted by NMI interrupt (*1), such as a WDT interrupt or NMI interrupt during the rewriting process.
The following methods can be used for recovery in this case. If neither method can be used, the chip cannot be used in the E8a emulator.
- For a microcontroller that has the forcible erase function, input the ASCII code of "ALeRASE" as the ID code to attempt full erase.
- Perform full erase using a parallel programmer (see FAQ 105425).
Take the following countermeasures to prevent this problem.
- Countermeasure 1： When a WDT interrupt is used
When using a WDT interrupt, always select [Debugging of program that uses WDT.] in the [Firmware Location] tab of the [Emulator Setting] dialog box. If not selected, the value of block 0 area may become undefined, as like with other non-maskable interrupts. Note that this setting is unnecessary in the M16C/50 series and the M16C/63, /64A, /65, /64C, /65C, /6B, /6C, /6S1 group.
- Countermeasure 2： When a non-maskable interrupt other than WDT is used
Prevent these non-maskable interrupts from occurring while performing a download operation.
*1: For the NMI interrupt types, refer to the hardware manual for each microcontroller.