Microchip® Advanced Software Framework

ram_to_ram_example.c File Reference
#include <string.h>
#include "compiler.h"
#include "board.h"
#include "print_funcs.h"
#include "gpio.h"
#include "pm.h"
#include "intc.h"
#include "usart.h"

Macros

#define DMACA_RAM2RAM_EVAL_BUF_SIZE   256
 
Board-Related Example Settings
#define DMACA_RAM2RAM_EVAL_USART   (&AVR32_USART1)
 
#define DMACA_RAM2RAM_EVAL_USART_RX_PIN   AVR32_USART1_RXD_0_0_PIN
 
#define DMACA_RAM2RAM_EVAL_USART_RX_FUNCTION   AVR32_USART1_RXD_0_0_FUNCTION
 
#define DMACA_RAM2RAM_EVAL_USART_TX_PIN   AVR32_USART1_TXD_0_0_PIN
 
#define DMACA_RAM2RAM_EVAL_USART_TX_FUNCTION   AVR32_USART1_TXD_0_0_FUNCTION
 
#define DMACA_RAM2RAM_EVAL_USART_BAUDRATE   57600
 
#define DMACA_RAM2RAM_EVAL_LED1   LED0_GPIO
 
#define DMACA_RAM2RAM_EVAL_LED2   LED1_GPIO
 
#define DMACA_RAM2RAM_EVAL_LED3   LED2_GPIO
 
#define DMACA_RAM2RAM_EVAL_LED4   LED3_GPIO
 

Functions

static void dmaca_error_int_handler (void)
 The DMACA Error interrupt handler. More...
 
static void dmaca_transfer_int_handler (void)
 The DMACA Transfer Complete interrupt handler. More...
 
static void init_hmatrix (void)
 Initializes the HSB bus matrix. More...
 
int main (void)
 The main function. More...
 
static void test_ram_to_ram (uint16_t u16BufferSize, volatile uint32_t *pSrcBuf, volatile uint32_t *pDstBuf)
 

Variables

volatile uint32_t dest_data_cpu_sram [DMACA_RAM2RAM_EVAL_BUF_SIZE]
 
volatile uint32_t * dest_data_hsb_sram_ptr
 
volatile uint32_t end_cycle_count
 
volatile uint32_t source_data_cpu_sram [DMACA_RAM2RAM_EVAL_BUF_SIZE]
 
volatile uint32_t * source_data_hsb_sram_ptr
 
volatile uint32_t start_cycle_count
 

#define DMACA_RAM2RAM_EVAL_BUF_SIZE   256

Referenced by main(), and test_ram_to_ram().

#define DMACA_RAM2RAM_EVAL_LED1   LED0_GPIO
#define DMACA_RAM2RAM_EVAL_LED2   LED1_GPIO

Referenced by dmaca_error_int_handler().

#define DMACA_RAM2RAM_EVAL_LED3   LED2_GPIO
#define DMACA_RAM2RAM_EVAL_LED4   LED3_GPIO

Referenced by dmaca_error_int_handler().

#define DMACA_RAM2RAM_EVAL_USART   (&AVR32_USART1)

Referenced by main(), and test_ram_to_ram().

#define DMACA_RAM2RAM_EVAL_USART_BAUDRATE   57600

Referenced by main().

#define DMACA_RAM2RAM_EVAL_USART_RX_FUNCTION   AVR32_USART1_RXD_0_0_FUNCTION

Referenced by main().

#define DMACA_RAM2RAM_EVAL_USART_RX_PIN   AVR32_USART1_RXD_0_0_PIN

Referenced by main().

#define DMACA_RAM2RAM_EVAL_USART_TX_FUNCTION   AVR32_USART1_TXD_0_0_FUNCTION

Referenced by main().

#define DMACA_RAM2RAM_EVAL_USART_TX_PIN   AVR32_USART1_TXD_0_0_PIN

Referenced by main().

static void dmaca_error_int_handler ( void  )
static

The DMACA Error interrupt handler.

Note
The `__attribute__((interrupt))' (under GNU GCC for AVR32) and `__interrupt' (under IAR Embedded Workbench for Atmel AVR32) C function attributes are used to manage the `rete' instruction.

References DMACA_RAM2RAM_EVAL_LED2, DMACA_RAM2RAM_EVAL_LED4, and gpio_clr_gpio_pin().

Referenced by main().

static void dmaca_transfer_int_handler ( void  )
static

The DMACA Transfer Complete interrupt handler.

Note
The `__attribute__((interrupt))' (under GNU GCC for AVR32) and `__interrupt' (under IAR Embedded Workbench for Atmel AVR32) C function attributes are used to manage the `rete' instruction.

References DMACA_RAM2RAM_EVAL_LED1, DMACA_RAM2RAM_EVAL_LED3, and gpio_clr_gpio_pin().

Referenced by main().

static void init_hmatrix ( void  )
static

Initializes the HSB bus matrix.

Referenced by board_init(), and main().

static void test_ram_to_ram ( uint16_t  u16BufferSize,
volatile uint32_t *  pSrcBuf,
volatile uint32_t *  pDstBuf 
)
static

volatile uint32_t dest_data_cpu_sram[DMACA_RAM2RAM_EVAL_BUF_SIZE]

Referenced by main().

volatile uint32_t* dest_data_hsb_sram_ptr

Referenced by main().

volatile uint32_t end_cycle_count

Referenced by test_ram_to_ram().

volatile uint32_t source_data_cpu_sram[DMACA_RAM2RAM_EVAL_BUF_SIZE]

Referenced by main().

volatile uint32_t* source_data_hsb_sram_ptr

Referenced by main().

volatile uint32_t start_cycle_count

Referenced by test_ram_to_ram().