MSCAN on the HCS12

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

MSCAN on the HCS12

4,726 次查看
metboy
Contributor I
Hi,
I've just used the Software in the App Note AN3034 to program the MSCAN. I've changed nothing in the software, but only deactivated loop back self test mode ( in CANCTL1 ).
But in the CAN0SendFrame() the Transmission completes never. The Code execution freezes hier:
CAN0TFLG = txbuffer;   // Start transmission 
while ( (CAN0TFLG & txbuffer) != txbuffer);  
// Wait for Transmission completion
I have no idea why!
i'll be thankful for your help!
 
 
标签 (1)
0 项奖励
4 回复数

630 次查看
Steve
NXP Employee
NXP Employee

metboy,

 The CAN bus requres that nodes acknowledge messages. This happens automatically, but you need at least two nodes on the bus otherwise it will never complete a transmission.

0 项奖励

630 次查看
metboy
Contributor I

Thanks Steve,

for my purpuse, i have to use only one node at this time. can i send the acknowledge myself?  

0 项奖励

630 次查看
imajeff
Contributor III
At least in my HC12 there is a LOOP bit I can set for testing, letting me send messages to myself.
0 项奖励

630 次查看
Steve
NXP Employee
NXP Employee

You need a receiving CAN node so you either need to create a network or use loopback mode.

0 项奖励