Skip to main content
Bastian Toulelan
Associate II
April 2, 2019
Question

i can't debug slave when ensuring spi communication between two STM32 boards

  • April 2, 2019
  • 2 replies
  • 611 views

Hi,

i want to ensure SPI communication between STM32F407VG as master and STM32F429i as slave , i loaded the program of the master to the first board then i loaded the program of the slave to the second board , and then i plugged the two usb wire to the PC to start communication , i tried to debugg the slave to verify if the data is received correctly but always the master is debugged not the slave !!!!

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
April 2, 2019

You aren't going to be able to single-step or view peripheral registers on a slave device being hit with data at real-time rates. You'll need to consider instrumenting your code to understand what's happening.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
S.Ma
Principal
April 2, 2019

If you reset the slave SPI every NSS rise edge, and the slave sync on NSS falling edge, you should be able to breakpoint and recover event is missed some messages. That's how I do to debug faster. Using SPI Slave with DMA cyclic RAM buffer is also reducing the frequency of slave interrupts.