User manual

Atmel AT02657: XMEGA-E5 Xplained Software User Guide [APPLICATION NOTE]
42085AAVR04/2013
7
ASF module Folder location
NVM driver xmega/drivers/nvm/
PMIC driver xmega/drivers/pmic/
Sleep driver xmega/drivers/sleep/
ADC driver xmega/drivers/adc/
RTC driver xmega/drivers/rtc/
TC driver xmega/drivers/tc45/
QDec driver xmega/drivers/qdec/
USART-SPI driver xmega/drivers/usart/
2.2
CPU load task
The CPU load task monitors the CPU active time and CPU sleep time through a TC counter. The counter is saved and
reset when the CPU enters and exits of the sleep mode. Each 250ms, the ratio is displayed through a bargraph on the
OLED display. The implementation is available in app_cpu_load.c/.h files.
Figure 2-2. CPU load task behavior.
CPU load task TC Drivers
ISR
Main
CPU sleeps
Save TC counter
& Reset TC counter
ISR
CPU sleeps
Save TC counter
& Reset TC counter
Exit sleep mode
Exit sleep mode
Enter in sleep mode
cpu_load_task()
Each 250ms display CPU load