08-22-2016, 02:58 AM
(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.