Skip to main content
November 30, 2025
Solved

Unable to read data from w25q64 using stm32h7b0vbt6

  • November 30, 2025
  • 1 reply
  • 161 views

Hi. I'm trying to read data from W25Q64 flash memory.

These are my connections:

Screenshot 2025-11-30 234748.png

And these are my SPI and RCC and GPIO settings:

spi6.pngrcc.pngcs pin.png

And these are my functions and main code:

functions1.pngfunctions2.pngmain.png

Using W25Q_ReadID function, i could read device ID.

Screenshot 2025-11-30 234005.png

But i can't read data stored on device using W25Q_Read.

these are my result that i think they're wrong:

result.pngresult 2.png

what's wrong with my code or configurations?

Best answer by TDK

> these are my result that i think they're wrong

Why? You haven't written anything, so what are you expecting to read out?

 

A proper test would be to erase a block, verify it reads back 0xFF, then write to it, and verify it read out the same as you wrote.

You only reading 20 bytes, so it's irrelevant what RxData[341] is.

 

85 in hex is 0x55. Probably that's what you wrote there and the code is working fine.

1 reply

TDK
TDKBest answer
Super User
December 1, 2025

> these are my result that i think they're wrong

Why? You haven't written anything, so what are you expecting to read out?

 

A proper test would be to erase a block, verify it reads back 0xFF, then write to it, and verify it read out the same as you wrote.

You only reading 20 bytes, so it's irrelevant what RxData[341] is.

 

85 in hex is 0x55. Probably that's what you wrote there and the code is working fine.

"If you feel a post has answered your question, please click ""Accept as Solution""."
December 1, 2025

Dear @TDK thanks for your helpful suggestion. that was true and it works.