We are using a 9S12XDP512, and have C code doing the initialization, transferring execution to old assembly code that is in the process of being converted. We are using the XGATE.
When we step through the code, the XGATE control register is left alone from it's initial value (0x0000).
When we set a break point, the debugger sets the XGDBG bit, setting the XGMCTL register to a minimum of 0x0020.
On resume of code execution, this debug bit is not cleared, and our old assembly code doesn't touch XGMCTL again after initialization. So the XGATE stays in debug mode, freezing it's execution.
Is there a way to have the debugger restore XGMCTL to it's previous state before the break point?