Actions

EmSys

Difference between revisions of "TM4C123GXL GPIO - Configure each bit as a GPIO Mode or Alternate Mode"

From EdWiki

(Created page with "__NOTOC__ == GPIO - Configure each bit as a GPIO Mode or Alternate Mode == Optionally you can configure the '''GPIOAFSEL''' register to program each bit as a GPIO Mode or Alte...")
 
m
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
== GPIO - Configure each bit as a GPIO Mode or Alternate Mode ==
 
== GPIO - Configure each bit as a GPIO Mode or Alternate Mode ==
Optionally you can configure the '''GPIOAFSEL''' register to program each bit as a GPIO Mode or Alternate Mode. If an alternate pin is chosen for a bit, then the PMCx field must be programmed in the '''GPIOPCTL''' register for the specific peripheral function.
+
We can configure the '''GPIOAFSEL''' register to program each bit as a GPIO Mode or Alternate Mode. If an alternate pin is chosen for a bit, then the PMCx field must be programmed in the '''GPIOPCTL''' register for the specific peripheral function.
 +
 
 +
=== GPIO Alternate Function Select (GPIOAFSEL) ===
 +
*The GPIOAFSEL register is the mode control select register. If a bit is clear, the pin is used as a GPIO and is controlled by the GPIO registers.
 +
* Setting a bit in this register configures the corresponding GPIO line to be controlled by an associated peripheral.
 +
* Several possible peripheral functions are multiplexed on each GPIO.
 +
* The GPIO Port Control (GPIOPCTL) register is used to select one of the possible functions.
 +
 
 +
 
 +
[[image:tm4c_gpioafsel_r.png|center]]

Revision as of 07:17, 4 June 2019

GPIO - Configure each bit as a GPIO Mode or Alternate Mode

We can configure the GPIOAFSEL register to program each bit as a GPIO Mode or Alternate Mode. If an alternate pin is chosen for a bit, then the PMCx field must be programmed in the GPIOPCTL register for the specific peripheral function.

GPIO Alternate Function Select (GPIOAFSEL)

  • The GPIOAFSEL register is the mode control select register. If a bit is clear, the pin is used as a GPIO and is controlled by the GPIO registers.
  • Setting a bit in this register configures the corresponding GPIO line to be controlled by an associated peripheral.
  • Several possible peripheral functions are multiplexed on each GPIO.
  • The GPIO Port Control (GPIOPCTL) register is used to select one of the possible functions.


Tm4c gpioafsel r.png