Skip to main content
Hi world!
Associate III
November 5, 2018
Question

Stm32f0 IAP Bootloader

  • November 5, 2018
  • 3 replies
  • 1417 views

Hi guys,

Bootloader program is doing jump. But my application code interrupts don't work.

HAL_Delay () does not work.

HAL_GPIO_TogglePin (GPIOA, PA0_LED_Pin);

HAL_Delay (1000); // IS NOT WORK

while (i ++ <1500000) {} // THIS WORK

i = 0;

So the led is blinking but Hal_Delay does not work because the interrupts are not working.

I don't know how to edit the vector table. I wrote a code, but it's not working.

void Remap_Table (void) {
 
 #define APPLICATION_ADDRESS (uint32_t) 0x08004000
 __IO uint32_t VectorTable [48] __attribute __ ((at (0x20000000)));
 
 for (uint8_t i = 0; i <48; i ++)
 {
 VectorTable [i] = * (__ IO uint32_t *) (APPLICATION_ADDRESS + (i << 2));
 }
 __HAL_RCC_APB2_FORCE_RESET ();
 __HAL_SYSCFG_REMAPMEMORY_SRAM();
 
}

What can I do. I'm using HAL Library.

Good work.

    This topic has been closed for replies.

    3 replies

    in mozbek we trust
    Associate III
    November 5, 2018

    maybe you should set timer interrupt and enable your interrupts when timer interrupt occur

    Hi world!
    Hi world!Author
    Associate III
    November 5, 2018

    I fixxed problem at another way. thanks.

    AvaTar
    Senior III
    November 5, 2018

    You bootloader has one vector table - preferably the one from the default startup code.

    Your application needs to be built with it's own vector table, i.e. needs a modified startup code.

    Setting the vector table is then done in the application, preferably in the startup.

    This is how one of my application has done it, only on a CY FM4 controller, not a STM32.

    Hi world!
    Hi world!Author
    Associate III
    November 5, 2018

    Thank for resond.

    How I get my vector table? So where this table information?

    Tesla DeLorean
    Guru
    November 5, 2018

    Normally startup_stm32f0xx.s

    Make sure you don't disable interrupts in your loader with __disable_irq, and don't transfer control from an interrupt handler or callback routine.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..