2018-05-31 08:07 PM
Hello all,
I'm here using the M95640 EEPROM and communicating via SPI. It looks like I'm sending all the signals correctly from my MCU side, but the device (
M95640)
is not responding to Signals.Below is the WriteEnableCommand(0x06)+WriteDataCommand(0x02)+Address(0x1234)+Data(0xAB) I send on D
Below is the ReadCommand(0x03)+Address(0x1234) I send on D
But If I observe the data output from the device(
M95640), it is always high which means I'm receiving FF always.
Below is the EEPROM circuit
Kindly suggest If any changes required.
Thanks in advance,
BJ Rajendranath.
2018-06-05 10:10 PM
I found it.
The actual misunderstanding started from the M95640 datasheet. It had been mentioned in the page 10 that the device will work for either for CPOL=0 & CPHA=0 or for CPOL=1 & CPHA=1. See the picture below.
Below that input data is latched in on the rising edge of Serial Clock (C), and output data is available from the falling edge of Serial Clock (C). This reflects the CPOL=1 &CPHA=0 application. I changed
accordingly
in my SPI module and it works.Note:
Also after every WRITE operation, we need to Read Status Register (RDSR 0000 0101) to check WIP bit