[Fx2lib-devel] Issues with I2C
Status: Beta
Brought to you by:
mulicheng
From: Kevin J. <kjp...@ya...> - 2011-01-05 17:10:37
|
I am using a Cypress 68013 and a 16 kB 3.3 V EEPROM. The fx2lib I2C functions to read the EEPROM isn't working, but if I manually send the I2C read and write functions as shown in the read and write EEPROM code, but with a delay in between it works fine. Has anyone else seen this? I am only running at 100kHz. I am using fx2lib-src-0.1.tgz which looks like the only released version. I am using the newest version of SDCC so I had to go through and update everything. Didn't know about the github until already had done it. I am just interested if there were any other fixes to I2C that I might not have roled in or if I should just add a SYNCDELAY in my fx2lib and rebuild it. When I check with a scope, what I notice is that without the delay the first 1 to 3 reads are NACKed. It retries and eventually gets a ACK when the part is ready but the randomness of when it gets acked means that the data is random. If I add the delay the first read is ALWAYS acked and the data is always good. Thanks Kevin |