HAL_ChibiOS: disable watchdog save in bootloader

This commit is contained in:
Andrew Tridgell 2019-07-26 07:52:30 +10:00
parent 5cbe85ee19
commit fa76d1fbe6
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,7 @@ void NMI_Handler(void) { while (1); }
*/
static void save_fault_watchdog(uint16_t line, FaultType fault_type, uint32_t fault_addr)
{
#ifndef HAL_BOOTLOADER_BUILD
bool using_watchdog = AP_BoardConfig::watchdog_enabled();
if (using_watchdog) {
AP_HAL::Util::PersistentData &pd = hal.util->persistent_data;
@ -61,6 +62,7 @@ static void save_fault_watchdog(uint16_t line, FaultType fault_type, uint32_t fa
pd.fault_icsr = SCB->ICSR;
stm32_watchdog_save((uint32_t *)&hal.util->persistent_data, (sizeof(hal.util->persistent_data)+3)/4);
}
#endif
}
void HardFault_Handler(void);