xgate software trigger problem

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

xgate software trigger problem

Jump to solution
2,067 Views
robmilne
Contributor II

I can make xgate software triggers work in RAM on the 512K parts but not so for
the smaller memory parts. I'm landing in the soft error handler every time I
write to XGSWT. The interrupts work fine if I run the code out of xgate flash but I need
to run my program on the small memory parts that do not have xgate flash.

Has anyone encountered this issue? Is there a workaround?

-rob

Labels (1)
0 Kudos
Reply
1 Solution
964 Views
robmilne
Contributor II
0 Kudos
Reply
8 Replies
964 Views
HSW
NXP Employee
NXP Employee

Hello Rob,

If you give me some more information, I can help you find the problem.

 

Which MCU are you using?

Where did you place the XGATE's vector table?

Where do your SWT vectors point to?

 

hsw

0 Kudos
Reply
964 Views
robmilne
Contributor II

Thanks HSW.

 

I know there is nothing wrong with the way I'm copying my xgate code to RAM or the value of XGVBR.  This seems to be an issue with software triggers specifically.  My other xgate interrupts (timer, rti) are functioning fine but as soon as I write to XGSWT to kick off an xgate software thread I get the software error.  I still have to investigate a possible misalignment.

 

What has me baffled is that the code works in some hw variants and not others.  I have a xd256 chip that thinks it is a xdp512 (according to NoICE) where the xgate sw triggers work fine in RAM.  On a xdt256 it fails with the exact same S file.  If I run the xgate code out of flash on the xdt256 the problem disappears.  I could live with the flash speed handicap except that I plan to use the xdg128 for my project which has no xgate flash.

 

-rob

0 Kudos
Reply
964 Views
robmilne
Contributor II

The attachment here shows where I am in the NoICE debugger just before the error happens.  The memory area shown is the xgate vector table in RAM with RPAGE = 0xFC.  The chip is a 9S12XDT256MAA with mask 1M84E.  The compiler is ICC12.

 

As far as I can tell there doesn't appear to be an alignment issue for the write to XGSWT on the CPU12 side or with the position of the thread in the xgate vector table at address 0x10E0 or the 0xE0BE address of the var (0x20BE in CPU12 local memory) passed to the xgate thread.  I'm really stuck.

 

-rob

0 Kudos
Reply
964 Views
robmilne
Contributor II

A snapshot ot my registers - in case that is helpful...

 

-rob

0 Kudos
Reply
965 Views
robmilne
Contributor II

Fixed.

0 Kudos
Reply
964 Views
HSW
NXP Employee
NXP Employee

What was the cause of the software error?

0 Kudos
Reply
964 Views
robmilne
Contributor II

I'll report when I'm totally sure - I found the problem but haven't completed a solution.

0 Kudos
Reply
964 Views
kef
Specialist I

Maybe this AN will help:

  

AN3555 : Investigating XGATE Software Errors (pdf)
The XGATE peripheral coprocessor includes a safety feature called Software Error Detection. The Software Error Detection...

 

This thread also may help.

0 Kudos
Reply