Trying to use START to generate a simple timer example. Struggling to get the timer ISR to fire slower than every 100mS for some reason. START only gives the Master Clock as a possible clock source for TCO, but the datasheet says PCK6 (or 5) can be used. Also not sure what START means when it asks you to enter "Lenth of one timer tick in uS". Does that mean "how many uS until you get an overflow, and then START calculates the value for the TC register? Looking at the code it generates, I also don't understand why it's using two different timer registers to hold values:
// <o> Length of one timer tick in uS <0-4294967295> // <id> timer_tick #ifndef CONF_TC0_TIMER_RC_TICK #define CONF_TC0_TIMER_RC_TICK 1000 #endif // </h> // <h> Event Control // <e> Event Output Enable // <id> timer_event_output_wave #ifndef CONF_TC0_EVENT_OUTPUT_WAVE #define CONF_TC0_EVENT_OUTPUT_WAVE 0 #endif // <o> Length of one timer RA tick in uS <0-4294967295> // <id> timer_ra_tick #ifndef CONF_TC0_TIMER_RA_TICK #define CONF_TC0_TIMER_RA_TICK 500 #endif //</e>
Are the timers on these parts much more confusing than an AVR part or is it just me?