cancel
Showing results for 
Search instead for 
Did you mean: 

External oscillator issue ( stm not booting)

Jeeva
Associate II

Hello, 

I have designed my PCB with stm32f427VIT6 and a 24Mhz crystal oscillator. I was trying to upload and test the normal blink code and it's not working. If I disable the external clock, the LED works and does not work with an external clock. I am completely new to STM, I did not know exactly whether I messed up with the design or could not configure the clock properly. I am attaching the schematics of my connection and a screenshot of the clock configuration that I have tried. Kindly help me :) 

Jeeva_0-1719489952248.png

Jeeva_1-1719489972408.png

Jeeva_2-1719490012982.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
BarryWhit
Lead II

 I did not know exactly whether I messed up with the design

 

oscillator circuits are delicate and need to be layed out with care. Can you post a screenshot of how you laid out the crystal and capacitors in your PCB near the MCU chip? How did you choose the 8pf capacitors?

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.

View solution in original post

8 REPLIES 8

Have you tried using the debugger to see exactly where it fails with the external clock ?

When you used the internal clock, did you still have the SYSCLK at 180 MHz ?

Probably stuck and died in Error_Handler() perhaps have that flag one of your LEDs, or use the debugger.

Have code starting the HSE fail more elegantly when the crystal doesn't start.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Check the code in SystemClock_Config() using HAL_RCC_OscConfig(), perhaps add code to alternatively use HSI (16 MHz) + PLL to get the operational speed you want in case HSE fails to start.

Then debug the component choices / loading of the HSE, that precludes it starting, or start sufficiently quickly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BarryWhit
Lead II

 I did not know exactly whether I messed up with the design

 

oscillator circuits are delicate and need to be layed out with care. Can you post a screenshot of how you laid out the crystal and capacitors in your PCB near the MCU chip? How did you choose the 8pf capacitors?

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.

Hii.., Thank you for your reply. I have found the issue. the issue was with the oscillator only where I used the wrong one. the pinouts for the oscillator I used are different from the circuit I made. replacing the oscillator would solve the issue.

Jeeva_0-1719564158158.pngJeeva_1-1719564189213.png

 

Thankyou for the response. The issue is with the oscillator only, I chose the wrong one.

One of those is an actual, active oscillator;  the other is just a passive crystal !

The circuit you showed is designed for the passive crystal.

See:

https://community.st.com/t5/stm32-mcus-products/stm32f4-osc-problem/m-p/664136/highlight/true#M241592

 

Yes I am replacing the oscillator. but I have one more issue my Type C port is not getting detected. is this oscillator could be any reason for that?