cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_RCC_OscConfig

willow
Associate III

Hello everyone, 

I am configuring an STM32F401RE and its RTC on the STM32CubeIDE software

I've written an program that debug without errors. But ErrorHandler() is called during the RCC Oscillators initialization (during the "SystemClock_Config(void)" process).

 

I think i'have followed the steps and the right parameters, but would you have a clue of where could it be from ? Let me know if you need additional pictores of the system configuration of the .ioc file maybe

 

 

 

 

 

 

/** Initializes the RCC Oscillators according to the specified parameters

 * in the RCC_OscInitTypeDef structure.

 */

 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSE;

 RCC_OscInitStruct.LSEState = RCC_LSE_ON;

 RCC_OscInitStruct.HSIState = RCC_HSI_ON;

 RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;

 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;

 RCC_OscInitStruct.PLL.PLLM = 16;

 RCC_OscInitStruct.PLL.PLLN = 336;

 RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;

 RCC_OscInitStruct.PLL.PLLQ = 7;



if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

 {

 Error_Handler(); //the call of ErrorHandler() happens here

 }

 

 

 

willow_0-1715762138855.png

willow_1-1715762168200.png

willow_0-1715762228368.png

 

 

13 REPLIES 13

@willow wrote:

it has previous user and uses  


So a previous user might have modifies and/or broken it ...

 


@willow wrote:

but always for my project purpose 


So is this a school class/lab setup?

If so, get your teacher/supervisor to check the board and your work ...

 

willow_1-1715776685141.png

 

And of course i have a screen that is meant to display the hour, but this one is only displaying black squares, i suppose this is related

 

I am currently working in a company and this is a test borad we have to try all the programs before implent them IRL, so I don't have any teacher or supervisor to check on me :(

Do you not have colleagues who could help?