cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with interrupt in custom bootloader on STM32F070CBT6

shyamparmar
Associate III

Dear STM32 Community,

I am encountering an issue with a custom bootloader implementation on the STM32F070CBT6 microcontroller. The same bootloader and application setup work flawlessly on the STM32F072RBT6, but when applied to the STM32F070CBT6, the application appears to get stuck, and interrupts do not function as expected.

  • Both MCUs (STM32F072RBT6 and STM32F070CBT6) are Cortex-M0 series.
  • Bootloader starts at Flash base (0x08000000) and jumps to the application located at 0x08004000.
  • Bootloader to Application Jump Function:

 

static void goto_application(void) { 
    void (*app_reset_handler)(void) = (void (*)(void))(*(volatile uint32_t *)(0x08004000 + 4));  

    __disable_irq();  
    HAL_RCC_DeInit();  
    HAL_DeInit();  

    SysTick->CTRL = 0;  
    SysTick->LOAD = 0;  
    SysTick->VAL = 0;  

    __set_MSP((*(volatile uint32_t *)0x08004000));  
    app_reset_handler();  
}
​

 

Application Code Setup (STM32F072RBT6):  The following setup works perfectly in the application.

 

__enable_irq();  

for (i = 0; i < 48; i++) {
    VectorTable[i] = *(uint32_t*)(0x08004000 + (i << 2));
}

__HAL_RCC_SYSCFG_CLK_ENABLE();
__HAL_SYSCFG_REMAPMEMORY_SRAM();
​

 

Using the same bootloader and application setup, the STM32F070CBT6 application does not work as expected. It seems to get stuck, and interrupts do not function.

Are there any specific differences in handling interrupts, vector table remapping, or peripheral initialization between the STM32F072RBT6 and STM32F070CBT6 that could cause this behavior?

Could there be additional steps required for the STM32F070CBT6 to support bootloader-to-application jumps with interrupt functionality?

Any guidance or suggestions to resolve this issue would be greatly appreciated.

 

Thank you in advance for your support!

1 REPLY 1
MM..1
Chief II

You kip show how you place 

VectorTable[i]