Electrical – Reading a MD25Q128SIG SPI flash memory with raspberry pi

flashmemoryraspberry pispi

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:

FLASH / RPI

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?

Best Answer

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.