Open DENESTY opened 4 years ago
@thanhhaibk96 Hi thanhhaibk96 Thank you for your help,Before I use the information you provided to find solution. Use the file you provided, through the below steps, whether it should work normally. I have the steps you mentioned,like(1)configure SPI Pin.(2)move the mcp251x.ko to /lib/modules/.../net/can/spi/. (3)move the dtbo to /boot and move the dtb to /boot/dtb .(4)sudo /opt/navida/jetson-io/jetson-io.py to configure .(5)use "lsmod",i can see the mcp251x. (6)sudo ip link set can0 type can bitrate 1000000 -->cannot find device "can0".
Can you show me "$ dmesg|grep mcp251x"? Do you communicate between 2 board mcp2515?
I transfered datas from a mcp2515 to STM32F407, because STM32F407 uses 3.3 voltage reference, but mcp2515 uses IC CAN TJA1050 which uses 5V voltage reference, so I have to replace TJA1050 with SN65HVD23x-HT (https://www.ti.com/lit/ds/symlink/sn65hvd230.pdf?ts=1592626665987&ref_url=https%253A%252F%252Fwww.google.com%252F). I think you should check this one.
@thanhhaibk96 z@z:~$ dmesg |grep mcp [ 0.554811] GPIO line 200 (mcp2515_int) hogged as input [ 8.312872] mcp251x: loading out-of-tree module taints kernel. [ 8.324874] mcp251x: Enable DMA
Can you see what the problem is? I only use a mcp2515 to transfered datas to imx6ul . thanks you a lot.
@DENESTY mcp251x.ko is OK, You try checking your hardware. Maybe problem is ic can TJA1050 on MCP2515
@thanhhaibk96 Hi thanhhaibk96 Can you send and receive data normally? In my device, Data can only be sent once ,and automatically send data once when can0 down. can't accept data. when rmmod mcp251x and insmod mcp251x.ko, then set can0 up ,it is RTNETLINK answers :Invalid argument. Can you see what the problem is? thanks you a lot.
I have already improved somwthing in the code, you can check it ..... https://github.com/thanhhaibk96/JetsonNano-mcp2515/tree/master/mcp2515_driver_v3
Hi DENESTY, You can follow these steps in this topic https://forums.developer.nvidia.com/t/jetson-nano-and-mcp2515-can-module/112271/23