drv_sdram.h 842 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2013-05-19 Bernard The first version for LPC40xx
  9. */
  10. #ifndef DRV_SDRAM_H__
  11. #define DRV_SDRAM_H__
  12. #include <board.h>
  13. #define SDRAM_CONFIG_16BIT /* use the 16 bitSDRAM */
  14. //#define SDRAM_CONFIG_32BIT /* use the 32 bitSDRAM */
  15. #ifdef SDRAM_CONFIG_16BIT
  16. #define EXT_SDRAM_SIZE 0x2000000 /* 256Mbit */
  17. #elif defined SDRAM_CONFIG_32BIT
  18. #define EXT_SDRAM_SIZE 0x4000000 /* 512Mbit */
  19. #else
  20. error Wrong SDRAM config, check ex_sdram.h
  21. #endif
  22. #define EXT_SDRAM_BEGIN 0xA0000000 /* CS0 */
  23. #define EXT_SDRAM_END (EXT_SDRAM_BEGIN + EXT_SDRAM_SIZE)
  24. void rt_hw_sdram_init(void);
  25. #endif /* DRV_SDRAM_H__ */