Hi,
I am currently trying to get CAN setup on the beagle bone black. However, not able to receive any CAN frames when I do candump can0. Our current configuration setup is:
Have an CAN transceiver’s RX and TX lines hooked up to the RX(P9_26) and TX(P9_24) pins on the Beagle bone black and the CANH and CANL lines hooked up to one of our custom CAN nodes which is always outputting CAN frames. We made sure that this node is sending out CAN frames and it is so we have data on the CAN bus the beagle bone isnt able to pick up the CAN frames.
So first for the configuration:
Have written the device overlay to set the correct pin muxing. This is the device overlay used :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";`<br><br>
/* identification */<br>```part-number = "dcan1pinmux";
fragment@0 {`<br>
target = <&am33xx_pinmux>;<br>```__overlay__ {
dcan1_pins_s0: dcan1_pins_s0 {`<br>
pinctrl-single,pins = <<br>```0x180 0x12 /* d_can1_tx, SLEWCTRL_FAST | INPUT_PULLUP | MODE2 */
0x184 0x32 /* d_can1_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */`<br>
>;<br>```};
};`<br>
};<br><br>```fragment@1 {
target = <&dcan1>;`<br>
overlay {<br>```#address-cells = <1>;
#size-cells = <0>;`<br><br>
status = “okay”;<br>```pinctrl-names = "default";
pinctrl-0 = <&dcan1_pins_s0>;`<br>
};<br>```};
};
Then compiled the overlay with the command: dtc -O dtb -o BB-DCAN1-00A0.dtbo -b 0 -@ BB-DCAN1-00A0.dts
and did the following steps after
-
sudo cp BB-DCAN1-00A0.dtbo /lib/firmware
-
echo BB-DCAN1 > /sys/devices/bone_capemgr.*/slots
sudo
modprobe can
sudo
modprobe can-dev
sudo
modprobe can-raw
``
linux-can/can-utilsGitHub
can-utils - Linux-CAN / SocketCAN user space applications
) Then ran make and make install
- Then these commands:
sudo
ip link ``set
can0 up ``type
can bitrate 125000
sudo
ifconfig
can0 up
- Then did candump can0 but no data seems to appear