Skip to main content
Associate
March 7, 2024
Question

SPI communication while debuging

  • March 7, 2024
  • 3 replies
  • 4887 views

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

3 replies

Andrew Neil
Super User
March 7, 2024

@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
March 10, 2024

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
March 10, 2024

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Aldo1Author
Associate
March 11, 2024

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
March 11, 2024

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
March 11, 2024

I didn't check

Andrew Neil
Super User
March 11, 2024

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.