This is my first attempt to use the BP5 for anything useful, so I thought I’d start with the DIP8 SPI flash adapter and the W25Q80BV chip that was helpfully included. I think I’m missing some steps, as I cannot flash probe to detect the flash chip at all.
Here are the steps I am taking, in order:
Preparation of the BP5
Insert W25Q80BV DIP8 SPI flash chip into DIP8 adapter (closer to lever)
Attach DIP8 adapter to the BP5
Hold button on bottom of BP5, and plug in BP5 to enter the RPi bootloader (GhostFAT / UF2 based updater)
Build sources from commit 92ad4b5 (fix base conversion binary fail)
Upload the built .UF2 from ./build/ via teh RPi bootloader
Verify the version on the RPi after reboot:
Bus Pirate 5 REV10
Firmware main branch (2024-06-16T01:40:51Z)
RP2040 with 264KB RAM, 128Mbit FLASH
From the W25Q80BV datasheet
SPI settings
SPI clock supports up to 104MHz, so anything in kHz ranges should be fine
SPI clock idles LOW by default (Mode 0), but the chip should also support Mode 3 (SPI clock idling high)
Both Mode 0 and Mode 3 sample on the LEADING (rising) edge of the clock, based on both the text and various figures in the datasheet
/CS … Active LOW: based on both text and various figures in the datasheet
Supported Instructions
The chip should support at least:
0xAB – Release Power Down / Device ID
0x90 – Manufacturer / Device ID
0x9F – JEDEC ID
Commands from freshly booted BP5 state
m to choose mode
6 to choose SPI mode
Set SPI settings to defaults: 100kHz, 8 bit, Clock Idles LOW, Clock Phase LEADING edge, and CS is active LOW) … actual speed ends up 122kHz
W to enable power (3.3V, no limit)
flash probe to try to communicate with the inserted flash
‘w’ to disable power (just in case)
Actual results from first try
SPI> flash probe
Probing:
Device ID Manuf ID Type ID Capacity ID
RESID (0xAB) --
REMSID (0x90) -- --
RDID (0x9F) -- -- --
SFDP (0x5A): not found
Initializing SPI flash...
Flash device manufacturer ID 0x00, type ID 0x00, capacity ID 0x00
Error: SFDP signature error. It must be 0x50444653 'SFDP'
Warning: Read SFDP parameter header information failed.
Warning: The chip does not support JEDEC SFDP.
Searching flash chip database for 0x00 0x00 0x00
Error: Flash device not found
Error: device not detected
I’m pretty sure this is a “wetware” (i.e., me) problem here… as the same results are obtained if using the SOP8 adapter with the helpfully included chip. I cannot currently test on the WSON adapter as I cannot find the chip that was included, and do not currently have my own WSON flash chip to try.
Should this sequence of steps work to at least detect the W25Q80BV?
If not, can you help me understand where I went wrong?
Ah, OK. That did result in successful probing of the (non-JEDEC SFDP) chip.
That guide explains what is done, but does not explain why pins 2/3 are set high.
I had incorrectly thought that the flash probe command would perform the setup of all pins needed (including defaulting to first chip).
Perhaps I can add some logic to flash probe, so that if it reads all-zero data, it will check that either internal pullups are enabled, or that at least two of the pins are manually set to a value.
Thanks for the review and helping me understand the error of my ways!
We’re working on a carry case for the Bus Pirate and accessories. The SOP8 adapter is a bit clunky, so we ran a small batch of boards with the low profile LOTES sockets. It is at the photographer now, and should be available monday.
I’m not a fan of the LOTES sockets, but that’s just my opinion. It seems like a good opportunity to hear what other people think.
If so, from a quick look, it appears that those have locking tabs on the side, and those tabs are a point of failure (lock tabs get loose via use?). Also, when the chip is secured, there is no way to visually check the alignment of the chip.
While some folks may prefer the LOTES because of its lower profile, for my purposes I will be happy with the current high-profile adapters.
Yes, those are the parts. Thanks for the info. I agree with your thoughts.
Somewhere up thread theres a photo of the LOTES board I made. The chip was hard to remove, needed a pokey thing of some sort. And it broke almost immediately and is broken in the photo (I believe, that may be the social media post photo).
My guide is the shenzhen Mobile phone repair market. I have some friends there we call the tool brothers. They sell the stuff the rest of the market uses to repair phones. So you know it’s fit for purpose or it wouldn’t get a place in their tiny booth of a shop. The whole market uses the spring loaded POM (?) Thing with the gold plated pins. Nobody at all uses the LOTES on their test tools. I defer to their wisdom.
Fun (or maybe not) side fact: we don’t get a discount for the big sop8 sockets at volume. They are $1 each. At 1000 (which we’ll never do) there is a $0.02 discount.
SOP8 SPI flash adapters with LOTES low profile sockets are in the Dirty PCBs store now. I’m not a huge fan of these, but I wanted to give them a chance and see what other people think. We made a tiny batch, I think 20.
Pros
They look nicer, or more sleek
More convenient to store than the big SOP8 spring loaded sockets
Cons
Hard to get the chip out, it really sticks in there