Solutions to your doubts are just one click away. Just select the appropriate category and ask questions. You can also reply to the answers you are already aware.
For testing CAN, canutils package
is highly recommended. We are not providong canutils packge along with NOR flash. So please boot the board from SD card and follow the below steps to test the can.
1.Boot the board from MMC.
2. After booting,check the interface is available or not by giving the below command.
$ ifconfig can0
3.To Transmit packets from board to PC. Connect the PCAN device. Give the below commands to test can.
Target side:
$ ip link set can0 down
$ ip link set can0 type can bitrate 50000
$ ip link set can0 up
$ cansend can0 123#1232
Host side:
$ sudo ip link set can0 down
$ sudo ip link set can0 type can bitrate 50000
$ sudo ip link set can0 up
$ candump can0
$ can0 123 [2] 12 32
To Transmit packets from PC to Board
Host side :
sudo ip link set can0 down
sudo ip link set can0 type can bitrate 50000
sudo ip link set can0 up
sudo cansend can0 123#1232
Target side :
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
candump can0
can0 123 [2] 12 32
Expected o/p :
To Transmit packets from board to PC
Target side:
root@sama5d27-som1-ek-sd:~# ip link set can0 down
root@sama5d27-som1-ek-sd:~# ip link set can0 type can bitrate 50000
root@sama5d27-som1-ek-sd:~# ip link set can0 up
root@sama5d27-som1-ek-sd:~# cansend can0 123#1232
Host side:
USER@ubuntudesk:~$ sudo ip link set can0 down
USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000
USER@ubuntudesk:~$ sudo ip link set can0 up
USER@ubuntudesk:~$ sudo candump can0
can0 123 [2] 12 32
To Transmit packets from PC to Board
Host side :
USER@ubuntudesk:~$ sudo ip link set can0 down
USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000
USER@ubuntudesk:~$ sudo ip link set can0 up
USER@ubuntudesk:~$ sudo cansend can0 123#1232
Target side:
root@sama5d27-som1-ek-sd:~# ip link set can0 down
root@sama5d27-som1-ek-sd:~# ip link set can0 type can bitrate 50000
root@sama5d27-som1-ek-sd:~# ip link set can0 up
root@sama5d27-som1-ek-sd:~# candump can0
can0 123 [2] 12 32
For testing CAN, canutils package is highly recommended. We are not providong canutils packge along with NOR flash. So please boot the board from SD card and follow the below steps to test the can. 1.Boot the board from MMC. 2. After booting,check the interface is available or not by giving the below command. $ ifconfig can0 3.To Transmit packets from board to PC. Connect the PCAN device. Give the below commands to test can. Target side: $ ip link set can0 down $ ip link set can0 type can bitrate 50000 $ ip link set can0 up $ cansend can0 123#1232 Host side: $ sudo ip link set can0 down $ sudo ip link set can0 type can bitrate 50000 $ sudo ip link set can0 up $ candump can0 $ can0 123 [2] 12 32 To Transmit packets from PC to Board Host side : sudo ip link set can0 down sudo ip link set can0 type can bitrate 50000 sudo ip link set can0 up sudo cansend can0 123#1232 Target side : ip link set can0 down ip link set can0 type can bitrate 50000 ip link set can0 up candump can0 can0 123 [2] 12 32 Expected o/p : To Transmit packets from board to PC Target side: root@sama5d27-som1-ek-sd:~# ip link set can0 down root@sama5d27-som1-ek-sd:~# ip link set can0 type can bitrate 50000 root@sama5d27-som1-ek-sd:~# ip link set can0 up root@sama5d27-som1-ek-sd:~# cansend can0 123#1232 Host side: USER@ubuntudesk:~$ sudo ip link set can0 down USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000 USER@ubuntudesk:~$ sudo ip link set can0 up USER@ubuntudesk:~$ sudo candump can0 can0 123 [2] 12 32 To Transmit packets from PC to Board Host side : USER@ubuntudesk:~$ sudo ip link set can0 down USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000 USER@ubuntudesk:~$ sudo ip link set can0 up USER@ubuntudesk:~$ sudo cansend can0 123#1232 Target side: root@sama5d27-som1-ek-sd:~# ip link set can0 down root@sama5d27-som1-ek-sd:~# ip link set can0 type can bitrate 50000 root@sama5d27-som1-ek-sd:~# ip link set can0 up root@sama5d27-som1-ek-sd:~# candump can0 can0 123 [2] 12 32
@Shipra Nigam Can you share the logs of your trials.
find out from the below link, with this we can test the CAN. https://www.peak-system.com/PCAN-USB.199.0.html?&L=1#