The SK-TDA4VM has 4 CAN bus interface. How can these be used?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The Edge AI SDK's prebuilt SD card image comes packaged with the same Linux driver for CAN as used in PSDK Linux. The CAN bus can be enabled and used as documented here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_02_00_03/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/MCAN.html
Linux discovers the CAN bus instances with the following names:
can0=J1=MCU_CAN0
can1=J5=CAN0
can2=J6=CAN5
can3=J2=CAN9
The header pins are defined like so (taken from SK userguide https://www.ti.com/lit/ug/spruj21b/spruj21b.pdf?ts=1651850889758&ref_url=https%253A%252F%252Fwww.google.com%252F):
To test CAN driver, we can do a loopback by connecting two CAN bus on SK board, then running the following commands:
root@j721e-eaik:~# ip link set can0 type can bitrate 500000
root@j721e-eaik:~# ip link set can1 type can bitrate 500000
root@j721e-eaik:~#
root@j721e-eaik:~#
root@j721e-eaik:~#
root@j721e-eaik:~# ip link set up can0
root@j721e-eaik:~# ip link set up can1
root@j721e-eaik:~#
root@j721e-eaik:~#
root@j721e-eaik:~# candump can0 &
[2] 1220
root@j721e-eaik:~# cansend can1 123#1122334455667788
can0 123 [8] 11 22 33 44 55 66 77 88
root@j721e-eaik:~#
Regards,
Takuma