flexspi_port.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-08-15 xjy198903 The first version for rt1170
  9. */
  10. #ifndef FLEXSPI_PORT_H__
  11. #define FLEXSPI_PORT_H__
  12. /* parameters for flexpsi peripheral */
  13. #define FLEXSPI1_CONTROL_BASE FLEXSPI1
  14. #define FLEXSPI2_CONTROL_BASE FLEXSPI2
  15. #define FLEXSPI_ROOT_CLK (80000000U) /* serial root clk: 80MHz*/
  16. #define FLASH_SIZE (32 * 1024) /* device size 32*1024(KB) = 32MB */
  17. #define ARD_SEQ_NUMBER 1 /* Sequence number for AHB read command */
  18. #define ARD_SEQ_INDEX 0 /* Sequence ID for AHB read command */
  19. #define AWR_SEQ_NUMBER 1 /* Sequence number for AHB write command */
  20. #define AWR_SEQ_INDEX 1 /* Sequence ID for AHB write command */
  21. #define ARD_SEQ_CMD 0xBB /* cmd for read */
  22. #define AWR_SEQ_CMD 0xAA /* cmd for write */
  23. #define FLEXSPI_RX_SAMPLE_CLOCK kFLEXSPI_ReadSampleClkExternalInputFromDqsPad
  24. #define FLASH_PORT kFLEXSPI_PortA1
  25. #define CLOCK_SRC kCLOCK_FLEXSPI2_ClockRoot_MuxOscRc400M
  26. #define CLOCK_DIV 5U
  27. #define CUSTOM_LUT_LENGTH 64U
  28. #define FLEXSPI1_AHB_DATA_ADDRESS (0x30000000U)
  29. #define FLEXSPI2_AHB_DATA_ADDRESS (0x60000000U)
  30. #endif /* FLEXSPI_PORT_H__ */