Skip to main content
Senior
August 30, 2025
Solved

HAL_Error at HAL_RCC_OscConfig in STM32N6570-DK board

  • August 30, 2025
  • 3 replies
  • 287 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!

 

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

AScha.3
Super User
August 30, 2025

Hi,

(I dont have an N6 , but ..)

OscillatorType = RCC_OSCILLATORTYPE_NONE;

this is correct ? type none ?

"If you feel a post has answered your question, please click ""Accept as Solution""."
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? 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question.Saket_Om"
athern27AuthorBest answer
Senior
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.