Main application of SAM TCM Demo.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Macros | |
#define | BUFF_SIZE 0x1000 |
Support and FAQ: visit Microchip Support More... | |
#define | DTCM_STACK_BASE ((void *)(&_sdtcm_stack)) |
#define | DTCM_STACK_LIMIT ((void *)(&_edtcm_stack)) |
#define | GET_CYCLE_COUNTER(x) x=DWT->CYCCNT; |
#define | RESET_CYCLE_COUNTER() |
#define | SRAM_STACK_BASE ((void *)(&_sstack)) |
#define | SRAM_STACK_LIMIT ((void *)(&_estack)) |
Functions | |
static void | configure_console (void) |
Configure UART console. More... | |
int | main (void) |
Application entry point for TCM example. More... | |
static uint32_t | normal_memcpy (uint8_t *pDest, uint8_t *pSrc, uint16_t len) |
static uint32_t | recursive (uint32_t n) |
static uint32_t | stack_test (uint32_t n) |
static uint32_t | tcm_memcpy (uint8_t *pDest, uint8_t *pSrc, uint16_t len) |
static void | tcm_stackinit (void) |
Change stack's location to DTCM. More... | |
Variables | |
char | _edtcm_stack |
char | _estack |
char | _sdtcm_stack |
char | _sstack |
static uint32_t | cyclecounter |
uint8_t | destbuff [3 *BUFF_SIZE] |
const char * | pBuffer |
uint8_t | srcbuff [BUFF_SIZE] |
uint8_t | tcm_destbuff [3 *BUFF_SIZE] |
uint8_t | tcm_srcbuff [BUFF_SIZE] |
#define BUFF_SIZE 0x1000 |
Support and FAQ: visit Microchip Support
Referenced by iperf_tcp_task(), iperf_udp_send(), and main().
#define DTCM_STACK_BASE ((void *)(&_sdtcm_stack)) |
#define DTCM_STACK_LIMIT ((void *)(&_edtcm_stack)) |
Referenced by tcm_stackinit().
#define GET_CYCLE_COUNTER | ( | x | ) | x=DWT->CYCCNT; |
Referenced by normal_memcpy(), stack_test(), and tcm_memcpy().
#define RESET_CYCLE_COUNTER | ( | ) |
Referenced by main(), normal_memcpy(), stack_test(), and tcm_memcpy().
#define SRAM_STACK_BASE ((void *)(&_sstack)) |
Referenced by tcm_stackinit().
#define SRAM_STACK_LIMIT ((void *)(&_estack)) |
Referenced by tcm_stackinit().
|
static |
Configure UART console.
References uart_rs232_options::baudrate, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
int main | ( | void | ) |
Application entry point for TCM example.
References board_init(), BOARD_NAME, BUFF_SIZE, configure_console(), normal_memcpy(), RESET_CYCLE_COUNTER, stack_test(), sysclk_init(), tcm_memcpy(), and tcm_stackinit().
|
static |
References cyclecounter, GET_CYCLE_COUNTER, and RESET_CYCLE_COUNTER.
Referenced by main().
|
static |
Referenced by stack_test().
|
static |
References cyclecounter, GET_CYCLE_COUNTER, recursive(), and RESET_CYCLE_COUNTER.
Referenced by main().
|
static |
References cyclecounter, GET_CYCLE_COUNTER, and RESET_CYCLE_COUNTER.
Referenced by main().
|
static |
Change stack's location to DTCM.
The function changes the stack's location from SRAM to DTCM
References DTCM_STACK_LIMIT, SRAM_STACK_BASE, and SRAM_STACK_LIMIT.
Referenced by main().
char _edtcm_stack |
char _estack |
char _sdtcm_stack |
char _sstack |
|
static |
Referenced by normal_memcpy(), stack_test(), and tcm_memcpy().
uint8_t destbuff[3 *BUFF_SIZE] |
const char* pBuffer |
uint8_t srcbuff[BUFF_SIZE] |
uint8_t tcm_destbuff[3 *BUFF_SIZE] |
uint8_t tcm_srcbuff[BUFF_SIZE] |