1
0

drv_sdram.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * File : drv_sdram.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2015 RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2015-08-03 xiaonong The first version for STM32F7
  13. */
  14. #ifndef __DRV_SDRAM_H__
  15. #define __DRV_SDRAM_H__
  16. #include <rtthread.h>
  17. #include <board.h>
  18. #define SDRAM_BANK_ADDR ((uint32_t)0xC0000000)
  19. #define SDRAM_TIMEOUT ((uint32_t)0xFFFF)
  20. #define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000)
  21. #define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001)
  22. #define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002)
  23. #define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004)
  24. #define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000)
  25. #define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008)
  26. #define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020)
  27. #define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030)
  28. #define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000)
  29. #define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
  30. #define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
  31. #define SDRAM_SIZE (16UL * 1024UL * 1024UL)
  32. #define SDRAM_BEGIN SDRAM_BANK_ADDR
  33. #define SDRAM_END (SDRAM_BANK_ADDR + SDRAM_SIZE)
  34. extern int bsp_sdram_hw_init(void);
  35. #endif