Electrical – CAN Loopback test using SN65HVD233-HT

canlpcmicrocontroller

Im using the SN65HVD233-HT CAN transceiver where it states that loopback is possible without data going out to the bus.

Im using LPC1778 uC and want to know,if i enable the loopback pin in the transceiver, will the data transmission from the uC be affected, because CAN works on sampling the Tx data and Rx data simultaneously(internal to the uC to identify bit errors).By shorting the Tx and Rx pins of the uC via the transceiver,will it cause any errors?

Or must i put the uC to self-test mode(no ACK required for a transmitted message to be declared successful) before i perform a loopback test,so that the Tx message wont be repeatedly sent when i perform a loopback?

loopback test will be used to check CAN module pin and transceiver integrity(i.e if TX data== RX data).

Best Answer

The loopback function of the SN65HVD233 does not work by shorting the output of the micro, instead it removes the device from the bus by putting the CANH and CANL pins into a high impedance state - see page 1 of the datasheet.

This will not cause any transmission errors due to the physical layer, you will however need to put the micro into the test mode as there won't be a node on the bus to acknowledge the message and you will get repeated transmission otherwise.

The easiest way to test this would be to fire up the device and step through the program checking the registers as you go.
Using the loopback mode only tests the connection between the micro and transceiver, it won't allow you to check the integrity (soldered correctly/shorts?) of the transceiver outputs (CANH & CANL).