All Boards FlexCAN

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

All Boards FlexCAN

All Boards FlexCAN

Freescale LTIB provides only the low level FlexCAN driver, so you can add Canutils and Libsocketcan developed by Pengutronix to have some more functions available on user space and some test and monitoring applications.

Adding Flexcan driver support on Kernel

On kernel menuconfig, add the following items:

[*] Networking support  --->
    <*>  CAN bus subsystem support  --->
        <*>  Raw CAN Protocol (raw access with CAN-ID filtering)
        <*>  Broadcast Manager CAN Protocol (with content filtering)
    CAN Device Drivers  --->
        <*> Virtual Local CAN Interface (vcan)
        [*] CAN devices debugging messages
        <*> Freescale FlexCAN


Adding Canutils and Libsocketcan Packages on LTIB

Download the libsocketcan-0.0.8.tar.bz2 and canutils-4.0.6.tar.bz2 source codes from the links below and save them on your PC at /opt/freescale/pkgs

http://www.pengutronix.de/software/libsocketcan/download/libsocketcan-0.0.8.tar.bz2

http://www.pengutronix.de/software/socket-can/download/canutils/v4.0/canutils-4.0.6.tar.bz2

On LTIB directory, create the spec file folders:

cd <ltib directory>/dist/lfs-5.1
mkdir canutils
mkdir libsocketcan

Download the following spec files, unpack them on their respective folders:

Can_specs.tar.gz ( attached below )

Now, on ltib directory, unpack, build and deploy them:

cd <ltib directory>
./ltib -p libsocketcan.spec -f
./ltib -p canutils.spec -f


Testing the FlexCAN network


To test the Flexcan network, first set the bitrate and after enable the can port:

canconfig can0 bitrate 125000
ifconfig can0 up                                        

Now it's possible to test the network connecting two boards:

On board 1:

cansend can0 -i0x100 11 22 33 44

On board 2:

canecho can0 -v

Board 2 will show the data coming from board 1.

标记 (1)
附件
评论

Hey,

the Can_specs.tar.gz isn't avaible any more. Can you repair the link or provide the spec?

It's attached now, don't know if you were notified when it got attached or not, but this should notify you.

Does Vector CANcaseXL work for iMX6 Boards?.

Can we not check the bus (of one target like iMX6 Sabrelite)  through CANoe software .


The Sabre Lite will send CAN messages and any tool in the other end ( PC tool, another evb, etc. ) should be able to receive them.

Regards,

Randy Krakora

Hello Randy

Do you think that in hardware connection only  CAN_H and CAN_L (from J22 of target

board iMX6q Sabrelite)  been connected to some CAN device is sufficient??

,

The problem is I am not able to see the CAN messages on the bus (In my case I am using Vector CAN devices.) from my only iMX6 Sabrelite board but from unix commands like

ip -details -statistics link show can0, reading "stat" file of ' can0 ', I find that there was some reception and transmission of CAN messages.

Connect an oscilloscope to make sure something is coming out of the board. Also, depending on what revision of Sabre Lite you have, you may need a patch.

See this thread:

https://community.freescale.com/thread/300921

Hi all,

Can anybody help me configuring mailbox in iMX6Q Rev D board.

I need to know how to configure mailbox,I am using Flexcan driver.I tried putting different values in iflag1 register.Can anybody tell me how and what values need to put in iflag or any other register to configure mailbox/es.

Thanks

Are you using linux?

Hi everyone,

I did add the above packages as described and could build the ltib without problems. But now I wanted to do a "./ltib -m clean" (trying to start with a clean sheet for version control) and this ends in:

error: removing these packages would break dependencies:

libc.so.6(GLIBC_2.4) is needed by libsocketcan-0.0.9-0

Can anyone tell me what I'm doing wrong here? Or is it just not a very good idea to use this clean option in this case? Still struggling a bit how these ltib commands work and what they actually do...

Regards,

Ruud

Hi,

I want to use FlexCAN in Android app. I am using i.MX6Q. The app is developing using ADT (in Eclips).

Could anyone please tell me how can use FlexCAN drivers in my app. I am newbie to Android app developing and linux programming.

Thanks in advance.

Hi,

       The above mentioned procedure is for Linux. Could you please say how to test can in Android 4.4.3 on Sabre_AI Board. How to install canutils in android. What are the commands to be used to test can in android.

Hi Jessege,

