cancel
Showing results for 
Search instead for 
Did you mean: 

SPI with DMA only with NSS hard?

florianaugustin9
Associate II
Posted on November 18, 2013 at 19:21

Hello 🙂

I created a working test programm with SPI over DMA with NSS hard. But then the problem is that CS never goes up. So I wan't to choose NSS soft, but then nothing happens on MISO/MOSI/CS/SCK.

Is there any opportunity to manually set levels of NSS hard CS pin and does it only works with NSS hard?

Thanks for answers!

Florian
1 REPLY 1
Phil1
Associate II
Posted on November 28, 2013 at 14:17

This is the sort of thing you need to do during initialisation:

spi.

SPI_NSS

=

SPI_NSS_Soft

;

SPI_Init

(

SPIx

,

&

spi

)

;

SPI_NSSInternalSoftwareConfig

(

SPIx

,

SPI_NSSInternalSoft_Set

)

;

Define the nSS pin as a GPIO output then use the GPIO functions to raise and lower nSS before and after an SPI transaction.

The key thing to remember is that nSS is not a chip select - it's an indication that the STM32's output drivers are driving the bus.