How to interface External SPI NOR flash memory to EC200U

HI,

I am trying to interface a SPI based External NOR flash memory (Winbond W25Q128JVSIQ) to EC200U. I am using SPI2 port to interface flash memory. There are two demo examples I have tried. spi4_ext_nor_flash_demo.c and spi_nor_flash_demo.c but none of them worked. Flash model not support error is occurs in debugger. I checked all hardware connections and it’s proper.
Kindly help by pointing where the actual mistake is.

Which set of SPI interfaces do you use? You need to configure the pin function as the corresponding reuse function first, then initialize the spi, and then mount the external flash. If the mount fails, format the external flash and then mount the external flash.
I hope this is helpful