# Cannot Bind GPIO7

**URL:** <https://forum.legato.io/t/cannot-bind-gpio7/3409>\
**Category:** Legato Application Framework\
**Created:** [July 6, 2018, 2:37pm UTC](https://forum.legato.io/t/cannot-bind-gpio7/3409 "2018-07-06T14:37:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dried-Apricot](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/dried-apricot/32/445_2.png) [@Dried-Apricot](https://forum.legato.io/u/Dried-Apricot)\
**Post date:** [July 6, 2018, 2:37pm UTC](https://forum.legato.io/t/cannot-bind-gpio7/3409/1 "2018-07-06T14:37:51Z")

</div>

Greetings everyone.

I’m experiencing a problem trying to bind GPIO7. I can bind other GPIO fine, such as GPIO2, but things do not seem to work when I bind the former. I’m not doing anything with the GPIO yet, just attempting to bind it. But, when trying to bind GPIO7, my app refuses to start.

If I start it with `"app start"`, it’ll simply hang on `"Execing 'myProg'"`.

If I start it with `"app runProc myProg --exe=myProg"`, it’ll hit `COMPONENT_INIT`, but then it’ll output:

* * *

Jul 6 13:13:30 swi-mdm9x15 user.emerg Legato: _EMR_ | myProg[394]/framework T=main | LE\_FILENAME ClientSocketHangUp() 852 | Session closed by server (myProg.mainComponent.le\_gpioPin7:eb4b6dc575d64f27484e7657275f11fd).

Jul 6 13:13:31 swi-mdm9x15 user.info Legato: INFO | supervisor[1616]/supervisor T=main | proc.c proc\_SigChildHandler() 2035 | Process ‘myProg’ (PID: 394) has exited with exit code 1.

Jul 6 13:13:31 swi-mdm9x15 user.warn Legato: -WRN- | supervisor[1616]/supervisor T=main | app.c app\_SigChildHandler() 3457 | Process ‘myProg’ in app ‘myProg’ faulted: Ignored.

Jul 6 13:26:12 swi-mdm9x15 user.info Legato: INFO | supervisor[1616]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘myProg’ has stopped.

* * *

I’m binding in my .adef like so:

&nbsp;&nbsp;&nbsp;&nbsp;`myProg.mainComponent.le_gpioPin7 -> gpioService.le_gpioPin7`

…and requiring in my .cdef:  
&nbsp;&nbsp;&nbsp;&nbsp;`le_gpioPin7 = le_gpio.api`

* * *

I’ve checked the pin status in microcom via `AT+WIOCFG?` as well. I’ve tried having it set to both 4 & 16, but it doesn’t seem to make a difference.

* * *

Is there something different about GPIO7? I looked around the forum a bit and saw some discusion regarding gpioExpanderService and conflicts, but I wasn’t sure if any of that applied to this scenario or not (gpioExpanderService is not installed on my device). Thank you very much in advance.

* * *

**Additional Info**  
Board: mangOH Red  
Chip: WP7504  
Firmware: SWI9X15Y\_07.12.14.00 r34472 CARMD-EV-FRMWR1 2017/11/29 18:24:42  
Legato: 18.05.1\_d037d454a5d7c4f01c1fe847eb476b4a\_modified

---

<div class="post-metadata">

**Author:** ![Dried-Apricot](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/dried-apricot/32/445_2.png) [@Dried-Apricot](https://forum.legato.io/u/Dried-Apricot)\
**Post date:** [July 6, 2018, 3:12pm UTC](https://forum.legato.io/t/cannot-bind-gpio7/3409/2 "2018-07-06T15:12:41Z")

</div>

Wow, just solved my issue like 5 minutes after posting lol…

Turns out you need to do a hard reboot after changing the pin configuration via microcom. I was failing to do this.

Basically, all I did was open microcom:  
`microcom -E /dev/ttyAT`

…then run the following command:  
`AT+WIOCFG=7,16`

Then reset the device and it worked. I tested with another pin that wasn’t working (GPIO13) and it was successful, too.

Also, for anyone having this issue in the future not familiar with microcom, you can check the status of all pins via `AT+WIOCFG?` and close the terminal with `CTRL+X`.
