cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in GPIO_ANAPinConfig() in 91x_gpio.c

jonny_bee_henry
Associate II
Posted on January 30, 2007 at 07:20

Bug in GPIO_ANAPinConfig() in 91x_gpio.c

2 REPLIES 2
jonny_bee_henry
Associate II
Posted on May 17, 2011 at 09:35

I think there's a bug in GPIO_ANAPinConfig(), which configures pins of PORT4 for analog input. The line

SCU->GPIOOUT[4] &= ~(0x3<

seems wrong, and stomps on other pins in PORT4. I'm not sure if this line is needed at all in this function, but something like this seems correct:

int shift;

switch(GPIO_ANAChannel) {

case GPIO_ANAChannel0:

shift = 0;

break;

case GPIO_ANAChannel1:

shift = 2;

break;

case GPIO_ANAChannel2:

shift = 4;

break;

... etc. ...

}

SCU->GPIOOUT[4] &= ~(0x3<

amira1
Associate II
Posted on May 17, 2011 at 09:35

Hi jonny_h,

This error will be corrected in the next release v1.2 of the library which will be available next month.

Thanks and best regards,

mirou