Dionysus
Active member
Specs: Teensy 4.0 with Audio shield Rev D and a W25Q126JVSIQ-ND memory chip from digi-key.
I am still struggling to get this working; just about the last piece of my puzzle. I was getting Erase Everything to work, but couldn't get RawHardwareTest's full approval. So I used solder braid to desolder everything, pried off the chip, and cleaned everything up with alcohol.
I put a drop of soldern on each of the six contacts, and then positioned a fresh clean chip (also from digikey) over it and heated down all six legs until the solder melted and it was stuck on.
That didn't do anything—EraseEverything no longer erases anything, it just says "Unable to access SPI Flash chip".
So I added some more solder to the tops of the legs, but that didn't do anything except make it look messier. Nothing looks like it's bridging, but EraseEverything is still refusing to play.
I've ordered a brand new AudioShield, and I have one remaining memory chip. I really want to get this to work! Can you recommend anything I should do differently this time?
I'm just using the standard example EraseEverything, but I'll post it here just in case. Thanks again for all your help with this. It's just frustrating because I don't even really know how to debug what's wrong.
I am still struggling to get this working; just about the last piece of my puzzle. I was getting Erase Everything to work, but couldn't get RawHardwareTest's full approval. So I used solder braid to desolder everything, pried off the chip, and cleaned everything up with alcohol.
I put a drop of soldern on each of the six contacts, and then positioned a fresh clean chip (also from digikey) over it and heated down all six legs until the solder melted and it was stuck on.
That didn't do anything—EraseEverything no longer erases anything, it just says "Unable to access SPI Flash chip".
So I added some more solder to the tops of the legs, but that didn't do anything except make it look messier. Nothing looks like it's bridging, but EraseEverything is still refusing to play.
I've ordered a brand new AudioShield, and I have one remaining memory chip. I really want to get this to work! Can you recommend anything I should do differently this time?
I'm just using the standard example EraseEverything, but I'll post it here just in case. Thanks again for all your help with this. It's just frustrating because I don't even really know how to debug what's wrong.
Code:
#include <SerialFlash.h>
#include <SPI.h>
const int FlashChipSelect = 6; // digital pin for flash chip CS pin
//const int FlashChipSelect = 21; // Arduino 101 built-in SPI Flash
SerialFlashFile file;
const unsigned long testIncrement = 4096;
void setup() {
//uncomment these if using Teensy audio shield
//SPI.setSCK(14); // Audio shield has SCK on pin 14
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7
//uncomment these if you have other SPI chips connected
//to keep them disabled while using only SerialFlash
//pinMode(4, INPUT_PULLUP);
//pinMode(10, INPUT_PULLUP);
Serial.begin(9600);
// wait up to 10 seconds for Arduino Serial Monitor
unsigned long startMillis = millis();
while (!Serial && (millis() - startMillis < 10000)) ;
delay(100);
if (!SerialFlash.begin(FlashChipSelect)) {
while (1) {
Serial.println("Unable to access SPI Flash chip");
delay(1000);
}
}
unsigned char id[5];
SerialFlash.readID(id);
unsigned long size = SerialFlash.capacity(id);
if (size > 0) {
Serial.print("Flash Memory has ");
Serial.print(size);
Serial.println(" bytes.");
Serial.println("Erasing ALL Flash Memory:");
// Estimate the (lengthy) wait time.
Serial.print(" estimated wait: ");
int seconds = (float)size / eraseBytesPerSecond(id) + 0.5;
Serial.print(seconds);
Serial.println(" seconds.");
Serial.println(" Yes, full chip erase is SLOW!");
SerialFlash.eraseAll();
unsigned long dotMillis = millis();
unsigned char dotcount = 0;
while (SerialFlash.ready() == false) {
if (millis() - dotMillis > 1000) {
dotMillis = dotMillis + 1000;
Serial.print(".");
dotcount = dotcount + 1;
if (dotcount >= 60) {
Serial.println();
dotcount = 0;
}
}
}
if (dotcount > 0) Serial.println();
Serial.println("Erase completed");
unsigned long elapsed = millis() - startMillis;
Serial.print(" actual wait: ");
Serial.print(elapsed / 1000ul);
Serial.println(" seconds.");
}
}
float eraseBytesPerSecond(const unsigned char *id) {
if (id[0] == 0x20) return 152000.0; // Micron
if (id[0] == 0x01) return 500000.0; // Spansion
if (id[0] == 0xEF) return 419430.0; // Winbond
if (id[0] == 0xC2) return 279620.0; // Macronix
return 320000.0; // guess?
}
void loop() {
}