AnsweredAssumed Answered

PRINTF interferes with LPI2C3 on RT1050?

Question asked by Jack King on Dec 16, 2018
Latest reply on Jan 2, 2019 by Jack King

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!

Outcomes