2024-08-15 08:42 AM - last edited on 2024-08-15 11:44 AM by STOne-32
I'm new to STM32. I made a custom board using STM32H7S3V8T6, but I think the HSE OSC configuration is failing.
If I build main.c in (in Boot, not Appli), if (HAL_RCC_OscConfig(&RCC_OscInitStructure)!= HAL_OK) This part doesn't make HAL_OK, so this goes to Error_Handler.
I don't know if the hardware configuration is wrong or if there's a problem with the software.
Any help would be greatly appreciated.
(X322524MOB4SI)
2024-08-15 08:57 AM
Having the trace snake around like that is really not ideal and could be the source of your problem.
You should be able to route OSC_IN and OSC_OUT directly from the pins, with short traces, and no vias. Better to have the vias on grounds than those signals.
Are the load caps proper values? What are they? Should be in the 16 pF region.
See here for oscillator design guidelines:
cd00221665-oscillator-design-guide-for-stm8af-al-s-stm32-mcus-and-mpus-stmicroelectronics.pdf
2024-08-15 09:45 AM
So are you saying it doesn't work because of that trace placement? Is there any possibility of a software problem? The capacitors are 10pF each.
2024-08-15 10:23 AM
> So are you saying it doesn't work because of that trace placement?
That is a possibility.
> Is there any possibility of a software problem?
There is always a possibility of a software problem. But in this case, a hardware problem seems much more likely. The code you've presented looks fine.
Perhaps try with higher value load caps. Could also be a soldering issue.
Would have been easy to route OSC_IN directly to the pin and still maintain the GND plane around the outside.