RPi.GPIO with C
#4
(08-14-2016, 02:35 PM)MarkHaysHarris777 Wrote: Wolfenstein, I am so pleased to see you working on this.

... this is a very good step towards porting pigpio from Raspberry PI over to PineA64.  Also, the more you understand about the RPi.GPIO-PinA64 source, the better we'll be positioned to implement a working i2S SPI i2c, and soft PWM.

Keep at it... I will also look at what you are proposing this next week--- keep working on it !

As long as we're sharing failures, i opened up the device-tree-compiler dtc and removed all references to spwm PL10 to see if by disabling that in the dtb we could reclaim pin(7) GPIO04.  No luck so far... i removed the references and recompiled the dtb (with appropriate renaming) but there is a driver in there that I need to disable too... so I still don't have GPII04 working yet...

Stay in touch on this thread.   tnx

Could it be that the reason for the PL10 («GPIO4» on the PI-2-Bus pin #7) is in a different Peripheral area. I went in and tried the code discussed in the thread «C GPIO» http://forum.pine64.org/showthread.php?tid=1327 and noticed that while it worked as expected for all the ports in the PB-PH series, the PL ones wouldn't move.

The reason that I found for that is that PB thru PH are all in the registers beginning at 0x01c20800 (defined as the SW_PORTC_IO_BASE) while the PL ports are in a similar data structure in a different location, at 0x01f02c00.

I found those addresses in the sections 3.21.1 and 3.22.1 in the Allwinner_A64_User_Manual_V1.0.pdf

When I re-used the code with this alternate IO base address, I could get the test-program (flash an LED on PL10) to work as
expected. Have similar problems shown up with PL9 and PL8 (PI-2-Bus pins 27 and 28)?

It might be something else, but having just seen a similar-looking problem here, I thought maybe this is the solution.
  Reply


Messages In This Thread
RPi.GPIO with C - by Wolfenstein - 08-14-2016, 02:26 PM
RE: RPi.GPIO with C - by MarkHaysHarris777 - 08-14-2016, 02:35 PM
RE: RPi.GPIO with C - by KnReLe - 08-22-2016, 02:58 AM
RE: RPi.GPIO with C - by martinayotte - 08-15-2016, 07:21 AM
RE: RPi.GPIO with C - by MarkHaysHarris777 - 08-22-2016, 07:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  RPi.GPIO python module for Pine A64/A64+ aquilegia 97 134,504 02-23-2022, 02:56 PM
Last Post: ncs
  fm transmitter with gpio weasel18 2 4,926 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,663 06-12-2019, 10:37 AM
Last Post: dkebler
Lightbulb Sample GPIO codes highlighting RPi.GPIO-PineA64 and the PI bus MarkHaysHarris777 6 11,326 06-07-2019, 12:37 AM
Last Post: tllim
Star GPIO, SPI and I2C C++ Lib databit 7 11,419 02-04-2019, 05:45 AM
Last Post: Jeff R
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 11,991 01-24-2019, 03:36 AM
Last Post: Fifth
  GPIO and SPI SamR1 20 32,184 03-15-2018, 10:32 AM
Last Post: jomoengineer
Question GPIO shockr 7 15,001 03-11-2018, 01:52 AM
Last Post: jomoengineer
  Read GPIO problem shworker 14 21,553 08-17-2017, 01:21 PM
Last Post: martinayotte
  GPIO fiq capability joseph 3 6,210 11-10-2016, 06:07 PM
Last Post: joseph

Forum Jump:


Users browsing this thread: 1 Guest(s)