Skip to main content
Explorer
October 20, 2022
Question

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

  • October 20, 2022
  • 4 replies
  • 991 views

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.

    This topic has been closed for replies.

    4 replies

    Graduate
    October 20, 2022

    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).

    Graduate II
    October 20, 2022

    Does it​ need to reinitialize the clocks?

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

    Look at causes not symptoms. ​

    TShet.2Author
    Explorer
    October 20, 2022

    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?

    Graduate II
    October 20, 2022

    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 ...