aimc
Posts: 31
Joined: Mon Jun 30, 2014 2:58 am

Serial GPIO pins

Mon Aug 24, 2015 2:36 am

Hi, i have been playing with many RPI so far but right now i have a beginner question:

Why is this warning issued when i try to use the GPIO 8?
>>> gpio.setup(8, gpio.OUT);
__main__:1: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.

Now i know that it might have to do with it being an UART / Serial pin. But i have disabled it with raspi-config > advanced > Disable serial

Apart from the warning, everything seems to work OK, so should i worry about it?


Greetings!

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Serial GPIO pins

Mon Aug 24, 2015 9:20 am

But is it specific to that particular GPIO pin only?
Are you using other GPIO pins, but not seeing the warning message for those?
Is you program exiting cleanly with

Code: Select all

GPIO.cleanup() 
.
You may notice that if you reboot the pi, run your program, and find that it does not show the warning, but if you then close the program and re-run it, that it does........

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

aimc
Posts: 31
Joined: Mon Jun 30, 2014 2:58 am

Re: Serial GPIO pins

Tue Aug 25, 2015 3:03 am

texy wrote:But is it specific to that particular GPIO pin only?
Are you using other GPIO pins, but not seeing the warning message for those?
Is you program exiting cleanly with

Code: Select all

GPIO.cleanup() 
.
You may notice that if you reboot the pi, run your program, and find that it does not show the warning, but if you then close the program and re-run it, that it does........

Texy
Thanks for your reply.

I was testing the program right after boot up. So there is no other program using those pins.
My best hypothesis is that i haven't fully disabled serial yet, even if i deactivated it from raspi-config.
Is this reasonable?


Greetings,

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Serial GPIO pins

Tue Aug 25, 2015 3:31 am

http://elinux.org/RPi_Serial_Connection
read after
Preventing Linux using the serial port

User avatar
joan
Posts: 14580
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Serial GPIO pins

Tue Aug 25, 2015 7:17 am

The GPIO will be in serial mode (ALT0 I think). You have told the system not to use the GPIO for its purposes, but the GPIO is still configured. Ignore the warning.

aimc
Posts: 31
Joined: Mon Jun 30, 2014 2:58 am

Re: Serial GPIO pins

Tue Sep 22, 2015 2:15 pm

JUst for the record, i ignored the warning so far and my RPI isn't burning in fire yet.

Greetings,

Return to “Beginners”