1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-24 05:12:02 +00:00

feat(core): support 32MHz HSE in USB driver (HS internal PHY only)

[no changelog]
This commit is contained in:
tychovrahe 2024-11-15 09:46:56 +01:00 committed by TychoVrahe
parent b4c95f4c16
commit bfb3c1c247

View File

@ -226,7 +226,13 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
/** Set the OTG PHY reference clock selection
*/
#if HSE_VALUE == 16000000
HAL_SYSCFG_SetOTGPHYReferenceClockSelection(SYSCFG_OTG_HS_PHY_CLK_SELECT_1);
#elif HSE_VALUE == 32000000
HAL_SYSCFG_SetOTGPHYReferenceClockSelection(SYSCFG_OTG_HS_PHY_CLK_SELECT_6);
#else
#error Unsupported HSE frequency
#endif
/* Peripheral clock enable */
__HAL_RCC_USB_OTG_HS_CLK_ENABLE();