Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: AzHofi on July 15, 2014, 08:05:42 PM

Title: A20 som can bus
Post by: AzHofi on July 15, 2014, 08:05:42 PM
Hi guys,
can someone point me how to enable and use can bus on a20? I use MCP2551 transceiver connected, but what should I configure on debian to use lincan infrastructure? Thanks in advance,
--
Attila HOFFEREK
Title: Re: A20 som can bus
Post by: JohnS on July 15, 2014, 10:37:56 PM
I've not heard of any support for it yet.

John
Title: Re: A20 som can bus
Post by: AzHofi on July 16, 2014, 10:51:39 AM
Finally I recompiled the kernel with mcp251x support and assembled a can receiver circuit using mcp2515 - mcp2551 combo, on SPI bus. Thanks.
Title: Re: A20 som can bus
Post by: bruceuk on July 19, 2014, 09:52:31 PM
Hi AzHofi ....any chance you could post a schematic and how you connected to the EVB....or the SOM?

Why did you need mcp2515? I think the A20 already has a single CAN controller, should be able to just attach mcp2551?


Bruce

Title: Re: A20 som can bus
Post by: AzHofi on July 20, 2014, 12:04:48 AM
Hi Bruce,

Hi AzHofi ....any chance you could post a schematic and how you connected to the EVB....or the SOM?

I used microchip's officially recommended schematic with a 16MHz crystal. I connected it to spi-1 bus wired to uext connector on evb.

Why did you need mcp2515? I think the A20 already has a single CAN controller, should be able to just attach mcp2551?

Because I don't know which driver to compile and use in debian linux kernel. Can You point me? I'd be very happy to use a20's own can facility with linux kernel lincan infastructure.

Thanks in advance,
--
Attila HOFFEREK
Title: Re: A20 som can bus
Post by: pankajmisra on September 11, 2014, 01:12:03 PM
Hi AzHofi,

I am able to compile mcp251x.c driver & inserted in kernel. Driver probed properly.

But problem is that Canutils programs are not able to drive it.

Candump never shows any output in loopback mode.

Were you able to check can communication on MCP2515 ?
Title: Re: A20 som can bus
Post by: bruceuk on October 07, 2014, 06:16:15 PM
>> Because I don't know which driver to compile and use in debian linux kernel. Can You point me? I'd be very happy to use a20's own can facility with linux kernel lincan infastructure.

Afraid I have no idea .... I did some digging and found absolutely nothing.....doesn't look like anybody is using the CAN controller in AllWinner processors ...kinda sad really, maybe Olimex can throw some weight behind an official question to AllWinner?


Title: Re: A20 som can bus
Post by: bruceuk on October 07, 2014, 06:21:31 PM

Just found this:
https://github.com/btolfa/sunxi-can-driver

Title: Re: A20 som can bus
Post by: bruceuk on October 07, 2014, 06:48:55 PM

Forked it for safe keeping and added the pdf which may be the documentation:

https://github.com/BruceBushby/sunxi-can-driver


Title: Re: A20 som can bus
Post by: AzHofi on October 11, 2014, 03:50:18 PM
Quote from: bruceuk on October 07, 2014, 06:48:55 PM

Forked it for safe keeping and added the pdf which may be the documentation:

https://github.com/BruceBushby/sunxi-can-driver

Thanks, but this is for android kernel, not debian or something. If I had some time I'd test and port it.
Title: Re: A20 som can bus
Post by: AzHofi on October 11, 2014, 03:52:36 PM
Quote from: pankajmisra on September 11, 2014, 01:12:03 PM
Were you able to check can communication on MCP2515 ?

I was. Did you use the previously suggested schematics? Could You post a drawing how do You try to use it?
Title: Re: A20 som can bus
Post by: pkm2kor on December 12, 2014, 03:41:28 PM
Hello,

Are you able to communicate on MCP2515 on multiple baudrates.

I am able to communicate on 250K but i am not able to establish communication on any other baudrate.
Setting any other baudrate results in error frames.
I am using ip & canutils as user application to do settings & send receive data.

I am using sunixi-linux on olimex a20 olinuxino micro.

Title: Re: A20 som can bus
Post by: dave-at-axon on December 12, 2014, 04:43:38 PM
What is your sampling points and sync jump width set for? Are they the same across different bit rates?

CAN with the same baud rate doesn't mean it will talk if the sampling points are different.