-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPIO not working on-py .js .c . PINMUX missing #18
Comments
I'm seeing pretty much the same except the .c version is working fine. I just changed the "Runner" setting to "C or C++ (Beagle Makefile)" and it works fine. The JavaScript one causes my BB AI to crash. For the Python version, I am unable to get any version to work either via the cloud9 IDE or from commandline. This is the output I see from the JavaScript BlinkLED example:
|
Do you really get an external led connected to a gpio blinking with the c
example or does the Programm just run? Python and c do appear to run for me
but they do not actually produce the intended gpio output because of the
misding pinmux
jomoengineer <[email protected]> schrieb am So., 20. Okt. 2019,
11:20:
… I'm seeing pretty much the same except the .c version is working fine. I
just changed the "Runner" setting to "C or C++ (Beagle Makefile)" and it
works fine. The JavaScript one causes my BB AI to crash.
For the Python version, I am unable to get any version to work either via
the cloud9 IDE or from commandline.
This is the output I see from the JavaScript BlinkLED example:
Debugger listening on 127.0.0.1:15454
info: No pinmux for P9_15
error: Unable to write to /sys/class/gpio/gpio48/value
error: Unable to write to /sys/class/gpio/gpio48/value
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18?email_source=notifications&email_token=AL2DEZXW36JJ474XICNRLLTQPQPFTA5CNFSM4I63CLQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBYF5IQ#issuecomment-544235170>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL2DEZUWEYQ2NYZVVNFYM43QPQPFTANCNFSM4I63CLQQ>
.
|
The .c program by default in the version I have which should be the latest blinks the usr3 LED which works fine:
This can be run from either the cloud9 IDE or locally under:
However, trying to use a P9 or P8 GPIO pin has not been successful. This is what 'config-pin' shows which indicates the issue with the pinmux or perhaps the config-pin tool:
Although, using '-q' reports an issue but using '-l' shows the default setting which is strange.
However, there does seem to be a pinmux def for the P9_15 pin.
Running the Adafruit BBIO Python code from a Python cli, I do not see a pinmux error but nothing happens on the GPIO pin:
Something seems to be missing or just different with the AI. |
I see there was some activity on the beagleboard/bb.org-overlays a few days ago that looks like there were some updates for the AI. However, I upgraded everything and I still get the same error concerning pinmux. info: No pinmux for P9_14 -Sean |
Looking at the BB AI schematic and the Data Sheet for the am527x, the AI pin mapping on P8 and P9 is not the same as with a BB Black. For the BB AI P9_15 is mapped to pin/ball AG4 which is associated with signal 'AG4_GPIO_12' and P9_12 which I was trying to use as well is mapped to 'B14_MCASP_ACLKR' so I suppose this is not a GPIO pin. Locate the .dts file:
Looking at the .dts file located at the following, the P9_15 entry is not enabled.
I tried changing this by adding 'PIN_OUTPUT' and rebuilt the dts but still no luck.
Since on the BB AI P9_15 is associated with gpio3_12, then I am guessing the gpio pin number is 108. Trying to enable this from command line still has not been successful. |
Numbering starts at 1 for GPIO banks, so gpio3_12 is 2*32 + 12 = 76. |
Also, this spreadsheet may be helpful: https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit?usp=sharing |
Ah, yes, 76 did the trick. I now have light on P9.15 The spreadsheet is very helpful. |
Also, in the Python example, since the Adafruit GPIO libs are more associated with the previous BBs, P8_39 maps to gpio76 . Thus, changing the P9_15 entry to P8_39 in the Cloud9 Python example results in a blinky LED on the BB AI P9_15 connection.
|
So this might mean that the pinout and the internal connection do not line up, which renders any pinout or compability with capes non working. We need a compability layer in between that is not there, so a BB-AI port of the adafruit-bbio library is needed to make it usable again and compatible with existing hardware, same goes for the other languages. Von meinem Huawei-Telefon gesendet-------- Ursprüngliche Nachricht --------Betreff: Re: [beagleboard/cloud9-examples] GPIO not working on-py .js .c . PINMUX missing (#18)Von: jomoengineer An: beagleboard/cloud9-examples Cc: mayermakes ,Author Also, in the Python example, since the Adafruit GPIO libs are more associated with the previous BBs, P8_39 maps to gpio76 . Thus, changing the P9_15 entry to P8_39 in the Cloud9 Python example results in a blinky LED on the BB AI P9_15 connection.
Ex:
#out = "P9_15"
out = "P8_39"
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
I believe the issue with the Adafruit BBIO.GPIO code is that it was coded
for the previous BBs and not the AI. The BB Black has a gpio0 where, as
Jason pointed, the BB AI does not thus the GPIO mapping will be different.
I filed an issue at the Adafruit BBIO github to see if this can be
addressed.
Jon
…On Fri, Oct 25, 2019 at 1:22 AM mayermakes ***@***.***> wrote:
So this might mean that the pinout and the internal connection do not line
up, which renders any pinout or compability with capes non working. We need
a compability layer in between that is not there, so a BB-AI port of the
adafruit-bbio library is needed to make it usable again and compatible with
existing hardware, same goes for the other languages. Von meinem
Huawei-Telefon gesendet-------- Ursprüngliche Nachricht --------Betreff:
Re: [beagleboard/cloud9-examples] GPIO not working on-py .js .c . PINMUX
missing (#18)Von: jomoengineer An: beagleboard/cloud9-examples Cc:
mayermakes ,Author Also, in the Python example, since the Adafruit GPIO
libs are more associated with the previous BBs, P8_39 maps to gpio76 .
Thus, changing the P9_15 entry to P8_39 in the Cloud9 Python example
results in a blinky LED on the BB AI P9_15 connection.
Ex:
#out = "P9_15"
out = "P8_39"
—You are receiving this because you authored the thread.Reply to this
email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18?email_source=notifications&email_token=ACTYYMRU47BFNILDKAUWU43QQKUD3A5CNFSM4I63CLQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECHTBMI#issuecomment-546255025>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACTYYMUMKN5SU7UJCGGAPVTQQKUD3ANCNFSM4I63CLQQ>
.
|
I am a beginner to the field of open source, |
Start with the issue labeled "good first issue" https://github.com/beagleboard/cloud9-examples/issues |
Only PRu examples work. ALL other examples that use GPIO functionality
python, js and C examples fail
Error message leads to missing Pinmux
there is no device tree file for the BB-AI in /lib/firmware and no guide on how to set the BB-Ai up for GPIO interactions wit /boot/uEnv.txt
to recreate:
flash latest debian image , make all updates&dist-upgrade , upgrade kernel to r119
load latest cloud9 examples into Github.
if you have a workaround/solution/dtbo-file please lead me to it, I'm working on an urgent project for the BB-AI product promo.
in the meantime I will workaround by having an external MCU
The text was updated successfully, but these errors were encountered: