External oscillator issue ( stm not booting)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 5:08 AM
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 :)
Solved! Go to Solution.
- Labels:
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 7:44 AM - edited ‎2024-06-27 7:45 AM
> 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?
- Please post an update with details once you've solved your issue. Your experience may help others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 5:22 AM
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 ?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 5:22 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 6:13 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 7:44 AM - edited ‎2024-06-27 7:45 AM
> 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?
- Please post an update with details once you've solved your issue. Your experience may help others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-28 1:43 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-28 1:44 AM
Thankyou for the response. The issue is with the oscillator only, I chose the wrong one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-28 2:13 AM
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:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-28 2:18 AM
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?
