Showing results for 
Search instead for 
Did you mean: 

QSPI Interfacing for Winbond Flash Memory STM32

Associate II

I have trying to use the ST Hal Library for interfacing the Win Bond Serial Flash IC with part Number w25q64jv. With Git repo Library which i found online . The Code work only until he W25Q_init() functions read ID. if i try to just Read the ID then i get no data from the IC. 








When i try to use Hal delay function then the ID is read only once after that the

Hospi structure shows error of incorrect sequence (note i am only trying to read

the ID multiple times).

If any one has ever interfaced this QSPI Protocol of ST please share example codes.

I am unable to figure out that why does using Hal Delay causing error in reading the ID.

Also if i comment the Delay and try then the ID is read for 1200 times and then again

The Id is not read.





For the H5xx ? That's be OCTOSPI not QUADSPI peripheral. It can access the memory but the initialization will be a bit more involved.

From a READID (0x9F) perspective the WINBOND and MICRON parts should work materially the same.

Some of the older WINBOND's don't support WRSR2 command, if you modify the SR2.QE bin you have to write SR1 and SR2 as a pair.

The Cube repositories generally have several working examples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Yes for H5xx Controllers. The OCTOSPI Peripheral. I have seen the below examples but they are of no use to me. I just to read the ID and perform simple read write Option. Also there is method mentioned by which i can use the OCTOSPI peripheral like simple SPI. I have earlier interfaced the same IC with Normal SPI Function. But to increase Speed thought of using the OCTOSPI Peripheral but i am unable get i working.

There's no pin or peripheral initialization in the library code.

If HAL_Delay() fails, likely an issue with HAL_Init() and ticker related code / interrupts.

What is your pin assignment for the H5 vs W25Q64 ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Associate II

My Pin Assignment is

1) QSPI_IO0 - PC9

2) QSPI_IO1 - PC10

3) QSPI_IO2 - PE2

4) QSPI_IO3 - PD13

5) QSPI_CLK - PF10

6) QSPI_CS - PG6

My Controller is STM32H563

For the Hal delay it is working properly there is no issue with HAL_Delay or HAL_Init the issue is when i use it as shown in the first post i am unable to receive data. Also i had a doubt why does the OCTO SPI Peripheral has fixed Chip select Function. In Normal SPI i can configure any pin as Chip Select but here it is not possible. Also does the HAL Library take care of the Chip Select Pin when I send Command or Receive data if not then how do i control the Chip Select Line if its needed.