Serial flash memory read without voltage - Page 1
Forum section: electronics / projects

author: robzy
author_rank: Regular Contributor
timestamp: July 04, 2022, 10:38:14 am
content: Somehow my ESP32 was able to read a serial flash memory chip even though the chip wasn't connected to power (missing the ground connection).Any guesses as to what might be happening? I'm guessing its parasatic power because the chip is bust?Background:I have a 10 year old ASRock motherboard that refuses to boot. It's stone cold dead. Its a fancy-pants one with an LED diagnostic display that doesn't show anything. That lead me to suspect that maybe the BIOS is borked. Thankfuly the BIOS chip is in a removable DIP-8 package.Reproduction steps:I hooked up the W25Q64FV (datasheet) to an ESP32 on a breadboardUsing the Arduino framework with the SPI librarySent the command to get the JEDEC ID (0x9F) and observed the result.Observed the result. 30% of the time the correct result came back, 70% of the time the incorrect result came back, usually with only 0x00s or 0xFFs.The correct/incorrect responses tend to occur in clumps.Super weirdness:I played around with all the physical connections, but nothing seems to make a difference. The weird thing is that the observations kept on happening even when the W25Q64FV's GND pin was left totally disconnected. 30% of the SPI responses had the correct JEDEC ID results.

author: Zero999
author_rank: Super Contributor
timestamp: July 04, 2022, 12:13:54 pm
content: This is common. The power supply current can find a path through one or more I/O pins, via the internal ESD protection diodes.

author: robzy
author_rank: Regular Contributor
timestamp: July 04, 2022, 12:54:52 pm
content: Ah ok, that does make sense, and I think I've heard about it before.So what on earth could be causing this flash chip to not send through a proper response 70% of the time?I've hooked up a logic analyzer and confirmed that sometimes it responds, and sometimes it doesnt.It's all on a breadboard, so I was thinking maybe signal integrity issues, but I'm running the SPI at only 10kHz.Attached is a screenshot of a 'good' response. In a 'bad' response the MISO line just stays high.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 04, 2022, 03:35:04 pm
content: Quote from: robzy on July 04, 2022, 12:54:52 pmIt has to do with rise/fall times, not just the frequency. Try adding a 100 ohm/100pF series RC snubber from clock to ground to help suppress ringing.

author: MikeK
author_rank: Super Contributor
timestamp: July 04, 2022, 05:16:57 pm
content: While my breadboards have been good up into the MHz, I use quality boards and keep wires to minimum length. A photo of your breadboard setup?

author: robzy
author_rank: Regular Contributor
timestamp: July 05, 2022, 01:57:34 am
content: Okay that's making sense. I'm using an old breadboard and old hookup wires. The wires are kept short. But I wouldn't bet my life on this setup.The RC snubber is an interesting idea. I'll buy some 100pF caps and give it a shot.If that doesn't work then I'll solder it up on protoboard.

author: robzy
author_rank: Regular Contributor
timestamp: July 05, 2022, 12:26:58 pm
content: A-ha! SOLVED IT!I only had a 100nF cap and a 100ohm resistor, but I thought I'd give it a shot anyway.100nF & 100ohm RC low-pass filter on CLK pin, running SPI at 1kHz, nothing at all. It seems like 1kHz might be too slow for the chip.100nF capacitor accross chip's VCC and GND pins - slightly increase in reliability. But still not perfect.Weird.Multimeter across the 100nF cap. Measuring only 2.8v. Weird. Should be 3.3v.Changed which breadboard pins were feeding the flash chip power - BINGO. Voltage across the cap shot up to 3.3v. And the chip worked perfectly.Bottom line - it was a breadboard issue. One of the VCC/GND connections was not solid enough.Thanks everyone for your help! You definitely got me rolling in the right direction.