Go to advanced search

by msperl
Sat Apr 19, 2014 3:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Something seems to be happening with the foundation kernels - see the 3.13.y-next branch. Also beware that there are yet some issues with anything not tested yet... It still eats lots of memory unnecessarily for any driver that does not use the SPI_OPTIMIZE patch. (at least my dev versions do - I fo...
by msperl
Sat Apr 19, 2014 5:10 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Seems as if you are not compiling from this git repository: https://github.com/raspberrypi/linux (which is from the RPI foundation) the branch: rpi-3.13.y (right now this maps to 3.13.10) This one is working for me - I still need to move to the official kernel to get it correctly upstream... But bef...
by msperl
Fri Apr 18, 2014 6:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

To start: take a current foundation kernel, boot it and then take /proc/config.gz
It contains the settings used by the foundation kernel.

copy it to your directory as .config and tune it to your preferences prior to compiling

Martin
by msperl
Fri Apr 18, 2014 10:37 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

OK - did check against 3.13.y with checksum "37e55d7".
For me I do not see any issues compiling spi-bcm2835dma against this kernel.

So it might be related to .config settings, that may influence this...

Martin
by msperl
Fri Apr 18, 2014 8:23 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

I will check myself with the latest updated version...
by msperl
Fri Apr 18, 2014 8:19 am
Forum: Compute Module
Topic: SPI and frequencies
Replies: 1
Views: 1478

SPI and frequencies

Did you do any testing on max-SPI frequencies that can be achieved with a nice waveform on the Compute model? For the "normal" pi there is the statement from Gert, which says that due to the trace design of the RPI-board and the GPIO pins it is limited to 10 MHz - I heard people run it up to 25MHz. ...
by msperl
Thu Apr 17, 2014 3:49 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

OK - then I have to investigate if it really works against linux 3.10. But it may also be a config option of the kernel that might be different which is why it does not find mach/dma.h. (i remember reading something about mach/... and a config option, so it might relate) Which kernel version are you...
by msperl
Wed Apr 16, 2014 3:55 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Unfortunately no: as you cross-compile the kernel you will also have to cross-compile the external module with the same parameters on the x86_64 box. So follow the analog steps there in the spi-bcm2835 directory you would use in the linux directory... The only thing you might need to define is KDIR=...
by msperl
Wed Apr 16, 2014 3:43 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

it is an out-of-tree kernel module.

So just run

Code: Select all

make install
inside this directory
(assuming you run the "kernel" that you have compiled already)

Note that the pathc is not 100% necessary - it is an extension to allow SPI drivers to be more efficient...

Martin
by msperl
Thu Apr 10, 2014 9:16 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

Fixed the Problem with the mcp2515a driver crashing when using it with the spi-bcm2708 driver. reason is that the spi-bcm2708 driver does NOT check for NULL prior to calling the complete callback. And to reduce possible interrupts the mcp2515a is not making use of complete callbacks under _all_ circ...
by msperl
Thu Apr 10, 2014 6:42 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

Fixed the issue with the spi-bcmdma driver - the "original" module also works now... Still I found ways to Improve the mcp2515a driver - there is quite some overhead switching from write to read with _any_ spi_bus driver, so to shorten the "delays" I need to switch to concurrent read+write operation...
by msperl
Wed Apr 09, 2014 3:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

For all those of you who have issues with the MCP2515. If you have issues with the mcp2515 driver (the interface comes up, but does not work), then please try to load the stock mcp251x driver instead and try to bring that one up. This original driver does not blindly assume that the mcp2515 is conne...
by msperl
Wed Apr 09, 2014 2:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

no - that is another piece of code that is related to 3.13 or newer.

please try the 3.13 kernel and the standard configs from /proc/config.gz (adding CAN naturally)

martin
by msperl
Wed Apr 09, 2014 2:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

I am using a clone of the official 3.13 kernel from the foundation... (exact Version is 3.13.4) but any 3.12 or later should do without any changes...

Martin
by msperl
Tue Apr 08, 2014 3:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

ad 2): Sending receiving messages:
http://en.wikipedia.org/wiki/SocketCAN
and also the definite documentation directly from the kernel:
http://lxr.free-electrons.com/source/Do ... ng/can.txt
by msperl
Tue Apr 08, 2014 10:25 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

OK - 3.10 is not supported directly

Unless you remove those offending lines 502 to 506, which is handling fields introduced with linux 3.12
by msperl
Mon Apr 07, 2014 12:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Against which kernel do you compile?
3.10, 3.13 or 3.14?
by msperl
Mon Apr 07, 2014 12:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

Hi Fabian! So, do there exist solutions to support the hardware filtering? Or does this require an own implementation/modification :? Here a quote from: Documentation/networking/can.txt line 908 (http://lxr.free-electrons.com/source/Documentation/networking/can.txt#L908) ... The high efficient filte...
by msperl
Sat Apr 05, 2014 7:51 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Pushed the changes to github - it should (hopefully) compile now... Also note that there is still a very rare race condition that shows up with highly optimized drivers that make use of the proposed spi_optimize interface (patchfile to 3.13 is in the repository), which triggers very rarely - in my c...
by msperl
Sat Apr 05, 2014 5:53 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

I think I know now what it is: you run a 3.14 kernel and there is a file-name conflict with dma-engine support for the upstream kernel. Will rename mine and push an update soon...
by msperl
Sat Apr 05, 2014 5:38 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

Seems as if i have not pushed an update lately...
It may also be compiler dependent...

Will check...
by msperl
Fri Apr 04, 2014 5:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

Just to put into perspective - I did measure how much time the submit a single CAN message to the kernel stack takes: 7us/message. So to put that into perspective: with 3300 Messages/s this means about 0.023s are spent submitting each second - that is about 2.3% of the overall CPU cycles - so the CP...
by msperl
Fri Apr 04, 2014 3:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 813
Views: 331912

Re: CAN controller

I have not seen any means to to "driver side filtering" inside the linux kernel - and I have written a new driver implementation, that works very well with a WiP DMA only SPI bus driver... Even if there was an Interface to HW filtering - changing the Filters requires switching the mcp2515 into confi...
by msperl
Wed Apr 02, 2014 5:17 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

I have left it running for the night and this morning the RPI was still receiving CAN messages.

Stats are: 150M messages out of which 949 messages have "overflown" due to CPU activities...
So that looks good.

I have pushed the latest code to git-hub...

Martin
by msperl
Tue Apr 01, 2014 7:25 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 132543

Re: SPI driver latency and a possible solution

OK - solved the mystery! It was a race condition between the GPIO and DMA interrupt, where GPIO was triggered first. Now the system is up and running for 54 minutes without any hickups handling 10M CAN messages (@500khz) during this time without any hickup (except for 69 CAN requests that have not b...

Go to advanced search