Skip to main content
Graduate II
August 30, 2025
Solved

HAL_Error at HAL_RCC_OscConfig in STM32N6570-DK board

  • August 30, 2025
  • 3 replies
  • 286 views

Hi everyone,

I am currently running the DCMIPP_Continuous mode example from STM32N6Cube firmware v1.2.0. However, I am getting stuck at the function call:
HAL_result = HAL_RCC_OscConfig(&RCC_OscInitStruct);

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_NONE;
 RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_ON;
 RCC_OscInitStruct.PLL1.PLLSource = RCC_PLLSOURCE_HSI;
 RCC_OscInitStruct.PLL1.PLLM = 4;
 RCC_OscInitStruct.PLL1.PLLN = 75;
 RCC_OscInitStruct.PLL1.PLLFractional = 0;
 RCC_OscInitStruct.PLL1.PLLP1 = 1;
 RCC_OscInitStruct.PLL1.PLLP2 = 1;
 RCC_OscInitStruct.PLL2.PLLState = RCC_PLL_NONE;
 RCC_OscInitStruct.PLL3.PLLState = RCC_PLL_NONE;
 RCC_OscInitStruct.PLL4.PLLState = RCC_PLL_NONE;
 HAL_StatusTypeDef HAL_result; // Have a variable to catch the result

 HAL_result = HAL_RCC_OscConfig(&RCC_OscInitStruct); // Catch the result
 if (HAL_result != HAL_OK)
 {
 Error_Handler();
 }

After some debugging, I found that the function returns HAL_ERROR. Earlier, this code was working fine, but now it consistently fails at this point.

Could anyone please guide me on how to proceed with this issue?

Thanks in advance!

 

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

    Solution - 
    Even I am not sure about this but apparently when my default IMX335 camera is connected (just cable attached) to the board it doesn't configure the clock. After removing it, it works properly.
    Strangely (while camera attached) even LED blink example doesn't run even though the camera is not being configured.

    3 replies

    Super User
    August 30, 2025

    Hi,

    (I dont have an N6 , but ..)

    OscillatorType = RCC_OSCILLATORTYPE_NONE;

    this is correct ? type none ?

    Technical Moderator
    September 2, 2025

    @athern27 wrote:

    Earlier, this code was working fine, but now it consistently fails at this point.


    You mean it was working in previous version? 

    athern27AuthorAnswer
    Graduate II
    November 15, 2025

    Solution - 
    Even I am not sure about this but apparently when my default IMX335 camera is connected (just cable attached) to the board it doesn't configure the clock. After removing it, it works properly.
    Strangely (while camera attached) even LED blink example doesn't run even though the camera is not being configured.