I want to test ezport on my board via frdm-kl43. I've tried simple SPI trasnmission and failed.
SPI1_S & (SPI_S_SPRF_MASK); //initial clear of SPRF bit
GPIO_DRV_ClearPinOutput(CS); //CS enable
while (!(SPI1_S & (SPI_S_SPRF_MASK))); //wait SPRF to be setted up
GPIO_DRV_SetPinOutput(CS); //CS desable
And logic analyzer picture is attached. Chip select goes high before transmit is complete.( SPRF sets)
What is the root of my problem?