TM4C123GXL GPIO - Configure each bit as a GPIO Mode or Alternate Mode
Revision as of 07:17, 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.