• AVR Freaks

Hot!LiveUpdate_Switcher demo only works the first time

Author
AndreaC
Starting Member
  • Total Posts : 40
  • Reward points : 0
  • Joined: 2017/01/27 12:49:40
  • Location: 0
  • Status: offline
2019/05/07 08:10:04 (permalink)
0

LiveUpdate_Switcher demo only works the first time

I'm trying to implement a Live Update on a PIC32MZ using the LiveUpdate_Switcher and LiveUpdate_App bootloader demos in Harmony, but I'm having an issue. I flash the evaluation board with the LiveUpdate_Switcher app and I'm able to perform a Live Update with one of the LiveUpdate_App apps using the UnifiedHost Java application. However, the Live Update only works the first time. The second time, the UnifiedHost application apparently completes the update, but the board still runs the previous app and not the new one, as if the bootloader doesn't switch to the new panel.
 
I modified the original demos to use USB instead of UART, and ported the demos to a chipKIT WiFire and to a Microchip Curiosity PIC32MZ EF boards, so I'm not completely sure that I haven't introduced the issue with my porting. Any suggestions on how to troubleshoot the issue? (There's an old thread with a similar issue, but it didn't provide a solution)
 
MPLAB X IDE v5.15
Harmony v2.06
XC32 v2.15
 
#1

5 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 439
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: LiveUpdate_Switcher demo only works the first time 2019/05/07 09:56:35 (permalink)
    0
    USB files needed big Heap, much larger than some of the demos, otherwise lost USB file access after a few mounts or dismounts.
    Some of us using Heap 10000.
    #2
    AndreaC
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/01/27 12:49:40
    • Location: 0
    • Status: offline
    Re: LiveUpdate_Switcher demo only works the first time 2019/05/07 11:37:08 (permalink)
    0
    Paul PortSol
    USB files needed big Heap, much larger than some of the demos, otherwise lost USB file access after a few mounts or dismounts.
    Some of us using Heap 10000.



    Hi Paul, thank you for your help! I had already seen the heap mentioned in an old thread about Live Update, and I had tried it already. Anyway, I tried again to increase the heap to 10000 in both the Switcher and the Apps, but to no avail. Any other suggestions?
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17344
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: LiveUpdate_Switcher demo only works the first time 2019/05/07 12:09:22 (permalink)
    0
    Did you look for your exact issue? I think I recall that early version only worked once since they were based on an appnote that only worked once.
    #4
    AndreaC
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/01/27 12:49:40
    • Location: 0
    • Status: offline
    Re: LiveUpdate_Switcher demo only works the first time 2019/05/07 12:23:23 (permalink)
    0
    Hi NKurzman, I'm trying to troubleshoot the issue, but I'm kinda at loss at how to proceed. Any suggestion is really appreciated. Anyway, from what I understand from the documentation of the demo, the Live Update is supposed to work multiple times:
     
    "With the LiveUpdate_App.X demonstration application has been compiled for all three instances, the generated hex files can now be programmed into the device using the Bootloader or the application itself (LiveUpdate feature).
    1. BootLoad (first time) the LiveUpdate_App.X\dist\pic32mz_ef_sk_Inst_1\production\LiveUpdate_App.X.production.hex file and program the device.
    2. LiveUpdate_App Instance 1 is Bootloaded into Panel 1 and LED_1 is illuminated.
    3. Load the LiveUpdate_App.X\dist\pic32mz_ef_sk_Inst_2\production\LiveUpdate_App.X.production.hex file and program device. LED_1 should continue to be illuminated.
    4. Reset the device to jump to LiveUpdate_App Instance 2 loaded in panel 2.
    5. LiveUpdate_App Instance 2 is loaded in panel 2 and LED_2 is illuminated.
    6. Load the LiveUpdate_App.X\dist\pic32mz_ef_sk_Inst_3\production\LiveUpdate_App.X.production.hex file and program device. LED_2 should continue to be illuminated.
    7. Reset the device to jump to LiveUpdate_App Instance 3 loaded in panel 1.
    8. LiveUpdate_App Instance 3 is loaded in panel 1 and LED_2 is illuminated.
    9. Steps 1 through 8 can be repeated for the same application or different Applications, which are configured to LiveUpdate mode through the MHC (Refer to Generating the Application Linker Script in the Bootloader Library Help)."
    #5
    AndreaC
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2017/01/27 12:49:40
    • Location: 0
    • Status: offline
    Re: LiveUpdate_Switcher demo only works the first time 2019/05/09 08:06:02 (permalink)
    0
    A quick update on this issue. I reverted the projects (switcher and apps) to use UART instead USB bootloader library and now the LiveUpdate works as expected (I can update the apps indefinitely). I suspect that either the USB bootloader library is broken somehow (or, possibly, the UnifiedHost Java application is), or there is a configuration problem somewhere.
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5