Skip to content

IceCore Connectivity

Al edited this page Nov 13, 2019 · 3 revisions

There seems to be quite a bit of confusion about the IceCore and Blackice Mx connections.

Let's see if we can clarify it.

BlackEdge

Blackedge consists of two 50-pin connections that connect the IceCore module to the carrier board.

When used with the IceCore module and Blackice Mx carrier board, these consists of:

  • The Digital expansion which has 48 digital pins (8 unused), +3V3 and GND.
  • The Mixed expansion which has 24 analog pins (only 15 used) , the 6 SD card pins, the two UART pins, the 3 SWD pins, 4 JTAG pins (unused), two I2C pins, the two user buttons, 4 pins connected to the flash SPI bus, +5V and ground.

The digital expansion is sometimes referred to as EXP A, and the Mixed expansion as EXP B.

Mixmods

On the Blackice Mx carrier board there are 3 Mixmods. Each Mixmod corresponds to a double double Pmod. (a double two-row Pmod, with a total of 16 digital pins) with 6 extra pins in the middle, 5 of which are analog pins and one is +5V.

5 of the Pmods correspond to the 40 pins on the Digital expansion and the sixth has the SD card pins and the two user buttons. The two user buttons are also connected to the blue and green user LEDs.

SPI connections

There are 3 SPI buses.

One is for the SD card and has 6 pins. It can be used in SDIO or SPI mode. The pins are connected to the ice40, the SD card reader, and the mixed expansion, and through that to one of the Pmods. It uses pins 102, 104, 105, 106, 99 and 101.

The second SPI is is the DSPI bus which is straightforward. It is connected between the ice50 and the STM32 and uses pins 73, 74, 75 and 76. @AndyCap's version of the firmware uses this SPI bus.

The third SPI bus is the one connected to the flash memory and is the most complex. It uses pins 63 (HOLD), 64 (WP), 67 (MOSI), 68 (MISO), 70 (SCK) and 71 (SS) to connect between the ice40, the STM32 and the flash memory chip. But is has two extra chip select pins. The first is CS (pin 56) which is also the red user LED, and is used to program the ice40 directly from the STM32. When this is used the MISO and MOSI pins are the wrong way round to use the harware SPI on the STM32, so bit-banging is used. The second extra chip select pin is referred to as ESS or L3 (pin 55) and also corresponds to yellow LED. It goes through the Mixed Expansion to the RPi header along with SCK, MOSI and MISO pins. Those last 3 pins are referred to as ESCK, EMOSI and EMISO on the RPi header. They allow SPI connections between a Raspberry Pi and the ice40, provided that the flash memory is not in use at the time.

The flash memory SPI bus has the HOLD and WP pins, which are used to hold (disable) the flash memory or write protect it. But they can also be switched to be used for dual or quad SPI to the flash memory either from the ice40 or the STM32.

You can add as many extra SPI buses as you like by using SPI cores on the ice40 and Pmod pins.

I2C connections

There is an I2C bus between the STM32 and the Mixed expansion which goes through to the RPI header. It could be used for an I2C connection between the STM32 and a Raspberry Pi. It can also be used as a CAN bus connection. It does not go to the ice40. I2C connections from the ice40 need an I2C core running on the ice40 and can use any of the Pmod pins. It would also be possible to send data from the ice40 to the STM32 via SPI and then bridge it to this I2C bus, but the firmware does not currently support that.

There is also an I2C bus from the STM32 to the HDMI connector, which is part of the HDMI standard and is used to interrogate properties of the connected HDMI device. But note that the HDMI connector does not currently work as its wiring is incorrect,

LEDs and buttons

There are 3 status Leds:

  • CDONE Red (labelled D, pin 65). This is used by the ice40 to indicate whether configuration was successful. It is connected to the ice40 and the STM32.
  • STATUS Green (labelled S). This is used by the STM32 to indicate when configuration is in progress. Connected only to the STM32.
  • MODE Yellow (labelled M). This is connected to the mode button by the STM32 to indicate the flash mode. It is only connected to the STM32. The mode button is only connected to the STM32.

There are 4 user leds, connected to the ice40. They are all on when the signal is low.

  • Blue Led, pin 49, is connected to button 1 and on when it is pressed. Connected to a Pmod on Mixmod 3.
  • Green Led, pin 52, connected to button 2 and on when it is pressed. Connected to a Pmod on Mixmod 3.
  • Yellow Led, pin 55, which is also the ESS pin, and is connected via the Mixed Expansion to the RPi header.
  • Red Led, pin 56, which is also the CS pin connected to the STM32 and used for direct programming of the ice40.

SWD pins

These are on the Mixed expansion and the RPi header and can be used to program and debug the STM32 via a device such as an STLink connected to the RPI header.

UART pins

These are pins 61 and 62. The latest STM32 firmware bridges them to the USB Prog connector, so you can read and write from a UART core on the ice40, via the STM32, to a CDC-ACM USB device (such as /dev/ttyACM0) on the host.

Note that the other USB connector is also connected to the STM32 but the firmware does not currently use it.

The USB Prog connector is used both for programming and as a UART connection to the ice40.

HDMI connector

As this is not currently working, I will not describe it.

SDRAM

The SDRAM is connected only to the ice40.

The RPi header

The Raspberry Pi header, also referred to as COM/DBG has the following connections:

  • The TX and RX UART pins
  • The three SWD pins
  • 4 SPI pins, described above
  • The I2C SDA and SCL pins described above, which can also be used for a CAN bus

The JTAG pins (TDI, TDI, TMS, TCK) are not currently used, and the DONE pin in the schematic does not appear to be connected.

Clone this wiki locally