SDRAMC on EBI example for SAM.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | SDRAMC_TEST_BUFF_SIZE (30 * 1024) |
SDRAM benchmark test size. More... | |
#define | SDRAMC_TEST_EVEN_TAG (0x55aaaa55) |
SDRAMC access test data in even address. More... | |
#define | SDRAMC_TEST_LENGTH (10 * 1024) |
SDRAMC access test length. More... | |
#define | SDRAMC_TEST_ODD_TAG (0xaa5555aa) |
SDRAMC access test data in odd address. More... | |
#define | SDRAMC_TEST_PAGE_NUM (1024) |
SDRAM benchmark test page number. More... | |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
Enumerations | |
enum | sdramc_status_t { SDRAMC_OK = 0, SDRAMC_TIMEOUT = 1, SDRAMC_ERROR = 2 } |
SDRAMC status. More... | |
Functions | |
static void | configure_console (void) |
Configure the console uart. More... | |
static uint32_t | get_delay_in_ticks (uint32_t ul_start_tick, uint32_t ul_end_tick) |
Get delayed number of ticks. More... | |
int | main (void) |
Application entry point for sdramc_example. More... | |
static uint8_t | sdram_access_test (void) |
Access test of the first 10K bytes of external SDRAM. More... | |
static uint32_t | sdram_benchmarks (void) |
SDRAM benchmark test. More... | |
void | SysTick_Handler (void) |
Systick handler to manage timestamp and delay. More... | |
static uint32_t | tick_get_count (void) |
Get current tick count (in ms). More... | |
Variables | |
static volatile uint16_t | gs_pus_mem_buff [SDRAMC_TEST_BUFF_SIZE] |
SDRAM benchmark buffer. More... | |
static volatile uint32_t | gs_ul_ms_ticks = 0 |
#define SDRAMC_TEST_BUFF_SIZE (30 * 1024) |
SDRAM benchmark test size.
Referenced by sdram_benchmarks().
#define SDRAMC_TEST_EVEN_TAG (0x55aaaa55) |
SDRAMC access test data in even address.
Referenced by sdram_access_test().
#define SDRAMC_TEST_LENGTH (10 * 1024) |
SDRAMC access test length.
Referenced by sdram_access_test().
#define SDRAMC_TEST_ODD_TAG (0xaa5555aa) |
SDRAMC access test data in odd address.
Referenced by sdram_access_test().
#define SDRAMC_TEST_PAGE_NUM (1024) |
SDRAM benchmark test page number.
Referenced by sdram_benchmarks().
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
enum sdramc_status_t |
|
static |
Configure the console uart.
References uart_rs232_options::baudrate, NULL, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
|
static |
Get delayed number of ticks.
ul_start_tick | Start tick point. |
ul_end_tick | End tick point. |
Referenced by sdram_benchmarks().
int main | ( | void | ) |
Application entry point for sdramc_example.
References board_init(), configure_console(), pmc_enable_periph_clk(), sdram_access_test(), sdram_benchmarks(), sdram_enable_unaligned_support(), SDRAM_ISSI_IS42S16100E, sdramc_init(), SDRAMC_OK, sleepmgr_enter_sleep(), sleepmgr_init(), STRING_HEADER, sysclk_get_cpu_hz(), and sysclk_init().
|
static |
Access test of the first 10K bytes of external SDRAM.
References SDRAMC_ERROR, SDRAMC_OK, SDRAMC_TEST_EVEN_TAG, SDRAMC_TEST_LENGTH, and SDRAMC_TEST_ODD_TAG.
Referenced by main().
|
static |
SDRAM benchmark test.
References get_delay_in_ticks(), gs_pus_mem_buff, SDRAMC_ERROR, SDRAMC_OK, SDRAMC_TEST_BUFF_SIZE, SDRAMC_TEST_PAGE_NUM, and tick_get_count().
Referenced by main().
void SysTick_Handler | ( | void | ) |
Systick handler to manage timestamp and delay.
References gs_ul_ms_ticks.
|
static |
Get current tick count (in ms).
References gs_ul_ms_ticks.
Referenced by sdram_benchmarks().
|
static |
SDRAM benchmark buffer.
Referenced by sdram_benchmarks().
|
static |
Referenced by SysTick_Handler(), and tick_get_count().