BeagleBone A4, Angstrom v2012.01, Sitara DCAN driver?

Was trying to play around with the CAN bus a bit. I'm new to the
subject. My BeagleBone is Revision A4 and I'm running the Angstrom
v2012.01 demo image.

Reading http://processors.wiki.ti.com/index.php/Sitara_DCAN_Linux_Driver
it seems the d_can driver in the linux kernel should work. Indeed I
can find that driver, and the tools, in the Angstrom repository. The
modules load succesfully but no can0 or can1 device is detected.

Is this to be expected, is there a firmware problem or something? Any
clues on what to do to get the can buses detected? dcan1 pins do seem
to be accessible in the expansion ports, dcan0 might be problematic
because of I2C2 and what the manual says at 8.1.2.

-Bert

PS lsmod and dmesg below

Module Size Used by
can_raw 4431 0
d_can_platform 2053 0
can_bcm 8379 0
can 19911 2 can_raw,can_bcm
d_can 6017 1 d_can_platform
can_dev 6783 1 d_can
g_ether 27893 0
ipv6 209417 16

[ 4016.030296] CAN device driver interface
[ 4034.279638] can: controller area network core (rev 20090105 abi 8)
[ 4034.279913] NET: Registered protocol family 29
[ 4146.456791] can_raw: Unknown parameter `can-bcm'
[ 4294.029535] can_raw: Unknown parameter `can-bcm'
[ 4309.493601] can: broadcast manager protocol (rev 20090105 t)
[38351.879251] CAN bus driver for Bosch D_CAN controller 1.0
[38703.370323] can: raw protocol (rev 20090105)

Was trying to play around with the CAN bus a bit. I'm new to the
subject. My BeagleBone is Revision A4 and I'm running the Angstrom
v2012.01 demo image.

Reading http://processors.wiki.ti.com/index.php/Sitara_DCAN_Linux_Driver
it seems the d_can driver in the linux kernel should work. Indeed I
can find that driver, and the tools, in the Angstrom repository. The
modules load succesfully but no can0 or can1 device is detected.

Is this to be expected, is there a firmware problem or something?

The platform data is not initialized yet, I'll take a look at that next week when the CAN cape arrives

Thanks Koen -Bert

Hello Koen,

has there been any further progress on this? I’m trying to figure out if the BeagleBoard is the right choice for my project, and CAN support is a big issue for me.

Best regards,
Rasmus

CAN cape is fully supported by the latest software release

Does the Beagle actually have a CAN controller on it? I know from experience that the TI/Mistral CraneBoard has the CAN bus perfectly and flawlessly implemented. The Narcissus load of Angstrom for the CraneBoard includes a SocketCAN device driver, interface, and easy to use utilities (“cansend”, “candump” etc) . You simply plug in the CraneBoard to your CAN bus, boot the Angstrom load, and you’re ready to go.

Pardon my ignorance, but I didn’t know that any of the Beagle boards exposed their CAN interfaces (for example, where do you plug the CAN bus into on the Beagle???).

There is a CAN controller on the processor used on the BeagleBone. It is accessed via the expansion connectors by plugging in a CAN CAPE (Expansion Board).

Gerald

Thank you!

