2025-12-07 9:39 AM
Hi. I'm trying to read data from w25q64. When i erase and write the chip and then read it, i receive true data.
But when i only read data, my chip is blank and i receive 0xFF.
Is my chip still blank or i wrote the chip correctly?
Why don't i receive true data when i only read it?
Solved! Go to Solution.
2025-12-07 10:10 AM
Once again, the most likely explanation is that the data returned is what's on the chip. The issue here is the assumption that it's not erased. Your (second) program only reads the memory, doesn't erase or write it.
What you're probably running into is that the debugger connects and resets a few times during the programming step. The previous program likely starts, erases a block, and then gets interrupted. The end state is that the memory is erased and the second program is simply reading it.
Perhaps create a program which reads what is on the chip and acts on that. If it's erased, it will write default values. If it's not erased, it doesn't. Surely that's closer to what you want in the end application.
2025-12-07 10:10 AM
Once again, the most likely explanation is that the data returned is what's on the chip. The issue here is the assumption that it's not erased. Your (second) program only reads the memory, doesn't erase or write it.
What you're probably running into is that the debugger connects and resets a few times during the programming step. The previous program likely starts, erases a block, and then gets interrupted. The end state is that the memory is erased and the second program is simply reading it.
Perhaps create a program which reads what is on the chip and acts on that. If it's erased, it will write default values. If it's not erased, it doesn't. Surely that's closer to what you want in the end application.