大家好,
客户在AM5716 IC2主地址发送从属地址期间观察到奇怪的行为。 I2C5主控制器无法 使总线繁忙以进行传输,并按如下所示的ACK位定时发送数据。 发生了1次/ 2到3小时。
I2C5与外部RTC通信。 I2C5模块停留在Line15,该总线正忙于 连接的代码。
您对此问题有什么想法吗?
/* Set i2c slave address */ I2CMasterSlaveAddrSet( baseAddress, slaveAddress ); I2CFIFOClear(baseAddress, I2C_TX_MODE); I2CFIFOClear(baseAddress, I2C_RX_MODE); /*Clear all interrupt status*/ I2CMasterIntClearEx(baseAddress, I2C_INT_ALL); /* Set data count */ I2CSetDataCount( baseAddress, size+1 ); /* Configure i2c as master-transmitter and to generate stop condition */ I2CMasterControl(baseAddress, I2C_CFG_MST_TX); /* generate start */ I2CMasterStart(baseAddress); /* wait for bus busy */ while(I2CMasterBusBusy(hwAttrs->baseAddr)==0) { } // data TX for (i = 0; i < (size+1); i++){ /*Wait for transmit interrupt to occur*/ while (I2CMasterIntRawStatusEx(baseAddress, I2C_INT_TRANSMIT_READY) != I2C_INT_TRANSMIT_READY) { } /* Send the data */ I2CMasterDataPut(baseAddress, txBuf[i] ); /*Disable transmit ready and stop condition interrupt*/ I2CMasterIntClearEx(baseAddress, I2C_INT_TRANSMIT_READY); } /* generate stop when requested */ I2CMasterStop(baseAddress); /*Clear data buffer length*/ I2CSetDataCount(baseAddress, 0);
谢谢,此致,
Kuerbis