Microchip® Advanced Software Framework

tc_event_example4_uc3l.c File Reference
#include <avr32/io.h>
#include "intc.h"
#include "compiler.h"
#include "board.h"
#include "power_clocks_lib.h"
#include "gpio.h"
#include "tc.h"

Macros

TC Channel Choice
#define EXAMPLE_TC   (&AVR32_TC0)
 
#define EXAMPLE_TC_CHANNEL   1
 
#define EXAMPLE_TC_IRQ_GROUP   AVR32_TC0_IRQ_GROUP
 
#define EXAMPLE_TC_IRQ   AVR32_TC0_IRQ1
 
#define EXAMPLE_EVENT_PIN   AVR32_PIN_PA11
 
#define EXAMPLE_TARGET_DFLL_FREQ_HZ   96000000
 
#define EXAMPLE_TARGET_MCUCLK_FREQ_HZ   12000000
 
#define EXAMPLE_TARGET_PBACLK_FREQ_HZ   12000000
 

Functions

static void init_tc_input (volatile avr32_tc_t *tc, unsigned int channel)
 Initializes the timer/counter capture. More...
 
int main (void)
 Main function: More...
 
static void tc_irq_handler (void)
 TC interrupt handler. More...
 

Variables

static volatile int chan_status = 0
 
Parameters to pcl_configure_clocks().
static scif_gclk_opt_t gc_dfllif_ref_opt = { SCIF_GCCTRL_SLOWCLOCK, 0, false }
 
static pcl_freq_param_t pcl_dfll_freq_param
 

#define EXAMPLE_EVENT_PIN   AVR32_PIN_PA11

Referenced by main().

#define EXAMPLE_TARGET_DFLL_FREQ_HZ   96000000
#define EXAMPLE_TARGET_MCUCLK_FREQ_HZ   12000000
#define EXAMPLE_TARGET_PBACLK_FREQ_HZ   12000000
#define EXAMPLE_TC   (&AVR32_TC0)

Referenced by main(), and tc_irq_handler().

#define EXAMPLE_TC_CHANNEL   1

Referenced by main(), and tc_irq_handler().

#define EXAMPLE_TC_IRQ   AVR32_TC0_IRQ1

Referenced by main().

#define EXAMPLE_TC_IRQ_GROUP   AVR32_TC0_IRQ_GROUP

static void init_tc_input ( volatile avr32_tc_t *  tc,
unsigned int  channel 
)
static
static void tc_irq_handler ( void  )
static

TC interrupt handler.

References chan_status, EXAMPLE_TC, EXAMPLE_TC_CHANNEL, gpio_tgl_gpio_pin(), and tc_read_sr().

Referenced by main().

volatile int chan_status = 0
static

Referenced by tc_irq_handler().

scif_gclk_opt_t gc_dfllif_ref_opt = { SCIF_GCCTRL_SLOWCLOCK, 0, false }
static
pcl_freq_param_t pcl_dfll_freq_param
static
Initial value:
=
{
.main_clk_src = PCL_MC_DFLL0,
.pextra_params = &gc_dfllif_ref_opt
}
#define EXAMPLE_TARGET_DFLL_FREQ_HZ
Definition: tc_event_example4_uc3l.c:118
Definition: power_clocks_lib.h:106
#define EXAMPLE_TARGET_PBACLK_FREQ_HZ
Definition: tc_event_example4_uc3l.c:120
#define EXAMPLE_TARGET_MCUCLK_FREQ_HZ
Definition: tc_event_example4_uc3l.c:119
static scif_gclk_opt_t gc_dfllif_ref_opt
Definition: tc_event_example4_uc3l.c:124

Referenced by main().