Microchip® Advanced Software Framework

tc_example2.c File Reference
#include <avr32/io.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_TC1)
 
#define EXAMPLE_TC_OUTPUT_PIN   AVR32_TC1_A0_0_1_PIN
 
#define EXAMPLE_TC_OUTPUT_FUNCTION   AVR32_TC1_A0_0_1_FUNCTION
 
#define EXAMPLE_TC_INPUT_PIN   AVR32_TC1_A1_0_1_PIN
 
#define EXAMPLE_TC_INPUT_FUNCTION   AVR32_TC1_A1_0_1_FUNCTION
 
#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...
 
static void init_tc_output (volatile avr32_tc_t *tc, unsigned int channel)
 Initializes the timer/counter waveform. More...
 
int main (void)
 Main function. Execution starts here. More...
 

Variables

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_TARGET_DFLL_FREQ_HZ   96000000
#define EXAMPLE_TARGET_MCUCLK_FREQ_HZ   12000000
#define EXAMPLE_TARGET_PBACLK_FREQ_HZ   12000000
#define EXAMPLE_TC   (&AVR32_TC1)

Referenced by main().

#define EXAMPLE_TC_INPUT_FUNCTION   AVR32_TC1_A1_0_1_FUNCTION

Referenced by main().

#define EXAMPLE_TC_INPUT_PIN   AVR32_TC1_A1_0_1_PIN

Referenced by main().

#define EXAMPLE_TC_OUTPUT_FUNCTION   AVR32_TC1_A0_0_1_FUNCTION

Referenced by main().

#define EXAMPLE_TC_OUTPUT_PIN   AVR32_TC1_A0_0_1_PIN

Referenced by main().

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

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
}
Definition: power_clocks_lib.h:106
#define EXAMPLE_TARGET_DFLL_FREQ_HZ
Definition: tc_example2.c:159
static scif_gclk_opt_t gc_dfllif_ref_opt
Definition: tc_example2.c:165
#define EXAMPLE_TARGET_MCUCLK_FREQ_HZ
Definition: tc_example2.c:160
#define EXAMPLE_TARGET_PBACLK_FREQ_HZ
Definition: tc_example2.c:161

Referenced by main().