Skip to main content
proc9
Associate II
August 28, 2015
Question

STM32F103 Hardware NSS solution

  • August 28, 2015
  • 2 replies
  • 686 views
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 topic has been closed for replies.

    2 replies

    stm32forum
    Associate III
    August 29, 2015
    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
    proc9Author
    Associate II
    August 29, 2015
    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;