AnsweredAssumed Answered

Why AF input as push-pull?

Question asked by Juha Aaltonen on Sep 2, 2017
Latest reply on Sep 3, 2017 by Juha Aaltonen

What is the idea that in many cases alternate function inputs are configured as "alternate function push-pull"? In most cases it seems to work, but why? From the documents I've got the idea that the inputs are always going to the alternate function and the "alternate function" output mode affects only the output drivers. Whether or not the alternate function actually reads the inputs, is a different story.

 

Like:

    /**SPI1 GPIO Configuration
    PA5     ------> SPI1_SCK
    PA6     ------> SPI1_MISO
    PA7     ------> SPI1_MOSI
    */
    GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

The picture in most manuls is like this:

Outcomes