How to use AHB operation for flexspi in imxrt1170

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use AHB operation for flexspi in imxrt1170

Jump to solution
1,002 Views
jingyangxie
Contributor V

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. */

0 Kudos
Reply
1 Solution
995 Views
jingyangxie
Contributor V
0 Kudos
Reply
1 Reply
996 Views
jingyangxie
Contributor V

I got it.

0 Kudos
Reply