I'm trying to read a MD25Q128SIG SPI flash memory with my raspberry pi, you can find its datasheet here: http://www.firstjit.com/Uploadfiles/20160121152131319.pdf

Here are raspberry pi pinouts:

enter image description here

Here are the pinouts of my chip:

enter image description here

and its descriptions:

enter image description here

I've connected like this in my raspberry pi:


1 - 24

2 - 21

3 - ?

4 - 9 (GND)

5 - 19

6 - 23

7 - ?

8 - 1 (3.3v)

My question is: where do I connect pins 3 and 7 of my flash memory? Pin 3 is write protection. Something should be done to prevent writing, I guess. And 7, which is hold/reset, what do I do? Are the other pins correct? Also, how can I read my memory with this pinout using python and save it to the disk?


To simply read or write the contents in plain SPI mode without invoking additional functionality, tie both /WP and /HOLD high, most easily to the flash chip's supply line.

  • \$\begingroup\$ you mean putting them to 3.3v? \$\endgroup\$ – Guerlando OCs Mar 16 '19 at 23:56
  • \$\begingroup\$ If connected to a pi, then presumably that is your supply and I/O voltage for the chip, yes. And it looks like that is within range for your data sheet, though beware that some other parts are only rated for lower voltages. \$\endgroup\$ – Chris Stratton Mar 17 '19 at 0:20
  • \$\begingroup\$ What you mean other parts? Now i'm afraid to turn on. I bought a camera just to take its flash memory off and read it, I can't screw this. I'm afraid I write things to it so that's why I'm asking about the write protection. Where did you see that write protection is on if WP is HIGH? \$\endgroup\$ – Guerlando OCs Mar 17 '19 at 0:27
  • \$\begingroup\$ No, write protection is off if /WP is high. If you want to figure out how to activate it, you'll need to read the data sheet. As for voltage, if you pulled the correct data sheet it is okay, but if you perhaps mixed up a few letters in the part number it could be a lower voltage part - for example, Winbond's parts with SIG in the name are low voltage. You could perhaps carefully measure the voltage in the camera, even of the pads where the chip was... \$\endgroup\$ – Chris Stratton Mar 17 '19 at 0:51
  • \$\begingroup\$ If write protection is off if WP is high, then why did you say that I need to set it to high, in your answer? \$\endgroup\$ – Guerlando OCs Mar 17 '19 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.