This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C1294XL: GPIOPinConfigure for ADC

Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: TM4C1294NCPDT

I can not find a macro to use PE2 or PE3 as an ADC in pin_map.h for GPIOPinConfigure() , does this mean for me to configure my pin correctly I only need to use GPIOPinTypeADC() or am I missing something?

This is what I find in the pin_map.h file for PE2 or PE3 for TM4C1294NCPDT:

#define GPIO_PE2_U1DCD          0x00040801

#define GPIO_PE3_U1DTR          0x00040C01

  • Hi Hisham,
    For example, if you want to use the AIN0 on PE3 you will do the below. Please also refer to the TivaWare examples under <TivaWare_Installation>/examples/peripherals/adc.

    SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
    GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_3);