I have two serial nor flash chips mounted on my board, which is based on i.mxrt1062.
One flash uses flexspi1 and another uses flexspi2.
I tried running the sdk example project for flexspi driver. It works for flexspi1. It doesn't work for flexspi2.
I have done the necessary changes in pin_mux.
I have done the following changes in the flexspi configuration,
#define EXAMPLE_FLEXSPI FLEXSPI2
#define FLASH_SIZE 0x2000 /* 64Mb/KByte */
#define EXAMPLE_FLEXSPI_AMBA_BASE FlexSPI2_AMBA_BASE
#define FLASH_PAGE_SIZE 256
#define EXAMPLE_SECTOR 1
#define SECTOR_SIZE 0x1000 * 14/* 4K */
#define EXAMPLE_FLEXSPI_CLOCK kCLOCK_FlexSpi2
I am using kFLEXSPI_PortB1.
Please advise if I'm missing some configuration.