CW4.6: 9S12XDP512: debug break point problems with XGATE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW4.6: 9S12XDP512: debug break point problems with XGATE

Jump to solution
1,410 Views
paulcsf
Contributor II
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?

Thanks, Paul.
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
522 Views
paulcsf
Contributor II
Well, we found it.

We were initializing the XGATE with XGMCTL=0x8383, which has the wrong state for BDM freeze operation.

The fix was to initialize the XGATE with XGMCTL=0xC3C3, causing the XGATE to freeze in DBM debug mode.


View solution in original post

0 Kudos
Reply
1 Reply
523 Views
paulcsf
Contributor II
Well, we found it.

We were initializing the XGATE with XGMCTL=0x8383, which has the wrong state for BDM freeze operation.

The fix was to initialize the XGATE with XGMCTL=0xC3C3, causing the XGATE to freeze in DBM debug mode.


0 Kudos
Reply