Hi, Michael,
I think you use the SDK1.3 based on FRDM-K64, and use the example:
C:\Freescale\KSDK_1.3.0\examples\frdmk64f\driver_examples\dspi_rongModification\dspi_non_blocking\master\kds
You develop your code based on the example. I think you have to consider two points:
1)finish the pin assignment for SPI0_PCS1, SPI0_PCS2... with the following code:
void PCSInit(void)
{
/* SPI0 */
/* Affects PORTD_PCR0 register, SPI0_PCS0 */
PORT_HAL_SetMuxMode(PORTD,0u,kPortMuxAlt2);
/* Affects PORTD_PCR4 register, SPI0_PCS1 */
PORT_HAL_SetMuxMode(PORTD,4u,kPortMuxAlt2);
/* Affects PORTD_PCR5 register, PSI0_PCS2 */
PORT_HAL_SetMuxMode(PORTD,5u,kPortMuxAlt2);
/* Affects PORTD_PCR6 register, SPI0_PCS3 */
PORT_HAL_SetMuxMode(PORTD,6u,kPortMuxAlt2);
}
2)secondly, you can use the code to set up different SPI0_PCSx.
masterState.whichPcs= kDspiPcs1;
I attach the code I modified based on the example, I can see the waveform on different SPI0_PCSx, it seems it is okay.
Hope it can help you.
BR
XiangJun Rong