Firmware update problem

LimeSDR version that is written on board: v1.4s.
LimeSDR is connected with 2headed usb cable that came with limesdr from crowdsupply.
The only jumper that is connected is FX3 BOOT as it was when i got LimeSDR.


i’ve started on Windows 10 and i’ve followed instructions, installed drivers and all looked same way it looks on the picture:

The device name was like on screenshot

Then i decided to update firmware. I’ve gone to LimeSuiteGUI on windows 10 and used auto update feature. After that in LimeUtil.exe --find my LimeSDR turned into WestBridge state:

  * [WestBridge , media=USB 2.0, module=STREAM, addr=04b4:00f3, serial=0000000004BE]
LimeSuit version on Windows, LimeUtil.exe --info
######################################################
## LimeSuite information summary
######################################################

Version information:
  Library version:      v17.02.2-PothosSDR-2017.05.16-vc14-x64
  Build timestamp:      2017-05-16
  Interface version:    v2017.2.0
  Binary interface:     17.02-1

System resources:
  Installation root:    C:\Program Files\PothosSDR
  User home directory:
  App data directory:   C:\Users\user\AppData\Roaming/LimeSuite
  Config directory:     /.limesuite
  Image search paths:
     - C:\Users\user\AppData\Roaming/LimeSuite/images
     - C:\Program Files\PothosSDR/share/LimeSuite/images

Supported connections:
   * PCIEXillybus
   * STREAM
   * uLimeSDR

At this point i switched to Ubuntu 16.04 under vmware player.

LimeSuit version on Ubuntu, LimeUtil --info
######################################################
## LimeSuite information summary
######################################################

Version information:
  Library version:	v17.02.2-myriadrf1~xenial
  Build timestamp:	2017-04-30
  Interface version:	v2017.2.0
  Binary interface:	17.02-1

System resources:
  Installation root:	/usr
  User home directory:	/root
  App data directory:	/root/.local/share/LimeSuite
  Config directory:	/root/.limesuite
  Image search paths:
     - /root/.local/share/LimeSuite/images
     - /usr/share/LimeSuite/images

Supported connections:
   * NovenaRF7
   * PCIEXillybus
   * STREAM
   * uLimeSDR

LimeSDR is connected with 2headed usb cable. I’ve tried updating it via:

  • non powered USB2.0 hub
  • other non powered USB2.0 hub in different pc port
  • powered USB3.0 hub connected to USB3.0 pc port and wall power outlet
  • directly connecting to USB3.0 pc ports

i have logs only of my last USB2.0 attempt since USB3.0 attempts didn’t seem different to me (at least in terms of result) and i didn’t bother saving output at the time.


In this WestBridge state:

  • When i go to Options -> ConnectionSettings in LimeSuiteGUI i see WestBridge [USB 2.0] 4BE, when i click connect folowing line apears in log: [14:50:47] Connected Control port: UNKNOWN FW:0 HW:0 Protocol:0 GW:0 GW_rev:0 Ref Clk: 30.72 MHz

  • When i try to open self_text.ini from Quick Test in LimeSuiteGUI i get Failed to load file:.

  • When i try to update firmware automaticaly in LimeSuiteGUI i get Programming Error!.

I’ve used instructions from this comment and:

  • every step from comment gives no visible errors

  • after step 7 LimeUtil --find is: [LimeSDR-USB, media=USB 2.0, module=STREAM, addr=1d50:6108, serial=0009060B00472B1A]

  • after step 10 i’m back to WestBridge state

  • if after step 7 i do LimeUtil --update then it goes back to WestBridge state after folowing output:

    Connected to [LimeSDR-USB [USB 2.0] 9060B00472B1A]
    
    ########################################################
    ##   !!!  Warning: gateware version mismatch  !!!
    ## Expected gateware version 2, revision 6
    ## 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 finished, 186040 bytes sent! 132156 ms(/usr/share/LimeSuite/images/17.02/LimeSDR-USB_HW_1.3_r3.0.img)
    Programming finished, 555969 bytes sent! 400626 ms(/usr/share/LimeSuite/images/17.02/LimeSDR-USB_HW_1.4_r2.6.rbf)
    Programming finished, 0 bytes sent! 22 ms
    
    Programming update complete!
    

