# GPIO problem

**URL:** <https://forum.sierrawireless.com/t/gpio-problem/3370>\
**Category:** Open AT\
**Created:** [June 25, 2009, 3:05am UTC](https://forum.sierrawireless.com/t/gpio-problem/3370 "2009-06-25T03:05:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhuzhiwei](https://avatars.discourse-cdn.com/v4/letter/z/e9c0ed/32.png) [@zhuzhiwei](https://forum.sierrawireless.com/u/zhuzhiwei)\
**Post date:** [June 25, 2009, 3:05am UTC](https://forum.sierrawireless.com/t/gpio-problem/3370/1 "2009-06-25T03:05:56Z")

</div>

hi all,  
I had wasted a whole day on the gpio problem.And the result really frustrated me.  
The product is Q24PL0002 ,OS version is 3.14,firmware is 657e.

```auto
void adl_main ( adl_InitType_e InitType )
{
	TRACE (( 1, "Embedded Application : Main" ));
	GPIO1_Handle = adl_ioSubscribe ( ADL_IO_Q24PLUS_GPO_1, 0,1,0,NULL); // GpioHandler ,output,value=1
	TRACE((1,"iowrite return value is %d",GPIO1_Handle));
	writereturn=adl_ioWrite ( GPIO1_Handle, ADL_IO_Q24PLUS_GPO_1, 0 );
	TRACE((1,"iowrite return value is %d",writereturn));
writereturn=adl_ioWrite ( GPIO1_Handle, ADL_IO_Q24PLUS_GPO_1, 1 );
	TRACE((1,"iowrite return value is %d",writereturn));
}
```

The monitoring tool shows :  
Trace IP 1 Embedded Application : Main  
Trace IP 1 iowrite return value is 5  
Trace IP 1 iowrite return value is 0

And the ADL\_IO\_Q24PLUS\_GPO\_1 is not used by any other function.

But the GPO1 output did not changed at all.

Anyone faced the same situation ?Thank u for your direction in advance.

---

<div class="post-metadata">

**Author:** ![zhuzhiwei](https://avatars.discourse-cdn.com/v4/letter/z/e9c0ed/32.png) [@zhuzhiwei](https://forum.sierrawireless.com/u/zhuzhiwei)\
**Post date:** [June 25, 2009, 6:07am UTC](https://forum.sierrawireless.com/t/gpio-problem/3370/2 "2009-06-25T06:07:44Z")

</div>

The problem was soloved .I made a so stupid mistake.

```auto
writereturn=adl_ioWrite ( GPIO1_Handle, ADL_IO_Q24PLUS_GPO_1, 0xFFFFFFFF );
```

GpioValues | x | | | Mask of Gpio values to write  
must be 0xFFFFFFFF
