1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

DFU mode via CLI for F1 and F3

This commit is contained in:
blckmn 2016-09-03 19:04:58 +10:00
parent cab020ba30
commit e338279be4
3 changed files with 28 additions and 2 deletions

View file

@ -114,4 +114,17 @@ void systemInit(void)
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);
}
}