Skip to main content
Associate
Mar 7, 2024 2:50 PM UTC
Question

SPI communication while debuging

Hi,

I using STM32F407IG in IAR Embedded workbench.

When I debug the program the SPI communication does not work.

what could be the reason?

Without debug the SPI work

This topic has been closed for replies.

15 replies

Andrew Neil
Super User
Mar 7, 2024 2:52 PM UTC

@Aldo1 wrote:

the SPI communication does not work.

what could be the reason?

Without debug the SPI work


What, exactly, do you mean by that - in what way(s), exactly, does it "not work" ?

What are the SPI lines doing in the "not working" state ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Aldo1Author
Associate
Mar 10, 2024 1:59 PM UTC

Hi Andrew Neil,

I using this routine: void spi_rtx(struct s_spi *s, unsigned len, unsigned char *rx_buf, unsigned char *tx_buf) of STM.

and for some reason I did not get an answer.

Again, in normal working condition, not in Debugging mode - I'm getting an answer.

Tesla DeLorean
Guru
Mar 10, 2024 2:29 PM UTC

Do you mean you can't single step real-time  code and for it to run in a timely manner?

The answer might be to instrument rather than break to code.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Aldo1Author
Associate
Mar 11, 2024 7:38 AM UTC

Hi Tesla DeLorean,

In the code I need to get an answer for a device in SPI as a condition to continue the program.

and when I debug the program I'm not getting an answer.

 

Andrew Neil
Super User
Mar 11, 2024 11:19 AM UTC

Again, what is happening on the SPI lines?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Aldo1Author
Associate
Mar 11, 2024 11:20 AM UTC

I didn't check

Andrew Neil
Super User
Mar 11, 2024 11:28 AM UTC

You need to check!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.