I'm having a hard time to understand this problem.
#define READ(X) (*(uint8_t *)(X)) //X is 32bit flash memory address
I use that Macro Function to read flash memory.
I ran this code with debugger. (there is break point at the end of 'for' loop)
please see the variable values below.
(this is parameter)
(this is flash memory)
(this is the problem)
as you can see, ReadResult is wrong.
why is this happened?
i just added one more READ before loop.
Absolutely, same as before.
this is the result i expected.
i turned off compile optimization.
Could you please explain????
Solved! Go to Solution.