Hello,
when accessing the target MCU over JTAG (JLink or other probe), FreeMASTER reads the memory asynchronously to main program execution. When reading 64bit (or misaligned 32bit) variables, it may happen the read occurs simultaneously with the CPU write cycle.
The read may return bad (inconsistent) data when the variable is just being modified.
This issue would not occur if you use UART or other "active" communication.
Regards,
Michal
There are some filtering options you can apply in the variable definition, but I do not think it will help with glitches like this.
I'm afraid there is no way the FreeMASTER can detect the value it reads is not correct.
Regards,
Michal
Hello,
this issue will never happen on 8 bit variables. Theoretically, it also should not happen on 16 and 32 variables when they are aligned on their size.
CortexM4 may split the write operation to multiple bus cycles when writing un-aligned variables. So it writes one "half" of the value and then the second. The JTAG read operation issued by FreeMASTER may fall between these two cycles so the value is damaged.
You can check your variable address if it is aligned properly. If yes, I would also study if a correct str instruction was used by compiler when writing the variable. If yes, then something else is wrong.
Regards,
Michal