Hi Folks,
I am easily able to receive CAN traffic with my Peak USB-CAN interface on my linux workstation. I know our device is producing regular updates at 250000 and it dumps find using candump.
For a couple days I have been trying (without success) to duplicate the behavior on my Element Rev B6 Beaglebone. I’ve read many posts and have worked bast a bunch of issues but still get no can traffic.
The results are the same with a WaveShare CAN Cape or a discrete NXP TJA1051 High-speed CAN transceiver that I have connected on a breadboard. If I hook a scope to the input RX signal I can see the external CAN traffic but nothing gets through.
I did modify ~/bb.org-overlays/src/arm/cape-universaln-00A0.dts to remove references to pins P9_24 and P9_26 (UART1 RX/TX)
For clarity’s sake here is the script that I run after rebooting the Beaglbone.
`
set -x
echo “# make sure, I’m running as root, unmolested bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img image”
id
uname -a
echo “# look, can pin muxing for P9_24 and P9_26 are at default (GPIO, mode 7)”
devmem2 0x44E10980 w
devmem2 0x44E10984 w
echo “# cat my overlay File, has been built/installed/rebooted successfully”
cat /hone/debian/bb.org-overlays/src/arm/BB-CAN1-00A0.dts
echo “# install my overlay to setup the CAN pins”
sh -c “echo ‘BB-CAN1’ > /sys/devices/platform/bone_capemgr/slots”
echo “# see that the overlay was installed and make sure pins went to mode 2”
cat /sys/devices/platform/bone_capemgr/slots
devmem2 0x44E10980 w
devmem2 0x44E10984 w
echo “#load the can drivers”
modprobe can
modprobe can-dev
modprobe can-raw
echo “# show what’s loaded”
lsmod
echo “# fire up the interface”
ip link set can0 type can bitrate 250000 triple-sampling on
ip link set can0 up
echo “# see that we’re up”
ifconfig can0
echo “#Shoud receive can data, same as my linux workstation…”
candump can0
`
Here is the output from the script…
`
debian@beaglebone:~$ sudo ./canSetup.sh
- echo # make sure, I’m running as root, unmolested bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img image
make sure, I’m running as root, unmolested bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img image
- id
uid=0(root) gid=0(root) groups=0(root) - uname -a
Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux - echo # look, can pins P9_24 and P9_26 are at default (GPIO, mode 7)
look, can pins P9_24 and P9_26 are at default (GPIO, mode 7)
- devmem2 0x44E10980 w
/dev/mem opened.
Memory mapped at address 0xb6f93000.
Value at address 0x44E10980 (0xb6f93980): 0x37 - devmem2 0x44E10984 w
/dev/mem opened.
Memory mapped at address 0xb6f9b000.
Value at address 0x44E10984 (0xb6f9b984): 0x37 - echo # cat my overlay File, has been built/installed/rebooted successfully
cat my overlay File, has been built/installed/rebooted successfully
- cat /home/debian/bb.org-overlays/src/arm/BB-CAN1-00A0.dts
/*