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

Hi sir, I am using EC200UCN module. I have to use w25q128jw to read and write using SPI protocol. I am using spi port 2 (24,25,26,27 pins for spi). But when initialized it shows flash model does not support error. Pls suggest the correct way to initialize it.

I think W25Q128JW should be a 6-wire flash, you should use pin13, pin135, pin24,pin25,pin26,pin27. And in the SDK run ql_spi6_ext_nor_flash_demo_init() in ql_init.c.