Output of LimeUtil --update in WestBridge state:

Connected to [WestBridge  [USB 2.0] 4BE]
libusb: warning [handle_timeout] async cancel failed -5 errno=22
libusb: warning [handle_timeout] async cancel failed -5 errno=22
libusb: warning [handle_timeout] async cancel failed -5 errno=22
Unsupported hardware connected: UNKNOWN[HW=0]
libusb: warning [handle_timeout] async cancel failed -5 errno=22

Programming update failed! : Unsupported hardware connected: UNKNOWN[HW=0]
libusb: warning [handle_timeout] async cancel failed -5 errno=22

Output of LimeUtil --fw LimeSDR-USB_fx3_fw.img in WestBridge state:

Connected to [WestBridge  [USB 2.0] 4BE]
libusb: warning [handle_timeout] async cancel failed -5 errno=22
Unsupported hardware connected: UNKNOWN[HW=0]
libusb: warning [handle_timeout] async cancel failed -5 errno=22
[  0%]     0/186040 Bytes Programming failed! Write operation failed
Programming failed! : Programming failed! Write operation failed
libusb: warning [handle_timeout] async cancel failed -5 errno=22
libusb: warning [handle_timeout] async cancel failed -5 errno=22

Device info in WestBridge state:

Device Info

Try update it via ubuntu.

everything after:

At this point i switched to ubuntu.

i did on ubuntu.

Unplug the card then try it again i have issue in some software that i have to that every time i make setting change.

at this point i’ve unplugged it at least 50 times, after i plug it in it is this WestBridge state.

OK you connected to usb2 not usb 3 in usb 2 you have to plug in external P.S same time with usb2 usb 2 dont have enough power to run the card this the issue i have before.

I’ve tried updating in this configurations:

  • non powered USB2.0 hub
  • other non powered USB2.0 hub in different pc port
  • powered USB3.0 hub connected to USB3.0 pc port and wall power outlet
  • directly connecting to USB3.0 pc ports

i have logs only of my last USB2.0 attempt since USB3.0 attempts didn’t seem different to me (at least in terms of result) and i didn’t bother saving output at the time.

Could be westbrige chip issue in ubuntu but not sure since i never hard this issue in my system win 10 and ubuntu 16.04.

From my notes: Fixed!! When the firmware gets scrogged like that - push the FX3 reset button and then start the LimeSuiteGUI - it’ll connect and can restore the FX3 image from /root/.local/share/LimeSuite/images/17.01/LimeSDR-USB_HW_*.img (latest).

I’ve seen that and i though that reset button is the same as plugging out and in which i did number of times.

What i did just now for you:

  • plug in board into powered USB3.0 hub trough USB3.0 pc port

  • LimeUtil --find
    [WestBridge , media=USB 2.0, module=STREAM, addr=04b4:00f3, serial=0000000004BE]
    it says USB 2.0 here and i don’t know why, maybe that’s a part of the problem.

  • single short reset press

  • output of udevadm monitor during reset:

    output

    KERNEL[451.808696] remove /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0 (usb)
    KERNEL[451.811079] remove /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1 (usb)
    UDEV [451.811140] remove /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0 (usb)
    UDEV [451.811185] remove /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1 (usb)
    KERNEL[452.761991] add /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1 (usb)
    KERNEL[452.763445] add /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0 (usb)
    UDEV [452.767788] add /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1 (usb)
    UDEV [453.774707] add /devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0 (usb)

  • LimeUtil --find
    [WestBridge , media=USB 2.0, module=STREAM, addr=04b4:00f3, serial=0000000004BE]

  • With .img file that got downloaded by autoupdate at somepoint:
    LimeUtil --fw=/usr/share/LimeSuite/images/17.02/LimeSDR-USB_HW_1.3_r3.0.img

    output

    Connected to [WestBridge [USB 2.0] 4BE]
    libusb: warning [handle_timeout] async cancel failed -5 errno=22
    libusb: warning [handle_timeout] async cancel failed -5 errno=22
    libusb: warning [handle_timeout] async cancel failed -5 errno=22
    Unsupported hardware connected: UNKNOWN[HW=0]
    [ 0%] 0/186040 Bytes Programming failed! Write operation failed
    Programming failed! : Programming failed! Write operation failed

  • With that debug .img file from github:
    LimeUtil --fw=LimeSDR-USB_fx3_fw.img

    output

    Connected to [WestBridge [USB 2.0] 4BE]
    Unsupported hardware connected: UNKNOWN[HW=0]
    libusb: warning [handle_control_completion] cancel: unrecognised urb status -32
    [ 0%] 0/186040 Bytes Programming failed! Write operation failed
    Programming failed! : Programming failed! Write operation failed
    libusb: warning [handle_timeout] async cancel failed -5 errno=22

  • If i upload LimeSDR-USB_HW_1.3_r3.0.img using LimeSuiteGUI to FX3 RAM:

    • no errors
    • device disconneted and never connects back on itself
    • if i press reset it connects back in WestBridge state.
  • If i upload LimeSDR-USB_HW_1.3_r3.0.img using LimeSuiteGUI to Flash it gives message box with Programming failed!

That “GET INFO” pic … looks to me that you didn’t connect to the LimeSDR-USB first. That’s the only time i ever get that window.

If it was … then perhaps you have a usb cable issue or?

when an issue occurs … try looking at dmseg (in another terminal) and see if there was a disconnect/reconnect of the usb buss

that’s how “device info” looks when LimeSuiteGUI is started:


that’s how “device info” looks when i click GET INFO:


that’s how “device info” looks when i connect to my LimeSDR Hairbrush:


also, as is stated it is my first post:

  • there is WestBridge device in Connection Settings window
  • after i click connect i get [21:47:07] Connected Control port: UNKNOWN FW:0 HW:0 Protocol:0 GW:0 GW_rev:0 Ref Clk: 30.72 MHz in log

Hi,
When you see ‘Westbridge’ it means that FX3 FW is not loaded and FX3 bootloader is running. In my experience the bootloader is always detected as USB 2.0.

You said that following instructions provided by Zack, after step 7 the device was detected as LimeSDR-USB. That means that firmware was successfully loaded to FX3 RAM. If you unplug or press reset in this state, it will return to bootloader “WestBridge”. So I am interested in what happens after successful step 7.

First of all, make sure that you using FW version from Github for programming and its plugged into USB3.0.

  1. After step 7, when you connect to LimeSDR-USB it should show correct device info (actually everything should work as normally until reset).
  2. After connecting to LimeSDR-USB when you try programming to Flash (steps 9, 10) do you get any error?
2 Likes

dmesg during Zack update routine seems normal, all disconnects occur after updates and are part (as far as i understand) of normal update process:

dmesg
[  653.212089] usb 1-1: new high-speed USB device number 4 using ehci-pci
[  653.433459] usb 1-1: New USB device found, idVendor=04b4, idProduct=00f3
[  653.433462] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  653.433463] usb 1-1: Product: WestBridge 
[  653.433464] usb 1-1: Manufacturer: Cypress
[  653.433465] usb 1-1: SerialNumber: 0000000004BE
[  753.358522] usb 1-1: USB disconnect, device number 4
[  753.930954] usb 1-1: new high-speed USB device number 5 using ehci-pci
[  754.158103] usb 1-1: New USB device found, idVendor=1d50, idProduct=6108
[  754.158106] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  754.158108] usb 1-1: Product: LimeSDR-USB
[  754.158109] usb 1-1: Manufacturer: Myriad-RF
[  754.158110] usb 1-1: SerialNumber: 0009060B00472B1A
[  915.889796] usb 1-1: USB disconnect, device number 5
[  916.365996] usb 1-1: new high-speed USB device number 6 using ehci-pci
[  916.588711] usb 1-1: New USB device found, idVendor=04b4, idProduct=00f3
[  916.588715] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  916.588718] usb 1-1: Product: WestBridge 
[  916.588720] usb 1-1: Manufacturer: Cypress
[  916.588722] usb 1-1: SerialNumber: 0000000004BE

