cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Slave NSS input not consistent

MDrac.1
Associate III

So I'm having this weird bug I can't seem to figure out.

I'm trying to connect two stm32f4 discovery boards through SPI.

The master is sending out a SS signal I want to use to synchronize with the slave.

However for some reason before I send out a message the slave always registers some data input. I've tried to solve it using a different pin (PE6 instead of PA4), still the same problem remains.

The weird thing is I don't think there is some 'dip' on the SS line, because if I put a breakpoint at the data-read section and check the SS GPIO input register it reads '1' (as I would expect since the master isn't sending anything at this point). (I also tested if there was a falling edge on the SS line using a picoscope, it didn't detect any)

The attached screenshots show the difference between the read output (NSS_Input) and the one in the IDR register. The third one shows the setup of the SS pin as GPIO input

2 REPLIES 2

Hello,

PA4 is the NSS_SPI1 or NSS_SPI3 , PE6 is just a simple GPIO pin.

Have in mind that SPI1 pins are connected already to MEMS and SPI3 is connected to 43L22 Audio DAC.

Suggest to use SPI2 to interconnect the two boards, to have clear picture about the issue.

MDrac.1
Associate III

I forgot to connect the ground pin.