I can transmit, but rx buffers never get message...help!

Greetings all. My first step into the CAN world occurred a few months ago.

Please, if you have any ideas regarding the following, don't hesitate to offer them up!

We are in the throes of designing a CAN based control system for automobile simulators. We are using MC9S12DP256 microcontroller from Motorola/Freescale - we have some development boards right now.

I am using a high speed TI transceiver (SN65HVD251) and set baud rate to 1Mb/s.

After much pain (especially in bit timing!), I am successfully transmitting messages between development boards and back to the PC (through IXXAT USBtoCAN device). The data I send does get transmitted and shows no errors. I can see the data displayed on the PC, and I can see the data on the bus with an oscilloscope.

The development boards don't receive the message properly, however. Each board sends the ACK signal, and no errors are generated. But the RXF flag never goes high - indicating the message is not passing the filtering (acceptance code/mask) setup.

Because the receive buffers never get populated with a message, no interrupt ever fires and all nodes happily ignore any and all messages I've tried.

I have tried the filters in many different configurations, including actually following the datasheet directions, and I am still not successful.

If you have any pointers, ideas, or condolences I'd love to hear them.

Also, I suppose it could be another issue, but I'm not convinced yet.

Thank you,

David Havell Sr Electrical Engineer L3 Communications SLC UT 84104

Reply to
david.havell
Loading thread data ...

The ACK is a hardware function -- a node sends it when it detects a valid packet, whether it does anything with it or not.

Try setting the acceptance masks to all ones, then all zeros. One of these should be "I'll take anything". If that doesn't work then there's probably some other obscure bit -- perhaps not one that's described in the CAN section of the manual -- that you need to set up.

Does Freescale have any example code you could try?

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Reply to
Tim Wescott

months

hesitate

from

rate

transmitted

can

the

the

messages

including

them.

yet.

there's

in

Yes, the ACK is generated on a valid message. Which is why I suspect my problem is in the Rx filtering setup.

I have tried all sorts of combinations, but not all 1's. That's a good idea. I will try that this morning.

Someone else mentioned setting both registers to 1's also, strangely not mentioned in the documentation I have.

I have asked Freescale directly on exactly how to set up the filters. Thanks for your recommendations, I really appreciate it.

David Havell L3 Communications

Reply to
david.havell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.