CAN message sending/receiving is working in general but the order of transmitted messages is not in FIFO mode as expected and configured. This is a problem using CAN transport protocol (ISO 15765-2) strongly based on correct message order. I use a Jetson TX2 and do CAN communication using golang with brutella (“github.com/brutella/can”) based on socket CAN (and mttcan… of the Jetson SDK).
ENOBUFS is sporadically returned when I send a bunch of messages (~500) with high speed. This is handled with delays and retries.
The message order on real CAN bus is not in the order messages forwarded successfully to the socket CAN. There are often few messages sent very early (e.g. 30th, 31st, … message) which will be sent at the end of the bunch. At least exact the number of messages forwarded successfully to socket CAN appear also on CAN bus but in wrong order.
Is there are configuration to force strict FIFO mode on all layers (socket CAN and below)? Is there a known issue with the queuing on mttcan driver/hardware?
Info: The communication works fine if I use a simple delay on every message transmit. But this slows down communication and depends on CAN bus traffic.
Thank you for the fast support!
Unfortunately I am not able to change the DT properly.
I tried to change according this instruction (even the file name seems to fit…): Linux Device Tree | How To Edit Device Tree at Run Time
The changes were applied: I can read the values with fdtget but they do not apply after reboot (reading: dtc -I fs /sys/firmware/devicetree/base, fdtget is still ok)
Because there is used a SD card for booting, I changed also the file after booting from native flash - there is no effect.
Hi,
You can update dtb using:
$ sudo dtc -I dtb <DTB_FILE> -o test.dts
open test.dts and modify and save (sudo vi test.dts)
$ sudo dtc -I dts test.dts -O dtb -o <DTB_FILE>
make sure you update the correct dtb which is getting flashed, reflash the device to get changes.
Can you please tell me how are you flashing the device?
the file /boot/tegra186-quill-p3310-1000-c03-00-base.dtb has already the changes (“dtc -I dtb … -o test.dts” creates the file test.dts including already the new changes).
The problem is that the new changes will not be applied. “dtc -I fs /sys/firmware/devicetree/base” reads the old values.
I flashed the board using the SDK-Manager. After that some modifications are applied (e.g. installing required tools). After that I copy the root file system to a SD card and adjust boot/extlinux/extlinux.conf to use mmcblk0p1 instead of mmcblk2p1. The file /etc/fstab will be added “/dev/mmcblk2p2 /config vfat dmask=027,fmask=137 0 1”.
Reboot does not update dtb partition. To update, you need to copy updated dtb in Linux_for_Tegra/kernel/dtb location and reflash the device. Please try and let me know.
I have seen there is a new JetPack 4.2.1 available (we use 4.2 so far). The DT is already changed accordingly there. I have flashed this version and yes: It is working fine now!