# Cannot flash FPGA bitstream after LimeTool --update

**URL:** <https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408>\
**Category:** LimeSDR\
**Created:** [28 February 2018 17:15 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408 "2018-02-28T17:15:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![theal](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@theal](https://discourse.myriadrf.org/u/theal)\
**Post date:** [28 February 2018 17:15 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/1 "2018-02-28T17:15:32Z")

</div>

Hi, I have a LimeSDR v1.4s, I tried to run `LimeTool --update` and it screwed up everything.  
At the moment I’m able to flash anything I want on the FX3 chip (using LimeSuiteGUI) but nothing on the FPGA.

LimeSuiteGUI shows right after connecting to the SDR:

```auto
[17:59:19] WARNING: Gateware version mismatch!
  Expected gateware version 2, revision 14
  But found version 0, revision 0
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

[17:59:19] ERROR: Command not supported
[17:59:19] INFO: Connected Control port: LimeSDR-USB FW:4 HW:4 Protocol:1 GW:0.0 Ref Clk: -0.00 MHz

```

If I try to use the programming tool (FPGA Flash / FPGA Reset) I just get ‘Programming Failed: Error’.

This is what happens if I try to do the same using LimeUtil:

```auto
$ LimeUtil --fpga=/home/al/Downloads/LimeSDR-USB_HW_1.4_r2.14.rbf 
Connected to [LimeSDR-USB [USB 2.0] 9060B00490F2B]
Gateware version mismatch!
  Expected gateware version 2, revision 14
  But found version 0, revision 0
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

Programming failed! Error
[0%] 32/574703 Bytes Programming failed! Error
Programming failed! : Programming failed! Error

```

Also, I tried to use any possible combination of:

- Different FX3 firmwares: {Latest from [downloads.myriadrf.org](http://downloads.myriadrf.org), Latest from git, Random ones}
- LimeSuite version: {(Random) Old stable, Latest stable version, Latest version on git}
- USB Data Cable: {USB2,USB3}
- Power supply {USB3 internal, USB external, external 7.5/9 adapter, external 9v battery}  
always with the exact same result.

Now I’m thinking about flashing it using an external JTAG interface, do you have any tutorial or suggestion about that?

Thank you!

---

<div class="post-metadata">

**Author:** ![martywittrock](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/martywittrock/32/66_2.png) [@martywittrock](https://discourse.myriadrf.org/u/martywittrock)\
**Post date:** [28 February 2018 18:47 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/2 "2018-02-28T18:47:50Z")

</div>

@theal,

Use the programming steps in this link to resolve the FPGA issues:

> [@Firmware update problem](https://discourse.myriadrf.org/t/firmware-update-problem/1255/21):
>
> Ok, So after step 7 using USB2, it detects correct FX3 FW, bad FPGA GW, FX3 programming to Flash doesn’t give any errors but then it fails to boot from Flash. The one more thing that you could try is programming FPGA GW first (maybe bad GW is preventing FX3 from booting somehow). To do that after step 7: a) In programming window select ‘Altera FPGA’ and ‘Bitstream to flash’ and click ‘Program’. use GW from: [https://github.com/myriadrf/LimeSDR-USB\_GW/blob/master/output\_files/LimeSDR-USB\_lms7…](https://github.com/myriadrf/LimeSDR-USB_GW/blob/master/output_files/LimeSDR-USB_lms7_trx_HW_1.4.rbf)

Keep us advised of your progress - thanks,

73 de Marty, KN0CK

---

<div class="post-metadata">

**Author:** ![theal](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@theal](https://discourse.myriadrf.org/u/theal)\
**Post date:** [28 February 2018 20:10 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/3 "2018-02-28T20:10:23Z")

</div>

Hi, thanks for the reply!  
I have the latest version of LimeSuiteGUI installed, so I don’t have the `Bitstream to FPGA` but `FPGA FLASH`.  
Here are some screenshots:

1. Options → ConnectionSettings  

2. Result (Log):  

3. Before flashing  

4. A few milliseconds after pressing ‘Program’  

The board is connected in this way:

 ![photo11](https://yyz2.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/3/3c5b3a8de3ecbdd45d8abeea8275a5dab98812e2.jpg)

(the external usb charger outputs 5v/2A)

---

<div class="post-metadata">

**Author:** ![vk5bd](https://avatars.discourse-cdn.com/v4/letter/v/ac8455/32.png) [@vk5bd](https://discourse.myriadrf.org/u/vk5bd)\
**Post date:** [1 March 2018 01:16 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/4 "2018-03-01T01:16:42Z")

</div>

Hello @theal, I see that you are using the supplied USB break out lead, I found mine was problematic, suspect even though it has the “Dual” supply the cable is not up to scratch, can you carefully plug your LimeSDR directly into the USB3 Port of your PC and try the upgrade again?

Regards,  
Bevan

---

<div class="post-metadata">

**Author:** ![theal](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@theal](https://discourse.myriadrf.org/u/theal)\
**Post date:** [1 March 2018 10:32 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/5 "2018-03-01T10:32:47Z")

</div>

Same result

 ![photo5819017930132794488](https://yyz2.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/f/ff27fffb7329874d235a7dc9cea867ff8f3a4440.jpg)

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [4 March 2018 13:29 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/6 "2018-03-04T13:29:36Z")

</div>

If you could try uploading firmware using the Cypress tools. You will need to force the FX3 into bootloader mode by removing J17. For details see:

[https://wiki.myriadrf.org/LimeSDR-USB\_Board\_Programming#Updating\_USB3\_Microcontroller\_Firmware\_in\_Bootloader\_Mode](https://wiki.myriadrf.org/LimeSDR-USB_Board_Programming#Updating_USB3_Microcontroller_Firmware_in_Bootloader_Mode)

Then when this is done upload the FPGA image using either the LimeSuiteGUI or LimeUtil.

---

<div class="post-metadata">

**Author:** ![theal](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@theal](https://discourse.myriadrf.org/u/theal)\
**Post date:** [6 March 2018 17:46 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/7 "2018-03-06T17:46:49Z")

</div>

Hi, thank you for the reply. Which firmware should I write into the FX3?

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [6 March 2018 19:23 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/8 "2018-03-06T19:23:58Z")

</div>

Pick the directory that corresponds to the build of Lime Suite:

[http://downloads.myriadrf.org/project/limesuite/](http://downloads.myriadrf.org/project/limesuite/)

The FX3 firmware has a \*.img extension and select the file which corresponds to your hardware version, which should almost certainly be v1.4 (it’s printed on the board).

---

<div class="post-metadata">

**Author:** ![srikar](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@srikar](https://discourse.myriadrf.org/u/srikar)\
**Post date:** [8 October 2018 16:46 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/9 "2018-10-08T16:46:29Z")

</div>

Hello @theal. I am having the same issue. Cannot reflash the FPGA firmaware. Tried everything. I think that there might be some memory corruption or something that’s stopping me from reading or writing anything into the chip. Did you get this issue resolved?

@andrewback I have tried installing the FX3 firmware numerous times. It installs properly but FPGA update fails. Having Gateware version mismatch issues. Any suggestions please?

Thanks  
S

---

<div class="post-metadata">

**Author:** ![theal](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@theal](https://discourse.myriadrf.org/u/theal)\
**Post date:** [9 October 2018 08:30 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/10 "2018-10-09T08:30:56Z")

</div>

Hey! Still broken for me, but I got a few ideas I will try them soon.

After I had struggled with all the tools/firmware&co and _nothing_ was working, I unsoldered the flash chip, connected to a raspberry pi and…guess what: flashrom (linux tool) writes stuff into the flash chip and then it reads them back wrong.  
After few tries (…and after I had bought 5 flash chips, all of them with the same problem), I spotted a pattern:  
it writes few sectors correctly and then it writes a sector with wrong values (every time it’s a different sector).  
So, I tried changing the write speed (10MHz, 5MHz, 1MHz, 100KHz) and I got always the same problem.  
What happens is that, at some point, it starts ignoring/losing (and then shifting) bits, e.g. writing “20 20 20 20 20” might give “20 40 40 80 80”.

I asked to a friend of mine(electronic engineer) and he told me that this happened once to him and he solved it by adding a resistor in the CLK line: the “overdamping” of the CLK (0 -\> 1) sometimes is read as multiple clock ticks.

---

<div class="post-metadata">

**Author:** ![en1gma](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@en1gma](https://discourse.myriadrf.org/u/en1gma)\
**Post date:** [23 October 2018 06:16 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/11 "2018-10-23T06:16:11Z")

</div>

im also having similar problems with my limesdr-mini  
[01:07:47] ERROR: Read(64 bytes) failed  
[01:07:47] INFO: Connected Control port: UNKNOWN FW:0 HW:0 Protocol:0 GW:0.0 Ref Clk: -0.00 MHz

no led light on board at all.  
usb is recognized a bit with LimeUtil --find but cant do any --update and same for limesuitegui.  
cant program fpga flash

any help would be much appreciated.  
cant get into bootloader mode because i cant find the FX3 jumper.  
is that for the limesdr-mini?

---

<div class="post-metadata">

**Author:** ![herlesupreeth](https://avatars.discourse-cdn.com/v4/letter/h/48db29/32.png) [@herlesupreeth](https://discourse.myriadrf.org/u/herlesupreeth)\
**Post date:** [10 January 2023 12:04 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/12 "2023-01-10T12:04:52Z")

</div>

I recently installed spectogram which installs a modified GW, but upon restoring the fpga back to default one (i.e. using --fpga\_restore). I am facing the same issue of not able to update the fpga firmware to latest.

Give me following output

```auto

LimeUtil --fpga=/home/sherle/.local/share/LimeSuite/images/LimeSDR-Mini_HW_1.2_r1.30.rpd
Connected to [LimeSDR Mini [USB 3.0] 1D587F76793E53]
TransferPacket: Read failed (ret=0)
TransferPacket: Read failed (ret=0)
TransferPacket: Read failed (ret=0)
TransferPacket: Write failed (ret=0)
TransferPacket: Write failed (ret=0)
Programming failed! Write operation faileded! Write operation failed
Programming failed! Write operation failed

Programming failed!

```

Its a LimeSDR-Mini V1,

```auto
LimeUtil --find
  * [LimeSDR Mini, media=USB 3.0, module=FT601, addr=24607:1027, serial=1D587F76793E53]

```

@andrewback any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [10 January 2023 12:26 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/13 "2023-01-10T12:26:36Z")

</div>

Will need @Zack to advise on this one. It may be that you will now need to program via JTAG, but hopefully not. Could you also post the output of LimeQuickTest please.

---

<div class="post-metadata">

**Author:** ![herlesupreeth](https://avatars.discourse-cdn.com/v4/letter/h/48db29/32.png) [@herlesupreeth](https://discourse.myriadrf.org/u/herlesupreeth)\
**Post date:** [10 January 2023 12:26 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/14 "2023-01-10T12:26:42Z")

</div>

Nevermind. I resolved it.

For other in same state. Here is how I solved it.

1. First run `spectrogram --fpga_restore`
2. Plug out the LimeSDR-Mini and plug it back in
3. `docker run -v /dev/bus/usb:/dev/bus/usb -v /usr/share/LimeSuite/images/22.09:/root --privileged -ti gasparka/spectrogram bash`  
NOTE: I am assuming that the host machine has fpga images at the location `/usr/share/LimeSuite/images/22.09`
4. Inside the docker container run the below  
`LimeUtil --fpga=/root/LimeSDR-Mini_HW_1.2_r1.30.rpd`

Thank you @andrewback for the swift reply.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [10 January 2023 18:00 UTC](https://discourse.myriadrf.org/t/cannot-flash-fpga-bitstream-after-limetool-update/2408/15 "2023-01-10T18:00:51Z")

</div>

Glad to hear you are back up and running and thanks for sharing the fix details!
