mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 10:13:34 +08:00
stm32: board_reset, keep legacy definition for old chips
This commit is contained in:
committed by
Beat Küng
parent
217a67f956
commit
20905ce478
@@ -62,7 +62,13 @@ int board_set_bootload_mode(board_reset_e mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stm32_pwr_enablebkp(true);
|
stm32_pwr_enablebkp(true);
|
||||||
*(uint32_t *)STM32_RTC_BKR(0) = regvalue;
|
|
||||||
|
// Check if we can to use the new register definition
|
||||||
|
#ifndef STM32_RTC_BK0R
|
||||||
|
*(uint32_t *)STM32_BKP_BASE = regvalue;
|
||||||
|
#else
|
||||||
|
*(uint32_t *)STM32_RTC_BK0R = regvalue;
|
||||||
|
#endif
|
||||||
stm32_pwr_enablebkp(false);
|
stm32_pwr_enablebkp(false);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user