logo       

Re: Problem in setting the state of GPIO pin in PXA255: msg#00079

Subject: Re: Problem in setting the state of GPIO pin in PXA255
>     I am trying to set the state of GPIO pin using
> GPSR/GPCR registers. But the state I am trying to set
> is not reflected on the GPIO pin. The pin always
> reatins its old state.
>
> I am using the following piece of code in
> the driver.
>
>    set_GPIO_mode(81 | GPIO_OUT);
>    old_state = ( GPLR(81) & GPIO_bit(81))?1:0 ;
>                   /* old_state is zero */
>    GPSR(81) |= GPIO_bit(81); /*set pin state to 1*/
>    new_state = ( GPLR(81) & GPIO_bit(81))?1:0 ;
>
> But I always get new_state as zero.
>
>    Any idea why the GPIO pin state is not
> changing even after setting in GPSR/GPCR registers?
>    Did I miss any settings in some other registers?
>

Um... Maybe cleaning the GPCR just after set_GPIO_mode? And look at you
don´t have configurated Alternate Functions in GAFR.

> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> -------------------------------------------------------------------
> Subscription options:
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php


-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php



<Prev in Thread] Current Thread [Next in Thread>