Hi @pieterbos
Based on your description, it strongly suggests a marginal oscillator startup issue—often caused by aging components, contamination, or environmental factors.
So i think you can try to Replace the Crystal and Check and Adjust Load Capacitors.
BR
Harry
Hi @pieterbos
You can try supplying an external 32.768 kHz signal (e.g. from a signal generator or test oscillator) to X1 to see if the system behaves correctly.
If the MCU starts reliably with this, the issue is almost certainly with the oscillator circuit.
If there is an issue with the oscillator circuit.
You can visual inspection under magnification for oxidation or corrosion around the crystal, capacitors, and oscillator pins (X1, X2).
Contaminants (e.g., flux residue) can create leakage paths or add parasitic capacitance.
BR
Harry
Hi Harry,
We tried but that did not solve the issue.
With external clock it works but also only the calbe and not clock it will startup correctly.
So it looks lijkt 1 pin needs a lot of capacitance / mass or somethine like that?
Hi @pieterbos
Yes,
Since touching or adding a cable helps:
Temporarily try adding small extra capacitance between OSC pins and GND ( e.g., 2pF, 4.7pF, 10pF).
Alternatively, add a high-value resistor across the crystal (some circuits benefit from this to kickstart oscillation).
BR
Harry
Hi @pieterbos
Based on previous information, the issue is almost certainly with the oscillator circuit.
If GND near the crystal is noisy or not low-impedance, oscillation can be disturbed.
Try probing VRTC and GND with oscilloscope during startup to ensure no glitch.
BR
Harry
Hi @pieterbos
If you're seeing 80 µV on your probe when checking the RTC crystal pin.
You're only seeing noise, and the RTC crystal oscillator is not starting up. This confirms the issue is in the oscillator startup conditions, not external interference.
BR
Harry
We found the problem, the PCBA maker did not was it properly and there was hidden flux and tin we could not see with the microscope. But after proper cleaning it works. Sorry for the trouble.