2017-03-03 03:34 AM
Hi guys!
I'm configuring the Nucleo 64 with the STM32F446RE to use SPI as a Master.
The problem I'm having right now is that the NSS pin is always low. Clock and MOSI are perfect. What I would like is that the NSS is high, and goes low during the transmission, then high again.
I've tried setting the NSS as Hardware output, and Software in Cube, but still failed to get what I want.
I think this configuration should be sorted with the following 3 bits, from CR1 and CR2. Right now Cube is setting SSOE= 1, SSM=1, SSI=1. And the NSS pin is configured as hardware output in Cube.
Any clues on how should I setup this? I would like to avoid having to use a random pin as CS and pull it manually.
Thanks!!
2019-11-18 08:16 AM
Ah, that explains the behavior. The part expects to be actively driven only. You could try an external pull-up of 500 ohms or less. I think then you would see it rise up better. However, with a very strong pull-up, you might have trouble fully driving it low, not to mention simply wasting a lot of power.
I do think it's unfortunate that the ST SPI driver works in this way, regardless of whether or not it's considered a bug.