Microchip® Advanced Software Framework

conf_test.h File Reference

Unit test configuration.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <ebi.h>
#include <ebi_port.h>
#include <string.h>
#include <sysclk.h>

Macros

Debug output configuration
#define CONF_TEST_USART   &USARTD0
 USART to redirect STDIO to. More...
 
#define CONF_TEST_BAUDRATE   38400
 Baudrate of USART. More...
 
#define CONF_TEST_CHARLENGTH   USART_CHSIZE_8BIT_gc
 Character length (bits) of USART. More...
 
#define CONF_TEST_PARITY   USART_PMODE_DISABLED_gc
 Parity mode of USART. More...
 
#define CONF_TEST_STOPBITS   false
 Stopbit configuration of USART. More...
 
Test configuration
#define CONF_TEST_RAM_BASE   0x800000UL
 Base address of RAM to test. More...
 
#define CONF_TEST_RAM_SIZE   0x20000UL
 Size of RAM to test. More...
 

Functions

static void ebi_sram_init (void)
 Initialize the EBI for on-board SRAM. More...
 

#define CONF_TEST_BAUDRATE   38400

Baudrate of USART.

Note
38.4 kbaud

Referenced by main().

#define CONF_TEST_CHARLENGTH   USART_CHSIZE_8BIT_gc

Character length (bits) of USART.

Note
8-bit character length

Referenced by main().

#define CONF_TEST_PARITY   USART_PMODE_DISABLED_gc

Parity mode of USART.

Note
No parity check

Referenced by main().

#define CONF_TEST_RAM_BASE   0x800000UL

Base address of RAM to test.

Note
The EBI is set up so that external RAM starts at 0x800000.

Referenced by ebi_sram_init().

#define CONF_TEST_RAM_SIZE   0x20000UL

Size of RAM to test.

Note
The external SRAM device is a CY7C1019DV-3310VXI of size 128 kB.
#define CONF_TEST_STOPBITS   false

Stopbit configuration of USART.

Note
No extra stopbit, i.e., use 1

Referenced by main().

#define CONF_TEST_USART   &USARTD0

USART to redirect STDIO to.

Note
USART0 on PORTD (RX on PD2, TX on PD3)

Referenced by main().

static void ebi_sram_init ( void  )
static

Initialize the EBI for on-board SRAM.

This function initializes the EBI according to the parameters specific to the on-board SRAM chip(s). It is defined in conf_test.h.

References CONF_TEST_RAM_BASE, EBI_CS_ASPACE_128KB_gc, ebi_cs_set_address_size(), ebi_cs_set_base_address(), ebi_cs_set_mode(), ebi_cs_set_sram_wait_states(), ebi_cs_write_config(), ebi_enable_cs(), EBI_PORT_3PORT, EBI_PORT_CS0, EBI_PORT_SRAM, and ebi_setup_port().

Referenced by main().