Tool/software:
I need to write data in eeprom for which i can use Burst write mode. Since i dont have a eeprom right now i'm using another microcontroller as slave.
MAP_I2CMasterSlaveAddrSet(I2C2_BASE, SLAVE_ADDRESS, false);
MAP_I2CMasterControl(I2C2_BASE, I2C_MASTER_CMD_BURST_SEND_START);
while(dataIndex < 6)
{
MAP_I2CMasterDataPut(I2C2_BASE, eeprom_w[dataIndex]);
if( (dataIndex < 4))
{
MAP_I2CMasterControl(I2C2_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
}
else if(dataIndex == 4)
{
MAP_I2CMasterControl(I2C2_BASE, I2C_MASTER_CMD_BURST_SEND_FINISH);
}
UARTprintf("eeprom write[%d]= 0x%x\n", dataIndex, eeprom_w[dataIndex]);
dataIndex++;
}
dataIndex=0;
while(MAP_I2CMasterBusBusy(I2C2_BASE))
{
}
Expected data eeprom[6] = {0xAA,0xBB,0xCC,0xDD,0xFF,0xEE};
After writing, i tried reading with Burst read mode.
eeprom read[0]= 0xaa
eeprom read[1]= 0xaa
eeprom read[2]= 0xbb
eeprom read[3]= 0xcc
eeprom read[4]= 0xdd
eeprom read[5]= 0xff
0xaa is repeating twice and last 0xee is missing
Can you please correct me on where i'm missing.