This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI delay betwen byte

Hello,

I have a problem with the SPI of the nRF52DK 52832, and Zephyr 1.6.1. I have to transmit 10 frames of 5760 bytes each to the TFT display with the ST7789 driver.

The transmission is successful but I measured a delay between one byte and the next of almost 2 uS,

which makes the writing of the frame perceptible. Is it possible to reduce this delay between bytes?

The SPI is thus initialized.

static const struct spi_config spi_cfg = {
.operation =SPI_OP_MODE_MASTER|SPI_WORD_SET(8)| SPI_TRANSFER_MSB | SPI_MODE_CPOL | SPI_MODE_CPHA,
.frequency = 8000000,
.slave =0,

};

and I use spi_write to send the frame:

uint16_t fBuffer[5760];

void sendfBuffer(int y)
{

struct spi_buf tx_buf = {
.buf = fBuffer,
.len = sizeof(fBuffer)
};

struct spi_buf_set tx = {
.buffers = &tx_buf,
.count = 1
};


startWrite();// cs low
setAddrWindow(0, y,240,24); // set the position of the frame 
spi_write(spi2_dev,&spi_cfg,&tx); // send buffer to display
endWrite();//cs high

}

Best regards

Parents Reply
  • HI,  Sigurd,

    unfortunately my nRF52-DK doesn't work anymore,

    I think the PCA10040 is broken (power and clock is ok, but the pc doesn't recognize it anymore).

    So I can't send you a photo of the spi transmission with the delays.

    I bought a new nRF52-DK, from mouser, as soon as I get it I redo the test and send a photo.

    What I see on my analyzer doesn't look like your measurement at all, where the clock is continuous.

    In my transmission the clock stops after 8 bits, pausing for 2 microseconds, to resume for the transmission of the next byte, and so on.

    I am using nRF52832 with Zephyr 1.6.1 whit Segger, what version did you use to do this test?

    Thank you, 

    Fausto

Children
Related