Skip to main content
Visitor II
January 23, 2025
Solved

Problem with PLL while using STM32MP157A engineering mode

  • January 23, 2025
  • 2 replies
  • 1398 views

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

 

    This topic has been closed for replies.
    Best answer by Orez

    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

    2 replies

    OrezAuthor
    Visitor II
    January 23, 2025

    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.

     

    OrezAuthorAnswer
    Visitor II
    January 23, 2025

    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