AnsweredAssumed Answered

SPI Master Transfer Timing Issue using fsl_spi (KSDK 1.2, KDS 3.0, FRDM-KL25Z)

Question asked by Michael Lyons Employee on Jul 14, 2015
Latest reply on Jul 15, 2015 by Michael Lyons

Hello,

I'm trying to initialize an SD Card in SPI mode using the fsl_spi module but I am having an issue with how fast I can complete multiple, single-byte transfers.  Below is my test code to see the delay between individual single byte transfers.  Spi clock is 250khz.

 

while(1)    SPI_DRV_MasterTransferBlocking(FSL_SPICOM1, &spiCom1_MasterConfig0, NULL, NULL ,1, 10);

 

When I look at the output on my logic analyzer I see a 156 us delay between consecutive transfers even though I am just repeating the same instruction.  See analyzer snapshot below.

I believe this long delay between transfers might be causing issue in my SD card initialization as I have tested the same hardware with different code on another setup and I have no issue with the SD hardware itself.

 

My questions is: is this how the fsl_spi module is supposed to operate or is there a way to implement consecutive single-byte transfers quicker?

 

Thanks,

Michael

Outcomes