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 11 #ifndef FLEXSPI_PORT_H__ 12 #define FLEXSPI_PORT_H__ 13 14 /* parameters for flexpsi peripheral */ 15 #define FLEXSPI1_CONTROL_BASE FLEXSPI1 16 #define FLEXSPI2_CONTROL_BASE FLEXSPI2 17 #define FLEXSPI_ROOT_CLK (80000000U) /* serial root clk: 80MHz*/ 18 #define FLASH_SIZE (32 * 1024) /* device size 32*1024(KB) = 32MB */ 19 #define ARD_SEQ_NUMBER 1 /* Sequence number for AHB read command */ 20 #define ARD_SEQ_INDEX 0 /* Sequence ID for AHB read command */ 21 #define AWR_SEQ_NUMBER 1 /* Sequence number for AHB write command */ 22 #define AWR_SEQ_INDEX 1 /* Sequence ID for AHB write command */ 23 #define ARD_SEQ_CMD 0xBB /* cmd for read */ 24 #define AWR_SEQ_CMD 0xAA /* cmd for write */ 25 #define FLEXSPI_RX_SAMPLE_CLOCK kFLEXSPI_ReadSampleClkExternalInputFromDqsPad 26 #define FLASH_PORT kFLEXSPI_PortA1 27 #define CLOCK_SRC kCLOCK_FLEXSPI2_ClockRoot_MuxOscRc400M 28 #define CLOCK_DIV 5U 29 #define CUSTOM_LUT_LENGTH 64U 30 #define FLEXSPI1_AHB_DATA_ADDRESS (0x30000000U) 31 #define FLEXSPI2_AHB_DATA_ADDRESS (0x60000000U) 32 #endif /* FLEXSPI_PORT_H__ */ 33