Hello friends!
Now I want to transmit multiple bytes to I2C slave device,but I don't know how to configure relevant registers.The following is my code:
{
I2CMasterSlaveAddrSet(I2C0_MASTER_BASE, deviceID, false);
I2CMasterDataPut(I2C0_MASTER_BASE, offset);
I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_START); while(I2CMasterBusy(I2C0_MASTER_BASE)) { }
I2CMasterDataPut(I2C0_MASTER_BASE, value);
I2CMasterControl(I2C0_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_START);
while(I2CMasterBusy(I2C0_MASTER_BASE)) { }
}
According to the sequence of write,the first byte is device add,the second is register add of slave device,the third is the value written in the register. But the waveforms that I watched from the scope are different from the manual of slave device. The waveforms show that the first byte is device add,the second is register add, then it transmits 1 repeated START,and then it transmits the device address again,the last byte that it transmits is the value that should be written in the register. So the sequence watched from the scope differs from the manual.And now I don't konw how to do next.Thank you in advance!