2025-11-19 10:52 PM - last edited on 2025-11-20 2:17 AM by Andrew Neil
why more than one STM32 SPI Slave connect to master means More SS need ?
2025-11-20 1:09 AM - edited 2025-11-20 2:02 AM
Hello,
Nothing to do with STM32 itself.
The SPI lines data and clock are common to all slaves. How the master could address the communication to a specific slave if there is nothing to indicate which slave to communicate with? SS: Slave Select.
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface
2025-11-20 2:15 AM - edited 2025-11-20 2:15 AM
As @mƎALLEm said, this is standard to the way SPI works - nothing specific to STM32.
The specific part of the Wikipedia article which describes this is:
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface#Multidrop_configuration
See also:
https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/chip-select-cs
2025-11-20 2:29 AM
As suggested, read a good tutorial about the basics of the SPI bus.
In it's duplex incarnation, SPI clocks out data via the MOSI line, and at the same time clocks in data from slaves via the MISO line.
You cannot have more than one slave connected at a time that disagree on the bus state.
In the best case, the result is chaos and incorrect data.
Only if you have an unidirectional connection (writing to slaves, MOSI only), you could drive several devices with one NSS signal.