rt-thread/bsp/nxp/lpc/lpc408x/drivers/drv_sdram.h

33 lines
842 B
C
Raw Normal View History

2015-10-15 23:14:27 +08:00
/*
2021-03-17 02:26:35 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
2015-10-15 23:14:27 +08:00
*
* SPDX-License-Identifier: Apache-2.0
2015-10-15 23:14:27 +08:00
*
* Change Logs:
* Date Author Notes
* 2013-05-19 Bernard The first version for LPC40xx
*/
2019-03-08 15:02:46 +08:00
#ifndef DRV_SDRAM_H__
#define DRV_SDRAM_H__
2015-10-15 23:14:27 +08:00
#include <board.h>
2019-03-08 15:02:46 +08:00
#define SDRAM_CONFIG_16BIT /* use the 16 bitSDRAM */
//#define SDRAM_CONFIG_32BIT /* use the 32 bitSDRAM */
2015-10-15 23:14:27 +08:00
#ifdef SDRAM_CONFIG_16BIT
2019-03-08 15:02:46 +08:00
#define EXT_SDRAM_SIZE 0x2000000 /* 256Mbit */
#elif defined SDRAM_CONFIG_32BIT
#define EXT_SDRAM_SIZE 0x4000000 /* 512Mbit */
2015-10-15 23:14:27 +08:00
#else
2019-03-08 15:02:46 +08:00
error Wrong SDRAM config, check ex_sdram.h
2015-10-15 23:14:27 +08:00
#endif
2019-03-08 15:02:46 +08:00
#define EXT_SDRAM_BEGIN 0xA0000000 /* CS0 */
#define EXT_SDRAM_END (EXT_SDRAM_BEGIN + EXT_SDRAM_SIZE)
2015-10-15 23:14:27 +08:00
2019-03-08 15:02:46 +08:00
void rt_hw_sdram_init(void);
2015-10-15 23:14:27 +08:00
2019-03-08 15:02:46 +08:00
#endif /* DRV_SDRAM_H__ */