linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* AW: [Socketcan-users] [socketcan]problem to using CAN with BeagleBone Black A5A
@ 2013-06-10 16:24 Michael Luxen
  2013-06-10 17:37 ` Wolfgang Grandegger
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Luxen @ 2013-06-10 16:24 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can@vger.kernel.org

Hello Oliver,


> > I'm thinking about to use 1-2 additional CAN-Interfaces to my BeagleBone 
> Black! That means two internal CAN-Interfaces and 2x SPI CAN-Interfaces.
> > For example the Cape TT3201 uses two MCP2515 via SPI but I don't know if 
> there are issues with CAN busload above 30% at 500 kbit/s
> > http://www.towertech.it/en/products/hardware/tt3201-can-cape/
> 
> We were discussing exactly about this board.
> AFAIK the CAN Capes have a I2C EEPROM for configuration data which conflicts
> with one of the internal DCAN mux pins:
> 
> http://circuitco.com/support/index.php?title=TT3201_CAN_Cape#EEPROM
> 
> My first idea was to to modify the board in a way that both internal DCAN
> interfaces and only one MCP2515 would be connected to the three CAN
> transceivers available on the board.
OK, that's fine. For me using of two SPI driven MCP2515 was not good enough if I've 2x CAN-channels onBoard (best performance or lowest CPU load). That was the reason for me not to use this board an to use the both internal CAN interfaces.
To add further CAN channels via the SPI driven MCP2515 is the next step for me (Wednesday afternoon I've hopefully more details and some test results available).
Loosing the CAPE detection feature is OK for me. Maybe someone else point me to a important point why I need it on my own CAPE.

> > I'm not sure about the cpu-load, latency and messages lost problems. My 
> experience on the RasperryPi is that 2x MCP2515 on one SPI-Channel doesn't work 
> with busload above 10% at 500kbit/s.
> 
> That's not that much. But it's an interesting information to get an estimation
> what one might get with this setup.
But keep in mind that the Raspi has only one SPI channel where I've connected two MCP2515 (only independetn ChipSelect and Interrupt lines). Therefore I'm interested in to sees how the BeagleBone Black can handle two MCP2515 on idenpendent SPI channels (SPI1/SPI2).

Regards
Mike
 
> > -----Ursprüngliche Nachricht-----
> > Von:	Oliver Hartkopp <socketcan@hartkopp.net>
> > Gesendet:	Sa 08.06.2013 13:46
> > Betreff:	Re: AW: [Socketcan-users] [socketcan]problem to using CAN with 
> BeagleBone Black A5A
> > An:	Michael Luxen <mluxen@gmx.net>; 
> > CC:	linux-can@vger.kernel.org; 
> >> Hello Mike,
> >>
> >> thanks for pointing to that comprehensive documentation.
> >>
> >> I was asked by a colleague how to get both internal CAN controllers working
> >> instead of adding SPI-based MCP2515 interfaces.
> >>
> >> Good job!
> >>
> >> Best regards,
> >> Oliver
> >>
> >> On 07.06.2013 21:46, Michael Luxen wrote:
> >>> Hello Mohamed,
> >>>
> >>> is you question still open or answered already?
> >>>
> >>> If still open, please have a look on this page where you can find how to 
> >> enable the CAN-Devices on BeagleBone Black.
> >>> http://www.aero-box.co.uk/beaglebone-black#TOC-Enable-CANbus-device
> >>>
> >>> The only thing you have to do is to edit the am335x-bone-common.dtsi file 
> for 
> >> enabling dcan0 and/or dcan1.
> >>> Please have in mind that dcan0 is normaly used for the optional Capes, as 
> >> they use the I2C2 pins which are muxed on the same pins than dcan0.
> >>> Nevertheless I've edited am335x-bone-common.dtsi successfully to enable 
> dcan0 
> >> and dcan1. On my BeagleBone Black (Hardware A5A) eveything is running fine 
> on 
> >> both internal CAN-Interfaces with latest Angstrom and latest Debian as well.
> >>> Keep in mind that you have to put a CAN-transceiver on the Pins 20/19 
> (DCAN0) 
> >> an 24/26 (DCAN1) on your BeagleBone Black.
> >>>
> >>> Regards
> >>> Mike
> >>>
> >>> -----Ursprüngliche Nachricht-----
> >>> Von:	Martin Gysel <m.gysel@gmail.com>
> >>> Gesendet:	Di 04.06.2013 13:32
> >>> Betreff:	Re: [Socketcan-users] [socketcan]problem to using CAN with 
> >> BeagleBone Black A5A
> >>> An:	linux-can@vger.kernel.org; 
> >>> CC:	socketcan-users@lists.berlios.de; 
> >>>> Am 25.05.2013 00:49, schrieb Mohamed HAMZAOUI:
> >>>>> Hi,
> >>>>>
> >>>>> I started with beaglebone black A5A, i installed on it the latest
> >>>>> Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20
> >>>>> 17:07:58 CEST 2013 armv7l GNU/Linux
> >>>>>
> >>>>> I have a problem when I try to add a can device, i load with modprobe
> >>>>> all necessary kernel module (can, ti_hecc, c_can, c_can_platform,
> >>>>> can-raw, can-bcm) but when i execute
> >>>>>> ip link add can0 type can
> >>>>> I have : RTNETLINK answers: Operation not supported
> >>>>> I used a recent version of iproute2.
> >>>>
> >>>> did you initialize the can module? do you use a can cape? if yes, does
> >>>> your kernel already include the needed dts to enable the can module?
> >>>>
> >>>> /martin
> >>>>
> >>>> --
> >>>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>>> the body of a message to majordomo@vger.kernel.org
> >>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-can" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 6+ messages in thread
* AW: [Socketcan-users] [socketcan]problem to using CAN with BeagleBone Black A5A
@ 2013-06-10 19:54 Michael Luxen
  2013-06-11  6:30 ` Wolfgang Grandegger
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Luxen @ 2013-06-10 19:54 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linux-can@vger.kernel.org, Oliver Hartkopp

