2019-06-04 03:16 AM
in our application we are using the M93C86-W EEPROM. It is driven by the 16Bit SPI mode of the TMS320F28069 Piccolo microcontroller by Texas Instruments.
As far as I can judge, the used instructions are executed correctly and the EEPROM works as the datasheet indicates. This is where the problems start. After writing data to a selected address, the data is not read correctly. According to the datasheet, a dummy 0 is output first, followed by the databits. The problem is, after the READ instruction, I send 16 bit dummy data to keep the clock running. The data to be read is 16 bit long, as well. But the first bit read is the dummy zero output by the EEPROM. As a result of this, the last databit is not read by the microcontroller (for it just reads 16 bit, but the EEPROM outputs 17 bit).
In the attached file you can see the signal flow on the SPI wires. I write 0xFAFA to the selected address (not showed). After the write disable command (0x1000) I send the READ command together with the aforementioned address (0x1A10). The data output by the EEPROM (to be seen on the MISO line) is 0x7D7D, wich is obviously not correct.
How do I solve this Problem? I tried different settings on the microcontroller but I can not read 17 bit with it (max. 16 bit). The result stays the same. I tried different timing settings on the EEPROM, as well, but it still outputs the wrong data. What kind of procedure would you recommend?
Greetings
Marcel
2019-06-04 09:33 AM
Dear Marcel,
During the read, the output begins to change (HiZ to 0) at the second to last bit of the address. (see figure 5 of datasheet attached).
After you can send your 16 bit of clock for the data Q15-Q0.
Let me know if it's clear.:smiling_face_with_smiling_eyes:
https://www.st.com/resource/en/datasheet/m93c86-r.pdf
BR
ST EEPROM Team SuPPort
2019-06-11 03:22 AM
Dear Support Team,
thank you for the quick reply.
I already did what you requested. The Problem stayed the same. I now have the feeling, that there are some sort of timing issues. The moment, the rising edge of Clock arrives, the EEPROM returns the data to be read. The problem is, there is a short delay between the clock rising edge and the arrival of the data. Therefore, the first bit read is no data bit, but the bit one clock cycle before the current bit. As a result of this, the last data bit is output too late (after the last clock edge). The bit can not be read and I loose one bit of information.
In the datasheet the aforementioned delay is called tCHQV. Its maximum value is 200ns. In my application I meassure a delay of 90ns. Therefore it should not be a problem. But the microcontroller never the less reads wrong data.
I tried to fix this problem with different settings in the SPI mode of my microcontroller. I can sample data on the rising or the falling edge of clock. Furthermore I can decide wether I want to delay the clock phase by half a cycle or not.
Sampling on the falling edge of clock does not bring any difference. Not delaying the output of data results in the operation not working at all.
I now do not know, what I can do to further manipulate the timing of the operation. Do you have any experience with this Problem? As I mentioned before, according to the datasheet the delay should not cause any problems. Nevertheless it seems to be the cause of the issues.
In the attached picture, I zoomed in on the critical time to iilustrate the delay. I hope this helps finding the solution of the problem. Let me know, if you need any further information.
Thank you for your help.
BR
Marcel