Hello,
I have run into a bit of an anomaly during my tests.
I am using the SDK example for the LPI2C driver (b2b_master_transfer)
Configuring the master to use LPI2C3 instead of LPI2C1, it seems that if I put a PRINTF statement before the transfer it causes the bus to leave the idle state and the transfer will hang.
// A print statement here will cause the lpi2c3 bus to leave the idle state
PRINTF("TEST\n");
/* Send master non-blocking data to slave */
reVal = LPI2C_MasterTransferNonBlocking(EXAMPLE_I2C_MASTER, &g_m_handle, &masterXfer);
// the reVal check will fail if the bus is not idle
PRINTF("handle state:0x%02X \n", g_m_handle.state);
/* Reset master completion flag to false. */
g_MasterCompletionFlag = false;
if (reVal != kStatus_Success)
{
return -1;
}
Any idea how the PRINTF is impacting LPI2C3?
This doesn't happen when using LPI2C1...
Thanks!
Hi Jack:
I downloaded the latest SDK_2.5.0_EVK-MIMXRT1060, run the demo lpi2c_interrupt_b2b_transfer_master,
modified the code to use lpi2c3 as below,
#define EXAMPLE_I2C_MASTER_BASE (LPI2C3_BASE)
and added a PRINTF as you did.
I only have one board at hand, so I don't connect to slave. But I don't see the transfer hang issue till now. Could you let me know how to reproduce your issue? I need to connect to a slave board?
Regards
Daniel
Thanks for testing that! I think it was a result of a bad solder joint on my development board. After touching it up, the problem went away.
Thanks