I am using an eeprom M24C32-W from ST.
Here is my schematic with VCC=3.3V. The write protection Write Control pin is connected to VSS and thus should be disabled. The address of the device is 0xA0 (or 0x50<<1) because the pins E1, E2, E3 are connected to VSS.
And here is my write and read command: I want to write value 0xAA to address 0xF0 but I cannot manage to read back this value. This is what my logic analyzer measures at the pull-up resistors.
Here is what I have tried so far:
- writing to and reading from different memory addresses: 0x0000, 0x00F0, 0x00FF, 0x0FFF, 0xFFFF,
- different delays between write and read: 0ms (it failed), 10ms, 1000ms.
- write to device, power down board, power up board, read from device.
None of those worked so far, I am running out of ideas.
EDIT: I have tried various clock speeds with no success: 100kHz, 10kHz, 1kHz. The EEPROM is the only device on the I2C bus.
Solved:
It was simply a faulty hardware problem. I switched the eeprom for a new one and now it works. Thank you all.