cancel
Showing results for 
Search instead for 
Did you mean: 

NSS Pin not going high when Idle in SPI

BrindhaP
Associate II

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

3 REPLIES 3
MasterT
Lead

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


@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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User

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.

If you feel a post has answered your question, please click "Accept as Solution".