STM32L4P5G-DK SystemClock_Config error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 2:57 AM
Hello,
I configured the STM32L4P5G-DK project with STM32CubeIDE according to the AN5050 for Octal-SPI PSRAM. At debugging state, the process was halt at SystemClock_Config. The infinite loop looks caused by while(READ_BIT(RCC->CR, RCC_CR_HSERDY) == 0U) after __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); step. The ioc file and main c-code is attached. Please help me to solve this issue.
Thanks.
Solved! Go to Solution.
- Labels:
-
STM32L4 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 6:57 AM
Disable HSE in the IOC file and regenerate code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 6:13 AM
> STM32L4P5G-DK
This board does not have an HSE crystal loaded. It is also disconnected from the 8 MHz clock signal from the ST-Link chip. So you can only use the internal HSI by default. Otherwise, you can bridge R49 and use the st-link clock, or load X3 and related caps/resistors to use the HSE crystal.
CubeMX really shouldn't be configuring X3 on this board by default, but it is, and this is the result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 6:54 AM
Hello @TDK ,
Thank you for the comment. Is it possible to avoid the problem with modifying the source code? If so, could you show me the code snippet for the change?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-20 6:57 AM
Disable HSE in the IOC file and regenerate code.
