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.

[AM335x] CAN interface with AM335x EVM

Guru 24520 points

Hi community member,

Would you please provide your advice for the following phenomenon?

[Phenomenon]

Now, we would like to confirm the operation of CAN interface of AM335x by using AM335xEVM.  I refer the following wiki site and enter the commnad, however the console was showed as below.

 wiki: http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide

 commnad:   $ ip link set can0 type can bitrate 50000 triple-sampling on

 "cannot find the device can0"

Would you please provide the solution in order to resolve this?

I summarized my environment for this test.

 EVM: AM335X EVM with General purpose daughter card

 Linux/uBoot: AM335x Linux SDK version 7.0.0

If you have any questions. please let me know.

Best regards.

Kaka

  • Hi Kato,

    You need to set the EVM in Profile #1 or #2. We have used CAN with the following setup commands on SDK 6.0:

    canconfig can0 bitrate 1000000 ctrlmode triple-sampling on

    canconfig can0 start

  • Hi Biser,

    Thank you for your response.

    Did you confirm the CAN interface with SDK 7?

    Best regards.

    Kaka

  • I can't, I'm not a SW expert. I needed a CAN interface for testing other hardware and it was prepared for me on the GP EVM.

  • I will ask for support on this.

  • Hi Biser,


    Thank you for your cooperation.
    Do you have any updates for this topics?

    Best regards.
    Kaka

  • Hi Biser,

    I checked the CAN interface with using GP EVM and SDK 7.0.  However, we could not confirm that the Linux was not recognized the CANs even though the profile #1.   If we used SDK6.0, we could confirm the CAN operation with using GP EVM.
    In addition to this, if we used the AM437x GP EVM, we could confirm that the CAN was enabled on Linux.
    Would you please provide your advice for enabling the CAN interface on GP EVM with using SDK7?

    Best regards.

    Kaka

  • Would anyone provide advice for us?

    Regards.

    Kaka

  • Hi Kato,

    Unfortunately builded kernel in sdk 7 not support CAN interface. You have to do this yourself doing the following steps:
    1. In .config (using "make xconfig" or "make menuconfig ARCH=arm") file you have to follow p. "Detailed Kernel Configuration" from one of the pointed links. Now CAN interface is compiling as module and not included in the kernel.
    2. In .../linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am335x-evm.dts you have to initialize pin mux.
    3. You have to initialize interface.

    For all of these steps you can see from the sdk 6 from files: .../linux-3.2.0-psp04.06.00.11/arch/arm/mach-omap2/board-am335xevm.c and .../linux-3.2.0-psp04.06.00.11/arch/arm/mach-omap2/devices.c

    BR
    Ivan
  • Hi Ivan,

    Thank you for your advice. Please let me confirm your comments.


    Regarding to No.1, I could not understand this advice because I'm Linux beginner.
    I checked the ".config" file but I could not judge whether the CAN interface includes in the Kernel.
    And I compared the ".config" file SDK7 for AM437x and that for AM335x, however I could not find the difference for this file.
    How to confirm whether CAN interface includes in Kernel?


    Regarding to No.2 advice, there is DTS file for GP EVM with Profile1 in the same directory.
    When I changed the H/W profile for AM335x GP EVM, does uboot read the correct DTB file?
    If yes, I think that I need not modified the "am335x-evm.dts" file.

    If you have any question, please let me know.

    BR

    Kaka

  • Hi Kato,

    All kernel has a .config file. This is configuration file and there you can change many settings. Using make xconfig is with more user friendly interface. If you don't find what you are looking for you can type CTRL F and you will see a find window. In this file you will see that many of options will be marked as "check mark", dot or the square will empty. When square is as "check mark" this module/driver will include in the kernel. When square is marked with dot this module/driver will be outside kernel and if you want to use you can include after kernel booting. The correct comparing is with .config on sdk 6.

    Yes u-boot read the am335x-evm.dtb file. This is compiled am335x-evm.dts file. This file is as board file in this version of sdk. For that reason here you can make all pin mux changes.

    BR
    Ivan