Welcome, Guest

Author Topic: Programming the iCE40HX1K-EVB FPGA with a Bus Pirate  (Read 603 times)

valhalla

  • Newbie
  • *
  • Posts: 1
  • Karma: +1/-0
Programming the iCE40HX1K-EVB FPGA with a Bus Pirate
« on: March 18, 2018, 03:13:04 PM »
Since my OLIMEXINO-32U4 was being used elsewhere, I've tried to program the iCE40HX1K-EVB via SPI using a bus pirate I already had on hand, and apparently it's working slowly but fine.

I've taken notes and did a post on my website: http://www.trueelena.org/computers/howto/programming_the_iCE40HX1K-EVB_fpga__with_a_bus_pirate.html

basically, I've followed the instructions for SPI on the raspberry pi (adapting the device name and speed) with the following wiring:

Code: [Select]
+------+----+----+--------+
| BP        | ICE40HX1K   |
+======+====+====+========+
| gnd  |  1 |  2 | gnd    |
+------+----+----+--------+
| gnd  |  1 |  6 | creset |
+------+----+----+--------+
| clk  |  7 |  9 | sck    |
+------+----+----+--------+
| mosi |  8 |  8 | sdo    |
+------+----+----+--------+
| cs   |  9 | 10 | ss_b   |
+------+----+----+--------+
| miso | 10 |  7 | sdi    |
+------+----+----+--------+

The command given on the wiki to create a 2M image didn't work for me (it created an image with the wrong size), I had to turn it around a bit as
Code: [Select]
dd if=/dev/zero bs=2M count=1 | tr '\0' '\377' > example.img (the second part, to write the .bin at the beginning of that image did work).