Hi Jim and Compilerguru,
Your alternatives are cool!
Compilerguru: no, you can't use only 0x9E as a single byte opcode because this is a escape code for the second opcode page (0x9E means that a second opcode byte follows). In case the second byte is a valid opcode (there are some of them defined on page 2), the instruction is valid and no ILAD reset will occur.
Jim: no, you can't use 0x8D and 0xAC because they are already used in the HCS08 CPU v4 (Flexis devices). These opcodes are used for the RTC and CALL instructions.
Other alternatives for ILAD reset:
1- Attempt to execute the STOP instruction when it is disabled (if your application is not using low power stop modes);
2 - Attempt to execute the BGND instruction when background debug is not active. This is very interesting. I always wondered why Freescale designed this is instruction to be illegal when debug mode is not active. If it was treated just as a NOP, it would be harmless when out of debug mode and act as a breakpoint when in debug mode.
Best regards,
Message Edited by fabio on
2008-02-22 12:04 PM