cancel
Showing results for 
Search instead for 
Did you mean: 

different received data from w25q64 using stm32h7b0vbt6

Mohammadreza-Azizi
Associate II

Hi. I'm trying to read data from w25q64. When i erase and write the chip and then read it, i receive true data.

problem1.pngproblem2.png

But when i only read data, my chip is blank and i receive 0xFF.

problem3.pngproblem4.png

Is my chip still blank or i wrote the chip correctly?

Why don't i receive true data when i only read it?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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.

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

View solution in original post

1 REPLY 1
TDK
Super User

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.

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