lpcware

SPI read pauses

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by JSalisbury on Tue Aug 09 01:58:38 MST 2011
I am wanting to read 24 bits from the SPI bus and I am doing so as 3 bit reads as per the code below. The SPI clock speed is 5.5MHz, the processor clock is 49.5 MHz I am finding there are 2.2us pauses between the reads, any ideas on how to reduce these?

  for ( i = Length ; i > 0; i-- )  // changed to count down
  {
     LPC_SSP0->DR = 0xFF;
    /* Wait until the Busy bit is cleared */
      while ( (LPC_SSP0->SR & (SSPSR_BSY|SSPSR_RNE)) != SSPSR_RNE );
*buf = LPC_SSP0->DR;
      buf++;
    }


Thanks

Outcomes