Welcome, Guest

Author Topic: Can't Flash ice40HX8k-EVB with Raspberry Pi  (Read 920 times)

Forty-Bot

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Can't Flash ice40HX8k-EVB with Raspberry Pi
« on: September 20, 2018, 12:43:36 AM »
Previously posted on reddit

I'm trying to program my ice40 HX8K. I am using a pi B+ ver2, which is offered as an alternate programming method on the wiki page for this board. These instructions are for the HX1K, so my connections are different.

Code: [Select]
    GND | GND
    GPIO 25 | iCE40-CRESET
    CE0# | iCE40-SS_B
    MOSI | iCE40-SDO
    MISO | iCE40-SDI
    SCLK | iCE40-SCK

The setup looks like this. I can turn off/on the iCE40-CRESET LED using GPIO25, like in the guide. However, when I try to read the flash contents I get

Code: [Select]
    $ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -r dump.bin
    flashrom v0.9.9-r1954 on Linux 4.9.41+ (armv6l)
    flashrom is free software, get the source code at https://flashrom.org
   
    Calibrating delay loop... OK.
    No EEPROM/flash device found.
    Note: flashrom can never write if the flash chip isn't found automatically.

I have checked all my connections, tried switching from CE0# to CE1#, tried switching MISO and MOSI, tried all /dev/spidev?.? devices, tried rewiring to use SPI1 (pins 36-40), tried different baud rates, tried building flashrom from source (instead of using the packaged version), and rebooted. I have also tried powering the board via the raspberry pi, and using a pi rev 3 B. The jumper cables have been checked. I have the spi interface enabled in /boot/config.txt. I first asked on #raspberrypi on freenode, and again on ##electronics, but they were out of ideas. Thanks in advance for any suggestions.
« Last Edit: September 20, 2018, 12:50:30 AM by Forty-Bot »

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • Karma: +46/-2
Re: Can't Flash ice40HX8k-EVB with Raspberry Pi
« Reply #1 on: September 20, 2018, 10:23:25 AM »
> These instructions are for the HX1K, so my connections are different.

I don't think your hardware connections should be different. The 1K and 8K boards have nearly identical programming connectors. Compare the programming connector in these PDFs:

https://github.com/OLIMEX/iCE40HX1K-EVB/blob/master/iCE40HX1K-EVB_Rev_B.pdf

https://github.com/OLIMEX/iCE40HX8K-EVB/blob/master/HARDWARE/REV-B/iCE40HX8K-EVB_Rev_B.pdf

Also the original project can be found here: https://github.com/anse1/olimex-ice40-notes
Technical support and documentation manager at Olimex

Forty-Bot

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Can't Flash ice40HX8k-EVB with Raspberry Pi
« Reply #2 on: September 20, 2018, 08:41:35 PM »
> I don't think your hardware connections should be different. The 1K and 8K boards have nearly identical programming connectors. Compare the programming connector in these PDFs:

Well it's more that the original instructions were for using IDC connectors and I am making the connection with jumper cables, as seen in the picture. Again, I have listed out the connections I made in the code box in the original post. I have checked them against the schematic for the HX8K and the pi.