dave kellogg

Can't Start Xgate: Due to XGDBG

Discussion created by dave kellogg on Dec 17, 2009
Latest reply on Dec 17, 2009 by HSW

Hi All,

I cannot get the XGATE to respond to an interrupt.  This is my first attempt at running the XGATE.


I'm using 9S12XD256 (0L15Y), CodeWarrior Debugger v6.1 (b9061), and P&E USB MultiLink (rev C).


I'm trying to get the XGATE to process an interrupt from ATD0.  The IRQ from ATD0 processes OK when directed to the CPU12, so the interrupt source is OK.  My configuration:


1. Set up the XGATE's vector table and VBR, and verified by examining memory in the debugger. 


2. Set the RQST and priority in XINT for ATD0, and verified by examining memory.


3. Enabled XGE in XGMCTL.  However, when I read this in memory with the debugger, I see that XGDBG is also set.  I suspect that this is a clue.  I just can't figure out how XGDBG is getting set.


Is this something that the debugger is doing behind my back?  Or is it somehow possible that the XGATE executed one instruction of RAM after it was zero blanked (causing a BRK), and before the XGATE code was copied down into RAM.  I know, this is really grasping at straws.  But I'm running out of theories.


Other clues:  When I examine the XGATE's processor registers, everthing is 0's, like it just came out of reset.


I've set up the XGATE vector table so that the VBR points lower in memory than the actual table origin at C800'x, to avoid wasting RAM on the unused vectors between offset $00 and $62 (channels lower then $32).  I noticed that since my vector table is butted up against the lowest RAM address (C800'x), the VBR actually points into non-existant memory space.  Reading between the lines in AN3555 "Investigating XGATE s/w Errors", I'm guessing that this is OK.  But is this alright to do?


I have an error handler in all of the XGATE's unused vectors, and that never is called (based on incrementing a counter in the error handler, and monitoring that location with the debugger).


I know that the debugger is running, because I can see the registers in the ATD changing when viewed in a memory window.


I have verified that the correct derivative is selected.  For grin's I turned on the "verify after load" option, and had no complaints.


I have looked at the alignment for the vector table, et al, and it seems OK.


Because I can load a program, I assume that the device is no secured.



Does anyone have suggestions about what to try next?  The XGDBC set bit looks like a smoking gun, but I'm not sure how to deal with it.


Thanks in advanced!!!