Skip to main content
Neolithic
Associate III
May 28, 2023
Solved

How to Perform W25Q16 Fast Read Dual Output ?

  • May 28, 2023
  • 2 replies
  • 2426 views

Hi,

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.

This topic has been closed for replies.
Best answer by Tesla DeLorean

SPI is not set up for this

You need an STM32 that supports QUADSPI, and you can configure that to use a 2-bit data phase.

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 28, 2023

SPI is not set up for this

You need an STM32 that supports QUADSPI, and you can configure that to use a 2-bit data phase.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Neolithic
NeolithicAuthor
Associate III
May 29, 2023

Hi Tesla, as far as I understood even a normal SPI peripheral could do the Dual read since it just uses MOSI and MISO as I0 and I1 for reading dual bits. But if we need to do quad read only then we will need QSPI. Isn't it correct.?

Neolithic
NeolithicAuthor
Associate III
May 29, 2023

@Community member​  Thank you for suggesting this. I double checked in CubeMX and you are correct. The dual lines are only available for QSPI.