cancel
Showing results for 
Search instead for 
Did you mean: 

Unstable output signal on RTC out pin (512 Hz)

amion
Associate

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.

ezgif-3-4415373aa1.gif

 

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

11 REPLIES 11

It could be something related to the crystal pullability.

Look at the section 3.7 Crystal pullability

SofLit_0-1726562822258.png

Also I recommend you to use one of ST boards for example NUCLEO-G031K8 it has an external 32KHz crystal on it:

SofLit_0-1726563286008.png

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

> 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:

waclawekjan_0-1726569870604.png

JW