Microchip® Advanced Software Framework

pevc_example1.c File Reference
#include <avr32/io.h>
#include "board.h"
#include "intc.h"
#include "power_clocks_lib.h"
#include "pevc.h"
#include "gpio.h"
#include "usart.h"
#include "print_funcs.h"
#include "pdca.h"
#include "ast.h"
#include "delay.h"
#include "conf_clock.h"

Macros

#define PDCA_CHANNEL_IRQ   AVR32_PDCA_IRQ_0
 
#define PDCA_CHANNEL_USART   0
 
#define PEVC_PDCA_SOT_USER   AVR32_PEVC_ID_USER_PDCA_0
 
String transfer size
#define STRING_TRANSFER_SIZE   36
 

Functions

void init_ast (void)
 AST Init. More...
 
void init_pdca (void)
 PDCA Init. More...
 
void init_pevc (void)
 PEVC Init. More...
 
void init_usart (void)
 USART init. More...
 
int main (void)
 This example show a DMA transfer to USART controlled by the AST periodic alarm using the PEVC. More...
 
static void pdca_int_handler (void)
 PDCA Interrupts handler. More...
 

Variables

unsigned char aDataTransfered [STRING_TRANSFER_SIZE]
 
volatile avr32_pdca_channel_t * pdca_channel
 
volatile avr32_pm_t * pm = &AVR32_PM
 
volatile avr32_pevc_t * ppevc = &AVR32_PEVC
 
static volatile U32 u32PdcaIsr
 

#define PDCA_CHANNEL_IRQ   AVR32_PDCA_IRQ_0

Referenced by init_pdca().

#define PDCA_CHANNEL_USART   0

Referenced by init_pdca(), and pdca_int_handler().

#define PEVC_PDCA_SOT_USER   AVR32_PEVC_ID_USER_PDCA_0

Referenced by init_pdca(), and init_pevc().

#define STRING_TRANSFER_SIZE   36

void init_usart ( void  )

USART init.

References FCPU_HZ, init_dbg_rs232(), and print_dbg().

int main ( void  )

This example show a DMA transfer to USART controlled by the AST periodic alarm using the PEVC.

References aDataTransfered, delay_ms, gpio_clr_gpio_pin(), gpio_tgl_gpio_pin(), i, init_ast(), init_pdca(), init_pevc(), init_sys_clocks(), and init_usart().

static void pdca_int_handler ( void  )
static

PDCA Interrupts handler.

References aDataTransfered, pdca_channel, PDCA_CHANNEL_USART, pdca_reload_channel(), print_dbg(), and u32PdcaIsr.

Referenced by init_pdca().

unsigned char aDataTransfered[STRING_TRANSFER_SIZE]
volatile avr32_pdca_channel_t* pdca_channel
volatile avr32_pm_t* pm = &AVR32_PM
volatile avr32_pevc_t* ppevc = &AVR32_PEVC
volatile U32 u32PdcaIsr
static

Referenced by pdca_int_handler().