Hello Wolfgang,

from the Raspberry Pi point of view I can say that I've patched already the original raspbmc based kernel MCP251x driver to the MCP2515 asynchronous of Andre B. Oliveira. I've also patched the raspbmc SPI driver to use DMA mode for low latency issues.
With these modifications the MCP2515 runs on my setup with the Raspi without any message lost. Also with busload >50% @ 1000kbit/s.

More details for Raspi users can be found here:
http://elinux.org/RPi_CANBus

But keep in mind as soon as a second MCP2515 is used on the MCP2515 one of them stops sending/receiving after a few seconds as the ISR seems to hang.

Regards
Mike

-----Ursprüngliche Nachricht-----
Von:	Wolfgang Grandegger <wg@grandegger.com>
Gesendet:	Mo 10.06.2013 19:50
Betreff:	Re: [Socketcan-users] [socketcan]problem to using CAN with BeagleBone Black A5A
An:	Michael Luxen <mluxen@gmx.net>; 
CC:	Oliver Hartkopp <socketcan@hartkopp.net>; linux-can@vger.kernel.org; 
> On 06/10/2013 06:24 PM, Michael Luxen wrote:
> ...
> >>> I'm not sure about the cpu-load, latency and messages lost problems. My 
> >> experience on the RasperryPi is that 2x MCP2515 on one SPI-Channel doesn't 
> work 
> >> with busload above 10% at 500kbit/s.
> >>
> >> That's not that much. But it's an interesting information to get an 
> estimation
> >> what one might get with this setup.
> > But keep in mind that the Raspi has only one SPI channel where I've connected 
> two MCP2515 (only independetn ChipSelect and Interrupt lines). Therefore I'm 
> interested in to sees how the BeagleBone Black can handle two MCP2515 on 
> idenpendent SPI channels (SPI1/SPI2).
> 
> The problem is not (only) SPI hardware but software. The CAN messages
> are not read-out quickly enough due to latencies resulting in message
> losses. May user do report that problem with the MPC251x. The following
> link does have some nice figures:
> 
>   http://clientes.netvisao.pt/anbadeol/mcp2515.html
> 
> I think the software can do better but still latency is critical for the
> MPC251x, especialy MPC2510.
> 
> Wolfgang.
> 
> 
> 
> 
> 
> 
> 
> 
> > Regards
> > Mike
> >  
> >>> -----Ursprüngliche Nachricht-----
> >>> Von:	Oliver Hartkopp <socketcan@hartkopp.net>
> >>> Gesendet:	Sa 08.06.2013 13:46
> >>> Betreff:	Re: AW: [Socketcan-users] [socketcan]problem to using CAN with 
> >> BeagleBone Black A5A
> >>> An:	Michael Luxen <mluxen@gmx.net>; 
> >>> CC:	linux-can@vger.kernel.org; 
> >>>> Hello Mike,
> >>>>
> >>>> thanks for pointing to that comprehensive documentation.
> >>>>
> >>>> I was asked by a colleague how to get both internal CAN controllers working
> >>>> instead of adding SPI-based MCP2515 interfaces.
> >>>>
> >>>> Good job!
> >>>>
> >>>> Best regards,
> >>>> Oliver
> >>>>
> >>>> On 07.06.2013 21:46, Michael Luxen wrote:
> >>>>> Hello Mohamed,
> >>>>>
> >>>>> is you question still open or answered already?
> >>>>>
> >>>>> If still open, please have a look on this page where you can find how to 
> >>>> enable the CAN-Devices on BeagleBone Black.
> >>>>> http://www.aero-box.co.uk/beaglebone-black#TOC-Enable-CANbus-device
> >>>>>
> >>>>> The only thing you have to do is to edit the am335x-bone-common.dtsi file 
> >> for 
> >>>> enabling dcan0 and/or dcan1.
> >>>>> Please have in mind that dcan0 is normaly used for the optional Capes, as 
> >>>> they use the I2C2 pins which are muxed on the same pins than dcan0.
> >>>>> Nevertheless I've edited am335x-bone-common.dtsi successfully to enable 
> >> dcan0 
> >>>> and dcan1. On my BeagleBone Black (Hardware A5A) eveything is running fine 
> >> on 
> >>>> both internal CAN-Interfaces with latest Angstrom and latest Debian as 
> well.
> >>>>> Keep in mind that you have to put a CAN-transceiver on the Pins 20/19 
> >> (DCAN0) 
> >>>> an 24/26 (DCAN1) on your BeagleBone Black.
> >>>>>
> >>>>> Regards
> >>>>> Mike
> >>>>>
> >>>>> -----Ursprüngliche Nachricht-----
> >>>>> Von:	Martin Gysel <m.gysel@gmail.com>
> >>>>> Gesendet:	Di 04.06.2013 13:32
> >>>>> Betreff:	Re: [Socketcan-users] [socketcan]problem to using CAN with 
> >>>> BeagleBone Black A5A
> >>>>> An:	linux-can@vger.kernel.org; 
> >>>>> CC:	socketcan-users@lists.berlios.de; 
> >>>>>> Am 25.05.2013 00:49, schrieb Mohamed HAMZAOUI:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I started with beaglebone black A5A, i installed on it the latest
> >>>>>>> Angstrom image with : Linux beaglebone 3.8.13 #1 SMP Mon May 20
> >>>>>>> 17:07:58 CEST 2013 armv7l GNU/Linux
> >>>>>>>
> >>>>>>> I have a problem when I try to add a can device, i load with modprobe
> >>>>>>> all necessary kernel module (can, ti_hecc, c_can, c_can_platform,
> >>>>>>> can-raw, can-bcm) but when i execute
> >>>>>>>> ip link add can0 type can
> >>>>>>> I have : RTNETLINK answers: Operation not supported
> >>>>>>> I used a recent version of iproute2.
> >>>>>>
> >>>>>> did you initialize the can module? do you use a can cape? if yes, does
> >>>>>> your kernel already include the needed dts to enable the can module?
> >>>>>>
> >>>>>> /martin
> >>>>>>
> >>>>>> --
> >>>>>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>>>>> the body of a message to majordomo@vger.kernel.org
> >>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>>>>
> >>>>> --
> >>>>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>>>> the body of a message to majordomo@vger.kernel.org
> >>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>>>
> >>>>
> >>>> --
> >>>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>>> the body of a message to majordomo@vger.kernel.org
> >>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>>
> >>> --
> >>> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >>> the body of a message to majordomo@vger.kernel.org
> >>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-can" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <CABMxt4gM55=Og5GdYmK_KHLuH1oQexGhcSpXRP3CA3FywjT5Yg@mail.gmail.com>]

end of thread, other threads:[~2013-06-16 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10 16:24 AW: [Socketcan-users] [socketcan]problem to using CAN with BeagleBone Black A5A Michael Luxen
2013-06-10 17:37 ` Wolfgang Grandegger
  -- strict thread matches above, loose matches on Subject: below --
2013-06-10 19:54 AW: " Michael Luxen
2013-06-11  6:30 ` Wolfgang Grandegger
2013-06-15 23:48   ` Mohamed HAMZAOUI
2013-06-16 19:01     ` Sebastian Haas
     [not found] <CABMxt4gM55=Og5GdYmK_KHLuH1oQexGhcSpXRP3CA3FywjT5Yg@mail.gmail.com>
2013-06-04 11:23 ` Martin Gysel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).