cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Slave Register Reset

Joseph.Paul
Associate II
Posted on April 16, 2018 at 18:37

I have an issue with the SPI slave interface in the ST32ML151. Occasionally, the SPI slave get an extra clock from outside, either because noise or a reset at the master side. I know when this happens. Is there a way to reset the SPI slave shift register other than reconfiguration the whole spi slave interface?

3 REPLIES 3
Posted on April 16, 2018 at 20:00

Probably no.

JW

Greg Fundyler
Associate II
Posted on April 16, 2018 at 23:37

Assuming you are using software slave management rather than hardware slave select, try this:

  • Set SPI_CR1_SSI
  • Read the DR register to clear the input buffer
  • Read the SR register to clear error flags
  • Set up for the next data exchange
  • Clear SPI_CR1_SSI
Posted on April 30, 2018 at 22:08

Did that work for you? Indicating success or failure may help others that stumble across the same issue.