The microprocessor I'm using, the BeagleBone Black, has an option to send CAN messages to/from it through the UART Tx and Rx pins. I'm not sure, though, if this is a 1:1 translation (i.e. the UART TX port corresponds to the CAN TX port) or if it's vice versa (i.e the UART TX port corresponds to the the CAN RX port).
-
2\$\begingroup\$ What is the question? \$\endgroup\$– LundinNov 8, 2019 at 11:01
-
2\$\begingroup\$ CAN doesn't have TX and RX, it has High and Low. You need a transceiver to connect TX/RX signals to the CAN bus. What transceiver are you using and is this not covered in its documentation? \$\endgroup\$– nekomaticNov 8, 2019 at 13:10
1 Answer
No, UART port does not directly correspond to CAN. In the Beaglebone you have physical pins that can be muxed to different peripherals, say pin E16 can be configured as UART0_TXD or as DCAN0_RX, but you can as well have pins that can be configured for CAN but not for UART (say pins D17/D18) and vice versa.
If you need a CAN functionality you need to configure your pin as a CAN RX/TX port in your device tree (or device tree overlay). Then, as @nekomatic says you need to connect CAN RX/TX to an external CAN transceiver that eventually should be connected to the CAN bus.