0
\$\begingroup\$

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).

\$\endgroup\$
5
  • \$\begingroup\$ This seems like a useless feature of the CAN transceiver. Pretty much every CAN controller supports loopback internally. Why you would want to do it on the transceiver, I have no idea. Is this the difference between HVD232 and HVD233? I've used the former plenty, but it has no such feature. \$\endgroup\$
    – Lundin
    Apr 20, 2016 at 13:40
  • \$\begingroup\$ To identify the fault area: Fault in CAN peripheral of the uC or fault in the transceiver \$\endgroup\$
    – AlphaGoku
    Apr 20, 2016 at 13:52
  • \$\begingroup\$ How? If the CAN controller is broken, how can you tell if it is the controller or transceiver that is bad? And what if the CAN side of the transceiver is broken, but the TTL side is fine? \$\endgroup\$
    – Lundin
    Apr 20, 2016 at 13:56
  • \$\begingroup\$ (These are very rugged circuits btw. To break them you must typically do something very creative, in which case all bets are off regarding the electronics in general anyhow.) \$\endgroup\$
    – Lundin
    Apr 20, 2016 at 13:58
  • \$\begingroup\$ If the CAN in uC is bad->data wont go out(you cant really tell if it fails).If the connection between transceiver and CAN is at fault->you can tell either connection between uC and transceiver or transceiver is at fault. Also the main reasons why this transceiver was chosen is because,as you pointed out,even though almost all uC come with internal loopback capabilty,the Tx data goes onto the bus as well. By enabling the LPBK pin in this transceiver,you can prevent data going onto the bus when the uC does an internal loopback test \$\endgroup\$
    – AlphaGoku
    Apr 20, 2016 at 14:08

1 Answer 1

1
\$\begingroup\$

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).

\$\endgroup\$
6
  • \$\begingroup\$ Wont it allow me to check if the traces are proper from CAN TTL to before CAN Differential and also if the transceiver is OK?Some checking is better than nothing right?Also,if theres no point checking this way,could you please explain why? \$\endgroup\$
    – AlphaGoku
    Apr 19, 2016 at 4:30
  • \$\begingroup\$ Also,even if i place the uC in Self-test and enable the loopback pin, will it effect the working,as TX data will be at RX Buffer at the same time \$\endgroup\$
    – AlphaGoku
    Apr 19, 2016 at 4:44
  • \$\begingroup\$ It will yes, up to the transceiver output, not the micro output. \$\endgroup\$
    – LogicTom
    Apr 19, 2016 at 9:50
  • \$\begingroup\$ No i asked if whether the CAN will function as expected or not because of data arriving at the Rx when data is transmitted \$\endgroup\$
    – AlphaGoku
    Apr 19, 2016 at 10:52
  • \$\begingroup\$ My previous comment was in response to your first comment - yes it will allow you to check up to just before the CAN differential pair. Can you elaborate on what you mean by "will it effect the working"? Do you mean the controller, transceiver or bus as a whole? My understanding is that it disconnects you from the network to allow you to perform loopback tests with effecting the rest of the bus but you still have to put the micro in test mode due to no ack but this does test the connection to the diff pair but I don't think you can't tell if the transceiver is ok vs completely missing. \$\endgroup\$
    – LogicTom
    Apr 20, 2016 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.