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
   |<--20us 11words-->|<--    80us delay -->|<-- Next 11 words....  
    _   _        _   _                       _   _
   | | | |  ... | | | |         .....       | | | | ...............
___| |_| |_    _| |_| |_________     _______| |_| |_
        
        
        
        
------------------------------------------------------------------------------
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
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to