STM32 GPIO Lecture 14 : Alternate functionality configuration of a GPIO pin

 

Alternate functionality configuration of a GPIO pin

 

 

 

In alternate functionality mode, as the name indicates the pin will assign for other functionality.

 

Alternate functionality configuration of a GPIO pin
Figure. Alternate function configuration

 

Let’s discuss what precisely alternate function mode.

In the alternate function mode, as the name indicates, the pin will be assigned for alternate functionality. The alternate functionality can be anything like UART-TX, UART-RX, timers input channel or ADC’s input channel, etc…

From Figure1, the output control now actually driven by the alternate function output, not from the output which comes from the output data register. Here, the output data register has no control over the output control block.

When the I/O port is programmed as an alternate function as shown in Figure:

 

  • The output buffer can configure as open-drain or push-pull.
  • The output buffer will driven by signal coming from the peripheral.
  • The Schmitt trigger input is activated.
  • The weak pull-up and pull-down resistors are activated.
  • The data present on the I/O pin sampled into the input data register every  AHB1 clock cycle.
  • Read access to the input data register gets the I/O state.

 

In the following article, let’s see GPIO output speed register and its applicability.

 

FastBit Embedded Brain Academy Courses,

Click here: https://fastbitlab.com/course1

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.