cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STM32F030CCT6TR microcontroller for my Bootloader, but the while switching to application there is an error in initialization of System Clock.

TShet.2
Associate III

I am blinking LED every 4 sec for up to 5 counts in Bootloader and switching to Application where I am blinking LED every second.

But while jumping to Application the Clock Initialization is failing.

4 REPLIES 4
gbm
Lead III

HAL_Init() initializes SysTick interrupt. Interrupts are using vector table at address 0 / 0x8000000. Its location cannot be changed on M0 core, so there is no working HAL time base and no chance to use any interrupt in your application. Worse - any interrupt enabled in your App is serviced (or rather not) by the bootloader code.

To fix this on any STM32F0, you must relocate app's interrupt vector table to RAM and map RAM at 0, which requires some programming effort (linker script plus explicit copy or startup code modification).

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Does it​ need to reinitialize the clocks?

Debug the control transfer, make sure the vector table is relocated properly.

Look at causes not symptoms. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TShet.2
Associate III

Control transfer is happening to the Application, but when the Timers and UART's are initialized code is hanging.

I don't have any knowledge regarding relocating the vector table.

Do you have any examples how to do it?

MM..1
Chief II

Bootloader is normal app compiled on reset start for MCU 0X08000000.

Application is on different page addres, then on main start you need load some ...

CubeIDE project do it for you after change vector table offset define ...