MSCAN on the HCS12

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MSCAN on the HCS12

5,463件の閲覧回数
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 返答(返信)

1,367件の閲覧回数
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 件の賞賛
返信

1,367件の閲覧回数
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 件の賞賛
返信

1,367件の閲覧回数
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 件の賞賛
返信

1,367件の閲覧回数
Steve
NXP Employee
NXP Employee

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

0 件の賞賛
返信