cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PLL while using STM32MP157A engineering mode

Orez
Associate II

There is a problem about PLL3 while using engineering mode on STM32MP157A-DK1 board. By STM32CubeMX, I configed the clock of M4 core, using PLL3P to get 209MHz, generated code, rebuild it and entered the debug mode. But it shut down and get into an Error. I debuged it bt step, found that it failed in the intial function HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct). When it get to configure PLL3, failed and enter the error. So what I missed? May someone can help me. Thanks!
屏幕截图 2025-01-23 102456.png

屏幕截图 2025-01-23 103533.png

屏幕截图 2025-01-23 102610.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Orez
Associate II

I found the reason. When using the stm32cubeMX, the generated code lost a rcc DeInit() function. In main.c, before SystemClock_Config(); Add HAL_RCC_DeInit(), and everything is good.

屏幕截图 2025-01-23 185003.png

View solution in original post

2 REPLIES 2
Orez
Associate II

Even using my own custom board with ST-LINK/V2, it encountered the same problem. And not only the max 209MHz, other frequences is failed. But using other clk sources(like HSI, CSI, HSE) is good. Only PLL3 will failed.

 

Orez
Associate II

I found the reason. When using the stm32cubeMX, the generated code lost a rcc DeInit() function. In main.c, before SystemClock_Config(); Add HAL_RCC_DeInit(), and everything is good.

屏幕截图 2025-01-23 185003.png