Hi all,
I wonder what happens if we don’t wait for send finished after LPUART_TransferSendNonBlocking in lpuart_interrupt_transfer example in SDK.
Exactly code line between 102-104. What happens if we delete these lines. Will data transmission fail for &xfer? Or exist any overflow with &sendXFer?
Thanks and Regards.
Solved! Go to Solution.
Hello @Lukas_Frank,
The API check if the busy flag to check if there an ongoing operation. So the best option would be to check the status that return the API to ensure the message was sent or not.
/* Return error if current TX busy. */
if ((uint8_t)kLPUART_TxBusy == handle->txState)
{
status = kStatus_LPUART_TxBusy;
}
Best Regard,
Alexis Andalon
Hello @Lukas_Frank,
The transmission will not fail, one of the reasons to use the NonBlocking functions is to continue the normal application flow until a transmission is received and the callback is triggered, in which case, the application will handle the oncoming packet.
Only you would need to be careful to not try to send a transmission until the callback notify that the current send operation is done.
Best Regards,
Alexis Andalon
Hi @Alexis_A ,
Thanks for your feedback. I wonder exactly what happens if I start new data transmission before last one’s callback is triggered?
Thanks and Regards.
Hello @Lukas_Frank,
The API check if the busy flag to check if there an ongoing operation. So the best option would be to check the status that return the API to ensure the message was sent or not.
/* Return error if current TX busy. */
if ((uint8_t)kLPUART_TxBusy == handle->txState)
{
status = kStatus_LPUART_TxBusy;
}
Best Regard,
Alexis Andalon