mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Move the USB voltage level detector after all init code.
This commit is contained in:
parent
85f06771d3
commit
aca7b9e8a8
@ -263,9 +263,7 @@ void SystemClock_Config(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MCU_SERIES_H7)
|
||||
HAL_PWREx_EnableUSBVoltageDetector();
|
||||
#elif defined(MCU_SERIES_F4) || defined(MCU_SERIES_F7)
|
||||
#if defined(MCU_SERIES_F4) || defined(MCU_SERIES_F7)
|
||||
if (HAL_PWREx_EnableOverDrive() != HAL_OK) {
|
||||
// Initialization Error
|
||||
__fatal_error("HAL_PWREx_EnableOverDrive");
|
||||
@ -305,5 +303,8 @@ void SystemClock_Config(void)
|
||||
|
||||
// Enables the I/O Compensation Cell
|
||||
HAL_EnableCompensationCell();
|
||||
|
||||
// Enable the USB voltage level detector
|
||||
HAL_PWREx_EnableUSBVoltageDetector();
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user