LPSPI Debugging S32K344

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

LPSPI Debugging S32K344

Jump to solution
1,714 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
1 Solution
1,706 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
1,707 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

1,701 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
1,673 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