cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_RCCEx_PeriphCLKConfig() failed on USB clock source config

Dick Lin
Senior
Posted on May 29, 2018 at 19:11

Hi,

I am seeing the SystemClock_Config() function failed due to 

HAL_RCCEx_PeriphCLKConfig() USB clock source config failed. I am just updated to Cube V4.25.1 for STM32L496 Nucleo-144.

Any thoughts on what might caused the issue? I believe my Cube V4.25.0 cause same problem too.

Thanks,

Dick

main()

{

...

SystemClock_Config();

}

stm32l4xx_hal_rcc_ex.c::HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)

{

//#if defined(USB_OTG_FS) || defined(USB)

//

// /*-------------------------- USB clock source configuration ----------------------*/

// if(((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB))

// {

// assert_param(IS_RCC_USBCLKSOURCE(PeriphClkInit->UsbClockSelection));

// __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection);

//

// if(PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLL)

// {

// /* Enable PLL48M1CLK output */

// __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_48M1CLK);

// }

// else

// {

// if(PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLLSAI1)

// {

// /* PLLSAI1 input clock, parameters M, N & Q configuration and clock output (PLLSAI1ClockOut) */

// ret = RCCEx_PLLSAI1_Config(&(PeriphClkInit->PLLSAI1), DIVIDER_Q_UPDATE);

//

// if(ret != HAL_OK)

// {

// /* set overall return value */

// status = ret;

// }

// }

// }

// }

//

//#endif /* USB_OTG_FS || USB */

}

1 REPLY 1
Imen.D
ST Employee
Posted on May 31, 2018 at 12:38

Hello,

Could you please share your ioc file.

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen