CAN1 does not work BBB

68 views
Skip to first unread message

hanswu...@googlemail.com

unread,
Sep 26, 2019, 5:08:44 PM9/26/19
to BeagleBoard
Hello,
I have a problem with the CAN1 interface on my Beaglebone Black. 

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[8f20cac93cbbec2ab705333a543903287ff9e7d4]
eeprom:[A335BNLT00C02017BBBK05D5]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gbb4af0f   50f]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-gbb4af0f50f]:[l   ocation: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-14-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-CAN1-00A0]
UBOOT: Loaded Overlay:[BB-I2C2-00A0]
UBOOT: Loaded Overlay:[BB-NHDMI-TDA998x-00A0]
UBOOT: Loaded Overlay:[BB-SPIDEV0-00A0]
kernel:[4.14.108-ti-r118]
nodejs:[v6.17.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/BB-I2C2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr6=/lib/firmware/BB-CAN1-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-   00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.4.20190922.0-0rcnee0~stretch+20190922]
pkg:[bb-wl18xx-firmware]:[1.20190227.1-0rcnee0~stretch+20190227]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~stretch+20190327]
pkg:[firmware-ti-connectivity]:[20180825+dfsg-1rcnee1~stretch+20181217]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev us   ers systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk    weston-launch xenomai autologin]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/m   mcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep remote
[    1.244859] remoteproc remoteproc0: wkup_m3 is available
[    1.464098] remoteproc remoteproc0: powering up wkup_m3
[    1.464219] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,    size 217168
[    1.468443] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   10.159438] remoteproc remoteproc1: 4a334000.pru is available
[   10.179638] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   10.135980] pruss 4a300000.pruss: creating PRU cores and other child platform    devices
[   10.159438] remoteproc remoteproc1: 4a334000.pru is available
[   10.159565] pru-rproc 4a334000.pru: PRU rproc node /ocp/pruss_soc_bus@4a32600   4/pruss@0/pru@34000 probed successfully
[   10.179638] remoteproc remoteproc2: 4a338000.pru is available
[   10.179757] pru-rproc 4a338000.pru: PRU rproc node /ocp/pruss_soc_bus@4a32600   4/pruss@0/pru@38000 probed successfully
dmesg | grep pinctrl-single
[    0.943534] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    0.955505] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END



debian@beaglebone:~$ cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
...
pin 96 (PIN96): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins
pin 97 (PIN97): 481d0000.can (GPIO UNCLAIMED) function pinmux_dcan1_pins group pinmux_dcan1_pins
...


debian@beaglebone:~$ sudo ip link set can1 up type can bitrate 125000

everythings fine with no Error or Warning.

and then i try:
debian@beaglebone:~$ cansend can1 07f#4004 
Nothing happens at the CAN bus


debian@beaglebone:~$ cansend can1 07f#4004
debian@beaglebone:~$ cansend can1 07f#4004
debian@beaglebone:~$ cansend can1 07f#4004
debian@beaglebone:~$ cansend can1 07f#4004
debian@beaglebone:~$ cansend can1 07f#4004
debian@beaglebone:~$ ip -details -statistics link show can1
3: can1: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT                           group default qlen 10
    link/can  promiscuity 0
    can state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
          bitrate 125000 sample-point 0.875
          tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
          c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
          clock 24000000
          re-started bus-errors arbit-lost error-warn error-pass bus-off
          0          0          0          1          1          1         numtxque                          ues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
    RX: bytes  packets  errors  dropped overrun mcast
    24         3        0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0
debian@beaglebone:~$


What am I doing wrong? Why is nothing transmitted ? 
I monitored the output with an oscilloscope. 



And another problem. 
Due to the problems with the CAN bus I tried to make a kernel and boatloader update.
But I get the following error message.

debian@beaglebone:/opt/scripts/tools$ git pull
fatal: unable to access 'https://github.com/RobertCNelson/boot-scripts/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
debian@beaglebone:/opt/scripts/tools$


many thanks in advance and have a nice day @ all 


Jacob J. Morales Argumedo

unread,
Sep 27, 2019, 1:50:11 AM9/27/19
to beagl...@googlegroups.com
Did you try using config-pin instead of the overlay?

See my post regarding a similar issue i had and see if it helps you:

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/f761c89f-1317-4868-8fd2-7aac992a22b7%40googlegroups.com.

debounce

unread,
Sep 27, 2019, 1:52:09 AM9/27/19
to BeagleBoard
What CAN transceiver are you using?  Have you verified your transceiver works?

hanswu...@googlemail.com

unread,
Sep 27, 2019, 6:27:06 AM9/27/19
to BeagleBoard
I tried it with overlays and with config-pin.
But both did not work.
We check the pins directly on the Board.

debounce

unread,
Sep 28, 2019, 1:14:22 PM9/28/19
to BeagleBoard

hanswu...@googlemail.com

unread,
Sep 28, 2019, 1:27:04 PM9/28/19
to BeagleBoard
Hi,
I do not have one connected right now.
I am watching pin9-24 and pin9-26 with an oscilloscope. And nothing happens there.
Best regards

Bert Buchholz

unread,
Sep 28, 2019, 1:39:53 PM9/28/19
to BeagleBoard
On Saturday, 28 September 2019 19:27:04 UTC+2, hanswu...@googlemail.com wrote:
I do not have one connected right now. 
I am watching pin9-24 and pin9-26 with an oscilloscope. And nothing happens there. 

CAN doesn't work without at least two nodes on the bus in order to ACK messages. You can see that your can1 device went into BUS-OFF. However, you should see the first attempts to send a package until the device had too many unacknowledged retries.

For what it's worth, I am using CAN without issues on the BBB with the same CAN1 overlay but I am initializing and using can0 instead of can1, maybe that's worth a try.

debounce

unread,
Sep 28, 2019, 3:56:00 PM9/28/19
to BeagleBoard
Like Bert said, you need two devices AND a transceiver. I hope you did not try to connect the BB straight into the CAN bus without a transceiver!

Jan Cumps

unread,
Sep 29, 2019, 5:55:42 AM9/29/19
to beagl...@googlegroups.com
> Like Bert said, you need two devices AND a transceiver.
Yes, and the other receiver has to be correctly set up with the same speed. When This is wrong, the pins P9.24 and P9.26 are not outputting data.
The hardware is needed to make it work.

 

Virusvrij. www.avg.com

On Sat, Sep 28, 2019 at 9:56 PM debounce <morales...@gmail.com> wrote:
Like Bert said, you need two devices AND a transceiver. I hope you did not try to connect the BB straight into the CAN bus without a transceiver!

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

hanswu...@googlemail.com

unread,
Oct 8, 2019, 9:24:05 AM10/8/19
to BeagleBoard
Thanks again to everyone,
The problem was the transceiver.
Current I work with the original Cape and ist works fine.
Reply all
Reply to author
Forward
0 new messages