CAN0, CAN1 not working even after enabling in PIN MUX spreadsheet

Is PIN MUXING methodology is considered as part of device tree ?

They are also written in dtsi, but they would be configured during MB1 rather than kernel.

Ok fine.

We are generating. Cfg file( which is flashed during MB1) from python tool using these dtsi files generated from PIN MUX sheet.

For T194 platform, you would need to use python script to transform dtsi to cfg for MB1.

1 Like

Yes. I know, I have done the same.
The generated .cfg file I am attaching here for for your reference.
tegra19x-mb1-pinmux-p2888-0008-b01-p2822-0000-jaxi.txt (30.5 KB)

I have some questions regarding this PIN MUXING stuff, please answer them so that my doubts will be cleared.

  1. What ever changes we do through pin muxing for the GPIO pin configuring, they wont reflect in my Sysfs node. I am right?
  2. Is this pinmuxing ( using GPIO PAA0, AA1,AA2,AA# pins as CAN0/1 IN/OUT pin in pinx mux spreadsheet) anyways helped my CAN functionality to work. or just my following commands helped me work my CAN. Please clarify.

sudo busybox devmem 0x0c303000 32 0x0000C400
sudo busybox devmem 0x0c303008 32 0x0000C458
sudo busybox devmem 0x0c303010 32 0x0000C400
sudo busybox devmem 0x0c303018 32 0x0000C458
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
sudo ip link set up can0
sudo ip link set up can1

exit 0

Yes.

They are the same thing.

1 Like

But still my CAN Pins are working in the background which I configured through GPIO pins from PIN MUX sheet. Am I right?

But as per my analysis, the .cfg file generated through PIN muxing will only do the below stuff, of writing these values to the registers as shown below:

sudo busybox devmem 0x0c303000 32 0x0000C400
sudo busybox devmem 0x0c303008 32 0x0000C458
sudo busybox devmem 0x0c303010 32 0x0000C400
sudo busybox devmem 0x0c303018 32 0x0000C458

My question is what about the other commands we have used to enable the CAN? any other method to integrate those command in code/device tree/etc to make CAN work apart from what I am doind now through script execution from my /etc/rc.local script file.

I’m not clear about what do you mean here.
Using pinmux spreadsheet is helping you to configure the pinmux register for the pins used by CAN.

They are necessary to enable and setup the CAN functionality.
I would suggest you should know every commands you used and every steps you did, and also the knowledge about the device tree, kernel config, how to configure can bus, how kernel module(driver) loaded…etc, or you would have endless questions here.

1 Like

you mean the below information is called writing to PinMux registers, which helps me in using my GPIO pins as my CAN IN/OUT lines?

Could you please point me to some link, which explains me about PinMuxing of GPIO pins/or any other pins so that I can study. Thanks.

pinmux.0x0c2f1600 = 0x00000001; # CONFIG AA0
pinmux.0x0c303000 = 0x00000000; # GPIO can1_dout_paa0
pinmux.0x0c2f1620 = 0x00000001; # CONFIG AA1
pinmux.0x0c303008 = 0x00000000; # GPIO can1_din_paa1
pinmux.0x0c2f1640 = 0x00000001; # CONFIG AA2
pinmux.0x0c303010 = 0x00000000; # GPIO can0_dout_paa2
pinmux.0x0c2f1660 = 0x00000001; # CONFIG AA3
pinmux.0x0c303018 = 0x00000000; # GPIO can0_din_paa3

Yes.

Please refer to the TRM (Technical Reference Manual) for Xavier Series Soc, which you could find in Jetson Download Center | NVIDIA Developer

1 Like

Thanks for the updates

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.