mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Fixed possibility of getting stuck in F7 bootloader mode (#5370)
This commit is contained in:
parent
2f8e59f8fc
commit
a24daa78d0
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ void checkForBootLoaderRequest(void)
|
||||||
bt = (*(__IO uint32_t *) (BKPSRAM_BASE + 4)) ;
|
bt = (*(__IO uint32_t *) (BKPSRAM_BASE + 4)) ;
|
||||||
if ( bt == 0xDEADBEEF ) {
|
if ( bt == 0xDEADBEEF ) {
|
||||||
(*(__IO uint32_t *) (BKPSRAM_BASE + 4)) = 0xCAFEFEED; // Reset our trigger
|
(*(__IO uint32_t *) (BKPSRAM_BASE + 4)) = 0xCAFEFEED; // Reset our trigger
|
||||||
|
// Backup SRAM is write-back by default, ensure value actually reaches memory
|
||||||
|
// Another solution would be marking BKPSRAM as write-through in Memory Protection Unit settings
|
||||||
|
SCB_CleanDCache_by_Addr((uint32_t *) (BKPSRAM_BASE + 4), sizeof(uint32_t));
|
||||||
|
|
||||||
void (*SysMemBootJump)(void);
|
void (*SysMemBootJump)(void);
|
||||||
__SYSCFG_CLK_ENABLE();
|
__SYSCFG_CLK_ENABLE();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue