Hi, all
i'm working on a project that use CC3200 as both i2c slave and i2c master. but i found that when working as I2C Slave, CC3200 may dosen't work when it is addressed by I2C Master device at the ninth clock.
and when i keep writting cc3200(i2c burst write), sometimes it is recognized as I2C read, i don't know how to deal with this problem.
any help is really appreciated.
void I2C0_IRQHandler(void)
{
static volatile unsigned int uiData = 0;
unsigned int uiStatus;
uiStatus = I2CSlaveStatus(I2CA0_BASE);
uint32_t i2c_int_status;
uint32_t cnt = 0;
//Report("I");
//i2c_int_status = I2CSlaveIntStatusEx(I2CA0_BASE, 1);
//Report("-----I2C0 IMR State: %x \r\n", i2c_int_status);
I2CSlaveIntClearEx(I2CA0_BASE, I2C_SLAVE_INT_DATA);
if(uiStatus & I2C_SCSR_DA)
{
uiData = I2CSlaveDataGet(I2CA0_BASE);
}
else if(uiStatus & I2C_SCSR_TREQ)
I2CSlaveDataPut(I2CA0_BASE, '5'); //i have to add this line, or i2c will not work
}
}
Best Regards,
Eugene.