I uninstalled some unneeded packages, as far as I could tell. Stuff like gnome and xserver and xapplications, etc.
I don’t think I uninstalled anything important, but maybe I did. I mention it because of this possibility.
My PWM’s still work fine, however my gpios don’t seem to work. value always says 0 on any gpio I try to use. I am using a 100k resister to 3.3v and the pin. It should read value = 1 but I must be missing something.
It worked before I removed some packages and did an “opkg update; opkg upgrade”.
I’m very happy to help in any way I can in diagnosing this issue.
It is always a good idea to let everyone know which board you have.
Gerald
Appologies. I have a Beaglebone Black.
I have been digging into the pinmux pins and through brute force decoding (because my perl script isn’t working correctly yet), discovered pin 0_2 was mux’d to 31. GPIO input obviously works on that pin.
So my problem is yet again an issue of muxing. Before the kernel upgrade, several pins I used were muxed to mode 7, but now it seems to have changed.
Is there a driver/helper app to change pin modes yet? Devicetrees are a terribly complicated interface for what could be such a simple task.
There is so much bad perl code in google when you search…
I finally found a way to convert hex to binary strings using sprintf and got my perl script working (I think.)
Very few of my pins are muxed for gpio. I really need to figure out how to change those pin settings.
Here are my pin modes:
pin 2 : *gpio0_2
pin 3 : *gpio0_3
pin 4 : *gpio0_4
pin 5 : *gpio0_5
pin 7 : *gpio0_7
pin 8 : mcasp0_aclkr
pin 9 : mcasp0_fsr
pin 10 : mcasp0_axr1
pin 11 : mcasp0_ahclkx
pin 12 : I2C2_SDA
pin 13 : I2C2_SCL
pin 14 : I2C1_SDA
pin 15 : I2C1_SCL
pin 20 :
pin 22 : lcd_data23
pin 23 : *gpio0_23
pin 26 : mmc2_dat6
pin 27 : mmc2_dat7
pin 30 : pr1_mii1_col
pin 31 : pr1_mii1_txen
pin 32 : gpmc_ad0
pin 33 : gpmc_ad1
pin 34 :
pin 35 :
pin 36 :
pin 37 :
pin 38 :
pin 39 :
pin 44 : gpmc_ad12
pin 45 : gpmc_ad13
pin 46 : gpmc_ad14
pin 47 : gpmc_ad15
pin 48 : gpmc_a0
pin 49 : gpmc_a1
pin 50 : gpmc_a2
pin 51 : gpmc_a3
pin 60 : mcasp0_aclkr
pin 61 :
pin 62 : pr1_pru1_pru_r31_12
pin 63 : pr1_pru1_pru_r31_13
pin 65 : mcasp0_fsr
pin 66 :
pin 67 :
pin 68 :
pin 69 : gpmc_be0n_cle
pin 70 :
pin 71 : lcd_data1
pin 72 : lcd_data2
pin 73 : lcd_data3
pin 74 : lcd_data4
pin 75 :
pin 76 : pr1_edio_data_out6
pin 77 : pr1_edio_data_out7
pin 78 : uart5_txd
pin 79 : uart5_rxd
pin 80 :
pin 81 : mcasp0_ahclkr
pin 86 : pr1_pru1_pru_r31_8
pin 87 : pr1_pru1_pru_r31_9
pin 88 : pr1_edio_data_in4
pin 89 : pr1_edio_data_in5
pin 110 : pr1_pru0_pru_r31_0
pin 111 : mmc1_sdcd
pin 112 : pr1_pru0_pru_r31_2
pin 113 : eCAP2_in_PWM2_out
pin 114 : mmc0_sdwp
pin 115 : EMU2
pin 116 : pr1_pru0_pru_r31_6
pin 117 : pr1_pru0_pru_r31_7
It says 6 pwms are enabled, but I can only get two of them to respond to period/duty/run. 8_13 and p_42 work IIRC. Oh my.
root@beaglebone:/sys/kernel/debug# cat pwm
platform/48304100.ecap, 1 PWM device
pwm-0 ((null) ):
platform/48304200.ehrpwm, 2 PWM devices
pwm-0 ((null) ):
pwm-1 (PWM_P8_13 ): requested enabled
platform/48302200.ehrpwm, 2 PWM devices
pwm-0 (PWM_P9_14 ): requested enabled
pwm-1 (PWM_P9_16 ): requested enabled
platform/48300100.ecap, 1 PWM device
pwm-0 (PWM_P9_42 ): requested enabled
platform/48300200.ehrpwm, 2 PWM devices
pwm-0 (PWM_P9_22 ): requested enabled
pwm-1 (PWM_P9_21 ): requested enabled
It seems PWMs are not stable. With angstrom’s patched kernel and tools, I can get at least two of the pwms to function.
I can not get the others to work. I can’t even change the modes on the ones that won’t work with my own device tree overlays.
I did find a great video that got me going with device tree.
http://www.youtube.com/watch?v=SaIpz00lE84
That guy has a great website and github with very useful information. I have two new GPIO layout charts on my wall!!