Content originally posted in LPCWare by teslabox on Sun Apr 03 04:51:48 MST 2016
Hi everyone!
I need to use Micron M25P16 Serial Flash Embedded Memory with 16 Mb (2 MB) of space.
It communicates used SPI interface up to 75 MHz clock signal.
First I made a prototype universal PCB (one layer, THT, 2.54 mm raster/grid) with +3,30 DC V from my LPCXpresso LPC1769 Rev. C PCB
and pull-up 10 kOhm resistors at W# (not Write Protect) and HOLD# (not Hold) pins and pull-up 100 kOhm resistor at S# (not Chip Select)
and pull-down 100 kOhm resistor at C (serial Clock) according to the "Figure 5: Bus Master and Memory Devices on the SPI Bus"
on the page no 10 in the datasheet of Micron M25P16. Also I added serial 100 Ohm resistor at C (serial Clock) line to reduce generating noise from
this signal to the other lines of SPI interface (MOSI and MISO lines).
I connected the prototype PCB with M25P16 memory to the LPCXpresso LPC1769 using female-female universal pigtails (with ca. 20-25 cm long).
I wrote proper code in ANSI C according to the flash memory commands in the datasheet and it works proper up to 500 kHz of clock speed.
I use commands as follows:
- READ IDENTIFICATION,
- READ STATUS REGISTER,
- WRITE ENABLE,
- WRITE DISABLE,
- READ DATA BYTES,
- SECTOR ERASE
- PAGE PROGRAM.
On the beginning it is enough for me.
Everything works very good - no failures/error, every command it recognizable by memory and gives answer from it.
Also I prepared some ANSI C code with slower SPI clock 10 kHz, 25 kHz, 50 kHz, 100 kHz, 200 kHz - all of them works very good.
In next step I designed a PCB and after assembly all electronics parts it turned out that there are some troubles with communication with M25P16
flash memory. Sometimes it works properly some time not - something like memory does not recognize commends...? and gives no answer
I checked SPI lines with oscilloscope and the SPI lines during sending commands look quite good but there is no answer...
Lengths of SPI traces on the PCB are ca. 20-30 mm from LPCXpresso LPC1769 goldpin connectors and I used round corners routing pull-up and pull-down
resistors are the same, 100 Ohm serial resistor on serial Clock line is also the same, decoupling 100 nF/100 V + 1 uF/50 V MLCC ceramic resistors
on Vcc power pin are the same... Even I slow down clock speed up to only 10 kHz... no positive changes.
I use 2-layer PCB with 20 mils width of traces and 10 mils clearance between signal traces and GDN polygon and signal to signal traces.
Do you have any suggestions what I can check more or what I can do in this situation?
If you need more information from me I will write all them below.