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   0x800000UL
 Size of RAM to test. More...
 
Convenience macros for EBI initialization
#define EBI_SDRAM_INITDLY   (100 * 2 * sysclk_get_per2_hz() / 1000000)
 SDRAM initialization delay in number of CLKper2 cycles (100 us) More...
 
#define EBI_SDRAM_REFRESH   (16 * 2 * sysclk_get_per2_hz() / 1000000)
 SDRAM refresh interval in number of CLKper2 cycles (16 us) More...
 

Functions

static void ebi_sdram_init (void)
 Initialize the EBI for on-board SDRAM. 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_sdram_init().

#define CONF_TEST_RAM_SIZE   0x800000UL

Size of RAM to test.

Note
The external SDRAM device on Xplain is of size 8 MB.
#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().

#define EBI_SDRAM_INITDLY   (100 * 2 * sysclk_get_per2_hz() / 1000000)

SDRAM initialization delay in number of CLKper2 cycles (100 us)

Referenced by ebi_sdram_init().

#define EBI_SDRAM_REFRESH   (16 * 2 * sysclk_get_per2_hz() / 1000000)

SDRAM refresh interval in number of CLKper2 cycles (16 us)

Referenced by ebi_sdram_init().