CAN Interfacing Timing or Signal Issue

I would like to check your diagram with internal team first so I need to clarify the diagram and your problem.
Doesn’t the problem only happen in sending non constant frames from a specific IMU to Xavier? Where is the IMU in the diagram?

@VickNV

Sorry here is the updated diagram with IMU.

CONFIG_CAN_CALC_BITTIMING is enabled in current kernel config.
According to the documentation you shared, disabling CONFIG_CAN_CALC_BITTIMING allows user-space tools to set the bit-timing parameters.
Could you just check with below command if current bit timing is as your expectation?
$ ip -d link show can1

@VickNV , thank you for the reply. Last i checked, existing timings were too big. i think one of them was even out of allowed range mentioned in the link i shared in my last post. I will check again.
Also, if its handy can you please share how to change this flag? I can check in one of the documentation on developer site if i get to it first.

Looking forward to hear from you about what your internal team thinks about my current setup.
Thanks in advance.

Regards,
Rishit

Before changing kernel config, you can search linux communities about the problem or check the related driver (~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_DDPX/DRIVEOS/drive-oss-src/kernel/drivers/net/can/dev.c on host system) to figure out why it fails to set the bit-timing parameters.

For kernel compilation, please check Compiling the Kernel (NVIDIA DRIVE Linux). Thanks.

Thanks for this information. Just checking to see if you got a chance to get the diagram reviewed by the team?

Thanks
Rishit

Below is the response from the internal team after reviewing your diagram. FYI.

The diagram looks like it should be ok, but if it were me, I would terminator on the CANlyst 2 instead of the IMU, making it the last device on the chain.

The reason is that this tool is more likely to send/receive many different messages rather than the IMU which will be sending specific messages.

Under normal circumstances, this shouldn’t make a huge difference, but it can’t hurt to give it a shot.

The other thing that might help is to run a shared ground between all devices on the bus.

Hi @VickNV ,

I have a good news. I was able to get the CAN working. But i am not entirely sure what made it work.

I did two things,

  1. Tried to cross-compile the kernel. But in the process I updated .config to defconfig.
  • Then i tried to manipulate CAN related modules in make menuconfig, especially enable Calculate bit timing.
  • I think all this should have been already configured and when i ran make defconfig it was over written.
  • I flashed the kernel but it was aborted. I think cross-compiling was not right.
  1. Then I downloaded DriveSoftware again using SDK manager - downloaded only target HW Image folder.
  • Flashed DriveAGX using SDK Manager.
  • I ran make defconfig again on host HW Image. Thats when I learned that this command changes config to default.
  • So i copied .config file from the target to replace .config file in Target HW Image folder. (get original configuration back)
  • CrossCompile the kernel.
  • Flash target with this new kernel

I am not sure if reflashing the kernel using SDK manager did the trick. I did that the first time but CAN dint work. Second time around I cross-compiled and flashed using SDK manager. May be that did the trick.

Any thoughts?

Thanks for your help all the way.

Regards
Rishit

Hi @rborad ,

Good to hear that your have some progress on this topic.

I have no idea actually but some questions for you:
Is any your previous post based on default kernel of DRIVE Software 10.0?
What’s the current working kernel configuration? Could you provide it by running the following command?

$ zcat /proc/config.gz

@VickNV ,

config_working (558.1 KB)
Please find Config file attached. Strangely i am not able to get my display working with DriveAGX, i tried restarting 3-4 times. I had to get the config using minicom. One of the solution i see online is to reflash the system. I am afraid i am going to loose whatever made the CAN work. Can you please help?

Regards,
Rishit

I’m not sure if I can help or not. But please create another topic for the display problem. Thanks.

ok and did anything pop out from looking at the config file i shared? Can i get default config file without downloading or flashing the new firmware? When i run defconfig in kernel folder on my host , all the CAN related modules look disabled in the config file.

flashed back to DRIVE Software 10.0 and got the following default kernel configuration for your checking.
kconfig.txt (177.4 KB)

1 Like

I also meet this issue. And I found a solution from CAN bus has error after connecting Jetson - #8 by joshshields0
Use following command to setup can will fix this issue.
“ip link set can0 type can bitrate 500000 sjw 4

3 Likes

Thank you for sharing your solution in the forum.