ferenc-nemeth / stm32-bootloader

UART bootloader for STM32 microcontroller.
MIT License
310 stars 94 forks source link

Application is not running after transferring through bootloader #7

Closed embhobbb closed 3 years ago

embhobbb commented 3 years ago

Hi I have done the changes as per and flash the code. I could see that application got transferred but application was not running. Application was just kled blinking. here is both the code.

worksspace.zip

ferenc-nemeth commented 3 years ago

Hi,

What exactly happens when you jump to the application? Do you have a hard fault?

Sergey-engineer-rus commented 3 years ago

Hello! I had the same problem. It was fixed by adding HAL_RCC_DeInit (); before HAL_DeInit (); in the flash_jump_to_app(); function.

I also want to say that you can debug your application that used the bootloader: Just start debugging on your application project (I am using IAR) and set a breakpoint on startup (main () function). Then press the RESET button on your device. After that, the bootloader will start and run your application, and the breakpoint will hit. Then you can see what is wrong. For example, I see that RCC cannot be started in my application. So I added HAL_DeInit (); function in the bootloader.

Hope this information was helpful to you.

ferenc-nemeth commented 3 years ago

Hi Sergey,

Thank you for helping Embhobbb out.