* Low SPI data throughput on Phytec 3250 board? (amba-pl022.c deployed on Phytec 3250 board.)
@ 2010-08-30 1:50 Quentin YANG
[not found] ` <AANLkTi=z6x38+qhgc6cuGEY3jgiUwReMURP6sFhP3Cfe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Quentin YANG @ 2010-08-30 1:50 UTC (permalink / raw)
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
Hi,
I am using transfer() function in spidev_test.c to verify the data
throughput on phytec LPC3250 board.
2KBytes SPI message is sent out to SPI Slave device.
There is a big delay (80us or so) after every 11 words transmission (
20 us or so, which is reasonable at 8MHz SPI Clock).
==== I am wondering where is this significant delay coming from??? ======
It largely reduced the SPI data througput.
It does not look like 'Linux Kernel Context switch'.
See attached Timing Info on Scope. (TimingOnScope.txt)
SPI board setting is as follows (8MHZ spi clock, 16bit data size,
interrupt transfer)
static struct pl022_config_chip spi1_chip_info = {
.lbm = LOOPBACK_DISABLED,
.com_mode = INTERRUPT_TRANSFER,
.iface = SSP_INTERFACE_MOTOROLA_SPI,
.hierarchy = SSP_MASTER,
.slave_tx_disable = 0,
.endian_tx = SSP_TX_LSB,
.endian_rx = SSP_RX_LSB,
.data_size = SSP_DATA_BITS_16, //SSP_DATA_BITS_8,
.rx_lev_trig = SSP_RX_4_OR_MORE_ELEM,
.tx_lev_trig = SSP_TX_4_OR_MORE_EMPTY_LOC,
.clk_phase = SSP_CLK_FIRST_EDGE, //SSP_CLK_SECOND_EDGE,
.clk_pol = SSP_CLK_POL_IDLE_LOW,
.ctrl_len = SSP_BITS_8,
.wait_state = SSP_MWIRE_WAIT_ZERO,
.duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX,
.cs_control = phy3250_spi1_cs_set,
};
Kernel (2.6.34) is using default 100ms context switch. ' CONFIG_HZ=100. '
Any help is appreciated.
Regards,
Quentin
[-- Attachment #2: TimingOnScope.txt --]
[-- Type: text/plain, Size: 283 bytes --]
|<--20us 11words-->|<-- 80us delay -->|<-- Next 11 words....
_ _ _ _ _ _
| | | | ... | | | | ..... | | | | ...............
___| |_| |_ _| |_| |_________ _______| |_| |_
[-- Attachment #3: Type: text/plain, Size: 392 bytes --]
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
[-- Attachment #4: Type: text/plain, Size: 210 bytes --]
_______________________________________________
spi-devel-general mailing list
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Low SPI data throughput on Phytec 3250 board? (amba-pl022.c deployed on Phytec 3250 board.)
[not found] ` <AANLkTi=z6x38+qhgc6cuGEY3jgiUwReMURP6sFhP3Cfe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-08-31 4:04 ` Quentin YANG
0 siblings, 0 replies; 2+ messages in thread
From: Quentin YANG @ 2010-08-31 4:04 UTC (permalink / raw)
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This post is closed.
Problem is resolved by turning off SPI Debug message.
In 2.6.34 Kernel config: (X:\lpc3250\ltib-qs\rpm\BUILD\linux-2.6.34\.config)
Change from
CONFIG_SPI_DEBUG=y
to:
# CONFIG_SPI_DEBUG is not set
After this, in #dmesg, we won't see those spi debugging message:
..................
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e006, rxend: c3e0e0dc, tx:
00000016, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e01a, rxend: c3e0e0dc, tx:
0000002a, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e02e, rxend: c3e0e0dc, tx:
0000003e, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e042, rxend: c3e0e0dc, tx:
00000052, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e056, rxend: c3e0e0dc, tx:
00000066, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e06a, rxend: c3e0e0dc, tx:
0000007a, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e07e, rxend: c3e0e0dc, tx:
0000008e, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e092, rxend: c3e0e0dc, tx:
000000a2, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e0a6, rxend: c3e0e0dc, tx:
000000b6, txend: 000000dc
ssp-pl022 dev:ssp1: readwriter, rx: c3e0e0ba, rxend: c3e0e0dc, tx:
000000ca, txend: 000000dc
..........................
However, we can get full 'spi data throughput'.
Regards,
Quentin
On Mon, Aug 30, 2010 at 11:50 AM, Quentin YANG <quentinyang05@gmail.com> wrote:
> Hi,
>
> I am using transfer() function in spidev_test.c to verify the data
> throughput on phytec LPC3250 board.
> 2KBytes SPI message is sent out to SPI Slave device.
>
> There is a big delay (80us or so) after every 11 words transmission (
> 20 us or so, which is reasonable at 8MHz SPI Clock).
> ==== I am wondering where is this significant delay coming from??? ======
> It largely reduced the SPI data througput.
> It does not look like 'Linux Kernel Context switch'.
>
> See attached Timing Info on Scope. (TimingOnScope.txt)
>
>
> SPI board setting is as follows (8MHZ spi clock, 16bit data size,
> interrupt transfer)
>
> static struct pl022_config_chip spi1_chip_info = {
> .lbm = LOOPBACK_DISABLED,
> .com_mode = INTERRUPT_TRANSFER,
> .iface = SSP_INTERFACE_MOTOROLA_SPI,
> .hierarchy = SSP_MASTER,
> .slave_tx_disable = 0,
> .endian_tx = SSP_TX_LSB,
> .endian_rx = SSP_RX_LSB,
> .data_size = SSP_DATA_BITS_16, //SSP_DATA_BITS_8,
> .rx_lev_trig = SSP_RX_4_OR_MORE_ELEM,
> .tx_lev_trig = SSP_TX_4_OR_MORE_EMPTY_LOC,
> .clk_phase = SSP_CLK_FIRST_EDGE, //SSP_CLK_SECOND_EDGE,
> .clk_pol = SSP_CLK_POL_IDLE_LOW,
> .ctrl_len = SSP_BITS_8,
> .wait_state = SSP_MWIRE_WAIT_ZERO,
> .duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX,
> .cs_control = phy3250_spi1_cs_set,
> };
>
>
> Kernel (2.6.34) is using default 100ms context switch. ' CONFIG_HZ=100. '
>
> Any help is appreciated.
>
>
> Regards,
> Quentin
>
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-31 4:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 1:50 Low SPI data throughput on Phytec 3250 board? (amba-pl022.c deployed on Phytec 3250 board.) Quentin YANG
[not found] ` <AANLkTi=z6x38+qhgc6cuGEY3jgiUwReMURP6sFhP3Cfe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-31 4:04 ` Quentin YANG
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).