HDL-0108-RSCPT: Firmware Updates

This is a quick post, just to begin by showing the correct connector orientations for firmware updates. For some background on hardware and tools for developing (including just updating) firmware, please also see: https://oshablue.com/bsides/2020/01/18/hdl-0108-rscpt-materials-for-getting-started/

Capture Control Chip (“CCC” = FPGA) Firmware Update Setup

We use Atom IDE with the apio plugin or system installed to “Upload” the compiled source to the board’s CCC chip. Installation instructions are out there. Or get in touch for guidance until (if) details are posted. There may be useful information within the README in the repository for this source code as well. Use cables as indicated below. More info coming, but ask questions as needed any time. Feel free to use “PM” channels to ask.

If your USB-SPI cable for programming the CCC on the HDL is new or hasn’t yet been used for this application, you’ll want to change some settings on it (see caption below) to match the out-of-the-box apio expectation. Ft_prog is a good bet for doing so. Link to ft_prog from FTDI (active link as of this writing): https://www.ftdichip.com/Support/Utilities.htm#FT_PROG (though also ftdi_eeprom on a Linux dev system also worked fine).

Please note that after you update the VID on this cable, ft_prob will no longer recognize it, because it only pulls up devices with the FTDI VID. You can reset it using another method, if/when needed. But for regular development with this system, set it once and just use it with this setup.

Cable: C232HM EDHSL-0 (Also noted in the linked “Getting Started” post in the text here of this post). This is the SPI to USB adapter cable. Sources shown in the linked post (part numbers, etc.). From memory, you may need to program this cable’s identity using ft_prog, a program from FTDI. Free. Easiest method as of this writing is using Windows. Settings are shown in the next image. You just do this once and then you’re set as long as you use this cable for this application. BTW, here you can see we’re using a USB expansion hub with switches for each port. Those are really helpful.
This is from “boards.json” in the apio repository, at apio/apio/resources/. You can see in our codebase’s apio.ini, that the board that is selected as the target is “iCE40-UP5K”, so, on the SPI-USB cable’s EEPROM, set values for VID, PID and description to match what is shown here (using ft_prog) for example. Then the apio plugin in Atom IDE will recognize the cable as a programming target for the board. Make sure these match exactly. PM for help.
Showing the wire order and orientation when connecting to the board for firmware update. ASSUMPTION: Wire color is always the same for this SPI-USB adapter cable. If any questions, please check with me/us first. Coming soon or on request would be the pinout for this header too, so you can verify.

MPLABX MCU Firmware Update Setup

PICKit3 orientation for programming/debugging. You can derive the pin order for other debuggers/programmers using this image pretty directly. Note the dot on the left side of the header for Pin 1 of the header, if that’s of any assistance.