2023-09-30 01:47 AM
Starting from this video (https://www.youtube.com/watch?v=CGUC1wqSLCE) I'm trying to write my bootloader for DFU from an USB stick. The code works but I would like to tweak it such that:
I got it work the second point by adding a delay to let me remove the USB stick. But if the USB stick is still plugged in, then the "jump to application part does not work.
I suspect that this is related some kind of USB peripheral initialization.
Here is the zip of the project.
Solved! Go to Solution.
2023-09-30 02:55 AM
Try rearange your start into app from clean mcu state. I preffer reboot with some marker....
Perfect is dont init or deinit all boot periph before jump.
2023-09-30 02:55 AM
Try rearange your start into app from clean mcu state. I preffer reboot with some marker....
Perfect is dont init or deinit all boot periph before jump.
2023-10-02 02:22 AM - edited 2023-10-02 04:37 AM
Thank you so much! I have managed to implement your solution. It works, but there is still a problem: when the flash programming is finished, the application program starts but when I remove the USB memory device, the program freezes.
EDIT: I fixed this issue by disabling the usb interrupt: HAL_NVIC_DisableIRQ(OTG_FS_IRQn);