mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
OP-1272 Fix STM32F4 Watchdog in debug mode
This commit is contained in:
parent
2190ccdf77
commit
ea665d1270
@ -73,7 +73,7 @@ uint16_t PIOS_WDG_Init()
|
|||||||
delay = 0x0fff;
|
delay = 0x0fff;
|
||||||
}
|
}
|
||||||
#if defined(PIOS_INCLUDE_WDG)
|
#if defined(PIOS_INCLUDE_WDG)
|
||||||
DBGMCU_Config(DBGMCU_IWDG_STOP, ENABLE); // make the watchdog stop counting in debug mode
|
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP, ENABLE); // OP-1272 : write in APB1 register
|
||||||
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
|
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
|
||||||
IWDG_SetPrescaler(IWDG_Prescaler_16);
|
IWDG_SetPrescaler(IWDG_Prescaler_16);
|
||||||
IWDG_SetReload(delay);
|
IWDG_SetReload(delay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user