Wanted to cross post this over here on the forums. I have my BBB using bonescript to fire LED’s on various pins on P9.
I am finding that some pins will not fire an LED like others will. So I put together a simple script to isolate the issue. I was hoping that someone out there could try to blink an LED on pin 17 using bonescript for me.
I am trying to find out if:
- there is a bug in the bonescript lib
- my BBB is defective
- P9_17 is a special pin that will never be able to blink.
I am working on building a shield and need to find some available pins up in that P9 header, although I could likely hunt and find some more pins that are working, I would prefer to understand why it is not blinking.
Any help would be greatly appreciated. Thanks.
Is there anyone out there willing to help me verify this bug? Is anyone aware of any other resources I can look to for help? Thanks
Let em see if I can break free one of my guys to look at it on Monday.
Thanks so much Gerald. We are trying to get our new cape off to production. But with several of the pins we need not working we have held off while we make sure we will have access to all the pins we need.
Any chance of a HW issue?
I am wondering if I have something wrong with my bbb. I am just not seeing an output voltage on several of those pins in the P9_11-30 range. But wanted to have someone else verify to see if we could narrow it down to hardware or a problem with the bonescript lib.
As I said. I will have one of my guys look at it on Monday. I already sent him an email to look at it.
Plug in your BBB and browse here: http://192.168.7.2/Support/BoneScript/getPinMode/
Under b.getPinMode type, b.getPinMode(“P9_17”, printStatus);
I ran mine and my 9_17 is set in mux 2, which is i2c1_scl, as shown below. If you want to use it as a GPIO, you have to set the mux to 7 so that the pin will be a GPIO. Have you tried that?
mux = 2
pullup = pulldown
slew = slow
options = spi0_cs0,mmc2_sdwp,i2c1_scl,NA,NA,NA,NA,gpio0_5
pin = P9_17
name = I2C1_SCL
err = undefined
If you look here, you can see all the modes for every pin. http://circuitco.com/support/index.php?title=Cape_Expansion_Headers#Full_Headers_with_8_Modes
On this website, you can read more about device tree overlay and muxing the pin to whatever you want to use.
Thanks for the help Juan. I am aware of the various mux modes. Bonescript uses mode 7 by default. If you look at the code at https://github.com/jadonk/bonescript/issues/44 you can see that I actually set it to 7 there as well. There is also a post there of what I get when I do the getPinMode() , I see that P9_17 is in mux 2.
Could the bug be that bonescript is not actually setting the mux mode properly? Do we need to rope in JasonK ?
I found this question which was recently posted, perhaps part of the problem?
If you check http://beagleboard.org/Support/BoneScript/pinMode/ it says, “Notice**:** This function is not fully implemented the 3.8 kernel that ships with the BeagleBone Black.”
Jason has been working on getting all the functions to work on bonescript. My recommendation to you would be to set a device tree overlay to mux the pin. This link is a good reference for that. (http://hipstercircuits.com/category/device-tree/)
Thanks for submitting the issue though! Hopefully it will get fixed soon.