I'm currently trying to connect a Macronix MX25L6406E SPI flash memory chip to a Raspberry Pi so that I can (hopefully) dump it's memory.

I am using a small Python script to bit-bang the commands and read data from the chip, an approach the worked for a previously used Winbond chip. My problem, is that the chip seems to be holding the MISO line high which is causing the Raspberry Pi to read in 1's (0xFF bytes).

I have confirmed that the pins of the chip are all connected to the correct GPIO pins on the Pi, and that the Vcc voltage to the chip is correct (3.3V).

Also, if it helps, the Pi isn't holding the MISO line high, as the LED I've attached to the line remains illuminated after disconnecting the Pi, but reconfiguring the corresponding GPIO pin as an output and setting it LOW seems to cause the MISO line to drop LOW.

The pin states during the transactions are as follows: MOSI: 1 0 0 1, MISO: 1 1 1 1, CS: 0 0 0 0. That's the first nybble of the Read ID commands (0x9F). Then, this is the first nybble of the response: MOSI: 1 1 1 1, MISO: 1 1 1 1, CS: 0 0 0 0.

  • 1
    \$\begingroup\$ What speed is your clock? I would avoid attaching other components like LEDs to your data lines... Also, that chip is not designed to source power (on the order of mA) on its output pins. Can you give us a circuit diagram? \$\endgroup\$
    – BeB00
    Commented Feb 27, 2018 at 11:40
  • \$\begingroup\$ Like I said originally, I'm bit-banging the data so my clock speed is currently 2Hz. I've slowed it to that speed so I can actually see the data (on the LED's). Previously, it was running at about ~5KHz (which worked fine for the Winbond chip). I'll see if I can get a circuit diagram... \$\endgroup\$
    – Jake
    Commented Feb 27, 2018 at 11:51
  • \$\begingroup\$ Well that is odd, because when the MISO is inactive it's high impedance, so the LED should be out. This means that it's sending data. Are you sure that all your connections are correct (especially gnd) and that you're sending the right commands? Can you list out the LED sequence that you observe during a transaction, with CS, MISO,MOSI and SCK? \$\endgroup\$
    – BeB00
    Commented Feb 27, 2018 at 11:57
  • \$\begingroup\$ Here is a GIF of the transaction: imgur.com/a/k63TV. The LED's are as follows; Top Left: CS, Bottom Left: MISO, Top Right: SCK, Bottom Right: MOSI. Sorry for the poor image quality and the lens flare, white LED's were all I had. \$\endgroup\$
    – Jake
    Commented Feb 27, 2018 at 12:18
  • 1
    \$\begingroup\$ Do you have a falling edge on the CS? \$\endgroup\$
    – BeB00
    Commented Feb 27, 2018 at 12:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.