MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / USBPLL_Configuration

Function USBPLL_Configuration

bsp/ht32/libraries/usbd_library/src/usb_port.c:23–48  ·  view source on GitHub ↗

/ * @brief Configure USB PLL * @retval None ************************************************************************************************************/

Source from the content-addressed store, hash-verified

21 * @retval None
22 ************************************************************************************************************/
23static void USBPLL_Configuration(void)
24{
25 {
26 /* USB PLL configuration */
27
28 /* !!! NOTICE !!!
29 Notice that the local variable (structure) did not have an initial value.
30 Please confirm that there are no missing members in the parameter settings below in this function.
31 */
32 CKCU_PLLInitTypeDef PLLInit;
33
34 PLLInit.ClockSource = CKCU_PLLSRC_HSE; // CKCU_PLLSRC_HSE or CKCU_PLLSRC_HSI
35#if (LIBCFG_CKCU_USB_PLL_96M)
36 PLLInit.CFG = CKCU_USBPLL_8M_96M;
37#else
38 PLLInit.CFG = CKCU_USBPLL_8M_48M;
39#endif
40 PLLInit.BYPASSCmd = DISABLE;
41 CKCU_USBPLLInit(&PLLInit);
42 }
43
44 CKCU_USBPLLCmd(ENABLE);
45
46 while (CKCU_GetClockReadyStatus(CKCU_FLAG_USBPLLRDY) == RESET);
47 CKCU_USBClockConfig(CKCU_CKUSBPLL);
48}
49#endif
50
51#if (LIBCFG_PWRCU_VREG)

Callers 1

USB_ConfigurationFunction · 0.70

Calls 4

CKCU_USBPLLInitFunction · 0.50
CKCU_USBPLLCmdFunction · 0.50
CKCU_GetClockReadyStatusFunction · 0.50
CKCU_USBClockConfigFunction · 0.50

Tested by

no test coverage detected