Other Parts Discussed in Thread: TM4C1294NCPDT
Tool/software: Code Composer Studio
Hi,
I am working on TM4C129X dev board to which I have interface an Power sequencer Ucd via I2C
My aim was to check whether the interface is thru for which I try to read the device ID and manf ID of chipset. In normal I am able to communicate with the Ucd chipset Via I2C.
When I unconnect the chip from I2C I face two issues
here is the code i work on
/***************************/
I2CMasterSlaveAddrSet(I2C1_BASE, UCD_I2Caddr , false);// write ucd addr
I2CMasterDataPut(I2C1_BASE, ui8Command); // put Command to I2C1
I2CMasterControl(I2C1_BASE, I2C_MASTER_CMD_BURST_SEND_START); // Send
while(!I2CMasterBusy(I2C1_BASE));
while(I2CMasterBusy(I2C1_BASE)); // check for I2C master busy hence wait
if( I2CMasterErr(I2C1_BASE) != I2C_MASTER_ERR_NONE)
{
return false;
}
/***********************/
Issue 1: when I2C pins are floating ie. when there are no pull-ups
I observe that the code hangs on statement
""while(I2CMasterBusy(I2C1_BASE)); // check for I2C master busy hence wait""
What to do about it??
Issue 2: when I2C disconnected from Ucd but has pullups
I2CMasterErr(I2C1_BASE) doesnot result in an error!!
but
""I2CMasterControl(I2C1_BASE, I2C_MASTER_CMD_BURST_SEND_START); // Send""
On scope i could observe only 9 clock cycle where as in actual case there should be 18 cycles (ADDR && Command"")
Is such a scenario how to determine error in the interface if any ??
What should be the right way to do this ??