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: Using GPIO Pins on different ports doesn't drive all of a device's inputs.

Part Number: EK-TM4C1294XL

Good morning!

Using the EK-TM4C1294XL Launch Pad.

Developing in Code Composer Studio version 20.4.1.4_1.10.1

Using TivaWare_C_Series-2.2.0.295

We've modified project0 to drive a tri-color LED.  The LED has one input for each color as well as a ground wire.  The ground wire is always connected to a ground connection on the Launchpad. If we connect all three LED inputs to GPIO pins on the same port the attached code (set up for a single port using three of its PINS) will light them all in order.  If we connect one input to another Port's GPIO pin as in the attached code, as set up in this example, the input attached to it's own port doesn't respond.  That is, the LED does not light.  We've stepped throught the code in the debugger and the code that should light that LED appears to be executed.  It just has no effect.  We have tried this with different combinations of GPIO ports and pins, always with two inputs on one port and one input on another port and the result is the same.

We will need to use two ports for one tri-color LED because of the number of GPIO pins (over 50) we'll be using and their proximity to one another on the breadboard connectors.

What's going wrong?

project0.c 

  • >  GPIOPinWrite(GPIO_PORTP_BASE, GPIO_PIN_5, 1);

    I'm pretty sure this should be 

    >  GPIOPinWrite(GPIO_PORTP_BASE, GPIO_PIN_5, GPIO_PIN_5); // PP5 pin high

  • Hi Bruce,

    Thank you for looking at my question.  Your solution is correct.  We were writing high to the wrong pin.  However, in our experiments, some combinations of ports and pins still failed to activate the single pin on a separate port.  My note taking was embarrassingly incomplete.  I'll close this question.  If I can present a more coherent data set, I'll open a new one. 

    Thanks again!