LPSPI Debugging S32K344

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

LPSPI Debugging S32K344

跳至解决方案
3,510 次查看
JoDo
Contributor III

Hello,

I wrote a small master salve code and tried to verify the function by debugging it.

When I step through the code, it seems that the flags and data registers are reset by themselves (see image below). But when I run the complete code (without stepping) everything is fine. The master is transmitting and the slave is receiving correctly.

I am using the onboard debuger P&E USB MULTILINK and I have also enabled debug in the CR.

Does anyone have an idea what the problem is?

Thanks!

JoDo_0-1633002920285.png

 

0 项奖励
回复
1 解答
3,502 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Johannes,

The RDF flag indicates the state of the RX FIFO.

And the data can be read by any master from the FIFO, not only the CPU and DMA but the debugger too.

You would need to close the register view and the memory view so that the Receive Data Register (RDR) is not read by the debugger.

 

Regards,

Daniel

在原帖中查看解决方案

3 回复数
3,503 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Johannes,

The RDF flag indicates the state of the RX FIFO.

And the data can be read by any master from the FIFO, not only the CPU and DMA but the debugger too.

You would need to close the register view and the memory view so that the Receive Data Register (RDR) is not read by the debugger.

 

Regards,

Daniel

3,497 次查看
JoDo
Contributor III

Hello Daniel,

 

Thank you very much for the quick reply. That was really very helpful.

I guess there is no other way to watch the registers without interfere with them?

 

Regards,

Johannes

0 项奖励
回复
3,469 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Johannes,

Unfortunately, if the debugger reads the RDR register it is as if the CPU read it.

 

Regards,

Daniel

 

 

0 项奖励
回复