Hi,
Currently i'm working in TMS320TCI6486,i'm using i2c interface for uart initailization , i almost completed it,but one problem remains.Sometimes when i enable and make the DSP i2c interface as master transmit ,it is not going to bus busy state.
CSL_FINS(hI2c->regs->ICMDR, I2C_ICMDR_TRX, TRUE);
CSL_FINS(hI2c->regs->ICMDR, I2C_ICMDR_MST, CSL_I2C_MODE_MASTER);
status = CSL_i2cHwControl(hI2c, CSL_I2C_CMD_START, NULL);
if (status != CSL_SOK) {
printf("I2C: Error while starting I2C. [status = 0x%x]\n", status);
return FALSE;
}
do
{
CSL_i2cGetBusBusy(hI2c,&BbResponse);
} while(BbResponse != 1);
it is getting stuck in that "CSL_i2cGetBusBusy(hI2c,&BbResponse);" the i2c initialization are as given below.
hwSetup.mode = CSL_I2C_MODE_MASTER;//I2C Master
hwSetup.dir = CSL_I2C_DIR_TRANSMIT;//I2C in tx mode
hwSetup.addrMode = CSL_I2C_ADDRSZ_SEVEN;//7-bit addr mode
hwSetup.sttbyteen = CSL_I2C_STB_DISABLE;//Start Byte Disable...
hwSetup.ownaddr = CSL_I2C_SLAVE_ADDR;//I2C own address
hwSetup.ackMode = CSL_I2C_ACK_ENABLE;// use when I2C is recver
hwSetup.runMode = CSL_I2C_FREE_MODE_DISABLE;// no free run mode
hwSetup.repeatMode = CSL_I2C_REPEAT_MODE_ENABLE;//repeat mode enable..I2C rcvs/tx untill stop is generated..
hwSetup.loopBackMode = CSL_I2C_DLB_DISABLE;//loop back disable
hwSetup.freeDataFormat = CSL_I2C_FDF_DISABLE;//free data format is disabled...7/10 bit addressing mode is used..
hwSetup.resetMode = CSL_I2C_IRS_ENABLE;//I2C enabled
hwSetup.bcm = CSL_I2C_BCM_DISABLE;//
hwSetup.inten = 0x00;//all intr req disabled...
hwSetup.clksetup = &clksetup;
any one please tell me why this is happening.
thanks,