2013-11-18 10:21 AM
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!Florian2013-11-28 05:17 AM
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.