[meta-freescale] CAN Supprt

Morgan McKenzie rmtm at uvic.ca
Fri Oct 10 01:04:54 PDT 2014


Hi,
I'm assuming you mean this board by EVK for automotive? http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREAUTOOtherwise, it should be similar (ignore the u-boot stuff) but the imx6q Sabre Auto is the one I'm familiar with. 
In my config I had+= canutils 
which isn't absolutely necessary to use can, but for debug purposes is very useful.
And for u-boot I had (but this could probably just be done in u-boot prompt - I don't have access to a board right now so I can't tell you for sure), which enables the second can bus at the expense of having no ethernet connection; up to you whether you want to do it.:---
 include/configs/mx6qsabreauto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index dbbb6f0..51fcb58 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -12,7 +12,7 @@
 #define CONFIG_MACH_TYPE	3529
 #define CONFIG_MXC_UART_BASE	UART4_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc3"
-#define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabreauto.dtb"
+#define CONFIG_DEFAULT_FDT_FILE	"imx6q-sabreauto-flexcan1.dtb"
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"
 #define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
 
-- 

And in my board's kernel config I had: CONFIG_CAN_VCAN=yCONFIG_CAN_SLCAN=y(But I believe these aren't absolutely necessary - VCAN is virtual can which is incredibly useful for testing by setting it to loop back, and SLCAN I believe is for USB to Serial converters which aren't really needed here. But thought it might be useful info)

These three things may not have all been necessary - that's just what I did to have it working. That was a while ago (may/june), but using the master branch at the time so much more recent than dora, or daisy for that matter.. but daisy should do the trick.
Once you have the board booted up try using the command 'canconfig'. If you've included canutils, you'll have candump and cansend which are very helpful for debugging, and maybe canecho as well.


To get the can buses set up this is what I had in my boot script (first a high-speed bus, second a low-speed bus):canconfig can0 bitrate 500000
ifconfig can0 up

canconfig can1 bitrate 33333
ifconfig can1 up
And finally, this is where you can find documentation:https://www.kernel.org/doc/Documentation/networking/can.txthttp://en.wikipedia.org/wiki/SocketCAN
I hope that helps and if you need some clarification let me know and I'll do my best!


Morgan McKenzie

> Date: Thu, 9 Oct 2014 18:49:57 -0300
> From: otavio at ossystems.com.br
> To: daniel.ca at nestgroup.net
> CC: meta-freescale at yoctoproject.org
> Subject: Re: [meta-freescale] CAN Supprt
> 
> On Wed, Oct 8, 2014 at 5:01 AM, Daniel C. A (NESTIT)
> <daniel.ca at nestgroup.net> wrote:
> >                 Presently im working on i.mx6 EVK for Automotive
> > application. I have used ‘fsl-image-gui’ which was Bitbaked using Yocto-dora
> > release. Since I’m worked on CAN interfaces, I got the following queries.
> >
> > 1.       How to make CAN interfaces up on EVK?
> >
> > 2.       Is there anything that I have to consider when I Bitbake
> > fsl-image-gui?
> >
> > 3.       Has fsl-image-gui got support for basic drivers like CAN,I2c,gpio
> > driver., etc?
> >
> > 4.       My intention is to test CAN Tx/Rx using CAN Analyzer and EVK, what
> > all are the steps for the same? Is there any document that I can follow?
> 
> Please check the archive, some people has posted some guidance abou
> CAN. Also I advise you to go do Daisy as Dora is very old and has a
> very old BSP release.
> 
> -- 
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> -- 
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20141010/2c08a175/attachment.html>


More information about the meta-freescale mailing list