I have Tiva tm4c129dncpdt. I try to put data { 0x06, 0xff} to I2C address 0x22. But the last data 0xff can't be sent .
Below is my code:
void I2cWriteTest(void)
{
SysCtlPeripheralEnable( SYSCTL_PERIPH_I2C1 );
I2CMasterEnable(I2C1_BASE);
SysCtlPeripheralReset(SYSCTL_PERIPH_I2C1);
SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOG);
GPIOPinConfigure( GPIO_PG0_I2C1SCL );
GPIOPinTypeI2CSCL(GPIO_PORTG_BASE, GPIO_PIN_0);
GPIOPinConfigure( GPIO_PG1_I2C1SDA );
GPIOPinTypeI2C( GPIO_PORTG_BASE , GPIO_PIN_1) ;
I2CMasterInitExpClk(I2C1_BASE, ui32SysClock, true);
I2CSlaveInit(I2C1_BASE, 0x22 );
I2CMasterSlaveAddrSet(I2C1_BASE, 0x22, false);
//Send the first byte.
I2CMasterDataPut( I2C1_BASE, 0x06 );
I2CMasterControl( I2C1_BASE, I2C_MASTER_CMD_BURST_SEND_START );
while(ROM_I2CMasterBusy(I2C1_BASE)) {}
I2CMasterDataPut( I2C1_BASE, 0xff );
I2CMasterControl( I2C1_BASE, I2C_MASTER_CMD_BURST_SEND_FINISH );
while(ROM_I2CMasterBusy(I2C1_BASE)) {}
}
The last data 0xff can't be sent . The signal as below: