CAN-CAPE TT3201 CAN/CANBUS on BeagleBone Black Redux

Anyway … tl;dr I can verify that 2 of the 3 CANBUS interfaces on the TT3201 work. The third looks like it should work, but I didn’t verify it.

For those who would like to actually use the thing, here’s the notes I was taking as I was going along in case I need to repeat this:

Dealing with CANBUS on the TT3201 with BeagleBone Black:

  1. Start from

Angstrom Distribution (BeagleBone, BeagleBone Black - 4GB SD) 2013-06-20
https://s3.amazonaws.com/angstrom/demo/beaglebone/Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.06.20.img.xz

  1. Expanded partition to 16GB–I did everything from a uSD card rather than eMMC which seems to sidestep some collisions and timing problems with certain things that people reported on different groups.

  2. opkg update

  3. opkg upgrade

(This dance required a couple of rounds and I had to shut down services on port 80 to get around an error)

Lather/rinse/repeat 3&4 until it converges.

  1. Upgrade the kernel TowerTech’s 3.8.13+ custom thing that you have to get directly from them

Really guys? You don’t just have a public link/repository in this day and age? Sigh. They did provide it within 24 hours, so “yay” for a vendor who actually responds to their support email address.

5b) Reboot

  1. The default can utilities appear to be broken (or maybe I just don’t understand them–wouldn’t be the first time ). You need to compile up a new set of can-utils from here: https://gitorious.org/linux-can/can-utils

Standard “./autogen.sh” “./configure” “make” dance applies as for anything afflicted with the autotools curse.

  1. Connect can0 to can1–Connect Pin 8 to Pin 6 and Pin 7 to Pin 5.

Pinout data in the TT3201 “user manual” does appear to be correct. I verified some stuff on my scope, but can2 exhibits different behavior from can0 and can1. Not surprising since the first two seem to come from the MCP2515 chips and the other is directly from the SoC.

CAN0 → IC4 → Pin 7 and Pin 8 on connector
CAN1 → IC5 → Pin 5 and Pin 6 on connector
CAN2 → IC6 → Odd behavior that I still haven’t worked out

  1. Push the 3 switches on S1 away from the edge of the board

This seems to connect the 120Ohm terminating resistors for the interfaces.

  1. Configure can buses

root@beaglebone:~# ip link set can0 type can bitrate 125000
root@beaglebone:~# ip link set can1 type can bitrate 125000
root@beaglebone:~# ip link set can0 up
root@beaglebone:~# ip link set can1 up

CAUTION: My scope shows the TX line as being 15.8us from rising edge-to-rising edge. That’s exactly 1/2 of 125000 (as it should be since that’s 2 bits), but it confused me until I thought about it for a bit. So if you are interfacing to a different CAN system, make sure that you agree on what “bitrate” actually means.

  1. Run cansend and candump in two different windows/sessions/whatever

root@beaglebone:~# cd linux-can-can-utils/
root@beaglebone:~/linux-can-can-utils# ./candump can1
can1 1F334455 [8] 11 22 33 44 55 66 77 88

root@beaglebone:~# cd linux-can-can-utils/
root@beaglebone:~/linux-can-can-utils# ./cansend can0 1F334455#1122334455667788

  1. Resist urge to crumple up into a gibbering heap in the corner

As always, your mileage may vary. Offer not valid anywhere. You’re on your own–cope. Be careful out there. Go pound sand. Etc.

Anybody want to tackle doing this in straight Debian (TowerTech sends you a repo link)? I’ll buy you a beer. Maybe even two. Possibly a six pack.

Please? Pretty please? Don’t make me do this again …

Hi!

Debian is now supported and you don’t need any particular kernel, we give a package
with full drivers sources and a script that does it all.

A git repository with the drivers is available but we found out that
customers makes less mistakes when we give them a package with instructions.

Can I get the package with instruction?

Thanks,
Kevin

Hi

Actually, now i suffer from same situation.
Could u give me the package with instruction?

Thanks,
Hyello

2015년 10월 9일 금요일 오전 6시 16분 17초 UTC+9, Alessandro Zummo 님의 말: