2025-11-30 12:39 PM
Hi. I'm trying to read data from W25Q64 flash memory.
These are my connections:
And these are my SPI and RCC and GPIO settings:
And these are my functions and main code:
Using W25Q_ReadID function, i could read device ID.
But i can't read data stored on device using W25Q_Read.
these are my result that i think they're wrong:
what's wrong with my code or configurations?
Solved! Go to Solution.
2025-11-30 6:53 PM
> 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.
2025-11-30 6:53 PM
> 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.
2025-12-01 11:15 AM
Dear @TDK thanks for your helpful suggestion. that was true and it works.
2025-12-06 11:30 AM
Dear @TDK i have another problem. when i erase and write the chip and after that i read the chip, i read my written data.
But after that, when i just read the chip it shows 0xff
why?