Repository navigation
2.0 AmigaPCI Field Programmable Devices
TBD
You must program the on-board ST microcontroller (U227) first on any new build. It controls many functions on the board, power being the most important as you set up a new board. It will be necessary to have access to programming hardware suitable for the STM32F205 controller. The ST-Link/V2 stand alone programmer can be purchased from Digikey, Mouser, and ST directly. Get the cheaper V2 version. You do not need to pay extra for the ISOL version. In addition, programming hardware often comes with ST microcontroller dev kits, like the ST Nucleo boards or other third party kits. You may wish to use one of these if you are already in possession of this type of kit.
Note
This document only covers the ST-Link/V2 programming hardware. For other hardware, refer to the user manual for your particular device.
-
Download the STM32CubeProgrammer software from ST.
-
Obtain the newest firmware release from the AmigaPCI-Software Github. The firmware (fw.bin) can be found in the /fw folder.
-
Connect the ST-LINK/V2 programmer to the programming header, CN227.
AmigaPCI CN227 ST-Link/V2 +3.3V Pin 1 (VAPP) SWCLK Pin 9 (TCK_SWCLK) GND Pin 6 (GND) DIO Pin 7 (TMS_SWDIO) NRST Pin 15 (NRST) TDO Pin 13 (TDO_SWO)
Warning
Confirm the programmer is connected correctly. Not connecting correctly could result in damage.
- Connect the ST-LINK/V2 to the computer.
- Ensure the ATX power supply is connected and plugged in. If there is a physical power switch on your power supply, ensure it is in the on position.
- Open the STM32CubeProgrammer software.
- Ensure the programming device is set to ST-LINK and then click connect. Your ST microcontroller should be recognized.
- Click the open file button, which is a tab to the left. Navigate to your firmware file and open.
- Click the Download button in the file tab. The ST microcontroller will be programmed. You will get confirmation when programming is complete.
- Click the Disconnect button.
- The LED near the microcontroller should light.
- The microcontroller is now programmed. The case power switch, HID, and other devices should now work.
There are four Lattice iCE40 FPGAs on the AmigaPCI board. Each FPGA has an associated flash memory module to store the FPGA configuration, which is loaded by the FPGA at startup. Each flash memory module has a programming header. The header is identified similarly to the associated FPGA. For example, CN712 programs the flash module for U712. CN409 for U409, etc. If you have not already programmed the on-board STM microcontroller, stop and do that now.
We will discuss programming the flash memory modules using iceprog with cheap FTDI FT232H interface boards. Such an example is the Adafruit FT232H. Similar boards can be obtained from other manufacturers. The following steps describe how to program the FPGA flash modules. Do not leave the AmigaPCI powered on for longer than necessary during the programming process.
It is recommended to program the FPGA's in specific order. Program FPGAs on the local bus card first. For the AmigaPCI local bus card ("THE BRAIN") program in this order: U400, U111. Then, on the AmigaPCI, program in this order: U409, U712, U110, U109.
Install icestorm.
Debian:
sudo apt install fpga-icestorm
Fedora:
sudo dnf install icestorm
Download from FPGAwars GitHub.
-
Obtain the current release firmware BIN files from the AmigaPCI-Mainboard GitHub.
-
If it is on, turn off the AmigaPCI.
-
Connect the FT232H board to the desired FPGA programming port.
AmigaPCI Adafruit FT232H C232HM MPSSE GND GND Black/GND SDI D1/MOSI Yellow/DO SCLK D0/SCK/SCL Orange/SK SDO D2/MISO Green/DI SS D4 Gray/GPIOL0 CRST D7 Blue/GPIOL3
Warning
Confirm the programmer is connected correctly. Not connecting correctly could result in damage.
- Turn the AmigaPCI on.
- Execute iceprog with the BIN file matching the FPGA to be programmed.
iceprog U712.bin - Repeat steps 2 through 5 for each FPGA. Power cycle the AmigaPCI once complete.
The flash memory contains extra ROM information that helps the AmigaPCI support extra hardware. It will be necessary to install the LIDE ROM for the ATA ports to function.
- Obtain the apciflash and AmigaPCI LIDE ROM files. TBD
- From a shell prompt, use apciflash to program the LIDE ROM to the flash space.
apciflash write bank 3 file amigapci-lide-db.rom
apciflash will ask to verify the installation.
Erase and Write bank=0 addr=0 len=8000 from file="amigapci-lide-db.rom"
Proceed - are you sure? (y/n)
- Reset the AmigaPCI after programming is confirmed. The ATA ports will now work.