1 Reply Latest reply on Jun 26, 2017 10:40 PM by AnkitaS_51

    Unable to jump to HID bootloader from application


      I've been tearing my hair out trying to figure this one out for hours and hours and hours.


      I have a HID bootloader.  It has a light, and a button to force enable it.  It works.  I also have HID firmware that works.


      I'm trying to have software switch from the active firmware to the bootloader.  I call Bootloadable_Load, and the light flickers for a second, but it won't stay in the bootloader, and jumps back to the application immediately.


      I've tried stopping and restarting USBFS on the bootloader, on the bootloadable application.  I've paused after calling stop, removed the start() commands from the bootloader (so it would match one of the cypress examples).  I've added delay loops in to try to delay starting the bootloader - it's acting almost like Bootloadable_Load is running the bootloader component directly, rather than the bootloadable firmware.


      I've tried having the ISR set a global flag instead of directly jumping.


      At this point, I don't know what could be causing the problem.  I've set my ISR to just call Bootloadable_Load every 10 seconds - the LED blinks for a very short time from the bootloader, then it goes right back into the main firmware.


      The code is on GitHub (in the GHETT-IO folder, and Bootloader folder).  If anyone has experience with something like this, or ideas why it would happen, I'd be rather appreciative.





        • 1. Re: Unable to jump to HID bootloader from application

          On device reset, the bootloader can wait for a command from the bootloader host or jump to the application code immediately. If this option is enabled, the bootloader waits for a command from the host until the timeout period specified by the Wait for command time parameter occurs. If the bootloader does not receive this command within the specified timeout interval, the active bootloadable project in the flash is executed after the timeout.