Hello , I'm trying to interface TM4C1294NCPDT with MPU9-150 through I2C , I'm using FIFO, cause i want to write 2 bytes at one time
is that possible here to just send a start condition with burst and still waiting on one condition till the bytes are sent and then generate a stop condition ?
or do i have to generate a burst continue after each byte?
//1. Enable and provide clock to choosen I2C.
SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0);
//2. Enable clock to the selected GPIO module.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
//3. Enable I2C pins for their alternate function.
GPIOPinConfigure(GPIO_PB2_I2C0SCL);
GPIOPinConfigure(GPIO_PB3_I2C0SDA);
GPIOPinTypeI2CSCL(GPIO_PORTB_BASE, GPIO_PIN_2);
GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_3);
GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_2|GPIO_PIN_3, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); //PULLUPS
//initialize as master
I2CMasterEnable(IIC0_BASE);
//initialize the clock
I2CMasterInitExpClk(I2C0_BASE, SYSTEM_CLOCK1, false);
//initialize the transmitter FIFO to the master
I2CTxFIFOConfigSet(IIC0_BASE, I2C_FIFO_CFG_TX_MASTER );
//specify the slave address of the master and configure to write.
I2CMasterSlaveAddrSet(IIC0_BASE ,slave_address, false);
//specify the data count
I2CMasterBurstLengthSet(IIC0_BASE, 2);
//putting the 2 bytes in FIFO
counter = I2CFIFODataPutNonBlocking(IIC0_BASE,0x07);
counter = I2CFIFODataPutNonBlocking(IIC0_BASE,10);
//Sending start with burst
I2CMasterControl(IIC0_BASE, I2C_MASTER_CMD_FIFO_BURST_SEND_START);
So what should i do here : Waiting on the count register till reaches to zero and then generate a stop condition or i have got to wait till one by one byte and every time generate a burst continue command ?
thanks.