Due_Can examples not running

I'm having problems with the due_can library. I've tried two different Due boards and four different CAN transceivers, and had a friend replicate my issues on his hardware, and I am now stumped.

I can't make any of the example sketches - e.g. extended ping pong, echo test, sending test - run properly. BUT, the GVRET sketch for SavvyCan works perfectly, sending and receiving on both transceivers, so I know that the hardware is fine.

I'm using Windows 10, and the latest version of the Arduino IDE and due_can library. The sketches compile and upload fine, using the Native USB port.

On, for example, the CAN_SendingTest sketch, by inserting a couple of Print statements I can see that the sketch runs through setup with no errors, and goes into the loop. It calls the sendData function each time through. But neither can0.available nor can1.available ever return anything but zero.

As above, I have checked and rechecked wiring and resistance across two different setups so am fairly confident those are ruled out.

Any help or pointers would be greatly appreciated.

The transmitter needs to receive an ACK from any other nod on the CAN bus. It will not work unless there is a second module that will ACK the message. Try configuring it in loopback mode and see it it starts working.

Thanks but that is what I have configured. These sketches effectively are the loopback tests, with the two can interfaces in the due communicating with each other, as either end of a short bus.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.