Skip to main content
romey
Associate II
December 4, 2012
Question

Question about GPIO port defined as AF

  • December 4, 2012
  • 2 replies
  • 689 views
Posted on December 04, 2012 at 19:17

I noticed on the STM3210E-EVAL board design and in the demo code GPIO port A was defined as AF for SPI1 and for USART. The chip select pin for the SPI flash memory was defined as pin 2 in GPIO port B. Does it mean once port A is defined as AF, all the pins have to be AF? Can I define Port A poin 4 as SPI flash chip select?

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    December 4, 2012
    Posted on December 04, 2012 at 19:24

    AF is Alternate Function, ie Controlled by the peripheral

    It is a per-pin designation.

    The Chip Select uses a GPIO mode so it can be controlled manual, rather than by the peripheral.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    romey
    romeyAuthor
    Associate II
    December 4, 2012
    Posted on December 04, 2012 at 20:53

    So it's OK to define Chip Select on the same port A. Many thanks for the quick reply.