Other Parts Discussed in Thread: C2000WARE
Hi,
I've written code to read an already programmed EEPROM through I2C peripheral, following are the steps i've done.
1.Configured I2C in Master transmitter mode and sent the Start Address of the EEPROM.
2.After the address has been set up, configured I2C in Master receiver mode to read the data sequentially upto 16 bytes(FIFO maximum) and stopped the data transfer.
3.Repeated the above step(without sending address again) to read blocks(16 bytes) of data until all the data reading is completed.
The block by block reading is done when i get the STOP condition interrupt of the previous block..
So, when i run this software only reading of the first block was successful...when i keep the breakpoints to check and ran the software, block by block reading was successful as i expected .Then
i kept a delay of 1 usec just before i send the command for next block reading ,this time also it is working fine...Without delays it is not working as expected.
I've checked the status of registers when the transfer is unsuccessful and found that bus is free,no interrupts of any kind but the stop condition is not cleared.. I could not understand the situation..
whether the sequence i've programmed is faulty or any other thing i am missing? please help
Regards,
Naveen.