This document gives an example of the usage of the CPU Cycle counter. The cycle counter is a COUNT register, that increments once every clock. The count register can be used together with the COMPARE register to create a timer with interrupt functionality. The COMPARE register holds a value that the COUNT register is compared against. When the COMPARE and COUNT registers match, a compare interrupt request is generated and COUNT is reset to 0.
This example shows how to use the COUNT register together with the COMPARE register to generate an interrupt periodically. Here is the operating mode of the example:
This software was written for the GNU GCC for AVR32.
This example has been tested with the following configuration:
For further information, visit Atmel AVR32.
Support and FAQ: https://www.microchip.com/support/