mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge pull request #11030 from SteveCEvans/f7_flash_lockup
This commit is contained in:
commit
4537f0c394
2 changed files with 8 additions and 1 deletions
|
@ -76,7 +76,7 @@ static void checkForBootLoaderRequest(void)
|
||||||
if (bootloaderRequest != RESET_BOOTLOADER_REQUEST_ROM) {
|
if (bootloaderRequest != RESET_BOOTLOADER_REQUEST_ROM) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE);
|
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_BOOTLOADER_POST);
|
||||||
|
|
||||||
__SYSCFG_CLK_ENABLE();
|
__SYSCFG_CLK_ENABLE();
|
||||||
SYSCFG->MEMRMP |= SYSCFG_MEM_BOOT_ADD0 ;
|
SYSCFG->MEMRMP |= SYSCFG_MEM_BOOT_ADD0 ;
|
||||||
|
|
|
@ -313,6 +313,13 @@ void OverclockRebootIfNecessary(uint32_t overclockLevel)
|
||||||
*/
|
*/
|
||||||
void SystemInit(void)
|
void SystemInit(void)
|
||||||
{
|
{
|
||||||
|
uint32_t bootloaderRequest = persistentObjectRead(PERSISTENT_OBJECT_RESET_REASON);
|
||||||
|
|
||||||
|
if (bootloaderRequest == RESET_BOOTLOADER_POST) {
|
||||||
|
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE);
|
||||||
|
NVIC_SystemReset();
|
||||||
|
}
|
||||||
|
|
||||||
initialiseMemorySections();
|
initialiseMemorySections();
|
||||||
|
|
||||||
SystemInitOC();
|
SystemInitOC();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue