Read Micron N25Q064A Flash Chip using SerialFlash library

Status
Not open for further replies.

jesse

New member
Is it possible to read all the data on a Micron N25Q064A chip using the SerialFlash Arduino Library?

It doesn't recognize the chip when I run the examples.

When I do this, it only returns 0 or 255 for every memory address

Code:
#include <SerialFlash.h>
#include <SPI.h>

const int FlashChipSelect = 6; // digital pin for flash chip CS pin

void setup() {

  Serial.begin(115200);

  while (!Serial) ;
  delay(100);

  Serial.println("Raw SerialFlash Hardware Test");
  SerialFlash.begin(FlashChipSelect);

  unsigned char buf[1];
  
  Serial.println();
  Serial.println("Reading Chip...");
  
  for(unsigned long i=0; i< 4294967295L; i++){ 
    Serial.print("  addr = ");
    Serial.print(i, HEX);
    Serial.print(", data = ");
    SerialFlash.read(i, buf, 1);
    Serial.print(buf[0]);
    Serial.println();
  }
}

void loop() {
  // do nothing after the test
}
 
What happens when you run the hardware test example? Does the 3 byte ID read as something other than all 0 or all 0xFF?
 
It says,
Code:
JEDEC ID: FF FF FF
Part Nummber: (unknown chip)
Memory Size: 0 bytes

Tests Failed :{

I tried a Winbond W25Q128FSG and that returns some info:

Code:
  JEDEC ID:     E3 0 0
  Part Nummber: (unknown chip)
  Memory Size:  1048576 bytes
  Block Size:   65536 bytes

All Tests Passed  :-)
 
Two possibilities:

Very unlikely: this chip doesn't support the JEDEC standardized ID command.

Much more likely: something's not wired up properly...
 
There are three parts: Arduino Uno, Micron N25Q064A, and a 4 channel Logic-level converter.

Arduino Uno GND -> Logic Level High Side GND
Arduino Uno 5V -> Logic Level High Side HV

Bench Power Supply GND -> Logic Level Low Side GND
Bench Power Supply 2V -> Logic Level Low Side LV

Micron N25Q064A Pin 1 (S#) -> LV1 -> HV1 -> Arduino Uno CS (Pin 10)
Micron N25Q064A Pin 2 (DQ1) -> LV2 -> HV2 -> Arduino Uno MISO (Pin 12)

Micron N25Q064A Pin 3 (W#/Vpp/DQ2) -> LL LV (2.0v to prevent writes)
Micron N25Q064A Pin 4 (Vss) -> LL LV GND

Micron N25Q064A Pin 5 (DQ0) -> LV4 -> HV4 -> Arduino Uno MOSI Pin 11
Micron N25Q064A Pin 6 (C) -> LV3 -> HV3 -> Arduino Uno CLK Pin 13

Micron N25Q064A Pin 7 (HOLD#/DQ3) -> LV (2.0 volts, active is low for pausing when transaction is in flight)
Micron N25Q064A Pin 8 (Vcc) -> LV (2.0 volts)

I changed CS from 6 to 10 in the code.

Arduino SPI Pins: https://www.arduino.cc/en/Reference/SPI
Micron N25Q064A Data sheet: https://www.micron.com/~/media/docu...flash/serial-nor/n25q/n25q_64mb_1_8v_65nm.pdf
Bi-directional logic level converter: https://www.sparkfun.com/products/12009

When I plug a Winbond chip into the same breadboard without changing any of the wires, I can run this successfully: http://www.instructables.com/id/How-to-Design-with-Discrete-SPI-Flash-Memory/
 
The chip worked as expected when soldered into a Macbook Pro logic board. I'm going to try to read the old chip using a Raspberry Pi.
 
You must be doing *something* to plug that Micron N25Q064A (which doesn't come in DIP package) into the same breadboard.

I remain convinced the problem reading all 0xFF for the ID bytes is almost certainly an indication your chip isn't probably connected.
 
Status
Not open for further replies.
Back
Top