application: use new bootloader method
This commit is contained in:
parent
55b30588ed
commit
7ea7be810d
|
@ -273,8 +273,12 @@ static void command_reset(void* argument)
|
|||
static void command_bootloader(void* argument)
|
||||
{
|
||||
(void)argument; // we won't use the argument
|
||||
RCC_CSR |= RCC_CSR_RMVF; // clear reset flags
|
||||
scb_reset_core(); // reset core (the bootloader will interpret it as starting into DFU)
|
||||
// set DFU magic to specific RAM location
|
||||
__dfu_magic[0] = 'D';
|
||||
__dfu_magic[1] = 'F';
|
||||
__dfu_magic[2] = 'U';
|
||||
__dfu_magic[3] = '!';
|
||||
scb_reset_system(); // reset system (core and peripherals)
|
||||
while (true); // wait for the reset to happen
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue