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.

BURST_SEND communication

Hi! I have a doubt in my i2c code:

I am using i2c with TM4C123 and a peripheral slave. Well, my doubt is using I2C_MASTER_CMD_BURST_SEND_START, all examples I have seen write while(I2CMasterBusBusy(I2C0_BASE)){} after to wait until bus isn't busy. But in my case, the debugging stops there and it isn't possible to continue. I have tried to omit this line and it works properly. My question is that ommitting this line, will be prolems in the i2c communication when running without debugging (delay)? And why?

I2CMasterSlaveAddrSet(I2C0_BASE, 0x0A,false);

I2CMasterDataPut(I2C0_BASE, 0x83);
I2CMasterControl(I2C0_BASE,I2C_MASTER_CMD_BURST_SEND_START);
while(I2CMasterBusBusy(I2C0_BASE)){} //Here!! The code stops debugging here.

I2CMasterDataPut(I2C0_BASE, 0x03);
I2CMasterControl(I2C0_BASE,I2C_MASTER_CMD_BURST_SEND_FINISH);
while(I2CMasterBusBusy(I2C0_BASE)){}

Thanks!

  • Hello Northpole,

    The loop command is not I2CMasterBusBusy but I2CMasterBusy. The first API checks if the Bus is Busy or not. Once the master begins the transmission it will return true and you will have the code stuck in that loop

    Regards
    Amit