This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the TC driver.
It also gives an example of the usage of the TC module.
This example will start a timer/counter and generates "tick" interrupts.
The selected timer input clock is the internal clock labelled TC3 referred to as TIMER_CLOCK3 in the datasheet. TIMER_CLOCK3 is connected to fPBA / 8 (see datasheet).
The 16-bit timer/counter channel will cycle from 0x0000 to RC. RC is initialized to (fPBA / 8) / 100, so that an interrupt will be triggered every 10 ms. Upon interrupt, a GPIO line is toggled thus producing a square signal of frequency 50 Hz.
This software was written for the GCC compiler for AVR32
All AVR32 devices with a TC module supported in AVR Studio 5 Simulator can be used. This example has been tested with the following board:
This example has been tested with the following configuration:
For further information, visit Atmel AVR32.