My NIXIE clocks have an on-board GPS receiver and I set the DS3232 to generate a 1 PPS output. On power-up I sanity check the internal registers and if it looks good I
transfer the date and time to the uP memory. I pre-increment the internal time and at the PPS IRQ I update the display RAM from the internal register.
For GPS, I monitor the serial stream until I confirm a good lock and checksums. I then wait 20 seconds with no errors in the stream and then transfer the GPS time to the internal
RAM and switch the PPS interrupt from the RTC to GPS. I assume the GPS PPS is good and use my internal counters, monitor the GPS for bad packets only.
If there are too many bad packets, I revert to the RTC PPS.
When I determine that GPS time is valid, I write the GPS time to the RTC. Also twice a day I update the RTC from the GPS at the GPS PPS (sort of disciplined).
-Bill-