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.

AM3517 HECC

Hello,

I have been attempting to set up the CAN interface on my 3517 SOM-M2.  I found the http://processors.wiki.ti.com/index.php/Sitara_AM35x_CAN_%28HECC%29_Linux_Driver resource page and have successfully cross-compiled the cansend/candump utilities.  However, as I understand it, for these to work the can interface must be initialized using the 'ip' utility.  I checked the version of 'ip' included in the PSP and it matches the one given on the resource page, however, I am unable to properly setup the interface.

I can run 'ip link set can0 type can' fine without errors.  However, if I try to add more flags, such as in 'ip link set can0 type can bitrate 125000 triple-sampling on' as specified in the resource page I get the following error: Garbage instead of arguments "bitrate ...". Try "ip link help".

Do I need to compile a different version of ip to get the other can paramaters set?  Any help would be appreciated.

Edit: Also, I noticed that my u-boot startup text does not display the HECC lines as shown in the page linked above.  Is the HECC not enabled by default in u-boot and could that be the problem?  If so, how would I go about enabling it in u-boot?  I am using a version of u-boot compiled from the PSP with the ETK lines muxed to GPIO. That is the only change I have made. I have also double checked to ensure that the CAN interface is included in the Linux kernel.

Thanks!

  • Justin,

    I think you do not have the right "ip" utility - i dont see any other reason for "ip" utility to give you that error. CAN has been enabled only in iproute2 utilities and a old "ip" utility generally does not recognize can related command and gives error.

    Also can you let me know which PSP/SDK version you are using so I can check the ip utility in it - I am not sure if the iproute2 "ip" utility was part of the PSP. You can download it from iproute2 git from the web and recompile it.

    Also the CAN phy on the EVM has to be enabled in uboot - if you are not seeing the relevant messages from uboot may be you are not using the right PSP release. That though would not be the reason for the "ip" utility error - you will face a issue later when the interface starts working but packets are not sent/received on the wire.

    Regards,

    Anant

  • Hi Anant,

    Actually I have the same doubt as Justin, I'm using the latest PSP release available  (03.00.01.06) and I don't get the HECC messages neither (I tried this by flashing the u-boot binary image included in it, u-boot 2009.11). I tried the u-boot binary image (u-boot 2009.08) from a previous PSP release (03.00.00.03) and got the messages. Any idea?

    Regards

    Diego Chaverri

  • Anant,

    I am using AM35x-OMAP35x-PSP-SDK-03.00.00.05, but I will switch to 1.06 if you think it will make a difference.  As far as IP, I will recompile and give it a try.


    With u-boot, since this seems like it is an issue with the more recent releases from what Diego says in his reply, should I switch to an older release or is there a modification you can suggest which will enable HECC?

    Thanks,

    Justin

  • Anant,

    I just tried 03.00.01.06 and I am getting the same error with its "ip" utility.  For reference, when I do "ip -V" I get "ip utility, iproute2-ss090324" which matches what the wiki page says, same as in 03.00.00.05.  I'm still in the process of compiling IP from source and I will let you know how that goes.


    Justin

  • Anant,

    Compiling iproute2 from source removed the CAN initialization errors, following the modifications listed here: http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/p/86552/299498.aspx#299498.

    Compiling u-boot from version 03.00.00.03 as Diego said restored the HECC messages at boot and gave me the ability to successfully run cansend.

     

    Thanks for the help,

    Justin