mirror of https://github.com/ARMmbed/mbed-os.git
Removed the HAL_RCCEx_PeriphCLKConfig statement that was selecting the HSI48 CLK for USB. Assumption is that the STM32G4 reset value (defaults to HSI48 selected for USB) is preserved throughout Mbed initialization.
parent
80f0a378fb
commit
21176e903a
|
@ -121,15 +121,6 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
return 0; // FAIL
|
||||
}
|
||||
|
||||
#if defined(DEVICE_TRNG) || defined(DEVICE_USBDEVICE)
|
||||
// Connect the HSI48 Clock to drive the USB & RNG Clocks @ 48 MHz (CK48 Clock Mux)
|
||||
RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB;
|
||||
RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
|
||||
if (HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct) != HAL_OK) {
|
||||
return 0; // FAIL
|
||||
}
|
||||
#endif
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
|
||||
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||
|
@ -184,15 +175,6 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
return 0; // FAIL
|
||||
}
|
||||
|
||||
#if defined(DEVICE_TRNG) || defined(DEVICE_USBDEVICE)
|
||||
// Connect the HSI48 Clock to drive the USB & RNG Clocks @ 48 MHz (CK48 Clock Mux)
|
||||
RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB;
|
||||
RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
|
||||
if (HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct) != HAL_OK) {
|
||||
return 0; // FAIL
|
||||
}
|
||||
#endif
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
|
||||
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||
|
|
Loading…
Reference in New Issue