| title: | Re overrun error in atmel spi c |
|
Harikrishna Donti wrote:
I have taken enough care in my driver not to call spi_sync() more than once
at a time by a mutex lock.
Still I dont understand why the overrun would occur.
Im unfamiliar with the sam9g20 but I experience the same errors with
the sam9261. Those chips have a fancy bus interface; check your chip
manual for a description. For example on the sam9261 there are 5
masters: icache, dcache, PDC, LCD Controller, USB Host. And there are 5
slaves: int sram, int rom, lcd/usb, EBI, and peripherals
The catch is that every peripheral is probably contending for the same
access to SDRAM. Its possible that other peripherals own the bus for
long-enough and that your SPI clockrate is high-enough that too many SPI
bytes arrive before the peripheral gets access to dump that data out to
memory. I have three suggestions:
1. Try using the internal sram for dma if the AHB can use it in parallel
to the EBI
2. Lower the SPI clockrate and see if a lower rate eliminates the overruns
3. Try adjusting the burst settings in MATRIX
Just so you know, I picked #2 on my system.
-joey
-------------------------------------------------------------------
List admin: rel="nofollow" lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: rel="nofollow" www.arm.linux.org.uk/mailinglists/faq.php www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: rel="nofollow" www.arm.linux.org.uk/mailinglists/etiquette.php www.arm.linux.org.uk/mailinglists/etiquette.php
|