From 9b366577932277cec0b7f3ad813bf1232a5000cd Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Sat, 23 Jan 2021 19:41:24 -0300 Subject: [PATCH] boards/atxmega-a1u-xpro: Add ebi configuration Enable EBI (External Bus Interface) and configure LPC SRAM memory. This set RIOT-OS to use up to 64k external data SRAM. Signed-off-by: Gerson Fernando Budke --- boards/atxmega-a1u-xpro/Makefile.include | 3 ++ boards/atxmega-a1u-xpro/include/periph_conf.h | 28 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/boards/atxmega-a1u-xpro/Makefile.include b/boards/atxmega-a1u-xpro/Makefile.include index f5bff7abc8..32baf45835 100644 --- a/boards/atxmega-a1u-xpro/Makefile.include +++ b/boards/atxmega-a1u-xpro/Makefile.include @@ -1,4 +1,7 @@ AVRDUDE_PROGRAMMER = xplainedpro_pdi DEBUGPROTO = -X +override RAM_LEN = 65536 +override EXP_RAM = 1 + include $(RIOTBOARD)/common/atxmega/Makefile.include diff --git a/boards/atxmega-a1u-xpro/include/periph_conf.h b/boards/atxmega-a1u-xpro/include/periph_conf.h index 68926e4269..e1664265ee 100644 --- a/boards/atxmega-a1u-xpro/include/periph_conf.h +++ b/boards/atxmega-a1u-xpro/include/periph_conf.h @@ -138,7 +138,33 @@ static const spi_conf_t spi_config[] = { * @{ */ static const ebi_conf_t ebi_config = { - 0 + .addr_bits = 18, /* A0-A17 */ + .flags = (EBI_PORT_LPC | EBI_PORT_CS2), + .sram_ale = 0, + .lpc_ale = 2, + .sdram = { 0 }, + .cs = { /* Reserved A16 */ + { EBI_CS_MODE_DISABLED_gc, + 0, + EBI_CS_SRWS_0CLK_gc, + 0x0UL, + }, /* Reserved A17 */ + { EBI_CS_MODE_DISABLED_gc, + 0, + EBI_CS_SRWS_0CLK_gc, + 0x0UL, + }, /* CS2 - 256K SRAM */ + { EBI_CS_MODE_LPC_gc, + EBI_CS_ASPACE_256KB_gc, + EBI_CS_SRWS_1CLK_gc, + 0x0UL, + }, /* Reserved LCD */ + { EBI_CS_MODE_DISABLED_gc, + 0, + EBI_CS_SRWS_0CLK_gc, + 0x0UL, + }, + }, }; /** @} */