mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Use 0x2001FFF8 for overclock request marker
This commit is contained in:
parent
2cac202447
commit
a877a132b9
2 changed files with 10 additions and 10 deletions
|
@ -269,11 +269,11 @@ void init(void)
|
|||
#if defined(STM32F4) && !defined(DISABLE_OVERCLOCK)
|
||||
// If F4 Overclocking is set and System core clock is not correct a reset is forced
|
||||
if (systemConfig()->cpu_overclock && SystemCoreClock != 240000000) {
|
||||
*((uint32_t *)0x2001FFFC) = 0xDEADBABE; // 128KB SRAM STM32F4XX
|
||||
*((uint32_t *)0x2001FFF8) = 0xDEADBABE; // 128KB SRAM STM32F4XX
|
||||
__disable_irq();
|
||||
NVIC_SystemReset();
|
||||
} else if (!systemConfig()->cpu_overclock && SystemCoreClock == 240000000) {
|
||||
*((uint32_t *)0x2001FFFC) = 0x0; // 128KB SRAM STM32F4XX
|
||||
*((uint32_t *)0x2001FFF8) = 0x0; // 128KB SRAM STM32F4XX
|
||||
__disable_irq();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue