Problems programming iCE40HX1K-EVB with OLIMEXINO-32U4

Started by unclouded, October 03, 2016, 10:09:27 AM

Previous topic - Next topic

unclouded

Hello,

I'm having some trouble trying to program the iCE40HX1K-EVB with the OLIMEXINO-32U4.

Arduino 1.0.5 (from Ubuntu 14.04 repositories) didn't work.  Arduino 1.6.12 in /opt worked and didn't require root privileges.

The SPIFlash library conflicted with a library of the same name by LowPowerLab (Moteino) so I renamed it to MoteinoSPIFlash in sketckbook/libraries, cloned github.com:Marzogh/SPIFlash as WinbondSPIFlash and made a symlink to the one I wish to use at the moment.

I checked the position of the voltage select jumper on the OLIMEXINO-32U4 and checked the voltage was 3V3 on the IDC-10 connector before connecting to the iCE40HX1K-EVB.

Then I tried to read the flash ID:


$ iceprogduino -t

Test mode
Serial: /dev/ttyACM0: Success
Bye.

$ iceprogduino -I/dev/ttyACM3 -t

Test mode
Serial: /dev/ttyACM3: Success
Manufacturer ID: 0x00 / Device ID: 0x0000
Bye.



I noticed that no LEDs on iCE40HX1K-EVB were lit so I bridged the 3V3 solder jumper on the programming connector.  Then:


$ iceprogduino -I/dev/ttyACM3 -t

Test mode
Serial: /dev/ttyACM3: Success
Winbond Serial Flash - W25Q16BV
Bye.


Reading the flash doesn't seem to work however:


$ iceprogduino -I/dev/ttyACM3 -v -r /tmp/iC40-flash.bin
read 0x000000 +0x200000..
Requesting missmatched frames.............................ERROR Reading..

ff
00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 01 4b 72 00 90 82 00 00 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ff 00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 01 4b 72 00 90 82 00 00 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ff 00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 01 4b 72 00 90 82 00 00 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ff 00 00 ff 7e aa 99 7e 51 00 01 05 92 00 20 62 01 4b 72 00 90 82 00 00 11 00 01 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Writing data to file /tmp/iC40-flash.bin
Bye.


Writing doesn't work either:


$ make prog
iceprogduino -I /dev/ttyACM3 example.bin
Serial: /dev/ttyACM3: Success

bulk erased.
Winbond Serial Flash - W25Q16BV

programming..
Winbond Serial Flash - W25Q16BV
prog 0x000100 +0x100...^CMakefile:20: recipe for target 'prog' failed
make: *** [prog] Interrupt


I recompiled iceprogduino to no avail.

I supplied 5V to the barrel jack on the iCE40HX1K-EVB but that didn't help either.

What should I try next?

EDIT: Could this be the issue (This from the OLIMEXINO-32U4 that I bought with the iCE40HX1K-EVB)?


unclouded

 
I gave up in the end and wrote something for the Raspberry Pi to upload images to and dump images from the flash chip:

  https://github.com/neilstockbridge/W25Q16DV-programmer

Using this (crude) tool, I was able to upload `example.bin` to the iCE40HX1K-EVB and witness the blinky lights.

LubOlimex

Hey,

Thank you for the RPi project! Yet, about OLIMEXINO-32U4 as programmer:

1. Did you upload: https://github.com/OLIMEX/iCE40HX1K-EVB/blob/master/programmer/olimexino-32u4%20firmware/iceprog.ino to the 32u4 board?

2. Did you stumble upon our instructions at the wiki here: https://www.olimex.com/wiki/ICE40HX1K-EVB ?

3. Did you stumble upon our Windows guide here: https://olimex.wordpress.com/2016/07/18/using-ice40hx1k-evb-under-windows/ ?

Also the rotated quartz of OLIMEXINO-32U4 is normal. This is mentioned on page 14 of the user's manual at the bottom of chapter "6.2 Clock":

IMPORTANT: If the board has a quartz crystal rotated at 45 degrees relative to the pads provided do not panic. This is normal. We have two types of such crystals – one of them requires 4 pads, the other only 2 pads. That is why we have provided 4 pads to be able to fit both crystals. All boards Olimex manufactures pass automatized optical inspection after assembly and obvious misplacement like this is impossible to occur.

Best regards,
Lub/OLIMEX

Technical support and documentation manager at Olimex