#include <string.h>
#include "board.h"
#include "print_funcs.h"
#include "gpio.h"
#include "pm.h"
#include "intc.h"
#include "usart.h"
#include "aes.h"
Macros | |
#define | DMACA_AES_EVAL_BUF_SIZE 256 |
#define | DMACA_AES_EVAL_REFBUF_SIZE 16 |
Board-Related Example Settings | |
#define | DMACA_AES_EVAL_USART (&AVR32_USART1) |
#define | DMACA_AES_EVAL_USART_RX_PIN AVR32_USART1_RXD_0_0_PIN |
#define | DMACA_AES_EVAL_USART_RX_FUNCTION AVR32_USART1_RXD_0_0_FUNCTION |
#define | DMACA_AES_EVAL_USART_TX_PIN AVR32_USART1_TXD_0_0_PIN |
#define | DMACA_AES_EVAL_USART_TX_FUNCTION AVR32_USART1_TXD_0_0_FUNCTION |
#define | DMACA_AES_EVAL_USART_BAUDRATE 57600 |
#define | DMACA_AES_EVAL_LED1 LED0_GPIO |
#define | DMACA_AES_EVAL_LED2 LED1_GPIO |
#define | DMACA_AES_EVAL_LED3 LED2_GPIO |
Functions | |
static void | init_hmatrix (void) |
Initializes the HSB bus matrix. More... | |
int | main (void) |
The main function. More... | |
void | test_ram_aes_ram (unsigned short int u16BufferSize, unsigned int *pSrcBuf, unsigned int *pDstBuf) |
1) Configure two DMACA channels: More... | |
Variables | |
volatile unsigned int | ccountt0 |
volatile unsigned int | ccountt1 |
const unsigned int | CipherKey [8] |
const unsigned int | InitVector [4] |
unsigned int | InputData [DMACA_AES_EVAL_BUF_SIZE] |
volatile unsigned int | OutputData [DMACA_AES_EVAL_BUF_SIZE] |
volatile unsigned int * | pDstData_HsbSram |
pm_freq_param_t | pm_freq_param |
unsigned int * | pSrcData_HsbSram |
const unsigned int | RefInputData [DMACA_AES_EVAL_REFBUF_SIZE] |
const unsigned int | RefOutputData [DMACA_AES_EVAL_REFBUF_SIZE] |
#define DMACA_AES_EVAL_BUF_SIZE 256 |
Referenced by main().
#define DMACA_AES_EVAL_REFBUF_SIZE 16 |
Referenced by main(), and test_ram_aes_ram().
#define DMACA_AES_EVAL_USART (&AVR32_USART1) |
Referenced by main(), and test_ram_aes_ram().
#define DMACA_AES_EVAL_USART_BAUDRATE 57600 |
Referenced by main().
#define DMACA_AES_EVAL_USART_RX_FUNCTION AVR32_USART1_RXD_0_0_FUNCTION |
Referenced by main().
#define DMACA_AES_EVAL_USART_RX_PIN AVR32_USART1_RXD_0_0_PIN |
Referenced by main().
#define DMACA_AES_EVAL_USART_TX_FUNCTION AVR32_USART1_TXD_0_0_FUNCTION |
Referenced by main().
#define DMACA_AES_EVAL_USART_TX_PIN AVR32_USART1_TXD_0_0_PIN |
Referenced by main().
|
static |
Initializes the HSB bus matrix.
Referenced by main().
int main | ( | void | ) |
The main function.
References AES_CBC_MODE, aes_configure(), AES_KEY_SIZE_256, AES_PMODE_CIPHER, AES_START_MODE_DMA, usart_options_t::baudrate, aes_config_t::CFBSize, aes_config_t::CounterMeasureMask, DMACA_AES_EVAL_BUF_SIZE, DMACA_AES_EVAL_LED1, DMACA_AES_EVAL_LED2, DMACA_AES_EVAL_LED3, DMACA_AES_EVAL_REFBUF_SIZE, DMACA_AES_EVAL_USART, DMACA_AES_EVAL_USART_BAUDRATE, DMACA_AES_EVAL_USART_RX_FUNCTION, DMACA_AES_EVAL_USART_RX_PIN, DMACA_AES_EVAL_USART_TX_FUNCTION, DMACA_AES_EVAL_USART_TX_PIN, gpio_clr_gpio_pin(), gpio_enable_module(), init_hmatrix(), InputData, aes_config_t::KeySize, aes_config_t::LodMode, aes_config_t::OpMode, OutputData, pDstData_HsbSram, pm_configure_clocks(), PM_FREQ_STATUS_FAIL, print(), print_ulong(), aes_config_t::ProcessingDelay, aes_config_t::ProcessingMode, pSrcData_HsbSram, RefInputData, SLEEP, aes_config_t::StartMode, test_ram_aes_ram(), USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, and USART_NORMAL_CHMODE.
void test_ram_aes_ram | ( | unsigned short int | u16BufferSize, |
unsigned int * | pSrcBuf, | ||
unsigned int * | pDstBuf | ||
) |
1) Configure two DMACA channels:
References aes_set_initvector(), aes_set_key(), ccountt0, ccountt1, CipherKey, DMACA_AES_EVAL_REFBUF_SIZE, DMACA_AES_EVAL_USART, Get_system_register, InitVector, OutputData, print(), print_ulong(), and RefOutputData.
Referenced by main().
volatile unsigned int ccountt0 |
Referenced by test_ram_aes_ram().
volatile unsigned int ccountt1 |
Referenced by test_ram_aes_ram().
const unsigned int CipherKey[8] |
Referenced by test_ram_aes_ram().
const unsigned int InitVector[4] |
Referenced by test_ram_aes_ram().
unsigned int InputData[DMACA_AES_EVAL_BUF_SIZE] |
Referenced by main().
volatile unsigned int OutputData[DMACA_AES_EVAL_BUF_SIZE] |
Referenced by main(), and test_ram_aes_ram().
volatile unsigned int* pDstData_HsbSram |
Referenced by main().
pm_freq_param_t pm_freq_param |
unsigned int* pSrcData_HsbSram |
Referenced by main().
const unsigned int RefInputData[DMACA_AES_EVAL_REFBUF_SIZE] |
Referenced by main().
const unsigned int RefOutputData[DMACA_AES_EVAL_REFBUF_SIZE] |
Referenced by test_ram_aes_ram().