I think I found the CAN Cape (http://www.towertech.it/en/products/hardware/tt3201-can-cape/), but I don’t like the lack of schematics and the use of a non-standard connector.
If I roll my own board, is it just a matter of adding CAN transcievers to the two CAN channels, or is the EEPROM necessary to “activate” the CAN interface?

Best regards
Rasmus

I am not sure which CAPE Koen is using. It may one from BeagleBoardtoys.com. I am not sure if it is readily available or not.

Gerald

I reply:

Oh, thanks for clarifying that you need an expansion board to “expose” the CAN feature of the TI ARM processor (the Beagle uses the same TI ARM processor as the CraneBoard). It may actually be more cost effective and simpler to use the CraneBoard where everything’s built-in.

Gerald wrote:

There is a CAN controller on the processor used on the BeagleBone. It is accessed via the expansion connectors by plugging in a CAN CAPE (Expansion Board).

I think that your biggest challenge in “rolling your own” is on the software end. You must also provide SocketCAN and drivers for the “roll-your-own” board. That’ll probably be quite time-consuming to compile (it requires a Linux Kernel re-compile).

Again, the CraneBoard is ready to go for $199. Although I’ve criticized the rotten support network for the CraneBoard in the past, it has performed well for me in a very environmentally challenging environment (on a fire truck) and has the CAN stuff well implemented in both hardware and software.

Not really. If using the build-in CAN controller, all software functionality is already there. All I would need to add would be the CAN transcievers.

You will always need an EEPROM for a cape

Ok, thanks! I looked into the EEPROM section of the BeagleBone SRM, and it doesen’t seem impossible to figure this out :slight_smile:

The “MUX Mode” setting for the two CAN ports is easy enough to glance from page 60, and I confirmed the values using the pin mux tool from TI. I really don’t understand the purpose of the “RX” bit (bit 5) though. Where can I find more information on what these pin settings actually do?

Provided I am able to:

  1. Figure out the correct EEPROM content to use the CAN buses
  2. Make a cape with EEPROM, CAN transcievers and connectors
    … would that be all the hardware needed?

If yes, what do I need to modify in the beaglebones software? If I understood you correctly, there already are socketCAN-compatible device drivers in the kernel in the latest ångström image, so I’m hoping not too much? :slight_smile:

Ok, thanks! I looked into the EEPROM section of the BeagleBone SRM, and it doesen’t seem impossible to figure this out :slight_smile:

The “MUX Mode” setting for the two CAN ports is easy enough to glance from page 60, and I confirmed the values using the pin mux tool from TI. I really don’t understand the purpose of the “RX” bit (bit 5) though. Where can I find more information on what these pin settings actually do?

Provided I am able to:

  1. Figure out the correct EEPROM content to use the CAN buses
  2. Make a cape with EEPROM, CAN transcievers and connectors
    … would that be all the hardware needed?

Yes, but you’ll still need to add support for your cape to the kernel to actually turn on the CAN subsystem

Ok. I’m really more of a hardware guy and have limited linux skills - I use it on all my computers, but haven’t bothered with customizing the kernel in a long time.

So my options really boils down to:

  1. Wait until there is a CAN cape available that also provide schematics with the design, and is supported out of the box by BeagleBone. Making a “clone” of an existing design is also an option since I’m used to building my own electronics and have the needed skills and equipment.
  2. Make my own design from scratch, and learn how to add support to the kernel.
    I realize that option 1 is the easiest and probably most time-efficient way to do this. However, this is for a hobby robotics project, and I would like to learn as much as possible along the way. Also, I will probably need to add other electronics apart from the CAN bus to my cape in the future, so in the long term I would be better off if I learn how to make my own cape from scratch.

And this is where my limited knowledge really shows. I have no idea how much work is needed to add support for a custom cape, and I’m not sure where to begin. To be honest, I thought that it was really just as easy as providing the correct mux configuration in the eeprom, and then the beaglebone would recognize the configuration, load the drivers and just work… I realize that I can not expect to be educated on the ins and outs of adding support for new hardware in this forum, but I would appreciate if you can tell me roughly what I need to learn to make this happen. I will document my progress as I go along and would be more than happy to provide this as a reference for other people wishing to develop their own capes.

I’m sure all the information is already out there somewhere, but I really need help with where I should start looking. :slight_smile:

Best regards,
Rasmus

Do you know why mistral no longer offers crane board at their shop:

http://www.mistralsolutions.com/gn-web-store.html?Itemid=62&PId=511&Iid=1

“This product has been removed from our webstore for more details contact info@mistralsolutions.com

Regards,
Marek

W dniu wtorek, 13 marca 2012, 19:27:04 UTC+1 użytkownik Fredric J. Einstein napisał:

I guess you need to ask them. I have no idea.

Gerald

Everyone,

I just got 2 ads sent to me through the beagleboard site. I hope this is not going to become a problem. I thought this site was for us to spread technical information on the beagle products.

Sincerely,

Mike Fontes

I think it is a spammer who slipped past the Google groups filters. I’m sure this will be cleared up soon