Good morning
I use the SPI0, without any interrupt, I have this effect.
It will never go out of the while loop, even after a clear.
Is there an explanation ????
DSPI_HAL_ClearStatusFlag( baseAddr, kDspiRxFifoDrainRequest );
while( DSPI_HAL_GetStatusFlag( baseAddr, kDspiRxFifoDrainRequest ) )
{
uint32_t b = DSPI_HAL_ReadData( baseAddr );
}
Thank You
Pietro
已解决! 转到解答。
Hi,
I recommend you to have a look at the examples provided in the KSDK folder. In the path C:\Freescale\KSDK_1.2.0\examples\frdmk64f\driver_examples\dspi\dspi_polling\master
you will find an example for the SPI usage.
Hope this information can help you
Best Regards,
Adrian Sanchez Cano
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
I recommend you to have a look at the examples provided in the KSDK folder. In the path C:\Freescale\KSDK_1.2.0\examples\frdmk64f\driver_examples\dspi\dspi_polling\master
you will find an example for the SPI usage.
Hope this information can help you
Best Regards,
Adrian Sanchez Cano
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello
Ok , the suggestion is qualified. The example outlines it is necessary to read and clear the flag. the flag will not definitely clear until everything is sucked out.
I think a short suggestion like this could be helpful, we work stressed for delivering results, not always we have time to read carefully the datasheet or test in a good order.
Thank You
Pietro