2019-04-19 01:54 AM
I just made a clock with 7-seg display and Stm32f030f4p6. Firstly i used 3.2768 HSE(high package) and 2x22pF caps. That's annoying, but uC randomly stucks displaying one digit(display is multiplexed, So whole uC is stopping). I was trying 1.5pF but then it stucks when i touching lines. Then, i changed HSE from 3.2768MHz(its too low for this uC) to 18.432MHz and cutted HSE lines to about 1cm(cant place it closer), added Second capacitors, So now i have 2x44pF. But it still freezing, about 3-4 Times per Day. Often if freezes when i connecting Tp4056 to charge battery.
Boot0 and nrst is pulled. Supply is filtered by two 100nF caps, one after voltage stabiliser, and one directly before uC pins.
1 resonator lines
2, 3 resonator caps(2x 22pF/line)
4 supply filter, 100nF
5 line stabiliser
6 display
2019-04-29 02:16 AM
There are good explanations about good oscillators practices in AN2687.