Custom bootloader - jump to program with USB enabled
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-09-28 1:54 AM
I'm trying to write a custom bootloader, so far I've been successful using
Address = *(__IO uint32_t*) (APP_ADDRESS + 4);
jump = (pFunction) Address;
__set_MSP(*(__IO uint32_t*) APP_ADDRESS);
jump();
however this only worked for a a very simple main application (blinking a LED).
My real application uses USB and after the jump the code gets stuck somewhere in the initialisation and the app doesn't run.
I have narrowed it down to here: By removing the line "MX_USB_DEVICE_Init()" from my main app, the bootloader works perfectly. I've tried calling "USBD_DeInit()" before jumping but this didn't fix anything.
Is there anything I should be resetting / disabling in my bootloader before jumping to my main app?
Thanks
Labels:
- Labels:
-
Bootloader
-
USB
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
