08-10-2016, 04:53 PM
(This post was last modified: 08-10-2016, 05:43 PM by MarkHaysHarris777.)
@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.
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
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! )
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! )