Skip to main content
Dick Lin
Senior
May 29, 2018
Question

HAL_RCCEx_PeriphCLKConfig() failed on USB clock source config

  • May 29, 2018
  • 1 reply
  • 690 views
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 */

}

    This topic has been closed for replies.

    1 reply

    ST Technical Moderator
    May 31, 2018
    Posted on May 31, 2018 at 12:38

    Hello,

    Could you please share your ioc file.

    With Regards,

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks