I want to try trimming the 32 MHz oscillator against GPS. No, it's not going to be as good as a GPSDO, but it's likely going to be better than the 32 kHz internal reference.
I've got TCC4+C5 set up as a 32 bit div1 counter and capture happening on the PPS pin. I expect the number of timer counts between adjacent PPS captures to be F_CPU. If it's low, I can nudge the frequency up, and if it's high, I can nudge it down. That's all I want to achieve here.
The question is what to do with the CALA and CALB registers. Do I increment or decrement one of them? Do I turn them both into a 13 value, increment or decrement that and then write it back out?