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.

How to change direction of a GPIO port in TI-RTOS?

Hi, is there a way to change the direction of a GPIO port at runtime? I looked into all documentation I found, can't find anything about this. I'm working on a project that has a peripheral that uses its ports to send and receive data (parallel communication).

Thanks

  • Hi Lucas,

    The TI-RTOS GPIO driver does not support configuring the GPIO pin direction. If you need to modify the direction for a particular pin at runtime, you will need to directly use the driverlib APIs. It is best to avoid using TI-RTOS GPIO driver APIs for this pin.

    I have filed a CQ requesting the capability to configure GPIO pin direction. Here's a link to the CQ:
    https://cqweb.ext.ti.com/cqweb/main?command=GenerateMainFrame&service=CQ&schema=SDO-Web&contextid=SDOWP&entityID=33666687&entityDefName=IncidentReport&username=readonly&password=readonly

    Best,

    Ashish

  • Thank you Ashish, this is a great help. I thought it could be a bad idea to use the GPIOs through driverlib in a TI-RTOS application, but it seems that as long we do not use both libraries in the same ports, everything is going to be all right.

    Best regards

  • This is just an FYI post. I filed a bug (CQ) against TI-RTOS requesting a change in the GPIO driver to support configuring the pin directions. Here's a link to the CQ that can be used to track progress:

    https://cqweb.ext.ti.com/cqweb/main?command=GenerateMainFrame&service=CQ&schema=SDO-Web&contextid=SDOWP&entityID=SDOCM00112255&entityDefName=IncidentReport&username=readonly&password=readonly

    Best,

    Ashish