I modified the app a bit and  tried running this code on the BBB  under 
sudo mode :

        gpio_export(gpio);
//      gpio_set_dir(gpio, 0);
        gpio_set_dir(gpio, 1);
        gpio_set_edge(gpio, "rising");
        gpio_fd = gpio_fd_open(gpio);
        printf("debug_1 \n");
        gpio_set_value(gpio,1);
        sleep(1000);
        gpio_set_value(gpio,0);
        printf("debug_2 \n");

but I see App stuck @debug_1 and getting this error : 
*gpio-49(sysfs):_gpiod_direction_output_raw:tried to set a  GPIO tied to an 
IRQ as output.*

I even tried this : 

     gpio_set_dir(gpio, 0);
  //      gpio_set_dir(gpio, 1);

in this I don't get the error but again the App hangs at the same point.

What I am doign wrong here?My intent is to Set -reset the GPIO1_17 ( that 
is p9 header pin P9_23) that  is GPIO 17 of 32 (0–31) on the second GPIO 
chip of four (0–3).
Am I choosing the wrong GPIO.?
 



On Monday, June 13, 2016 at 9:41:34 AM UTC+5:30, Raul Piper wrote:
>
> CEB, 
> On which platform you tested this?Did you get any issue?Set/Reset of any 
> GPIO works fine on any kernel?4.x+?
> Rp
>
> On Friday, June 14, 2013 at 2:01:51 AM UTC+5:30, CEB wrote:
>>
>> Take a look at 
>> https://developer.ridgerun.com/wiki/index.php/Gpio-int-test.c
>>
>> Worked for me.
>>
>> CEB
>>
>> On Wednesday, June 12, 2013 12:46:04 AM UTC-4, MH wrote:
>>>
>>> Just want to start a discussion.  Who all is working or maybe even found 
>>> a means of controlling the GPIO in C for Beaglebone Black?  I have been 
>>> hunting for a while and haven't found anything reliable. 
>>>
>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c6abe7ba-c08d-42de-8d9a-685a24a4a810%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to