请教一下TI工程师,
在其他单片机上, 已通过模拟I2C的方式正确读取SHT20温湿度。
但在cc3200上
写操作成功:
aucDataBuf[0] = 0xf5;
I2C_IF_Write(0x40, aucDataBuf,1,0);
读操作,能正确读取数据:
aucDataBuf[0] = 0;
aucDataBuf[1] = 0;
I2C_IF_Read(0x40, aucDataBuf, 2);
但在最后的地方卡死了。
//
// Complete the last reception
//
RET_IF_ERR(I2CTransact(I2C_MASTER_CMD_BURST_RECEIVE_FINISH));
// I2CTransact 函数体 此处死循环
// Wait until the current byte has been transferred.
// Poll on the raw interrupt status.
//
while((MAP_I2CMasterIntStatusEx(I2C_BASE, false)
& (I2C_INT_MASTER | I2C_MRIS_CLKTOUT)) == 0)
{
}
根据上面模拟I2C, 我猜想是不是ACK的问题? 任何朋友能够给我一些建议吗? 谢谢。