Skip to content

Commit 7d7c141

Browse files
committed
K64F SPI driver: Add the delay between CS assertion and first sclk edge
FPGA test shield requires at lease half slck period delay between CS assertion and first sclk edge.
1 parent 17d5e6d commit 7d7c141

File tree

1 file changed

+1
-1
lines changed
  • targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F

1 file changed

+1
-1
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/spi_api.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void spi_format(spi_t *obj, int bits, int mode, int slave)
109109
master_config.ctarConfig.cpol = (mode & 0x2) ? kDSPI_ClockPolarityActiveLow : kDSPI_ClockPolarityActiveHigh;
110110
master_config.ctarConfig.cpha = (mode & 0x1) ? kDSPI_ClockPhaseSecondEdge : kDSPI_ClockPhaseFirstEdge;
111111
master_config.ctarConfig.direction = kDSPI_MsbFirst;
112-
master_config.ctarConfig.pcsToSckDelayInNanoSec = 0;
112+
master_config.ctarConfig.pcsToSckDelayInNanoSec = 100;
113113

114114
DSPI_MasterInit(spi_address[obj->spi.instance], &master_config, CLOCK_GetFreq(spi_clocks[obj->spi.instance]));
115115
}

0 commit comments

Comments
 (0)