Forums - Use new GPIO pins for other purpose

2 posts / 0 new
Last post
Use new GPIO pins for other purpose
nelson.kon
Join Date: 20 Apr 15
Posts: 33
Posted: Sun, 2018-09-16 20:55

Hi,

I would like to use 2 separate GPIO pins to do other purposes.  One is as an input pin and another one is as an output pin.  How should I do it?

Hope to hear from you soon.

 

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2018-09-17 16:06

We have QCLI_demo with example of GPIO configuration demonstration.

Navigate to @QCLI_demo\build\gcc path and execute below instructions:

@QCLI_demo\build\gcc: setnev.bat periphenv.config \\This is will enable PERIPHERALS component or use " SET CFG_FEATURE_PERIPHERALS=true"
@QCLI_demo\build\gcc: build.bat t 4020 cdb \\Build the image
@QCLI_demo\build\gcc: flash_openocd.bat \\Flash the image on to device

Open Serial Terminal and Execute below instructions to Set example GPIO_12 as output and drive HIGH/LOW

> Peripherals GPIO gpio_tlmm
Peripherals\GPIO: USAGE: gpio_pin fun dir pull val
gpio_pin -> pin number
fun -> function value (0-15)
dir -> direction(input/ output) 0-input 1-output
pull -> gpio pull up/down/no-pull 0-No pull 1-Pull Down 2-Pull Up
val(value to drive if direction is output)

Example: Peripherals GPIO gpio_tlmm 12 0 1 0 1 //This will set GPIO_12 with function 0 set direction as output, No pull and drive HIGH
Example: Peripherals GPIO gpio_tlmm 12 0 1 1 0 //This will set GPIO_12 with function 0 set direction as input, No pull and drive LOW

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.