2024-03-07 06:50 AM
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
2024-03-07 06:52 AM
@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 ?
2024-03-10 06:59 AM
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.
2024-03-10 07:29 AM
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.
2024-03-11 12:38 AM
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.
2024-03-11 03:42 AM
@Aldo1 wrote:and when I debug the program I'm not getting an answer.
What does that mean?
Is there no activity on the bus?
2024-03-11 03:45 AM
@Aldo1 wrote: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.
What routine is that? It's not one of the standard ST HAL_... functions.
Please use this button to properly post source code:
So have you tried stepping into that routine, to see where it goes wrong?
Or, as @Tesla DeLorean suggested, adding some instrumentation/diagnostics that you can watch without the debugger.
Again, what is happening on the SPI lines?
2024-03-11 03:51 AM
Yes, it is a standard ST function.
I tried to step in this function and probably the DR register do not get the data that I want to send
2024-03-11 03:51 AM
the DR register not get the data that I want to send
2024-03-11 04:19 AM
Again, what is happening on the SPI lines?