The USB Ports of the BlackIce II Board - mystorm-org/BlackIce-II GitHub Wiki

Introduction

The BlackIce-II has 2 USB ports. Let's be creative and call them USB1 and USB2.

They are marked as such in the picture below: BlackIce Board Marked

USB1

USB1 is connected straight to the built-in USB port of the STM32 chip.

This makes it a very powerful and fast USB interface with a lot of flexilibity. The USB interface is completely configurable with firmware and can be programmed to behave like any USB device imaginable, with multiple end-points per device.

The default BlackIce-II iceboot firmware uses USB1 to do a volatilabe download of a bitstream into the FPGA, or to program a bitstream into the internal flash of the STM32. You can read more about this in the "Loading an FPGA Design to the BlackIce-II" and "Flashing an FPGA Design to the BlackIce-II" articles.

It's totally possible to repurpose USB1 for your own applications by writing, and flashing, new firmware for the STM32.

A typical application would be one where the STM32 does heavy software lifting, while the FPGA functions as a hardware accelerator or front-end.

Still, that would require an amount of software programming that's overkill for most projects, especially if you want to keep the feature of loading volatile bitstreams into the FPGA during development.

This is where USB2 enters the picture!

USB2

The USB2 port connects to a CH340 chip: a USB to Serial converter. It's a lower cost equivalent if the FTDI chips that can be found in many similar FPGA boards.

The serial RX/TX IOs of the CH340 connect both to a hardware UART on the STM32 and to 2 general purpose IOs on the ICE40 FPGA, a Uart Loopback example written in Verilog can be used to test this.

You can use USB2 by configuring the port to 115200 baud. You can also set it raw mode for example on linux:

sudo stty -F /dev/ttyUSB0 115200
sudo stty -F /dev/ttyUSB0 raw
sudo cat /dev/ttyUSB0

Important: Earlier versions of the iceboot firmware made it possible to do the volatile bitstream load through USB2. There are still quite a bit of references to this on the web, and even source code of iceboot 4.0 (under ./firmware/iceboot) mention this as an option. This capability has been defeatured and doesn't work! The only way to load a bitstream into the FPGA is through USB1!