LPSPI Debugging S32K344

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPSPI Debugging S32K344

Jump to solution
2,102 Views
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 Kudos
Reply
1 Solution
2,094 Views
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

View solution in original post

3 Replies
2,095 Views
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

2,089 Views
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 Kudos
Reply
2,061 Views
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 Kudos
Reply