Skip to content

Latest commit

 

History

History
77 lines (63 loc) · 5.14 KB

0149-2023-09-30.md

File metadata and controls

77 lines (63 loc) · 5.14 KB

30 Sep 2023

Previous journal: Next journal:
0148-2023-09-28.md 0150-2023-10-02.md

SPI Flash ROM

Background

  • I want to make raybox-zero able to read data from a memory of some kind.
  • SPI seems most likely at the moment, due to low pin count available on TT05.
  • SPI Flash ROM is pretty standard and cheap these days. I've ordered some on eBay (W25Q32FVSIG, W25Q64BVAIG) and order some on DigiKey (W25Q40CLSNIG-ND, W25Q16JVSSIQ-ND, AT25EU0011A-SSHN-TCT-ND, GD25Q20CTIGR, W25Q32JVSFIQ).
  • I've also desoldered a BergMicro 25Q80ASSIG (8Mbit) from an ESP-01, and put it on a breakout board. This device should hopefully be able to do at least 25MHz transfers, maybe 60~120MHz, and possibly much higher with DSPI or QSPI.
  • I'm going to try using my Bus Pirate v3.5 to read it, then program it.

Flashing the regular Bus Pirate firmware

Notes

My BP had been specially flashed with JTAG (Bus-Blaster-like) firmware, because it was hooked up to the JTAG port of my XC9572XL test board. I might need to reflash it.

  • When I plug it into my Win 11 laptop it shows up in Device Manager as an FT232 device, with a warning symbol, but after going to Properties I was able to 'update driver' and then it shows up as 'USB Serial Port (COM3)'.
  • Next step: What serial UI do we get from the BP? I'll install a terminal program, or do USB pass-thru to a Linux VM.
  • I installed PuTTY and as Dangerous Prototypes advises, the JTAG firmware doesn't have a serial terminal, so it doesn't respond meaningfully.
  • In terms of putting on normal BP firmware, I'm not clear on the difference between bootloader versions, BP versions,a nd firmware versions.
  • Oh, according to 0026, I started with Firmware v6.1 r1676 Bootloader v4.4. The official firmware downloads doco says that firmware 6.1 is the official firmware, though there's newer community-maintained stuff here on GitHub.

Procedure

  1. Download BusPirate.package.v6.1.zip (cached here) and extract it.
  2. Unplug the BP and short pins PGC and PGD of the ICSP header, and plug in the USB cable.
  3. 'MODE' LED will hopefully be lit, indicating it's in the bootloader. I think you need to keep the pins shorted for the duration of this exercise.
  4. Go into BPv3-firmware
  5. Run BusPirate-firmware\ds30 Loader GUI.exe
  6. Let it download and install .NET if required
  7. Make sure your COM port is selected.
  8. For Hex-file, locate BPv3-frimware-v6.1.hex (sic)
  9. Click the Download button. Don't try to interact with the app while it's writing the flash: I found it interrupted it and caused an error. I was able to retry the Download button, though, and it succeeded:
    Initiating download...
        Searching for bl . 
        Found PIC24FJ64GA002 fw ver. 1.0.2
        Waiting for bootloader to be ready...ok
        Writing flash...ok
        Download finished
        Tx 65.2kB / Rx 382 bytes / 12.4s
    
  10. Exit the ds30 Loader GUI and unplug the BP's USB.
  11. Disconnect PGC/PGD, and plug the BP back in.
  12. Open a terminal program (e.g. PuTTY, and select 'Serial' mode) and try connecting to the BP's COM port.
  13. Issue the i command. NOTE: First time I tried, it didn't respond. Not sure why. I tried again, hit ENTER, then got the HiZ prompt. Did i command again and got to display firmware info:
    HiZ>i
    Bus Pirate v3.5
    Firmware v6.1 r1676  Bootloader v4.4
    DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
    http://dangerousprototypes.com
    HiZ>
    

Other Notes