RPi.GPIO python module for Pine A64/A64+
#49
@DonFL, confirmed:  

GPIO.setmode(GPIO.BOARD)
GPIO.setup(40, GPIO.OUT)

... will get an error channel not valid on a Raspberry PI.  Either the RPi.GPIO-PineA64 codes were ported from the 26 pin GPIO stuff... or else, this is an over-sight (a bug, for sure).

The work-around (as DonFL has noted) is to code  GPIO.setmode(GPIO.BCM).  then all of the channels may be setup, with the exception that some of the channels (GPIO04) apparently do not work.  Need to dive into the code to find out, because that doesn't make any sense.

Thanks for reporting these issues guys,  and we'll proceed.  Again, the RPi.GPIO-PineA64 codes are a work in progress, and the author notes that they are not complete.  I personally do not use BCM numbers below 12, and I always code for BCM, so my projects so far have run happy as a clam...  

... I can confirm that for output the channels GPIO 20-27 work fine !

PS,  so... tis also probably the time to go through the pin block one by one and get a status check...  what on the pinblock works ?

@Wolfenstein, if you like,  set your GPIO04 to output, and see if it stays ON all the time regardless of setting it OFF.

Update:  never mind.

The GPIO04 pin(7) is not a compatible Raspberry PI bus configuration.  

On the PineA64 pin(7) PL10 is GPIO04,  AND  S_PWM,  GPCLK0   hence, the reason a test LED is lit all the time;  the S_PWM function on this pin will have to be disabled in dts to use this pin as GPIO04 (compatible with the Raspberry PI).

Refer to the Pine_A64_Pin_Assignment_160119.pdf document page 1 for the dual functions of all PineA64 channels; the PI bus is not exactly compatible with the Raspberry PI bus.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply


Messages In This Thread
RE: RPi.GPIO python module for Pine A64/A64+ - by MarkHaysHarris777 - 08-10-2016, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  fm transmitter with gpio weasel18 2 4,851 09-10-2019, 04:28 AM
Last Post: desai_amogh
  How to use dts or other setup to declare gpio pin Interrupt (e.g. a button)? dkebler 1 3,614 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 11,184 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 11,257 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,902 01-24-2019, 03:36 AM
Last Post: Fifth
  GPIO and SPI SamR1 20 31,750 03-15-2018, 10:32 AM
Last Post: jomoengineer
Question GPIO shockr 7 14,838 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 21,266 08-17-2017, 01:21 PM
Last Post: martinayotte
  Cross-wired Uart Ports between two Pine Boards via Cat5 Cable MarkHaysHarris777 10 16,078 11-20-2016, 04:17 AM
Last Post: pfeerick
  GPIO fiq capability joseph 3 6,129 11-10-2016, 06:07 PM
Last Post: joseph

Forum Jump:


Users browsing this thread: 2 Guest(s)