I'm using RTC on Atmega4808 with this settings
RTC.CTRLA = RTC_PRESCALER_DIV1_gc /* 1 */ | 1 << RTC_RTCEN_bp /* Enable: enabled */ | 0 << RTC_RUNSTDBY_bp; /* Run In Standby: disabled */ RTC.CLKSEL = RTC_CLKSEL_INT1K_gc; /* 32KHz divided by 32 */ RTC.INTCTRL = 0 << RTC_CMP_bp /* Compare Match Interrupt enable: disabled */ | 1 << RTC_OVF_bp; /* Overflow Interrupt enable: enabled */
The OVF ISR will be called in each 1 ms or in each 65.535s? So with this setup PER=0. RTC will increment CNT at first or will check CNT and call ISR?