Skip to main content
DiBosco
Senior
September 23, 2010
Question

NSS pin as GPIO when using SPI interface

  • September 23, 2010
  • 4 replies
  • 669 views
Posted on September 23, 2010 at 18:56

NSS pin as GPIO when using SPI interface

    This topic has been closed for replies.

    4 replies

    Singh.Harjit
    Senior
    May 17, 2011
    Posted on May 17, 2011 at 14:08

    Glad you got it working.

    The documentation is very confusing on this topic. I wish they had spelled out what it took to support each way.
    DiBosco
    DiBoscoAuthor
    Senior
    May 17, 2011
    Posted on May 17, 2011 at 14:08

    Thanks, Harjit. this still doesn't work though.

    Edit: yes it does. You seem to have to set both the bits at the same time.

    Singh.Harjit
    Senior
    May 17, 2011
    Posted on May 17, 2011 at 14:08

    You can indeed do what you are asking - I have it working. I had to try different coding things to make it work.

    The comment from my (working) code is:

    // Set Software slave management amd make the SSI bit one.

    Then, as long as the SPI_CR1_SPE is set, the SPI interface will work.
    DiBosco
    DiBoscoAuthor
    Senior
    May 17, 2011
    Posted on May 17, 2011 at 14:08

    The documentation on a lot of the STM32 stuff is absolutely terrible. I don't know whether a non-native English speaker wrote it or they just didn't take enough time over it. It's made me look at going back to Atmel or NXP for future products now other people have Cortex devices out there.

    It may be a cultural ST thing because their web site is also terrible!