Hello
To my knowledge, SPI master on STM32L476 is working perfectly
with multiple simultaneous devices on the same bus. There is no
obvious problem in this driver unless it was changed very
recently.
You do not HAVE TO use the hardware managed NSS pin because it is unusable in most SPI master situations (ALL stm32 and stm32L4 only support very few useless SPI protocols, have a look at the reference manuals). And IIRC, the SPI driver does not even try to use NSS. It is really only useful (maybe) in SPI slave mode, and I have never used that myself.
Moreover... there is only one NSS pin per SPI bus... when you
usually have multiple devices per bus! even more useless!
So SPI chip selects are usually NORMAL GPIO pins, and they are managed in the spiXselect functions of the source directory for the board.
Have a look here for the Nucleo-L476RG: https://bitbucket.org/nuttx/nuttx/src/82ff00fabf1e93cdc5ad0dbabb2c83320aa13768/configs/nucleo-l476rg/src/stm32_spi.c?at=master&fileviewer=file-view-default
There is even a SD card example, or at least boilerplate code!
Note that you CAN STILL use the PA3/NSS pin as chip select if you want, but you have to configure it as a normal GPIO!
Sebastien
--
You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.