cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 Hardware NSS solution

proc9
Associate II
Posted on August 29, 2015 at 00:01

Hello.

I'm having problems with STM32F103 SPI peripheral. On STM32F072 I could have proper transmission with hardware NSS management, but on STM32F103 it is just pulled low and it stays like that.

Is there any solution for that?
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
stm32forum
Associate II
Posted on August 29, 2015 at 21:07

Maybe you can shine a light on what spi port your using, maybe some used pins and preferably some code snips.

proc9
Associate II
Posted on August 30, 2015 at 00:42

Of course. I'm using SPI1 and its PA4 PA5 PA6 and PA7.

I'm initializing SPI with that code:

RCC->APB2ENR |= RCC_APB2ENR_SPI1EN;

SPI1->CR2 = SPI_CR2_SSOE;

SPI1->CR1 = SPI_CR1_MSTR | SPI_CR1_BR_2 | SPI_CR1_SSI | SPI_CR1_SPE;