forked from Archive/PX4-Autopilot
stm32h7:Bootloader fix assertion caused by USB running
USB was still running in transition to Firmware. This resets the USB
This commit is contained in:
parent
0cc250194d
commit
44c7b90a7b
|
@ -311,6 +311,7 @@ board_deinit(void)
|
||||||
|
|
||||||
#if INTERFACE_USB
|
#if INTERFACE_USB
|
||||||
px4_arch_configgpio(MK_GPIO_INPUT(GPIO_OTGFS_VBUS));
|
px4_arch_configgpio(MK_GPIO_INPUT(GPIO_OTGFS_VBUS));
|
||||||
|
putreg32(RCC_AHB1RSTR_OTGFSRST, STM32_RCC_AHB1RSTR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BOARD_FORCE_BL_PIN_IN) && defined(BOARD_FORCE_BL_PIN_OUT)
|
#if defined(BOARD_FORCE_BL_PIN_IN) && defined(BOARD_FORCE_BL_PIN_OUT)
|
||||||
|
@ -342,7 +343,10 @@ board_deinit(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* disable the AHB peripheral clocks */
|
|
||||||
|
/* Clear any RSTR set above and disable the AHB peripheral clocks */
|
||||||
|
|
||||||
|
putreg32(0, STM32_RCC_AHB1RSTR);
|
||||||
putreg32(0, STM32_RCC_AHB1ENR);
|
putreg32(0, STM32_RCC_AHB1ENR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue