08-31-2016, 04:09 AM
(This post was last modified: 08-31-2016, 04:13 AM by MarkHaysHarris777.)
Martin, I want to thank you too. You have answered many questions I have had about the /dev/mem and about the manual; really, thanks !
It may turn out that there is something over-riding your /dev/mem writes with C (I don't know, I'm just suspicious because I have seen this type of behavior on the Pine board in other areas. (other dts|dtb definitions, and other drivers)
It may also be, and unfortunately probably is, that the manual is out-of-date. We know in fact that the schematic is out-of-date... and we are still waiting to see the schematic that matches the 2G PineA64+ , and we are still waiting for the updated manual. So, we might just have to keep waiting, or keep experimenting. If you know that your GPIO68 works (by using sysfs) then we know this is not a hardware problem! ... and, that the manual you are attempting to follow is probably not correct for this board.
edit: PS... the GPIO12 number is the Raspberry PI Broadcom GPIO pin numbering scheme. It means absolutely 'nothing' for your C code. It is only important for codes library like RPi.GPIO-PineA64 , which is a Raspberry PI GPIO emulator... and can be coded with either BOARD numbering or BCM numbering.
Sysfs must use Pine GPIO numbering. I suspect your C code must use the offsets that match the Pine GPIO numbering scheme.
It may turn out that there is something over-riding your /dev/mem writes with C (I don't know, I'm just suspicious because I have seen this type of behavior on the Pine board in other areas. (other dts|dtb definitions, and other drivers)
It may also be, and unfortunately probably is, that the manual is out-of-date. We know in fact that the schematic is out-of-date... and we are still waiting to see the schematic that matches the 2G PineA64+ , and we are still waiting for the updated manual. So, we might just have to keep waiting, or keep experimenting. If you know that your GPIO68 works (by using sysfs) then we know this is not a hardware problem! ... and, that the manual you are attempting to follow is probably not correct for this board.
edit: PS... the GPIO12 number is the Raspberry PI Broadcom GPIO pin numbering scheme. It means absolutely 'nothing' for your C code. It is only important for codes library like RPi.GPIO-PineA64 , which is a Raspberry PI GPIO emulator... and can be coded with either BOARD numbering or BCM numbering.
Sysfs must use Pine GPIO numbering. I suspect your C code must use the offsets that match the Pine GPIO numbering scheme.
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! )