These constants should not be modified by user.
Macros | |
#define | CLASSB_TC_COUNT_REF |
TC count reference. More... | |
#define | CLASSB_TC_FREQ (uint32_t)(F_CPU / CLASSB_TC_PRESCALER) |
TC frequency. More... | |
#define | CLASSB_TC_MAX_DIFF |
Maximum absolute difference between reference and estimated frequency. More... | |
#define | CLASSB_TC_MAX_OVF_COUNT |
TC maximum number of overflows. More... | |
#define | CLASSB_TC_PER 0xFFFF |
TC period. More... | |
#define | CLASSB_TC_PRESCALER_gc LABEL(TC_CLKSEL_DIV, CLASSB_TC_PRESCALER, _gc) |
Label for the TC prescaler group configuration. More... | |
#define | CLASSB_TEST_TC LABEL(TC, CLASSB_TC_MOD,) |
Label for the TC module. More... | |
#define | CLASSB_TEST_TC_OVF_vect LABEL(TC, CLASSB_TC_MOD, _OVF_vect) |
Label for the overflow interrupt vector for the chosen TC. More... | |
#define CLASSB_TC_COUNT_REF |
TC count reference.
This is the reference value for TC count within one RTC interrupt period. Reference = F_tc * Interrupt_Period_rtc / F_rtc This can overflow if CLASSB_TC_FREQ and CLASSB_RTC_INT_PERIOD are too large.
Referenced by classb_freq_callback().
#define CLASSB_TC_FREQ (uint32_t)(F_CPU / CLASSB_TC_PRESCALER) |
TC frequency.
The frequency of the TC is F_CPU divided by the prescaling factor.
#define CLASSB_TC_MAX_DIFF |
Maximum absolute difference between reference and estimated frequency.
Referenced by classb_freq_callback().
#define CLASSB_TC_MAX_OVF_COUNT |
TC maximum number of overflows.
This is a limit for the number of TC overflows. If this is exceeded, the RTC is assumed to be faulty and the error handler called.
Referenced by classb_freq_tc_callback().
#define CLASSB_TC_PER 0xFFFF |
TC period.
The 16-bit TC will generate an interrupt when the count reaches this value. The code is built counting that this is the largest possible value, i.e., 0xFFFF.
Referenced by classb_freq_setup_timer().
#define CLASSB_TC_PRESCALER_gc LABEL(TC_CLKSEL_DIV, CLASSB_TC_PRESCALER, _gc) |
Label for the TC prescaler group configuration.
Referenced by classb_freq_setup_timer().
#define CLASSB_TEST_TC LABEL(TC, CLASSB_TC_MOD,) |
Label for the TC module.
Referenced by classb_freq_callback(), and classb_freq_setup_timer().
#define CLASSB_TEST_TC_OVF_vect LABEL(TC, CLASSB_TC_MOD, _OVF_vect) |
Label for the overflow interrupt vector for the chosen TC.