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:
parent
cab020ba30
commit
e338279be4
3 changed files with 28 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue