I'm a bit stuck programming the "save to eeprom" functionality of the CY8C9560A. Since the command value 0x01 is broken (per datasheet errata), I am trying to replicate that functionality with commands 0x06 (read device configuration) and 0x03 (write configuration to EEPROM). Here's my status so far:
- I have two I2C objects (addresses 0x20 and 0x50 for the volatile and EEPROM device functions, respectively). I am able to connect to the EEPROM I2C address after enabling it using the enable register (0x2D).
- I have successfully read out the 146-byte configuration information by reading the command register 0x30, setting command 0x06 to read the device configuration, then reading the 146 byte payload and checking the CRC. That works fine, and I get the configuration values that I expect to get. In fact, all single-register reads and writes are working great, so this "save" functionality is the only missing piece.
- When I try to write this data back to EEPROM, the device doesn't ACK, which indicates the packet is malformed or the CRC check failed. But I don't see what the issue is. The packet I'm sending is the following, and I'm writing it to the volatile I2C device (address 0x20). I have also tried writing it to the EEPROM address (0x50), but that doesn't work either.
I find that you are following the correct procedure to write configuration data to EEPROM. Can you confirm if clock stretching is enabled in your I2C Master. Kindly give us some time to investigate what can cause the NACK at the last byte.