Search code examples
cspieeprom

M93C46 cant write but can read


I encountered some problems when using M93C46. I can read data in 93C46 through spi communication, but I cannot write data to 93C46. I checked the timing of my spi, but no problem was found.

Here are the sequences pictures:

enter image description here

enter image description here

Here is the code table and sequences pictures:

enter image description here

enter image description here


Solution

  • It looks like your D signal (what would be MOSI if this were SPI) is transitioning simultaneously with the rising edge of the clock. This would be SPI mode 1.

    These "microwire" parts are not SPI, they are a pain in the backside.

    You have to use a different clock edge when reading and writing. Write data before the rising edge of clock, the memory samples it on the rising edge (equivalent to SPI mode 0). However, the memory only outputs data on Q (equivalent to MISO) after the rising edge of the clock, so you have to read it on the falling edge of the clock (SPI mode 1).