Go to advanced search

by msperl
Fri Oct 19, 2012 10:20 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

I have received an enc28j60 module which I have used for debugging the issue. The reason for the patch posted previously not working is that when there was a chunked spi transfer issued, the driver took the ChipSelect line high between each chunk getting transferred, which essentially finished the t...
by msperl
Thu Oct 18, 2012 9:14 am
Forum: Linux Kernel
Topic: DMA and SPI and Interrupts - cant get it to work
Replies: 24
Views: 16143

Re: DMA and SPI and Interrupts - cant get it to work

See http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=19489 for more details on starting with the kernel (includes a link how to compile your kernel yourself,...) So if you need to write a Driver for your specific device you will need to fill in the spi_transfer data structure and pass that to ...
by msperl
Mon Oct 15, 2012 9:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Status update for all: the device enc28j60 seems to behave strangely, so some more work need to get done to drill down into the root cause - I even ordered one to test it myself, so I may be able to test it next weekend (or whenever it arrives) But in the meantime I have taken an SD card and attache...
by msperl
Sun Oct 14, 2012 4:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi psergui! I do not fully understand where the enc28j60 driver really fails, but worsted case it may be that there is a "dependency" on the original spi driver backport. Unfortunately I do not have a enc28j60 chip for testing (attaching a logic analyzer to the lines), so I can not tell you where th...
by msperl
Sat Oct 13, 2012 10:59 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi! Here the attached patch that now also allows for DMA transfers, as long as the spi_transfer frames have the rx_dma and tx_dma filled in. For all practical purposes at least with a mcp2515 attached it does not make a big difference if DMA is used or not. Reason being that all the transfers that t...
by msperl
Sat Oct 13, 2012 7:41 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi Arjan! The problem is that the hardware chip-select of the bcm2708 can only handle those 3 pre-wired CS/SS-lines of which - it seems - only 2 can are available on the RPI extension ports. If you need extra chip selects - you can do it (if needed) but there would be quite a lot of work needed to m...
by msperl
Sat Oct 13, 2012 7:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi RudiRatlos! How to compile the kernel yourself - please look at: http://elinux.org/RPi_Kernel_Compilation or google (or google for other sites) For applying a patch: Before or after executing the "make menuconfig" step, execute the command "patch -p0 << path/to/patchfile" Then continue to compile...
by msperl
Fri Oct 12, 2012 2:54 pm
Forum: Linux Kernel
Topic: DMA and SPI and Interrupts - cant get it to work
Replies: 24
Views: 16143

Re: DMA and SPI and Interrupts - cant get it to work

Now with this translation of ControlBlock (CB) kernel addresses to Bus addresses the SPI Bus is working as expected... At least the SPI-interface does allow for transfer blocks to pass also DMA addresses, so if the driver using SPI is allocating DMA buffers, everything works with DMA, otherwise we h...
by msperl
Fri Oct 12, 2012 1:00 pm
Forum: Linux Kernel
Topic: DMA and SPI and Interrupts - cant get it to work
Replies: 24
Views: 16143

Re: DMA and SPI and Interrupts - cant get it to work

Seems as if the DMA is totally implemented in VideoCore, which has another address mapping relative to the ARM kernel space (bus address vs. ARM Physical Address - see Page 5 of the Document) The question is now: is there an API to map between the address spaces or is there the need for a "hack" in ...
by msperl
Fri Oct 12, 2012 9:28 am
Forum: Advanced users
Topic: Updated GPU firmware
Replies: 308
Views: 189373

Re: Updated GPU firmware

