Teensy v3.6: need help with RTC
Hi guys,
I've connected the 3.3V coin battery to my Teensy v3.6 and I've also added on the setup() function the setSyncProvider(getTeensy3Time); call.
I'v added these 2 new function to my sketch:
time_t getTeensy3Time()
{
return Teensy3Clock.get();
}
void rtc_seconds_isr() {
// do nothing
}
Is that all I need?
It seems to work fine but if I don;t use the board for some days the time is not correct.
I've checked the connection and the battery Voltage...
PS: I've also added this lines on my setup fotm MTP but not sure if could cause the isse:
RTC_IER |= 0x10; // Enable seconds IRQ from RTC peripheral
NVIC_ENABLE_IRQ(IRQ_RTC_SECOND); // Enable seconds IRS function in NVIC
Hi guys,
I've connected the 3.3V coin battery to my Teensy v3.6 and I've also added on the setup() function the setSyncProvider(getTeensy3Time); call.
I'v added these 2 new function to my sketch:
time_t getTeensy3Time()
{
return Teensy3Clock.get();
}
void rtc_seconds_isr() {
// do nothing
}
Is that all I need?
It seems to work fine but if I don;t use the board for some days the time is not correct.
I've checked the connection and the battery Voltage...
PS: I've also added this lines on my setup fotm MTP but not sure if could cause the isse:
RTC_IER |= 0x10; // Enable seconds IRQ from RTC peripheral
NVIC_ENABLE_IRQ(IRQ_RTC_SECOND); // Enable seconds IRS function in NVIC
Last edited: