This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BEAGLEBK: Beaglebone Black - CAN Configuration

Part Number: BEAGLEBK

Hi,

I am trying to configure the CAN bus in he Beaglebone Black development board. I followed many tutorials but was unable to get the CAN bus up and running.

Was wondering anyone knew the correct method to configure the CAN bus. If anyone can help me out or share a working tutorial it will highly appreciated.

Thank you

Nisal

  • Hello Nisal,

    Please take a look at our DCAN Linux driver documentation.

    Regards,

    Nick

  • HI Nick,

    I am finding the documentation a bit difficult to understand. I am using Debian Image 2019-08-03. I am using a ISO1050 as the CAN transceiver, and a CAN bus analyzer to see the CAN messages. I can see that both can0 and can1 are up running in ifconfig. However, the cansend command does not seem to generate any CAN messages. After a few tries, I get this error 

    debian@beaglebone:~$ cangen can1
    write: No buffer space available


    Are there anything I must configure before configuring the CAN buses. 

    Thank you

    Nisal

  • Hi,

    TI only supports the TI SDK on the Beagle Bone Black. I am unfamiliar with the Debian image so I don't know what it sets up in the DTS file for the board. 

    It is possible to enable CAN on the Beagle Bone Black but it is not enabled by default in the TI SDK either.  To enable DCAN on the board that you are using will require enabling the interfaces and setting the interface pin mux. The interface nodes look to be defined at least since they are showing up in the interface list. 

    What DTS file changes have you done?

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Thank you for the reply. I managed to get the CAN1  interface up and running, though I am not sure I did it the correct way. I followed the following steps,

    1. Enabled uBoot overlays in the uEnv.txt file and added BB-CAN1-00A0.dtbo as a custom cape

    2. Run the command - 

    sudo ip link set can1 type can bitrate 500000

    3. Run the command - 

    sudo ip link set can1 up


    After following those steps I was able to sent and receive CAN messages with a TMS320F28075 microcontroller. I want to clarify whether this method is correct. And furthermore I would like to know how I can change the boot settings, so that the CAN1 interface will be setup during bootup.

    Thank you

    Nisal

  • Hi,

    I am glad you were able to get CAN1 functioning. I  confirming the steps looks OK to me, main thing is that it worked.  

    Since you are using Debian you will need look at how SystemD services or applications are started on boot. There is content on the web covering this topic. TI does not have any documented examples on how to do this since this is outside the scope of driver support.

    Best Regards,

    Schuyler

  • Hello,

    I use the latest debian buster ioT image 2020-04-06 on beaglebone black and a waveshark RS485 CAN cape. The waveshark CAN cape has the cape "detecting mechanism" / EEPROM automatic cape detection. 

    How can I use the U-Boot overlay feature on the beaglbone am335x ?   

    Where can I get the BB-CAN1-00A0.dtbo  file? It is not in /lib/firmware available .  But in /lib/firmware ist another file with the name PB-CAN1-00A0.dtbo. Maybe I can use this file? 

    The CAN cape is connected with P9.24 and P.26 with the can-transceiver. 

    How can I enable the uBoot overlay to use the CAN-cape? I only want to use CAN1.

    Regards,

    Jörg Simon

     

  • Hi,

    TI does not support the CAN cape on the Beagle Bone Black, cape manager or the Debian Image running on the board. A quick look on the web found this link perhaps addresses what you are looking for.   

    Best Regards,

    Schuyler