I am also experiencing those hung task timeouts using the latest version of the GPU firmware (arm_240 - with md5sum b77e7028caa3d733985b0baf6510e144 - git commit: 17ff0bb5bb46210bad235d32589d35f951f269cf) in conjunction with a kernel compiled by the latest kernel git-pull (last commit: f9506a194ad6a...
by msperl
Thu Oct 11, 2012 8:57 pm
Forum: Linux Kernel
Topic: DMA and SPI and Interrupts - cant get it to work
Replies: 24
Views: 16143

DMA and SPI and Interrupts - cant get it to work

Hi! i am trying to finish the SPI patch for higher performance - it is already faster in interrupt driven mode and does not have any latency lags any more (see also http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=19489) resulting in high thruput without packetloss, which is good. But as to "r...
by msperl
Mon Oct 08, 2012 8:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi maddin! The driver is not using delay anywhere really - the includes came with the original driver, so I did not touch them - I believe we could remove a lot of those includes... If I take out the include of delay.h then it compiles all the same.... - same for log2.h, sched.h, wait.h. Ciao, Martin
by msperl
Mon Oct 08, 2012 5:39 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

attached now the updated version with better source code formatting based on the emacs macro in Coding styles...
by msperl
Mon Oct 08, 2012 5:19 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

@lb: i will get to it in time (when I have time to figure out the correct settings in emacs and nano - as i use both to keep "correct" indenting) - I just wanted to get the first version out of the door to share... Please also note that I really only have touched spi-bcm2708.c all others are just co...
by msperl
Mon Oct 08, 2012 4:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

There is a first version of a patch to the kernel driver available, that can improve the situation tremedously! There is not a single packet that gets lost on the driver level. See here for the details: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=19489 We still are facing a delay of about...
by msperl
Mon Oct 08, 2012 4:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

Re: SPI driver latency and a possible solution

Hi! As a status update I got the interrupt driver working - attached the diff for my spi patch... My workload benchmark was: 1000kBit CAN Bus, with about 26% Duty Cycle for 4101 packets. The RPI is getting higher CPU loads, but it does not loose a single packet even when compiling the kernel in back...
by msperl
Mon Oct 08, 2012 9:41 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 241
Views: 99555

SPI driver latency and a possible solution

Hi! When attaching a MCP2515 CAN bus controller to my RPI I started investigating the implementation performance and had to realize, that for some reason the RPI was unable to handle high load on the CAN bus (>100kHz CAN bus and duty cycle >50%). This resulted in loss of packets and errors showing o...
by msperl
Fri Oct 05, 2012 7:37 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

Last thing on the "packet loss" side: When running 100kHz there is no packet loss in my test setup. Also the test runs with low CPU utilization: procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 0 143092 19836 393...
by msperl
Fri Oct 05, 2012 1:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

I have now done some more testing and found that the mcp2515 driver is not using a threaded interrupt handler (like the in kernel mcp251x.c), but is working in the interrupt handler itself. But it is making heavy use of asyncronous callbacks when a SPI command has finished, so it is quite quick and ...
by msperl
Fri Oct 05, 2012 8:42 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

Hi! As for the mcp251x driver there is an issue of losing packets when running at 500MBit and with a CAN-bus Duty cycle of almost 50%. The RPI starts to drop packets (and even more so when candump is running and printing to STDOUT)... Right now the investigation between Gerd and myself include the o...
by msperl
Mon Oct 01, 2012 6:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

Hi Basti!

My guess is that the issue lies with /etc/modprobe.d/raspi-blacklist.conf, where you still have got the line: "blacklist spi-bcm2708".

Comment this line out and reboot (or reload all the modules) and then it should work...

Ciao, Martin
by msperl
Wed Sep 26, 2012 9:18 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

Thanks for the patch Bertr2d2! One issue though - for me the system hangs on the network level when removing the fiq-fix-enable=1 This happens repeatedly! Kernel messages look like this in /var/log/messages: Sep 24 12:00:57 raspberrypi kernel: [ 2162.699007] smsc95xx 1-1.1:1.0: eth0: Failed to write...
by msperl
Sun Sep 23, 2012 10:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

@Benoit: I just did a quick check on the SPI frequency with Overclocking turned on/off (and in active use) with my logic analyzer and I found that: with 700MHz the SPI clock runs for me at around 61.69kHz (with 100KHz configured) while running on 900MHz the SPI clock runs at 81.633kHz. If you calcul...
by msperl
Thu Sep 20, 2012 5:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

with dwc_otg.fiq_fix_enable=0 instead of dwg_otc.fiq_fix_enable=0 the system is not experiencing these issues...
by msperl
Thu Sep 20, 2012 4:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 301577

Re: CAN controller

I have experienced the same issue with freeze on "ip link..." - and in my case I did not have any USB devices attached (besides using the usb ethernet). The serial console (input) is still working and I am able to log in... dmesg then gives the following output: [ 590.328282] smsc95xx 1-1.1:1.0: eth...

Go to advanced search