Part Number: TM4C123GH6PGE
Other Parts Discussed in Thread: TMP75
Hi, i'm trying to achive I2C high speed communications with this device, but without success
for example I'm trying to connect to TMP75 (http://www.ti.com/product/TMP75
I'm using TivaWare_C_Series-2.1.3.156, and tried to following command seqeunce (burst reading):
setup I2C frequency to 400KHz using ROM_I2CMasterInitExpClk
ROM_I2CMasterControl(I2C1_BASE, I2C_MASTER_CMD_HS_MASTER_CODE_SEND);
ROM_I2CMasterBusy waiting
ROM_I2CMasterSlaveAddrSet(I2C1_BASE, 0x4A, 0);
ROM_I2CMasterDataPut(I2C1_BASE, 0x00);
ROM_I2CMasterControl(I2C1_BASE, I2C_MASTER_CMD_BURST_SEND_START);
ROM_I2CMasterBusy waiting
ROM_I2CMasterSlaveAddrSet(I2C1_BASE, 0x4A, 1);
.............................
I have the following questions:
1. How do setup it correctlly
2. I saw in I2C.c in driverlib:
if(HWREG(ui32Base + I2C_O_PP) & I2C_PP_HS)
{
ui32TPR = ((ui32I2CClk + (2 * 3 * 3400000) - 1) /
(2 * 3 * 3400000)) - 1;
HWREG(ui32Base + I2C_O_MTPR) = I2C_MTPR_HS | ui32TPR;
}
This is set only on calling I2CMasterInitExpClk, what if I want to set other SCL freqeuncy, more like 1MHz so TMP75 could support it?
in overall This is very confusing, do I start with 400KHz and later setup again the frequency, or it will be automatically?
I can't find any examples in TivaWare_C_Series-2.1.3.156 regarding using I2C HS mode
any help will be appreciated
Thanks
Igor