dear all,
I'm using SPI interface and I set 100000 as baudrate / 16 data bit. I'm using SPI_WriteData to transfer the data to a periferal and it works.
I inserted a delay function SDK_DelayAtLeastUs(160U, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY); to avoid any overload error.
Instead of inserting a delay I would like to test a bit of the SPI periphery that indicates that the data transmission is completed
// now I'm using the following code
SPI_WriteData(FLEXCOMM4_PERIPHERAL, data, configFlags);
SDK_DelayAtLeastUs(160U, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);
// but I would like to use the following procedure
SPI_WriteData(FLEXCOMM4_PERIPHERAL, data, configFlags);
while(SPI_checkTransmittedFlag(FLEXCOMM4_PERIPHERAL)) {}
Is there any SPI_chekTransmittedFlag that do that ?
Thank you very much for your help and cooperation
regards
Solved! Go to Solution.
Hello,
Yes, you can check the register FIFOSTAT,
You can also use transmit interrupt:
Recommend you refer to SPI demo under SDK, it includes polling and interrupt mode.
BR
Alice
Solved!!
Hello,
What about the part number of your mcu?
BR
Alice
Dear Alice,
I'm using LPC55S28 assembled in LPC55S28 -EVK board
regards
Hello,
Yes, you can check the register FIFOSTAT,
You can also use transmit interrupt:
Recommend you refer to SPI demo under SDK, it includes polling and interrupt mode.
BR
Alice