Hello Jing Pan. I am using MIMXRT1020-EVK. I am trying to connect to MT25QL128ABA1EW9-0SIT. Firstly i change flash mode from ordinary SPI to Quad. For doing that i use LPSPI3. Connection is the folowing:
MXRT1020 MT25QL128ABA1EW9-0SIT
PCS0 - [76] GPIO_AD_B1_13 - as chip select S# [1]
SCK - [78] GPIO_AD_B1_12 - as clock С [6]
SDI - [74] GPIO_AD_B1_15 DQ1[2]
SDO - [75] GPIO_AD_B1_14 DQ0[5]
PCS2-[82] GPIO_AD_B1_08 W#/DQ2[3]
PCS3-[83] GPIO_AD_B1_07 DQ3/HOLD#[7]
From flash datasheet: "When using legacy (x1) SPI commands in extended I/O protocol (XIO-SPI), DQ0 is an input and
DQ1 is an output." So, the connection is ok.
In 1x SPI it works well. I can read Device ID and it is correct.
After changing flash mode to Quad (4x) i send to it ReadDevIdCmd in quad mode and it answers correctly (as i can see from oscilloscope). FlashIC sends the same data as in 1x mode but as i can see from the buffer data is incorrect. All bits from D0 are read as from D1 and vice versa.
Master received(SingleCH):
20 BA 18 10 40 0 72 28 98 0 1 20
Master received(Quad):
10 B9 28 20 40 0 71 18 A8 0 2 10
In Quad mode ReadIDCmd = 0xAF. If SOUT/SIN connection is reversed FlashIC will not respond neither in the single chanel mode nor in the Quad chanel.