This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Tiva I2C I2C_MASTER_ERR_ARB_LOST error

Other Parts Discussed in Thread: ADS1015, TM4C123GH6PM

Hello,


I can't understand what is the reason of getting this error. Below you can find my code:

bool AdafruitTaskInit(void)
{

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
    GPIOPinConfigure(GPIO_PD0_I2C3SCL);
    GPIOPinConfigure(GPIO_PD1_I2C3SDA);
    GPIOPinTypeI2C(GPIO_PORTD_BASE, GPIO_PIN_1);
    GPIOPinTypeI2CSCL(GPIO_PORTD_BASE, GPIO_PIN_0); //  special I2CSCL treatment for M4F devices

    SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C3);
    SysCtlPeripheralReset(SYSCTL_PERIPH_I2C3);
    I2CMasterInitExpClk(I2C3_BASE, SysCtlClockGet(), false);
    SysCtlDelay(10000);

    testdata = ads1015_read_register(0x01);

...

...

uint16_t ads1015_read_register(uint8_t read_reg) {
    I2CMasterSlaveAddrSet(I2C3_BASE, ADS1015_ADDRESS, false); // false = write
    I2CMasterDataPut(I2C3_BASE, read_reg);
    I2CMasterControl(I2C3_BASE, I2C_MASTER_CMD_SINGLE_SEND);
    while(I2CMasterBusy(I2C3_BASE)){}
    error_code = I2CMasterErr(I2C3_BASE);
//    Here I get the error! I2C_MASTER_ERR_ARB_LOST = 16 = 0x10

...

One strange thing is that I can not see I2CMDR register loaded. After I2CMasterDataPut(I2C3_BASE, read_reg);

I am using CCSv5.5.0.00077 on Windows with J-Link debugger.

Here is a picture from registers:

http://i.hizliresim.com/M96AZM.png


Thanks in advance!