is that the correct FW version from Github for programming link?

Yes, its correct FW for boards v1.4(s)

ok, something new.
Over USB3 after step 6 board disconnects and never connects back (no dmesg\udev messages, no device in ConnectionSettings).
But before disconnecting it gives success message box:
msgbox


After i press reset button or unplug-plug it’s back to being WestBridge. Which is expected for RAM FX3 fw as far as i understand.

after step7 over USB2.0 device info looks like this:

if at this point i try to open self_test.ini i get Failed to load file: message box and in console i see LimeSuiteGUI spitting out:

########################################################
##   !!!  Warning: gateware version mismatch  !!!
## Expected gateware version 2, revision 6
## 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
########################################################

steps 8, 9, 10 over USB2.0 give no error, except this one (which as far as i understand is minor wx gui issue):


full backtrace:

backtrace
ASSERT INFO:
../src/gtk/gauge.cpp(67): assert "0 <= m_gaugePos && m_gaugePos <= m_rangeMax" failed in DoSetGauge(): invalid gauge position in DoSetGauge()

BACKTRACE:
[1] wxGauge::DoSetGauge()
[2] void std::vector<unsigned char, std::allocator<unsigned char> >::emplace_back<unsigned char>(unsigned char&&)
[3] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[4] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[5] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[6] wxEvtHandler::TryHereOnly(wxEvent&)
[7] wxEvtHandler::ProcessEventLocally(wxEvent&)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::ProcessPendingEvents()
[10] wxAppConsoleBase::ProcessPendingEvents()
[11] wxApp::DoIdle()
[12] g_main_context_dispatch
[13] g_main_loop_run
[14] gtk_main
[15] wxGUIEventLoop::DoRun()
[16] wxEventLoopBase::Run()
[17] wxAppConsoleBase::MainLoop()
[18] wxEntry(int&, wchar_t**)
[19] __libc_start_main
[20] _start

after i click continue i get success dialog:

in console there is following messages:

Programming finished, 186040 bytes sent! 129421 ms
Programming finished, 0 bytes sent! 21 ms

firmware is updated and device disconnects.
after it connects back device is WestBridge again.

addr=04b4:00f3 is the FX3 Boot-loader *1
addr=1d50:6108 is Myriad-RF LimeSDR-USB (ref: http://wiki.openmoko.org/wiki/USB_Product_IDs )*2

*1 The device is booting up from a 32K ROM inside the FX3 USB chip, in recovery mode. The normal reason for this is because it is being forced into this mode by jumper J13 being disconnected (ref: https://wiki.myriadrf.org/images/3/3b/LimeSDR-USB-Overview.jpg ).

*2 The device is either running the a firmware from RAM, or from flash. If it is running from RAM then this is when you should be installing the current firmware onto the the flash chip for the FX3 USB controller. And then the latest paired/corresponding firmware/gateware/bitstream onto the FPGA’s separate flash chip.

If you are seeing “addr=1d50:6108” on a disconnect-reconnect then you have a valid firmware on the flash chip for the FX3 USB chip (and you have reinstalled J13 jumper so that the device boots up normally from a valid firmware and bitstream stored on flash). And everything should be fine.

1 Like

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_trx_HW_1.4.rbf
b) After this the device will probably get reset so you will have to program FX3 to RAM again to check FW and GW version in device info.
c) If GW versions is no longer 0’s, try programming FX3 to flash again.

If all this fails, then I don’t have any more ideas.

Also, that issue with USB3 is strange, maybe there is something wrong with your board or power power delivery to board when using USB3 port.