I have been trying to program W25Q16 external flash for Fast Read Dual Out mode. In this mode, basically both the lines MISO and MOSI become input for the host (STM32 in this case) and data can be read at double the speed. My SPI is running at 40MHz and in Normal read mode with DMA I am getting the correct bandwidth. I am able to read out 20KB in roughly 4.150 milliseconds.
Now, when i try to send the instruction to perform Fast Read Dual Output as mentioned in page 30 of this user manual
https://datasheet.lcsc.com/lcsc/1912111437_Winbond-Elec-W25Q128JVSIQ_C113767.pdf
I don't get the required dual data rate, Its the same data rate, and I also start getting incorrect Data. I have written some predefined values to 512Byte space in flash for the comparison. When I do a normal read, as mentioned above, the data stays correct. However, with Fast Read Dual Out, the data gets corrupted.
What i am not able to understand is that, does it require special steps to configure GPIOs before we do fast read dual output? Or am i missing anything specific which is not mentioned in the manual. If someone has already done something similar, kindly guide me. My SPI initialization values are:
inSPIHandle->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
inSPIHandle->Init.CLKPhase = SPI_PHASE_1EDGE;
inSPIHandle->Init.CLKPolarity = SPI_POLARITY_LOW;
inSPIHandle->Init.CRCPolynomial = SPI_CRCPR_CRCPOLY;
inSPIHandle->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLED;
inSPIHandle->Init.DataSize = SPI_DATASIZE_8BIT;
inSPIHandle->Init.Direction = SPI_DIRECTION_2LINES;
inSPIHandle->Init.FirstBit = SPI_FIRSTBIT_MSB;
inSPIHandle->Init.Mode = SPI_MODE_MASTER;
inSPIHandle->Init.NSS = SPI_NSS_SOFT;
inSPIHandle->Init.TIMode = SPI_TIMODE_DISABLE;
I will be looking forward to your reply.
I have come to know that with a normal SPI peripheral it is not possible to do Dual Read. It is only possible via QSPI peripheral. I have double checked it via a different STM32 MCUs Code generator CubeMX.