No announcement yet.

xPico keep resetting every 8 secondes

  • Filter
  • Time
  • Show
Clear All
new posts

  • xPico keep resetting every 8 secondes


    I was upgrading the xPico with my own SDK firmware through the wlan, but it didn't end well: the connection got lost while upgrading, the wlan and ap disappeared, and now the xPico resets every 8 seconds.

    I tried recovering it with the DeviceInstaller but it fails every time. I get the response "G\r\n" to the "!SL115200\r" and then "E25\r\n" 25 ms after the rom file transfer started. But then no response anymore after the file transfer until the xPico resets 8 seconds later which discards all the process I guess.

    The xPico RESET pin goes low for 30 us every 8 seconds, and this is not driven by my processor.
    I looked carefully at the RESET and DEFAULT lines for the recovery process but didn't see anything wrong.

    I can send you a logic capture of different pin signals if you need.

    Please help.

  • #2
    Can you post a screenshot from DeviceInstaller? Also, which version of DeviceInstaller are you using?

    E25 usually means that the recovery loader did not run correctly.


    • #3
      [18:24:52.340] Firmware File:
      [18:24:52.341] C:\xPicoWifi Firmwares\xPicoWifi_1.4.0.0R28.rom
      [18:24:52.344] DeviceInstaller version
      [18:24:52.345] Device Parameters/Info:
      [18:24:52.346] Name/Type: xPico Wi-Fi
      [18:24:52.347] ID: Y1
      [18:24:52.349] Category: xPico
      [18:24:52.413] Device Type: Device Server
      [18:24:52.415] Download Type: Binary
      [18:24:52.416] Erase Type: FileLength
      [18:24:52.418] Initial Baudrate: 115200
      [18:24:52.419] Final Baudrate: 115200
      [18:24:52.421] Load Type: Linux
      [18:24:52.422] # of Ports: 2
      [18:24:52.423] Operating System: ThreadX
      [18:24:52.425] Recover Type: Linux
      [18:24:52.426] Rom Compressed: False
      [18:24:52.427] Storage Type: ParallelFlash
      [18:24:52.429] Use @: False
      [18:24:52.433] Use Header: False
      [18:24:52.435] Device Port: 1
      [18:24:52.438] Opening COM6 serial port.
      [18:24:52.448] Changing serial port speed to 115200.
      [18:24:52.457] Changing serial port flow control to 'None'.
      [18:24:52.457] The defaults line must be asserted for about a second prior to reset or power-on
      [18:24:52.970] Querying Device.
      [18:24:55.041] Please reset, power-on, or power-cycle the device....
      [18:24:55.934] Sending ROM Raw.
      [18:24:55.954] Serial Recovery Loader File:
      [18:24:55.954] C:\Program Files\Lantronix\DeviceInstaller4.4\RecovLoader_xPi coWifi.rom
      [18:24:55.955] Transferring the Serial Recovery Loader File....
      [18:24:56.923] Transfer complete.
      [18:24:57.942] Waiting for the device command prompt....
      [18:24:57.965] From Device:
      [18:25:00.980] Sending a carriage return to the device.
      [18:25:03.988] Sending a carriage return to the device.
      [18:25:07.098] Sending a carriage return to the device.
      [18:25:10.009] Sending a carriage return to the device.
      [18:25:13.023] Sending a carriage return to the device.
      [18:25:16.037] Sending a carriage return to the device.
      [18:25:19.051] Sending a carriage return to the device.
      [18:25:22.065] Sending a carriage return to the device.
      [18:25:25.078] Sending a carriage return to the device.
      [18:25:28.089] Sending a carriage return to the device.
      [18:25:31.103] Sending a carriage return to the device.
      [18:25:34.117] Sending a carriage return to the device.
      [18:25:37.133] Sending a carriage return to the device.[18:25:38.236] [18:25:38.238] ** An error occurred:
      [18:25:38.244] Serial Recovery Failed: No response from device.
      [18:25:38.262] Serial Recovery Complete!
      [18:25:38.371] Serial Recovery has Failed!


      • #4
        Do you have hardware flow control lines connected?


        • #5
          No, flow control is disabled.


          • #6
            Hardware flow control is required to be able to do serial firmware recovery.


            • #7
              Ok, I actually tried with and without before.
              Just tried again with flow control, but I get exactly the same behaviour.


              • #8
                Only the first 16 bytes of the rom file are sent well from the DeviceInstaller, I then get different data than the rom file (or a lot of missing bytes). And it stops after 11kB. Could it be that the DeviceInstaller does not see its CTS going low?

                I tried sending the rom file using teraterm, and I got the right data to the xPico (I check with a logic analyzer on the serial pins of the xpico) so I know the flow control works on my system.


                • #9
                  I tried to do the recover process by myself by sending "!SL115200\r" and then the rom file after receiving "G\r\n" from the xPico.
                  I received "E21\r\n" instead of the "E25\r\n" 20 ms after the start of the rom file transfer.
                  I hope this can help resolving my problem.


                  • #10
                    The issue with what you're doing with Tera Term is that after receiving the G character, the xPico Wi-Fi expects the Recovery Loader, to load into RAM and be able to flash the firmware image into flash. So you shouldn't send the firmware image just yet.

                    Here's a Tera Term macro to get the Recovery Loader into RAM and execute it:

                    ; Variables, edit to suit setup
                    AppImage =  'c:\Program Files\Lantronix\DeviceInstaller4.4\RecovLoader_xPicoWifi.rom'
                    BaudRate = 115200
                    BaudString = '115200'
                    setbaud 115200
                    messagebox "Turn power off, click OK, then turn power on. Hold down DEFAULT and RESET buttons, then let go of RESET" "Polling"
                    ; Contact the bootstrap and initiate the first download
                    mpause 50
                    send '!SL' #13
                    wait 'G'
                    loop while result=0
                    ; Send recovery loader
                    setbaud BaudRate
                    sendfile AppImage 1
                    Now you'll be in the Recovery Loader shell. Make sure to switch Tera Term to hardware flow control if you haven't yet, then enter this command into the shell:
                    flash download

                    Now you send the firmware image.

                    Another option is to do a:
                    flash clean

                    That will delete the flash, get rid of the bad firmware image, and after you reboot let you do an OTA again.


                    • #11
                      I was able to recover the module and upgrade the firmware successfully.

                      So I don't know what is going on with my DeviceInstaller. There is data missing in the Recovery Loader as if the flow control doesn't work.

                      Otherwise concerning my first failure, can it be something else than my own code that put the xPico in that continuous resetting state?
                      I have the same code running on another xPico without any problem (yet).
                      I'll investigate my code, I have to change its entire structure anyway.

                      We might implement this serial recovery + firmware update feature in our configuration software, just in case OTA is impossible. It's always reassuring to have a reliable upgrade process.

                      Thank you for your quick help Mariano!