Electronic – EEPROM: Same driver for similar chips, different behaviours

eepromstm32

I have two very similar eeproms (M24C01-x and M24C64-x), both driven by the same standard library provided for my STM32F2.

For the M24C64-x, all is fine. However, the M24C01-x is interpreting the address byte of a write transaction as a data byte, and can only write on the first page. (Reads work fine.)

A quick look through the datasheets reveals that the main difference between the chips is that one has a 16 byte page size, and the other a 32 byte page size, which I have accounted for.

What difference between these two eeproms could cause the standard library driver to break down and behave in this manner?

Best Answer

Look at Figure 7 in the M24C01 datasheet and Figure 9 in the M24C64 datasheet.

The M24C01 only takes one byte for the address and the M24C64 takes two. So the library you are using is sending out a two byte address to the M24C01.

You didn't specify the library you are using. Are you able to specify the address width?