Electronics > Beginners
Transmitting CAN messages and ignoring ACK with MCP2515
(1/2) > >>
HwAoRrDk:
I have a need to put together a test/simulation setup for sending CAN messages on a bus. The bus will consist solely of the simulating transmitter and one other receiving node (the DUT). However, the receiving node is designed to be a passive listen-only node, and thus will never ACK any of the messages it receives.

The test setup I was thinking of putting together would consist of an Arduino board with a CAN shield that uses an MCP2515 controller. I have been looking the MCP2515 datasheet, but I cannot seem to see an explicit way of telling it to ignore when a transmitted message goes un-ACKed. Otherwise, I believe that if I just went ahead and started sending out messages, it would not only continuously try to re-send the unacknowledged messages, but also after a short period it would start sending error frames and then eventually go to bus-off mode and stop. Obviously not very useful for my situation.

Can I use the 'one-shot' mode for my needs? I gather this turns off the retry mechanism, but will it result in complete messages being transmitted on the bus? That is, will my passive-listening DUT node still receive them as complete, error-free frames?

Also, how rigorous do I need to be with bus termination in a small test setup? The MCP2515 shield has built-in termination, but my DUT does not have any, as it is designed to only be a spur node on a bus with termination already existent at both ends. Should I just whack a resistor on a breadboard, have the shield connected to the breadboard, and put my DUT connections just before the resistor? Also, how critical is the exact resistor value? I don't think I have any 120R resistors, but I can probably series/parallel some up for something close (maybe ±10R).
Chriss:
Hi!
For the termination resistor.
I was tried several setups on can bus, actully in some car diagnostic and flashing tools for ecu like 120+- 5% and also with or without resistor and everything was workink properly.
The ACK I'm not sure also what will happen.

May I ask you what kind of simulator you make?
I also thinking to make for me a can simulator for use in my job.
I would actually connect a diagnostic tool to the simulator and send some msg to the simulator....
Sorry I really don't want to hijack your post.
I'm just curious and interested in diy can simulator.

My best regard.

Sent from my GT-I8260 using Tapatalk

MosherIV:
Hi

Not familiar with MCP2515. Just speed read (cursry scanned) the data sheet.

Have you tried 'one shot mode'?
The data sheet says that it will only send the message once regardless of arbitration loss or frame error.

Hope that helps.
max_torque:
Just put a "dummy" second device on the bus, which never transmits data onto the bus, and have that one in "normal" mode, that way you'll get the ACK the CAN standard requires.
Jeroen3:
Most CAN controllers have a bit to disable automatic retransmit. You shouldn't normally do this, since corrupted frames also do not get retransmitted, but in your case it might be the way to go.
I think Microchip calls this One Shot, but you should try it.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod