G120: RTC not running

I assembled 2 custom boards with G120 modules.
The RTC does not run on both of them

The RTC runs on the very first board I assembled, meaning the code is correct.

Can someone please guide me on what I am missing, that would make the RTC not run.

I assume you have tried basic stuff like:-

RTC Battery Pin Voltage?
32KHz Crystal correct with correct capacitors?
Checked the Crystal is oscillating with an oscilloscope?

Thanks hagster

I checked again and it is all wired correctly.

Under what case does the RTC not run.
It stays at time 1/1/1970.

Do I even need the xtal and battery to make clock run

The xtal will run if you have normal main power supplied to the processor.

The RTC will only be set when you set it. If you don’t set it, you’ll still see the firmware default time.

If you want the RTC to maintain the RTC set time, you need VBAT.

@ Brett -
I have more issues
I have assembled 10 board. Some of the them the clock works
Some of them if I touch the xtal pin it starts running.
I have no idea what is going on.

Any help is appreciated.

touching a track is a sure sign that the way you have a solder reflow issue or the board laid out is causing issues - is this based on a reference design from GHI? How far are the capacitors to the G120 RTC pads ? Can you check everything is soldered correctly ?

Sounds like the wrong value on the load caps…

Can you show from your CAD software just the area on the PCB where you laid out the xtal and caps for the RTC pins? It sounds like either a layout issue or wrong value of caps and or crystal. What value of caps did you use and what does the crystal expect?

it is 18pf.

It does the same thing even if I remove both the caps.

CAD drawing attached

I have tried everything
changed the caps with new cap and new xtal.

What ever I do it does not work.
But on the working board, all these components works.

I doubt the G120 modules. Any thoughts?

When you say “18pF”, do you mean the crystal needs 18pF load capacitance? If so, what value capacitors are you using? For 18pF load capacitance and 5pF stray capacitance your caps should be about 26pF.

Adding a feedback resistor might help, there is a good document here:

@ microt -

Can you please try a small code, and post it here?
What version are you using, please?

Everything can be happened, but in fact I haven’t seen any RTC problem on G120 while it happens on your 2 boards, so I doubt something else.

I think it is a flux issue…

I cleaned the board and got one board working…