cancel
Showing results for 
Search instead for 
Did you mean: 

Hello world project clock issue

RMais
Associate II

I have an STM32F415VG custom board with a 25MHz external oscillator.

I created an empty project with CubeMX setting the clock to use HSE+PLL to have 72MHz SYSCLK. Nothing else is enabled except the Serial Wire Debug port.

I import the project in KEIL, build and load it.

When I run it, the SystemClock_Config function crashes, loosing debuger connection.

I debugged the funcion and found out that the issue arises right after the instruction

    /* Enable the main PLL. */

    __HAL_RCC_PLL_ENABLE();

inside the HAL_RCC_OscConfig(&RCC_OscInitStruct) function.

What could be the issue? I neve experienced this.

N.B. We have previously used this board for another project and never had an issue like that, the clock config just worked.

4 REPLIES 4
TDK
Guru

Looks like a clock configuration issue.

Is HSE_VALUE set to 25000000?

Are wait states sufficient?

If you feel a post has answered your question, please click "Accept as Solution".
RMais
Associate II

Yes HSE is set to proper value. About wait states i'm using default value provided by CubeMX.

Javier1
Principal

This happened to me once when i forgot to put in place the external XTAL, and also remmember another time i placed the wrong capacitor value (100nF instead of 22pF)

Did you discarded damaged board?

we dont need to firmware by ourselves, lets talk

The board was just working as is with another software project.