AnsweredAssumed Answered

HAL_RCCEx_PeriphCLKConfig() failed on USB clock source config

Question asked by Dick Lin on May 29, 2018
Latest reply on May 31, 2018 by Imen D

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,

****

 

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 */

}

Outcomes