Go to advanced search

by bertr2d2
Fri Apr 12, 2013 9:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi, I was following this thread since beginning and I must admit, that CAN&RPi has some limitations. The MCP2515 with it's SPI interface is a challenge. Great affords were made with the the new SPI driver (thx to msperl), but IMHO the RPi isn't the best platform for using CAN. I'm quite happily usin...
by bertr2d2
Fri Feb 22, 2013 2:51 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 158959

Re: SPI driver latency and a possible solution

There is something interesting going on with RT Linux: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=33809 which includes a description building Xenomai RT Kernel for RPi. Realtime kernels are bot faster, but the the delay should be lower/deterministic. Read on: http://code.google.com/p/pic...
by bertr2d2
Sun Feb 03, 2013 4:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 158959

Re: SPI driver latency and a possible solution

The kernel docs (i.e. kernel/Documentation/spi/spi-summary) and the http://www.jumpnowtek.com/index.php?option=com_content&view=article&id=57&Itemid=62 are a good start. I've tried to write a generic SPI device explorer but other things needed more attention ... Regards Gerd (not Gert) Is that even...
by bertr2d2
Sun Feb 03, 2013 10:56 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 158959

Re: SPI driver latency and a possible solution

As for the configurations - I want the existing way of setting it to continue to work the way it currently does - ie. I currently have the abiltiy to select the channel and select the clock speed (without recompiling the kernel). I would be interested to know how you do that without recompiling. Is...
by bertr2d2
Sun Dec 16, 2012 1:38 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi Zeta,

I'm quite sure that the modified SPI module will boost the CAN performance significantly.
Most lost CAN frames are caused by the original (slow) SPI module IMHO.

Regards

Gerd
by bertr2d2
Sat Dec 15, 2012 5:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Zeta,

do you use the modified SPI module from Martin ?:

http://www.raspberrypi.org/phpBB3/viewt ... 44&t=19489

Regards

Gerd
by bertr2d2
Sun Dec 09, 2012 10:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi Chris, I also integrated the virtual can module. How can I set up it up? I tried ip link add dev vcan0 type vcan this operation was not possible (I did it in this way on Ubuntu). Do I need to configure something different in ip link ? Why was it not necessary to do this operation for the can bus ...
by bertr2d2
Mon Oct 08, 2012 4:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 158959

Re: SPI driver latency and a possible solution

Fantastic ! Great work Martin !

Regards

Gerd
by bertr2d2
Fri Oct 05, 2012 10:37 am
Forum: Automation, sensing and robotics
Topic: Driving multiple servos from the RaspberryPi
Replies: 212
Views: 119443

Re: Driving multiple servos from the RaspberryPi

Hi Gert, I received a question about the PWM clock frequency yesterday. You are not the first to have an 'issue' where the clock/frequency/output signal are not what is expected. I have not had time to look into the details. For my code I was relying in the data sheet and my general knowledge how mo...
by bertr2d2
Fri Oct 05, 2012 7:31 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi Benoit, Hello, Has anyone evaluated how the CAN MCP251x setup behaves on an overclocked Raspberry Pi? (refering to http://www.raspberrypi.org/archives/2008) Setting the Core frequency to 333MHz shouldn't be a problem -> 333/32=10.4MHz - slightly above specs. I've connected a MCP2515 with 13.33MHz...
by bertr2d2
Tue Oct 02, 2012 12:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hello Gerd Thanks for your advices. I'm using a buffer because I want to use the setup for analysing my car's CAN bus. And because of the buffer I have built in ESD and overvaoltage protection for my Pi. Probably you want CAN BUS Isolation. IMHO the best place is the CAN-Tranceiver to reach your go...
by bertr2d2
Mon Oct 01, 2012 12:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi, Hi all First thing I did was, I uncommented the blacklisted modules and rebooted. Reloaded all modules. Result is this: dmesg | egrep -i "can|spi|mcp" [ 0.000000] Linux version 3.2.27CAN_MCP251x_Moduled+ (root@raspberrypi) (gcc version 4.6.3 (Debian 4.6.3-8+rpi1) ) #5 PREEMPT Sat Sep 29 13:36:37...
by bertr2d2
Sun Sep 30, 2012 9:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi Basti,
Basti wrote:Hi all
...
But I have a problem to add a new CAN-interface with:

Code: Select all

ip link set can0 up type can bitrate 500000
i get an error message:

Code: Select all

Cannot find device "can0"
Could you show the output from 'dmesg | egrep -i "can|spi|mcp"' and 'cat /proc/interrupts' ?

Regards
Gerd
by bertr2d2
Fri Sep 21, 2012 6:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

The IRQs might change in the future, so I would suggest following patch to the board definition: --- bcm2708.c_org 2012-09-21 14:33:39.102730640 +0200 +++ bcm2708.c 2012-09-21 20:19:09.560050330 +0200 @@ -54,6 +54,12 @@ #include <mach/vcio.h> #include <mach/system.h> +#include <linux/can/platform/mc...
by bertr2d2
Thu Sep 20, 2012 7:23 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi, I don't have any problems with my setup (github kernel from ~ 8th of September): [ 0.000000] Kernel command line: dma.dmachans=0x3c bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x89c9XXXX smsc95xx.macaddr=B8:27:EB:XX:XX:XX dwc_otg.lpm_enable=0 dwc_otg.fiq_fi...
by bertr2d2
Thu Sep 13, 2012 8:20 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Oliver Hartkopp wrote:If you want to play with ISO TP on SocketCAN - it's located here:

https://gitorious.org/linux-can/can-mod ... an/isotp.c
by bertr2d2
Sat Sep 08, 2012 11:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

It's still unclear to me why the CANINTF+EFLG is read again. I can't find it in the code. Maybe the IRQ setup for the GPIO has a fault ... Grmpf. It's in the code ... I switched to the async mcp2515 modul and the new 3.2.27+ kernel with 'dwc_otg.fiq_fix_enable=1' which reduces the USB interrupts fr...
by bertr2d2
Wed Sep 05, 2012 9:05 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi, Reading the RX0 or RX1 automatically clears the interrupt. There is a third sequence which reads the CANINTF+EFLG again I don't think so, MCP2515 manual chapter 4.1.3 says: "This bit must be cleared by MCU..." What you saw could be a read-modify-write on these registers or a bit-manipulation co...
by bertr2d2
Tue Sep 04, 2012 3:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi maddin1234, Hi, that there are more interrupts on SPI than on CAN doesn't puzzle me. I think it is the "Interrupt on Done" and "Interrupt on RXR" from the HW SPI. That means, every write to the SPI will cause one Interrupt when finished, and when the command was a read-command, it will cause anot...
by bertr2d2
Sat Sep 01, 2012 3:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi, as the CAN is generally working there is still headroom for improvements. I've made some investigations on the pins: http://lnxpps.de/rpie/man_frames.png http://lnxpps.de/rpie/complete_frame.png Explanation Yellow CANH Pink0 /INT Pink1 CS Pink2 Clock Pink3 MOSI Pink4 MISO Grey0 Decode SPI MOSI G...
by bertr2d2
Thu Aug 30, 2012 11:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Benoit wrote:various can stats
Thx for your statistics - very helpful.
by bertr2d2
Thu Aug 30, 2012 11:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi bertr2d2, The first thing I would observe is, what causes the great latency between interrupt and first SPI activity. I have the sneaking suspicion that it comes from the split into two modules (spidev and mcp251x). From what I read so far, the sysfs (virtual file system) is very often used for ...
by bertr2d2
Thu Aug 30, 2012 3:30 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

These test look to all be at 1Mbps. Can anyone comment on the likely performance at 125kbps? [...] Regards Alex Shepherd Here are the same tests run at different speeds: can0@1000000 3836 590744 245504 59% |XXXXXXXXXXX.........| can0@500000 1312 202048 83968 40% |XXXXXXXX............| can0@250000 1...
by bertr2d2
Thu Aug 30, 2012 7:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Benoit wrote: Looking at the mcp251x driver, it seems, that hardware filters are not implemented.
Ups - thought the driver uses the MCP2515 filter ...
by bertr2d2
Thu Aug 30, 2012 7:47 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 816
Views: 390084

Re: CAN controller

Hi,
kiwi64ajs wrote:These test look to all be at 1Mbps. Can anyone comment on the likely performance at 125kbps?
AlexB testeted with 90%@500kbps without errors - 125kbps shouldn't be a problem.
I'm testing with 1Mbps because I want to know where the limit is.

Regards

Gerd

Go to advanced search