Skip to main content
Explorer
July 7, 2025
Question

NSS Pin not going high when Idle in SPI

  • July 7, 2025
  • 2 replies
  • 325 views

Hi,

I am connecting ESP32 with STM32G474RET6 Nucleo board via SPI. I have configured SPI in DMA mode to transfer data. With NSS pin enabled for chip select I can see the pin remains low always during transmission of data and also in idle. So that I could not communicate with ESP32. Because of that I have to do manual GPIO write high and low in the code and that works. How to automate this NSS pin (chip select) to work, Kindly help me with this.

 

Thanks in Advance

    This topic has been closed for replies.

    2 replies

    Explorer
    July 7, 2025

    Pin 'd stay low as long as SPI active.  Use I2S instead, right/left channel line is your NSS in this case. 

    Super User
    July 7, 2025

    @MasterT wrote:

    Pin 'd stay low as long as SPI active.  Use I2S instead, right/left channel line is your NSS in this case. 


    Indeed.

    @BrindhaP this is documented in the Reference Manual:

    AndrewNeil_0-1751896914419.png

    https://www.st.com/resource/en/reference_manual/rm0440-stm32g4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=1835

    via: https://www.st.com/en/microcontrollers-microprocessors/stm32g474re.html#documentation

    Super User
    July 7, 2025

    Hi,

    i have a SPI data DMA transfer between ESP and STM32 also, working fine.

    Just : the ESP is SPI master, the STM32 is slave; then NSS (hardware) is input and this works as expected.