A program cannot be run when the program counter is an odd number.
Set a suitable number in the program counter using the following procedure.
- Download the program: Go to the menu and select [Debug]→[Download] and select the load module. Or, right click on [Load module] for download modules in the Workspace window. This will display the popup menu from which you can select [Download].
- After downloading the user program, select [Reset CPU].
If the above process does not resolve the problem, check your user program reset vector to make sure the value is not an odd number. If it is odd, adjust it appropriately.
When a Reset CPU is issued, the value of the reset vector is set in the program counter. If you download the program, the correct value should already be written to the reset vector. Therefore, after download, the correct value should automatically be set to the program counter when a reset is executed. If the program is executed under these conditions, it should run correctly.
If, on the other hand, the program has not been downloaded, the reset vector value is undefined. If the reset vector value is odd, the odd value will be set in the program counter when the Reset CPU is issued, generating the “Program counter is odd” at program execution.
Depending on the MCU in use, the operating mode setting should be re-confirmed because the intended reset vector value may not be written because of the MCU operating mode setting (e.g., on-chip ROM disabled expansion mode).