# How to use CAN on JETSON TX2?

**URL:** <https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125>\
**Category:** Jetson TX2\
**Created:** [October 12, 2017, 4:10am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125 "2017-10-12T04:10:52Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![dxn140430](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dxn140430](https://forums.developer.nvidia.com/u/dxn140430)\
**Post date:** [October 12, 2017, 4:10am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/1 "2017-10-12T04:10:52Z")

</div>

New to the Jetson in general, but wanting to use CAN on the TX2. (If it’s possible)  
Already installed Ubuntu, ROS, and the latest drivers/firmware(28.1).  
Any information to use CAN on the TX2 will help!  
Thank you!

---

<div class="post-metadata">

**Author:** ![spatra](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/spatra/32/12509_2.png) [@spatra](https://forums.developer.nvidia.com/u/spatra)\
**Post date:** [October 12, 2017, 4:41am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/2 "2017-10-12T04:41:32Z")

</div>

Hi,

Yes, Jetson TX2 supports CAN communication among CAN nodes.  
TX2 has 2 CAN controllers.  
To make use of CAN communications, CAN transceiver has to be interfaced with each of the controllers.  
CAN transceiver is the interface between a controller area network (CAN) protocol controller and the physical bus.  
To interface transceiver with CAN controller please follow TX2 TRM (CAN topic).  
For a quick setup please check the below pin description and the attachment.

J26 PIN === Desc.  
1=======CAN wake

3=======CAN0 STAND BY  
5=======CAN0 RX  
7=======CAN0 TX  
9=======CAN0 ERR

13======CAN1 STANDBY  
15======CAN1 RX  
17======CAN1 TX  
19======CAN1 ERR

Once you interface them properly, below steps can be followed to achieve proper communication.

Steps to enable and check CAN on TX2:

1. Enable kernel support for mttcan (Other required modules are already supported)

2. Insert CAN BUS subsystem support module.  
modprobe can

3. Insert Raw CAN protocol module (CAN-ID filtering)  
modprobe can\_raw

4. Real CAN interface support (for our case, it is: mttcan)  
modprobe mttcan (dependent module is can\_dev: can driver with netlink support)

5. CAN interface settings for both the controllers  
ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on  
ip link set up can0  
ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on  
ip link set up can1

6. Installation of user app to check CAN communication  
sudo apt-get install can-utils

7. Commands to run to check CAN packet send/receive  
broadcasting a can data packet:  
cansend \<can\_interface\> \<can\_frame\>  
e.g. cansend can0 123#abcdabcd

8. To check the interface statistics  
ip -details -statistics link show can0  
ip -details -statistics link show can1

 ![JetsonTX2_CAN.png](https://global.discourse-cdn.com/nvidia/original/2X/6/6b23c6cb452ea1aa64a491982ea886e6610d5a50.png)

---

<div class="post-metadata">

**Author:** ![Marius\_I](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/marius_i/32/12895_2.png) [@Marius\_I](https://forums.developer.nvidia.com/u/Marius_I)\
**Post date:** [February 22, 2018, 4:24pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/3 "2018-02-22T16:24:48Z")

</div>

Hi,  
I have used your topic above and everything works fine.  
I am sending data from CAN0 to CAN1 via 2 tranceivers SN65HVD230 using cansend and candump.  
But if during the sending i disconnect the wires and break the link between can0 and can1 and try to send again my Nvidia tx2 freezes and i need to restart it.  
I think that Can Message RAM is filled up with data and because is not been sended it crashes.  
Did someone tried to send data and then break the loop betweend Can0 and Can1?

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [March 1, 2018, 6:11am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/4 "2018-03-01T06:11:20Z")

</div>

Hi Marius\_I,

We will clarify and reply in your topic - [url][Nvidia Tx2 freeze after disconnecting from 3.3v pin the can bus transceivers SN65HVD230 during the c... - Jetson TX2 - NVIDIA Developer Forums](https://devtalk.nvidia.com/default/topic/1030241/jetson-tx2/nvidia-tx2-freeze-after-disconnecting-from-3-3v-pin-the-can-bus-transceivers-sn65hvd230-during-the-cansend/%5B/url%5D)

Thanks

---

<div class="post-metadata">

**Author:** ![ckann](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ckann](https://forums.developer.nvidia.com/u/ckann)\
**Post date:** [December 4, 2018, 9:14pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/5 "2018-12-04T21:14:25Z")

</div>

Hi, I was hoping for some help following this post.

I am currently attempting to communicate between my TX2 and an arduino Teensy using CAN. I am using a MCP2561/2 transceiver with each controller. I have flashed the TX2 with mttcan = y and followed the instructions above, however, when I try to do cansend on my can0 there doesn’t seem to be any action on the TX0 line.

If I send from my Teensy I am able to track the message all the way to the RX0 line of the TX2, but candump shows no message.

Any advice would be appreciated. Thanks!

MCP2561/2 - [http://ww1.microchip.com/downloads/en/DeviceDoc/20005167C.pdf](http://ww1.microchip.com/downloads/en/DeviceDoc/20005167C.pdf)

%%%%%

Resolved

---

<div class="post-metadata">

**Author:** ![spatra](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/spatra/32/12509_2.png) [@spatra](https://forums.developer.nvidia.com/u/spatra)\
**Post date:** [December 6, 2018, 7:04am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/6 "2018-12-06T07:04:11Z")

</div>

Hi Ckann,

We need to have logs to analyze whats going wrong.

Please provide the complete boot log (this is required as your mttcan module is built statically)  
Also please provide the kernel log while doing candump on mttcan.

Thanks & Regards,  
Sandipan

---

<div class="post-metadata">

**Author:** ![raisintoe](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@raisintoe](https://forums.developer.nvidia.com/u/raisintoe)\
**Post date:** [February 12, 2019, 10:22pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/7 "2019-02-12T22:22:51Z")

</div>

Sparta,

I have also followed the steps given above for configuring the CAN devices, and I am running into the same problem that Ckann is. I write to my can0 port, and see no action on the CANTX pin. I do not have a transceiver tied to the pins yet, but I expect to see changes happening on the CANTX pin with my oscilloscope.

---

<div class="post-metadata">

**Author:** ![akimball0000](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@akimball0000](https://forums.developer.nvidia.com/u/akimball0000)\
**Post date:** [June 21, 2019, 8:19pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/8 "2019-06-21T20:19:37Z")

</div>

See next post…

---

<div class="post-metadata">

**Author:** ![akimball0000](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@akimball0000](https://forums.developer.nvidia.com/u/akimball0000)\
**Post date:** [June 21, 2019, 8:20pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/9 "2019-06-21T20:20:39Z")

</div>

Our implementation of CAN bus uses a TI canbus transceiver and does not use CANERR or CANSTBY signals. I’ve reviewed the reference design and also various other sources… it seems like there is no requirement on those signals for any pullup or pulldown resistors if they are not implemented.

Our implementation is working without them for both CAN0 and CAN1, using only the TX and RX lines. My question are along the lines of good design practice: Should we tie CANERR and CANSTBY high or low? Pull them up or down? Or is it okay to leave them as no-connect inputs?

Feedback will be appreciated.

EDIT: Also, I can’t find the bit-rate specification for the TX2 or TX2i anywhere. I’m in charge or writing the User Manual for our new product. I would like to quote the bit-rate limits of the CAN bus interface. I know it will work at 500,000 bits per second. How fast can it go? Is there a lower limit?

---

<div class="post-metadata">

**Author:** ![shgarg](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shgarg/32/9748_2.png) [@shgarg](https://forums.developer.nvidia.com/u/shgarg)\
**Post date:** [July 1, 2019, 4:42am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/10 "2019-07-01T04:42:30Z")

</div>

Hi,

CANERR and CANSTBY pins supoort are not yet implemented in driver. It is okay to leave them( do not connect).  
Bit-rate min is 500kbps and Max is 1Mbps

Thanks,  
Shubhi

---

<div class="post-metadata">

**Author:** ![JDSchroeder](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jdschroeder/32/15466_2.png) [@JDSchroeder](https://forums.developer.nvidia.com/u/JDSchroeder)\
**Post date:** [October 9, 2019, 7:58pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/11 "2019-10-09T19:58:05Z")

</div>

> [@shgarg](#):
>
> CANERR and CANSTBY pins supoort are not yet implemented in driver. It is okay to leave them( do not connect).

According to the Developer Kit Carrier Board schematic CAN0/1\_STBY is bidirectional, and CAN0/1\_ERR is an input signal to the SoM. How are these signals intended to be used in the future when they are implemented in the driver?

---

<div class="post-metadata">

**Author:** ![JDSchroeder](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jdschroeder/32/15466_2.png) [@JDSchroeder](https://forums.developer.nvidia.com/u/JDSchroeder)\
**Post date:** [October 10, 2019, 5:29pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/12 "2019-10-10T17:29:48Z")

</div>

Also, it appears that pin E17 is reserved in the latest documentation. However, it is connected on the schematic as CAN0\_STBY. Is E17 usable as a GPIO signal?

---

<div class="post-metadata">

**Author:** ![shgarg](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shgarg/32/9748_2.png) [@shgarg](https://forums.developer.nvidia.com/u/shgarg)\
**Post date:** [November 18, 2019, 6:20am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/13 "2019-11-18T06:20:29Z")

</div>

Hi JDSchroeder,

CAN0\_STBY pin can be used as GPIO. I will look at it soon on how STBY and ERR pins can be used in future.

Thanks,  
Shubhi

---

<div class="post-metadata">

**Author:** ![JDSchroeder](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jdschroeder/32/15466_2.png) [@JDSchroeder](https://forums.developer.nvidia.com/u/JDSchroeder)\
**Post date:** [November 18, 2019, 3:23pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/14 "2019-11-18T15:23:57Z")

</div>

> [@shgarg](#):
>
> CAN0\_STBY pin can be used as GPIO.

That would be great. E17 is not listed in the pinmux document so any additional details like which padconf/address to use to configure it and what the corresponding GPIO port/address to use for controlling it as a GPIO are needed.

---

<div class="post-metadata">

**Author:** ![shgarg](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shgarg/32/9748_2.png) [@shgarg](https://forums.developer.nvidia.com/u/shgarg)\
**Post date:** [November 19, 2019, 3:31am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/15 "2019-11-19T03:31:08Z")

</div>

Hi,

Sorry, my bad. I just checked E17 pin is not connected anywhere in CVM of Jetson-TX2. That’s why, it is not given in pinkux document as well. Well generally CAN\_STBY and CAN\_EN pins are configured as GPIO and driver uses them in suspend/resume time to make chip active/inactive by controlling GPIO.

Thanks,  
Shubhi

---

<div class="post-metadata">

**Author:** ![nvidia22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nvidia22](https://forums.developer.nvidia.com/u/nvidia22)\
**Post date:** [October 13, 2020, 3:41am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/16 "2020-10-13T03:41:21Z")

</div>

Is the minimum still 500kbps? That’s awfully high; lots of gear out there is locked to 250kbps. I’d hate to have to use a USB-CAN or SPI-CAN interface.

Best,

Steve

---

<div class="post-metadata">

**Author:** ![shgarg](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shgarg/32/9748_2.png) [@shgarg](https://forums.developer.nvidia.com/u/shgarg)\
**Post date:** [October 13, 2020, 4:03am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/17 "2020-10-13T04:03:16Z")

</div>

Hi,  
CAN communication should be possible at 125Kbps as well with CAN clock rate to be 40MHz and according to specs, it should work to min 50kbps but I have not verified it this minimum.  
Can you please check.

Thanks,  
Shubhi

---

<div class="post-metadata">

**Author:** ![Natanael\_Vitorino](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/natanael_vitorino/32/119471_2.png) [@Natanael\_Vitorino](https://forums.developer.nvidia.com/u/Natanael_Vitorino)\
**Post date:** [August 31, 2021, 2:59pm UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/18 "2021-08-31T14:59:35Z")

</div>

Raisintoe,

To you see any action, you need to put and set it up a Can trasceiver, because the controller is to configure the data in binary, send this data to transceiver and the transceiver send data to the bus in order to eletric pulses. So, if you have been setted up one transceiver and sent data, you will can see it in the osciloscopio, if not, it will not work.

You can check the data with the loopback mode, but you will just test the Can controller on board, I guess that’s it you want. Another thing, you setted the pinmux correctly?

I did one “get started” setting up of Jetson AGX Xavier, I think that will help you too.

> **[GitHub - nata-vito/CAN-transceivers-on-Jetson-AGX-Xavier: In this repository you will find a simplified...](https://github.com/nata-vito/CAN-transceivers-on-Jetson-AGX-Xavier)**
>
> In this repository you will find a simplified method of installing CAN transceivers on the Jetson AGX Xavier board. After much research and study, I created these steps in the way I would have liked to find when I was doing the installation.

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [September 8, 2021, 6:44am UTC](https://forums.developer.nvidia.com/t/how-to-use-can-on-jetson-tx2/54125/19 "2021-09-08T06:44:49Z")

</div>


