Help! Steps to follow in order to share data between HC12x cpu and xgate.

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

Help! Steps to follow in order to share data between HC12x cpu and xgate.

Jump to solution
2,196 Views
Ral_Virutas
Contributor I
Hello everybody!
 
I'm working in a project using a hc12x with Xgate and I don't understand the way data is shared between them. I want read a port or activate a output, across Xgate, something easy.  Has anybody some examples of C code about it???
 
Thanks in advance!!!!!
 
 
Raul

Message Edited by J2MEJediMaster on 2007-04-12 10:55 AM

Labels (1)
Tags (1)
0 Kudos
1 Solution
845 Views
J2MEJediMaster
Specialist I
Have you looked at the example code supplied with the CodeWarrior installation? In the directory ..\CW for HC12V4.5\(CodeWarrior Examples)\HCS12X\HCS12X_XGATE_SoftwareRequest is an example program that demonstrates communications between the HCS12X core and the XGATE, via Software Request interrupts. That might not be exactly what you're looking for, but it would be a starting point.

---Tom

View solution in original post

0 Kudos
3 Replies
845 Views
pittbull
Contributor III
Hi,
Somewhere in the XGATE chapter of the S12XDP512 manual you'll find that the S12 always has precedence when XGATE and S12 try to access a ressource at the same time.
Anyway, you can use the XGATE semaphore registers to lock critical code sections...
846 Views
J2MEJediMaster
Specialist I
Have you looked at the example code supplied with the CodeWarrior installation? In the directory ..\CW for HC12V4.5\(CodeWarrior Examples)\HCS12X\HCS12X_XGATE_SoftwareRequest is an example program that demonstrates communications between the HCS12X core and the XGATE, via Software Request interrupts. That might not be exactly what you're looking for, but it would be a starting point.

---Tom
0 Kudos
845 Views
Steve
NXP Employee
NXP Employee
Also have a look at AN3144 which contains an example showing the sharing of a simple buffer.