TM4C123GXL GPIO - Configure each bit as a GPIO Mode or Alternate Mode
Revision as of 07:20, 4 June 2019 by Jshankar
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.
|7:0||AFSEL|| GPIO Alternate Function Select|
0: The associated pin functions as a GPIO and is controlled by the GPIO registers.
1: The associated pin functions as a peripheral signal and is controlled by the alternate hardware function.
|31:8||Reserved||Software should not rely on the value of a reserved bit.|