mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
implemented IAP by using ROM bootloader, changed ADXL init stuff, changed mag axis orientation. added startup assembly file to root since it got modified with bootloader reboot check.
git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@88 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
d262c6e66c
commit
738541b269
9 changed files with 811 additions and 81 deletions
12
drv_system.c
12
drv_system.c
|
@ -186,3 +186,15 @@ void failureMode(uint8_t mode)
|
|||
BEEP_OFF;
|
||||
}
|
||||
}
|
||||
|
||||
#define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
|
||||
|
||||
void systemResetToBootloader(void)
|
||||
{
|
||||
// 1FFFF000 -> 20000200 -> SP
|
||||
// 1FFFF004 -> 1FFFF021 -> PC
|
||||
*((uint32_t *)0x20004FF0) = 0xDEADBEEF; // 20KB STM32F103
|
||||
|
||||
// Generate system reset
|
||||
SCB->AIRCR = AIRCR_VECTKEY_MASK | (uint32_t)0x04;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue