Exemplo n.º 1
0
void checkForBootLoaderRequest(void)
{
    if (*((uint32_t *)0x2001FFFC) == 0xDEADBEEF) {

        *((uint32_t *)0x2001FFFC) = 0x0;

        __enable_irq();
        __set_MSP(0x20001000);

        bootJump = (void(*)(void))(*((uint32_t *) 0x1fff0004));
        bootJump();
        while (1);
    }
}
Exemplo n.º 2
0
void checkForBootLoaderRequest(void)
{
    void(*bootJump)(void);

    if (*((uint32_t *)0x20004FF0) == 0xDEADBEEF) {

        *((uint32_t *)0x20004FF0) = 0x0;

        __enable_irq();
        __set_MSP(*((uint32_t *)0x1FFFF000));

        bootJump = (void(*)(void))(*((uint32_t *) 0x1FFFF004));
        bootJump();
        while (1);
    }
}