Hi,
I've read over most of the forum threads about I2C and have the code set up correctly as far as I am aware.
I2CMasterSlaveAddrSet(I2C0_BASE, SLAVE_ADDRESS, false);
//SEND CONTROL CMD
I2CMasterDataPut(I2C0_BASE, 0x01);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_BURST_SEND_START);
while(I2CMasterBusy(I2C0_BASE))
{
}
//SEND DATA BYTES
I2CMasterDataPut(I2C0_BASE, 0x02);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
while(I2CMasterBusy(I2C0_BASE))
{
}
//SEND DATA BYTES
I2CMasterDataPut(I2C0_BASE, 0x03);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
while(I2CMasterBusy(I2C0_BASE))
{
}
//FINISH
I2CMasterDataPut(I2C0_BASE, 0x04);
I2CMasterControl(I2C0_BASE, I2C_MASTER_CMD_BURST_SEND_FINISH);
while(I2CMasterBusy(I2C0_BASE))
{
}
The slave (MAX5825 DAC chip) is responding to address with ACK.
Now the difference:
When I set up a loopback slave the dataput is fine.
But when I use a real slave only second and fourth bytes is seen.
Picture from logic analyzer below.
It doesn't seem possible that the MAX5825 can inhibit I2C from sending data. So maybe the software is skipping over the Send commands?
Stephen