Hi,
First post here,I use evkmimxrt1064_lpi2c_edma_b2b_transfer_master this project to test I2C, and found that if my I2C1 doesn't connect anything or get a nak, then my edma will always busy and g_MasterCompletionFlag always true, then I couldn't send another data anymore.
How can I fix it?Use LPI2C_MasterCheckAndClearError to detected and clear the flag?Or use LPI2C_MasterTransferAbortEDMA behind the LPI2C_MasterTransferEDMA?
I just want make sure that if something wrong happened and I still can send data.
Hello ,
Hope you are doing well.
I'd like to reproduce this from my end so I can check which may be the better option. From my understanding what you are doing is running the evkmimxrt1064_lpi2c_edma_b2b_transfer_master example and at a certain point disconnect the device, correct? After the device is disconnected then you experience the above behavior.
Did you make any changes to the example or you are using it as is it?
Best Regards,
Sabina
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Did you make any changes to the example or you are using it as is it?
No.
Hello ,
Hope you are doing well.
I would recommend to use first the LPI2C_MasterTransferAbortEDMA to terminate the transfer early. The LPI2C_MasterCheckAndClearError is better used to check for errors. You may also check for the error prior to aborting the transfer to see if you didn't get a nack what other issue may be occurring.
Best Regards,
Sabina
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------