Not sure if this will work but this is what I can find.I have seen references in the forum to the ability to trim the RTC oscillator via SW registers, but can't find specifically how to do this - please help...
Thanks,
Chuck Geber
void adjustRTCTrim(int8_t coarseTrim, int8_t fineTrim)
{
// Disable the RTC before making adjustments
RTC_CR &= ~RTC_CR_OSCE; // Clear the RTC oscillator enable bit
// Set the coarse and fine adjustments in the RTC_TCR register
RTC_TCR = (coarseTrim << 8) | fineTrim;
// Re-enable the RTC oscillator
RTC_CR |= RTC_CR_OSCE;
}
void setup() {
int8_t coarseTrim = 0; // Coarse trim adjustment
int8_t fineTrim = 0; // Fine trim adjustment
adjustRTCTrim(coarseTrim, fineTrim);
}