Skip to main content
info239955
Visitor II
Jan 14, 2014 9:40 PM UTC
Question

[F407vtg] jump to bootloader

Posted on January 14, 2014 at 22:40

STM32F407VTG

CooCox IDE

Hello,

how can i jump to inbuild bootloader?

This code is not working:

void BootLoader(void) {

    void (*SysMemBootJump)(void) = (void (*)(void)) (*((uint32_t *) 0x1FFF0004));

    __set_PRIMASK(1);

    RCC_DeInit();

    SysTick->CTRL = 0;

    SysTick->LOAD = 0;

    SysTick->VAL = 0;

    RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);

    __set_MSP(0x20002000);

    SysMemBootJump();

}

Thanks,

Markus
    This topic has been closed for replies.

    1 reply

    chen
    Associate II
    Jan 15, 2014 9:09 AM UTC
    Posted on January 15, 2014 at 10:09

    Hi

    Why are you doing it this way?

    All you have to do is pull the Boot0 pin low and reset - The STM32 will automatically run the build in bootloader.

    If you must do it this way, search the forum. There is another thread discussing this.