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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,206 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,855 次查看
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 项奖励
回复
3 回复数
1,855 次查看
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...
1,856 次查看
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 项奖励
回复
1,855 次查看
Steve
NXP Employee
NXP Employee
Also have a look at AN3144 which contains an example showing the sharing of a simple buffer.