I have a imxrt1170 board ,want to use flexspi1(connect to fpga).
I want to use AHB bus operation on flexspi1 ,but when I access BASE_ADDR(0x30000000U), the debug software told timeout(Sat Oct 08, 2022 17:19:04: Warning: Communication timed out: Requested 4 bytes, received 0 bytes !)
config is as follows:
flexspi_config_t config;
FLEXSPI_Type *base;
base = FLEXSPI1;
//Set root clk 20MHz
flexspi_clock_init(kCLOCK_Root_Flexspi1, CLOCK_SRC, CLOCK_DIV);
/*Get FLEXSPI default settings and configure the flexspi. */
FLEXSPI_GetDefaultConfig(&config);
/*Set AHB buffer size for reading data through AHB bus. */
config.ahbConfig.enableAHBPrefetch = true;
config.ahbConfig.enableAHBBufferable = true;
config.ahbConfig.enableReadAddressOpt = true;
config.ahbConfig.enableAHBCachable = true;
config.ahbConfig.enableClearAHBBufferOpt = true;
config.rxSampleClock = FLEXSPI_RX_SAMPLE_CLOCK;
if(COMBINATION_MODE)
{
config.enableCombination = true;
}
if(FREE_RUNNING_MODE)
{
config.enableSckFreeRunning = true;
}
FLEXSPI_Init(base, &config);
/* Configure flash settings according to serial flash feature. */
FLEXSPI_SetFlashConfig(base, &deviceconfig, FLASH_PORT);
/* Update LUT table. */
FLEXSPI_UpdateLUT(base, 0, customLUT, CUSTOM_LUT_LENGTH);
/* Do software reset. */
FLEXSPI_SoftwareReset(base);
when I use a pointer, debug software output timeout:
uint32_t *flexspi = (rt_uint32_t *)(0x30000000U); /* FLEXSPI1 start address. */
已解决! 转到解答。