I am working for quite a while now with a GD5F1GQ4UCYIG from GigaDevice. The goal is to dump the content of the flash.

To do so I use a BusPirate. The NAND flash itself is still attached to the board, I simply connected its output pins with the BusPirate via short wires. Unfortunately I can't desolder it from the board.

The problem that I have is the following, when I execute a page read I can't read the entired page. (1 page=2048 Bytes + 128 Bytes OOB).
When I try to read 2048 Bytes it starts well but after a few Bytes (the exact number is not consistent but it is around 530 Bytes +-) I only get 0x00 Bytes. I found out the number of Bytes that I can read directly depends on the SPI speed that I can configure in the BusPirate Settings. I tried all 8 SPI speeds and I got the best result with 2MHz. All the other speeds start generating 0x00 Bytes way before 500 Bytes.

Why is that so? I mean I should be able to read an entired page at once, shouldn't I?
And why can I read less Bytes at once with diferent SPI speed values?

  • 1
    \$\begingroup\$ It could be related to the other things on the board. \$\endgroup\$
    – user253751
    Jan 29, 2020 at 11:08
  • \$\begingroup\$ If the board is powered, other things may override the signals on the SPI bus. If you supply power to the chip only, it still may power up other components too. You certainly need a scope to check the signals. In the worst case you may have to unsolder at least the Vcc pin and use a bracket. \$\endgroup\$
    – A.K.
    Jan 29, 2020 at 17:16

1 Answer 1


A first step to understanding this reading issue is to study the NAND Flash connections with an oscilloscope. Do this first without the BusPirate connected. With the circuit board in the same state as when you were trying to read see if the circuit board's other electronics is trying to make accesses to the NAND Flash. If there are other transactions then be aware that those transactions are most assuredly colliding with those that the BusPirate was trying to initiate. You may need to take some action with respect to the circuit board to make it stop these normal operational accesses. That may be as simple as finding and asserting a reset signal but could be as complex as isolating the NAND device from other circuits by lifting pins or cutting traces.

If the first level investigation does not show any transactions from the circuit board other components then you need to study each and every signal and power pin on the NAND Flash device. Use the oscilloscope to see if you have normal expected behavior on the pins. You would be looking for normal voltage levels on the power pins, expected signal swings of the logic signals without obvious contention or clamping of signal levels. Any problem seen will give a good clue as to why you are unable to successfully read out from the device.

There are several problem areas that you can zero in on:

  1. If you are leaving the board unpowered and trying to supply power to the NAND device from the BusPirate it may be possible that it is not able to power up the Flash. This would be because the BusPirate is just not able to power the voltage rail that supplies other components on the board. It may be necessary to isolate the power connection to the NAND from the rest of the board.
  2. Signal clamping could be going on wherein the circuit board is attempting to drive the same signals to the NAND Flash as the BusPirate. For example the board may be trying to pull the ChipSelect signal high whilst the BusPirate tries to drive it low to start a transfer with the Flash. The result would be a ChipSelect signal that does not pull down all the way to GND leaving the NAND to be working with illegal logic levels of signals. Signal isolation may be required on some pins.
  3. Adding wires to the board may cause the signal integrity of the excitation coming from the BusPirate to be less than optimal. This could be added ringing, degraded rise/fall times and additional capacitive loading that causes a violation of the signal setup and hold times relative to the CLK signal.

Your Answer

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

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