Sending signals from NVIDIA TX2 board CAN to ECU

Hi,

We are working on assisted braking system based on pedestrian detection.
How to send signals from the CAN to the ECU using C++ code.
We are unable to send and receive signals between TX2 and Canalyser even after doing all the setup mentioned in the forums.

Kindly help.

Thanks

Hi Pratosha,

You have tried the method provided in below topic, but still not working, right?[url]https://devtalk.nvidia.com/default/topic/1025630/jetson-tx2/what-is-the-order-of-communication-for-can-communication-/post/5216441/#5216441[/url]

Thanks

Hi kayccc,

Thanks for your response.
We are following the same steps mentioned above but currently using AMIS-30663-D as the transceiver to CAN0 port only.
While checking with the oscilloscope probes we can see the variations of the signal being passed from Canalyzer to the transceiver.The signal is getting detected at the transceiver level as well. But at pin5(Rx) of J26 port, we can’t detect any signal being received.
The Canalyzer throws an error NAK(not acknowledged).

When we probe Tx and Rx pin we don’t see data getting sent or received.

Kindly help.

Thanks,
Pratosha

Please help.

Have you successfully been able to send CAN data using the Jetson before (I’m assuming you’re using Vector Canalyzer)? Could it be a terminating resistor issue?

I would recommend getting SocketCan working first with Canalyser before trying anything else in custom software.

Hi _david_evans_g,
We have implemented socketCAN code on Jetson TX2 to send data using it.
But we haven’t been sucessful.
While probing the Rx and Tx pin of J26 port, we don’t see any data getting transmitted/received.
We have a terminating resistor(120ohms) after transceiver between CANH and CANL pin.

Hi, Prathosha.

(Software)
Are you using any of the ‘CANUtils’ tools [url]https://elinux.org/Can-utils[/url], such as ‘candump’ to ensure the CAN interface is up? Have you been able to confirm that the CAN drivers is correctly set up on the device and the interface is running?
[url]http://sgframework.readthedocs.io/en/latest/cantutorial.html[/url]

(Hardware)
Is your Transceiver powered and grounded by the Jetson? Are the pins correct?

Sorry to ask basic questions, sometimes they are the answer.

David.

Hi David,

Yes i agree .
We are using can-utils .These are the set of commands we are using to initialize the driver and set up the interface:
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
sudo ifconfig -a
sudo ifconfig can0 down
sudo ifconfig can1 down
sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
sudo ip link set up can0
sudo ifconfig can0 up
sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
sudo ip link set up can1
sudo ifconfig can1 up
sudo apt-get install can-utils
cansend can0 123#abcdabcd

Our transceiver is externally powered up , but the common ground point of J26 port i.e pin 10 and 11 are grounded externally as well.

Thanks for your response.

Pratosha

I can only comment on my setup, but mine is powered by the Jetson, I think as a test you should try powering your CAN transceiver from the Jetson as a test (check the voltages).

Hi David,
Can you share the pin configuration of J26 port you used to connect your transceiver?
That would be of great help.

Thanks,
Pratosha

Here’s an image of my setup (red pwr, black GND, gren/white CAN) [url]https://imgur.com/a/oeKg5[/url]

(Try this at your own risk, etc.)

@Pratosha … Did that work?

Hi David,

We did the setup for our CAN transceiver but no luck with it .
Can you share a picture of the other side of the transceiver?
Can I also know which was the transceiver used by you?

Thanks a lot for your support and response.

Hi, Pratosha.

My setup is identitcal to the one here:
MCP2551 CAN Transceiver Circuit
[url]http://www.learningaboutelectronics.com/Articles/MCP2551-CAN-transceiver-circuit.php[/url]

I can’t confirm which transceiver is being used (as I cannot read it) but it’s most likely MCP2551.

Have you tried another transceiver? Do you have a 10K ohm pull down resistor (see link)?

Hi David,

We are using AMIS - 30663- D as the transceiver.
I have attached an image of the connection we use - Imgur: The magic of the Internet
When we use the oscilloscope probes at pin 5/7 of J26 port we see no signal being sent or received.
We can see the signal getting passed at the transceiver level, hence the transceiver seems to be connected fine.

Is there any jumpers to enable the J26 port? We can’t see any signal other than voltage levels at pin2 and pin8 of J26 port.

Kindly help.

Thanks David

I really don’t know the issue, my only concern is that maybe the CAN transceiver is not compatible with the Jetson, or may need additional setup… It should work, but I don’t know what is causing the issue.

The only suggestion I can make is try a different CAN transceiver… for example, MCP2551 or SN65HVD230… Transceivers that are known to work with the TX2.

What are you doing with Pin8 on the CAN Transceiver? (see page 2) [url]http://www.onsemi.com/pub/Collateral/AND8375-D.PDF[/url]

Hi David,
Pin 8 of the transceiver goes to Pin 2 of J26 port - 3.3V
Pin 4 of the transceiver goes to Pin 5 of J26 port - CAN0 Rx
Pin 1 of the transceiver goes to Pin 7 of J26 port - CAN0 Tx
Pin 3 of the transceiver goes to Pin 8 of J26 port - 5 V
Pin 2 of the transceiver goes to Pin 10 of J26 port - gnd

Pin 7 goes to CAN_H of DB9 connector
Pin 6 goes to CAN_L to DB9 connector
120 ohms across CAN_H and CAN_L

We have used this transceiver for our previous setups and has worked fine.
Yes , will surely try with SN65HVD230 once available with us.
Is there any additional setup at J26 port ?
We cannot detect any signal getting sent/ received other than supply voltages at J26.

Kindly help
Thanks.

@Pratosha

I really can’t figure out what’s wrong with your setup, everything appears to be correct. My only concern is that maybe your CAN transceiver isn’t compatible with the Jetson, or it might require a subtle change to the Jetson device tree or CAN driver to make it work.

Hi David,

We will try with SNHVD230 and come back to you on this. Hopefully it succeeds!!
https://devtalk.nvidia.com/default/topic/1027805/how-can-i-control-can-bus-on-tx2-/#5246401

We are not able to find the dts file here on our board.
Hence using this link - https://devtalk.nvidia.com/default/topic/1030142/can-apis/?offset=5#5240501
to download and run the sources folder.

Are we on the right track regarding this? Or do we have to rebuild it?

Thanks alot,
Pratosha