2024-09-16 01:18 AM - last edited on 2024-09-16 03:50 AM by SofLit
I am using stm32g030 RTC. for calibration I send RTC out frequency (512hz) on RTC output pin. when I see the signal on the oscilloscope, the output frequency is unstable. its pulse width are changing constantly and it is not showing me a pure 512hz. I want to use this signal for calibrating the crystal but my calibration fails since I get different frequency in each test.
I checked the same signal on ds1340, the signal is clear, same test on stm32f103vet6 evaluation board and the signal is ok. the only problem is with stm32g030... I ordered an evaluation board to check if the problem arose from my pcb. but same problem still exists.
Tests that I have done so far:
1-changig (from 5pf to 20pf) or removing capacitors of clock crystal.
2- cleaning board from any dust or soldering oil
3- using different supply or even RTC backup battery
4- using evaluation board instead of my own PCB
2024-09-17 01:47 AM - edited 2024-09-17 01:54 AM
It could be something related to the crystal pullability.
Look at the section 3.7 Crystal pullability
Also I recommend you to use one of ST boards for example NUCLEO-G031K8 it has an external 32KHz crystal on it:
2024-09-17 03:47 AM
> According to the video you shared, I can see only the falling edge moving not the rising one.
Not only that, but also that falling edge does not *move*, instead, it *jumps* a discrete time interval.
The 512Hz signal has cca 2ms period, there are 4 divisions per period so the oscilloscope is set to 500us/div (it's barely visible on the picture). Those falling edge jumps are what, one tenth of a division or slightly less? 1/32.768kHz=30us.
In other words, it appears, that the 512Hz circuit sometimes toggles at 32/32 and other times 31/33 cycles. It might've been interesting to capture a longer sequence e.g. using a LA with high enough and observe this, maybe there's some pattern.
Btw. closer reading of RM reveals this:
JW