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
已解决! 转到解答。
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
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
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.