FreeMaster波形显示异常

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FreeMaster波形显示异常

1,713 次查看
peisihai
Contributor I

peisihai_0-1694236610767.png

使用Jlink 连接Arm M0+的单片机,读取数据(32bit)偶发上图中的调动值(通过单片机跟踪调试发现未出现过该跳动值), 不知该现象是由于什么原因造成的,以及如何修改?  Freemaster版本为 V3.1.2.4

 

0 项奖励
回复
6 回复数

1,607 次查看
MichalH
NXP Apps Support
NXP Apps Support

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

 

0 项奖励
回复

1,583 次查看
peisihai
Contributor I

Thanks for your reply,
Can I set a filter so that the point is not drawn?

0 项奖励
回复

1,559 次查看
MichalH
NXP Apps Support
NXP Apps Support

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

0 项奖励
回复

1,535 次查看
peisihai
Contributor I

Thanks for your reply,

So there is no good way to solve this phenomenon,By the way,Does this happen if the variable is 8 bits or 16 bits?

 

 
0 项奖励
回复

1,519 次查看
MichalH
NXP Apps Support
NXP Apps Support

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

 

0 项奖励
回复

1,484 次查看
peisihai
Contributor I

Hello, 

I confirm that the variables are 32-bit aligned,but the kernel is ARM Cortex-M0+。

0 项奖励
回复