Adding delay between SPI transfers

Trinath 2010-05-19 23:54:24 Link
Hello,

I am trying to add delay to spi_ioc_trasnfer struct in my application code
like this below (.delay_usecs). I am testing this on DSO but the delay
between each transfer is always less than 25usec. (to be precise, 22us
delay after first transfer and 11us after then.) 


        struct spi_ioc_transfer tr = {
                .tx_buf = (unsigned long)txptr,
                .rx_buf = (unsigned long)rxptr,
                .len = noBytes,
                .delay_usecs = 1000,
                .speed_hz = speed,
                .bits_per_word = bits,
        };

struct spi_ioc_transfer is defined in /include/linux/spi/spidev.h.


Any suggestions please....

Trinath

Trinath 2010-05-20 17:55:02 Link
Also,

Why ioctl() trasfers need atleast 2 bytes to transfer? Got segmentation
fault when tried to send one byte.

Xristos 2011-09-16 20:59:17 Link
I have to write an application that sends 1 byte via SPI and receives one.
Is that impossible?

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number 7300