I've an imx6q sabre sd board and I'm trying to build Linux with flex can driver enabled for this target board using Yocto (repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b :jethro). While giving the command 'bitbake virtual/kernel menuconfig', I'm getting the kernel configuration gui but the option 'Freescale FlexCAN' is absent there. (Initially I tried with LTIB also with the steps given in link 'Freescale i.MX6 Development Platforms: Using LT... | element14 ', but I was unable to reach 'menuconfig' gui, the procedure was always exiting at 'platform selection' gui, giving the error shown below:

Can't open input file in dialog_textbox().

Died at ./ltib line 2969.

traceback:

main::get_plat_dir:2969

  main:560

Started: Mon Jan 25 13:17:50 2016

Ended:   Mon Jan 25 13:18:08 2016

Elapsed: 18 seconds

Build Failed

Exiting on error or interrupt)

Do anyone have an Idea on how to get the option 'Freescale FlexCAN' in kernel config menu, or any other method to enable flex can, any info will be appreciated, thanks in advace.

-Regards

Gopish R K

jessegjodipaul

Hi,  I am using mpc8309 tower board with ltib. I have followed the steps above mentioned,I am able to make can0,can1,can2 and can3 up. But on 'canconfig can3  bitrate 12500'  I am getting the below error.

 # canconfig can3 bitrate 125000
# RTNETLINK answers: Operation not supported
# failed to set bitrate of can3 to 125000

My kernel is 2.6.33.7.2-rt30,
Am I missing any kernel configurations to support canconfig ? Or is there any dependencies missing in 2.6 kernel ? Please help in resolving this.
I have tried with iproute2 also which also didn't succeed. Below is the output when I used ip command.

# ip link set can3 type can bitrate 125000

# Error: either "dev" is duplicate, or "type" is a garbage.

I have removed  tool 'ip' from ltib and added iproute(2) ,and version of it is, iproute2-ss050330

To have support of iproute2 I have enabled the following configuration also in kernel.

CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CT_NETLINK=y
CONFIG_SCSI_NETLINK=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCHED=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_XT_TARGET_MARK=y

Please help me in bringing can interface working  with either 'canconfig' or 'ip' tool...

Hi,

  I am also using same linux version and i am also having the same issue i.e it showing same error while setting bitrate, 

   So anyone please  help me on this

  Can we enable all the configuration in our Linux kernel (2.6.35). We can enable configuration which are commented but if we just add the line in config file which may look for driver, So will it compile first?

Hi Vineeth,

  As you mentioned, I enabled all the configuration

CONFIG_NETFILTER_NETLINK=y 
CONFIG_NETFILTER_NETLINK_QUEUE=y 
CONFIG_NETFILTER_NETLINK_LOG=y 
CONFIG_NF_CT_NETLINK=y 
CONFIG_SCSI_NETLINK=y 
CONFIG_IP_ADVANCED_ROUTER=y 
CONFIG_NET_SCH_INGRESS=y 
CONFIG_NET_SCHED=y 
CONFIG_IP_MULTIPLE_TABLES=y 
CONFIG_NETFILTER_XT_TARGET_MARK=y

But still RTNETLINK answers: Operation not supported problem has not been resolved and also I am not able to transfer messages through FlexCAN. If you resolved the problem kindly please let me know.

Hi,

RandyKrakora

  Anyone kindly help me on above RTNETLink issue. I have been posting this query for so many times. I am not able to fix this issue even after enabling following configuration in kernel menuconfig, I am grateful if anyone suggest solution to fix this issue.

CONFIG_NETFILTER_NETLINK=y 
CONFIG_NETFILTER_NETLINK_QUEUE=y 
CONFIG_NETFILTER_NETLINK_LOG=y 
CONFIG_NF_CT_NETLINK=y 
CONFIG_SCSI_NETLINK=y 
CONFIG_IP_ADVANCED_ROUTER=y 
CONFIG_NET_SCH_INGRESS=y 
CONFIG_NET_SCHED=y 
CONFIG_IP_MULTIPLE_TABLES=y 
CONFIG_NETFILTER_XT_TARGET_MARK=y

Thanks,

Karthik

Hi Vineeth and karthik 

I am facing the same issue could you pls guide me for the solution if you have resolved it 

pls refer my post 

https://community.nxp.com/message/1114808?commentID=1114808&et=watches.email.thread#comment-1114808 

How have you resolved this issue 

无评分
版本历史
最后更新:
‎08-06-2012 04:01 PM
更新人: