[beagleboard] Using GPIO for SPI Slave Selects

2017-12-04 Thread Robert M
Hi all,

I plan to interface with 8 SPI slave devices using the BBBlue along with 
the RoboticsCape libraries.

I plan to use a 3-to-8 line decoder (CD74AC138E) so that I will only need 
three GPIO pins to access the slave select of each device.

Has anyone done anything similar to this before? I presume some form of 
bit-banging will be necessary, though I'm not yet certain what code I need 
to modify to make this possible.

It looks like modifying rc_spi.c 

 
might be my best bet. In particular, it looks like i would need to modify 
the switch statements in *rc_manual_select_spi_slave()* and 
*rc_manual_deselect_spi_slave()*, as well as the gpio_ss array 
initialization in *rc_spi_init()*.

The gpio_ss array currently uses BLUE_SPI_PIN_6_SS1 and BLUE_SPI_PIN_6_SS2 
GPIOs for slave selects. Will I also be able to use the pins on the GPIO 
headers to control slave selections?


Thanks,
Robert

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2ffe5403-6a40-40ce-9684-9b7129a9267e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Using GPIO in BBB.Is it necessary to use Device Overlay?

2016-05-26 Thread Raul Piper
HI ,  
I am new to BBB.I am trying to create a user app to access GPIO in BBB.I 
came across this video - > https://www.youtube.com/watch?v=wui_wU1AeQc  .Is 
it really necessary to use Device overlay to access the GPIOs?
Can some one please post a link to how to get started with  GPIOS on BBB.
Rgds,
Rp

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/61ea6235-f99f-4749-aed0-41095623732e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Using GPIO pins and scratchpad of the PRU with C

2016-02-09 Thread lucas
Hi,

I am building an application based on the PRU_Hardware_UART example of the 
"Programmable Real-time Unit (PRU) Software Support Package release 4.0" 
from TI. And I am using the TI C compiler v2.1.2. The UART works great.

I am able to use the GPIO pins by declaring "volatile register uint32_t 
__R30;" in my C source code. Then I can simply set the value of the 
variable "__R30" and the register value and the output pins reflect this 
value. This seems a bit like magic to me, how does the compiler know that 
__R30 is supposed to be the GPIO register? There doesn't seem to be macro 
expansion or similar going on.

Is there a similar declaration I can use for the scratchpad registers and 
then access them from PRU0 as well as PRU1?

Thanks a lot,

Lucas

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-09-08 Thread Charles Steinkuehler
On 7/31/2014 11:07 AM, maxmike wrote:
 I'm setting up cape-universal on a production machine - minor item,
 but I noticed the syntax *in+* works whereas the equivalent *in_pu* does 
 not.

There was a cut/paste problem with the regular expressions that generate
the desired pin mode.  Thanks for the heads-up!

Fix pushed:
https://github.com/cdsteinkuehler/beaglebone-universal-io/commit/4476b207dd3f8b713453d095dd64ff6ec495d929

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-07-31 Thread maxmike
I'm setting up cape-universal on a production machine - minor item,
but I noticed the syntax *in+* works whereas the equivalent *in_pu* does 
not.

On Saturday, May 3, 2014 3:01:51 PM UTC-7, Charles Steinkuehler wrote:

 You beat me to the answer...use the config-pin utility!  :) 

 Let me know if you run into any problems.  I haven't tested every 
 combination of features and there was a lot of cut-and-paste, so there 
 could be some bugs. 

 On 5/3/2014 1:59 AM, Hannes Hörting wrote: 
  Sorry. You already answered: 
  
  Once loaded, all pins default to inputs with their power-on reset 
  default pull up/down settings.  To change the pin functions, use the 
  config-pin utility: 
  config-pin p9.24 uart 
  config-pin p9.25 high 
  Just type config-pin (with no options) to get usage info. 

 -- 
 Charles Steinkuehler 
 cha...@steinkuehler.net javascript: 


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-06-09 Thread Jason Kridner
On Tue, Jun 3, 2014 at 1:05 PM, maxmike maxmikes...@gmail.com wrote:

 Jason, could you please let me know how you got cape-universal to let you do
 pwm?

 If I use the am33xx_pwm and bone_pwm_P9_21 dtbo's I can see
 /sys/devices/ocp.3/pwm_test_
 P9_21.11 period polarity and run files.

 If I use the cape-universal instead and config-pin P9_21 as pwm
 all I get is a confirmation that it occurred, but I have difficulty finding
 the period, polarity, run files.

Well, be sure *NOT* to load the bone_pwm_* dtbo (dt overlays).
Instead, you should use the standard Linux sysfs entries for PWM.

root@beaglebone:~# config-pin p9.14 pwm
root@beaglebone:~# config-pin -q p9.14
P9_14 Mode: pwm
root@beaglebone:~# echo 3  /sys/class/pwm/export
root@beaglebone:~# cat /sys/class/pwm/pwm3/run
0
root@beaglebone:~# cat /sys/class/pwm/pwm3/duty_ns
0
root@beaglebone:~# cat /sys/class/pwm/pwm3/period_ns
0
root@beaglebone:~# echo 50  /sys/class/pwm/pwm3/period_ns
root@beaglebone:~# echo 10  /sys/class/pwm/pwm3/duty_ns
root@beaglebone:~# echo 1  /sys/class/pwm/pwm3/run
root@beaglebone:~# cat /sys/class/pwm/pwm3/run
1
root@beaglebone:~# cat /sys/class/pwm/pwm3/duty_ns
10

To figure out the index for performing the export, you need to look at
the order the PWMs are placed in the devicetree. I input these into my
bone.js file that keeps the board specific info
(https://github.com/jadonk/bonescript/blob/427de9494d4f494bd7806ddde10913f1578cdbea/src/bone.js#L271).

root@beaglebone:~# node -e var
p=require('bonescript').bone.pins;for(var x in
p){if(p[x].pwm)console.log(x+':'+p[x].pwm.sysfs);}
P8_13:6
P8_19:5
P8_34:4
P8_36:3
P8_45:5
P8_46:6
P9_14:3
P9_16:4
P9_21:1
P9_22:0
P9_28:7
P9_29:1
P9_31:0
P9_42:2



 --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to the Google Groups
 BeagleBoard group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-06-03 Thread maxmike

Jason, could you please let me know how you got cape-universal to let you 
do pwm?

If I use the am33xx_pwm and bone_pwm_P9_21 dtbo's I can see
/sys/devices/ocp.3/pwm_test_
P9_21.11 period polarity and run files.

If I use the cape-universal instead and config-pin P9_21 as pwm 
all I get is a confirmation that it occurred, but I have difficulty finding 
the period, polarity, run files.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-29 Thread Mike



 Fair enough:

 beaglebone:~# config-pin -q p9.18
 P9_18 Mode: gpio Direction: out Value: 1
  
 Did some probing on the hardware and it looks fine. Guess I was having 
 another issue.

 I am using the pre-loaded cape-universal in 3.8.13 bone50 release and 
although I can execute:
config-pin -l P9_21

the command
config-pin -q P9_21
gives me:

*cape-universal overlay not foundrun config-pin overlay cape-universal to 
load the cape*
But running that changes nothing - still get same thing.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-15 Thread Charles Steinkuehler
On 5/15/2014 8:00 PM, Jason Kridner wrote:
 I was able to get PWM output, but I'm struggling with GPIOs for some reason:
 
 root@beaglebone:~# dash -x `which config-pin` P9_18 out
 .
 .
 .
 + sudo -A su -c echo out  /sys/class/gpio/gpio4/direction
 + echo_dbg echo gpio  /sys/devices/ocp.3/P9_18_pinmux.36/state
 + [ -n  ]
 + sudo -A su -c echo gpio  /sys/devices/ocp.3/P9_18_pinmux.36/state
 + exit 0
 
 root@beaglebone:~# cat /sys/devices/ocp.3/P9_18_pinmux.36/state
 gpio
 
 root@beaglebone:~# cat /sys/class/gpio/gpio4/direction
 out
 
 root@beaglebone:~# fgrep P9_18 /sys/devices/ocp.3/cape-universal.48/status
 11 P9_18  4 IN  0
 
 Thoughts on why this still says IN and I don't see output?

Hmm...probably because the cape-universal status under ocp represents
the device tree that got exported, where all pins are GPIO inputs with
appropriate pull up/down until you change them.  Since the settings are
changed via the standard GPIO export sysfs files, this doesn't directly
affect the device tree and likely isn't getting pulled back into the
cape-universal sysfs entries.

The pinmux helper and gpio sysfs entries should contain the proper
values, and you should get correct results if you:

config-pin -q p9.18

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Jason Kridner


On Thursday, May 1, 2014 2:22:37 PM UTC-4, Charles Steinkuehler wrote:

 On 5/1/2014 1:18 PM, Hannes Hörting wrote: 
  Hi Charles! 
  
  Sorry for the question, but what did you mean with just load? 
  New BBB and set the first Commando: 
  echo cape-universal  /sys/devices/bone_capemgr.*/slots 
  
  And there I get Write Error. File exists. 
  
  Guess without this command I cannot proceed? 

 You're probably having an issue with the audio pins if you haven't 
 disabled the HDMI cape (leaving the HDMIn without audio to load). 

 If HDMI is grabbing the audio pins, you need to load the universaln cape 
 which leaves the audio pins open: 

 echo cape-universaln  /sys/devices/bone_capemgr.*/slots 


With the 4/23 Debian image, I get the following error when running the 
above command fresh:

[ 1184.038531] bone-capemgr bone_capemgr.9: part_number 'cape-universaln', 
version 'N/A'
[ 1184.038814] bone-capemgr bone_capemgr.9: slot #9: generic override
[ 1184.038866] bone-capemgr bone_capemgr.9: bone: Using override eeprom 
data at slot 9
[ 1184.038918] bone-capemgr bone_capemgr.9: slot #9: 'Override Board 
Name,00A0,Override Manuf,cape-universaln'
[ 1184.039193] bone-capemgr bone_capemgr.9: slot #9: Requesting part 
number/version based 'cape-universaln-00A0.dtbo
[ 1184.039246] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware 
'cape-universaln-00A0.dtbo' for board-name 'Override Board Name', version 
'00A0'
[ 1184.039313] bone-capemgr bone_capemgr.9: slot #9: dtbo 
'cape-universaln-00A0.dtbo' loaded; converting to live tree
[ 1184.159501] bone-capemgr bone_capemgr.9: slot #9: cape-universaln 
conflict P9.31 (#5:BB-BONELT-HDMI)
[ 1184.169509] bone-capemgr bone_capemgr.9: slot #9: Failed verification
 


 -- 
 Charles Steinkuehler 
 char...@steinkuehler.net 


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Robert Nelson
On Wed, May 14, 2014 at 8:00 PM, Jason Kridner jkrid...@gmail.com wrote:



 On Thursday, May 1, 2014 2:22:37 PM UTC-4, Charles Steinkuehler wrote:

 On 5/1/2014 1:18 PM, Hannes Hörting wrote:
  Hi Charles!
 
  Sorry for the question, but what did you mean with just load?
  New BBB and set the first Commando:
  echo cape-universal  /sys/devices/bone_capemgr.*/slots
 
  And there I get Write Error. File exists.
 
  Guess without this command I cannot proceed?

 You're probably having an issue with the audio pins if you haven't
 disabled the HDMI cape (leaving the HDMIn without audio to load).

 If HDMI is grabbing the audio pins, you need to load the universaln cape
 which leaves the audio pins open:

 echo cape-universaln  /sys/devices/bone_capemgr.*/slots


 With the 4/23 Debian image, I get the following error when running the
 above command fresh:

 [ 1184.038531] bone-capemgr bone_capemgr.9: part_number 'cape-universaln',
 version 'N/A'
 [ 1184.038814] bone-capemgr bone_capemgr.9: slot #9: generic override
 [ 1184.038866] bone-capemgr bone_capemgr.9: bone: Using override eeprom
 data at slot 9
 [ 1184.038918] bone-capemgr bone_capemgr.9: slot #9: 'Override Board
 Name,00A0,Override Manuf,cape-universaln'
 [ 1184.039193] bone-capemgr bone_capemgr.9: slot #9: Requesting part
 number/version based 'cape-universaln-00A0.dtbo
 [ 1184.039246] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware
 'cape-universaln-00A0.dtbo' for board-name 'Override Board Name', version
 '00A0'
 [ 1184.039313] bone-capemgr bone_capemgr.9: slot #9: dtbo
 'cape-universaln-00A0.dtbo' loaded; converting to live tree
 [ 1184.159501] bone-capemgr bone_capemgr.9: slot #9: cape-universaln
 conflict P9.31 (#5:BB-BONELT-HDMI)


Pin Conflict. ^^

Make sure you disable the cape you need to disable before loading that
specific cape.

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Jason Kridner


On Wednesday, May 14, 2014 9:04:02 PM UTC-4, RobertCNelson wrote:




 On Wed, May 14, 2014 at 8:00 PM, Jason Kridner wrote:



 On Thursday, May 1, 2014 2:22:37 PM UTC-4, Charles Steinkuehler wrote:

 On 5/1/2014 1:18 PM, Hannes Hörting wrote: 
  Hi Charles! 
  
  Sorry for the question, but what did you mean with just load? 
  New BBB and set the first Commando: 
  echo cape-universal  /sys/devices/bone_capemgr.*/slots 
  
  And there I get Write Error. File exists. 
  
  Guess without this command I cannot proceed? 

 You're probably having an issue with the audio pins if you haven't 
 disabled the HDMI cape (leaving the HDMIn without audio to load). 

 If HDMI is grabbing the audio pins, you need to load the universaln cape 
 which leaves the audio pins open: 

 echo cape-universaln  /sys/devices/bone_capemgr.*/slots 


 With the 4/23 Debian image, I get the following error when running the 
 above command fresh:

 [ 1184.038531] bone-capemgr bone_capemgr.9: part_number 
 'cape-universaln', version 'N/A'
 [ 1184.038814] bone-capemgr bone_capemgr.9: slot #9: generic override
 [ 1184.038866] bone-capemgr bone_capemgr.9: bone: Using override eeprom 
 data at slot 9
 [ 1184.038918] bone-capemgr bone_capemgr.9: slot #9: 'Override Board 
 Name,00A0,Override Manuf,cape-universaln'
 [ 1184.039193] bone-capemgr bone_capemgr.9: slot #9: Requesting part 
 number/version based 'cape-universaln-00A0.dtbo
 [ 1184.039246] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware 
 'cape-universaln-00A0.dtbo' for board-name 'Override Board Name', version 
 '00A0'
 [ 1184.039313] bone-capemgr bone_capemgr.9: slot #9: dtbo 
 'cape-universaln-00A0.dtbo' loaded; converting to live tree
 [ 1184.159501] bone-capemgr bone_capemgr.9: slot #9: cape-universaln 
 conflict P9.31 (#5:BB-BONELT-HDMI)


 Pin Conflict. ^^

 Make sure you disable the cape you need to disable before loading that 
 specific cape.


Is there not a version of cape-universal that doesn't use the eMMC or HDMI 
pins?

https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dts
 
makes me think that P9-31 isn't requested by cape-universaln, yet the 
conflict still happens. Leaving the .dts files around might be helpful.
 


 Regards,

 -- 
 Robert Nelson
 http://www.rcn-ee.com/ 


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Jason Kridner
On Wed, May 14, 2014 at 9:57 PM, Jason Kridner jkrid...@gmail.com wrote:



 On Wednesday, May 14, 2014 9:04:02 PM UTC-4, RobertCNelson wrote:




 On Wed, May 14, 2014 at 8:00 PM, Jason Kridner wrote:



 On Thursday, May 1, 2014 2:22:37 PM UTC-4, Charles Steinkuehler wrote:

 On 5/1/2014 1:18 PM, Hannes Hörting wrote:
  Hi Charles!
 
  Sorry for the question, but what did you mean with just load?
  New BBB and set the first Commando:
  echo cape-universal  /sys/devices/bone_capemgr.*/slots
 
  And there I get Write Error. File exists.
 
  Guess without this command I cannot proceed?

 You're probably having an issue with the audio pins if you haven't
 disabled the HDMI cape (leaving the HDMIn without audio to load).

 If HDMI is grabbing the audio pins, you need to load the universaln
 cape
 which leaves the audio pins open:

 echo cape-universaln  /sys/devices/bone_capemgr.*/slots


 With the 4/23 Debian image, I get the following error when running the
 above command fresh:

 [ 1184.038531] bone-capemgr bone_capemgr.9: part_number
 'cape-universaln', version 'N/A'
 [ 1184.038814] bone-capemgr bone_capemgr.9: slot #9: generic override
 [ 1184.038866] bone-capemgr bone_capemgr.9: bone: Using override eeprom
 data at slot 9
 [ 1184.038918] bone-capemgr bone_capemgr.9: slot #9: 'Override Board
 Name,00A0,Override Manuf,cape-universaln'
 [ 1184.039193] bone-capemgr bone_capemgr.9: slot #9: Requesting part
 number/version based 'cape-universaln-00A0.dtbo
 [ 1184.039246] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware
 'cape-universaln-00A0.dtbo' for board-name 'Override Board Name', version
 '00A0'
 [ 1184.039313] bone-capemgr bone_capemgr.9: slot #9: dtbo
 'cape-universaln-00A0.dtbo' loaded; converting to live tree
 [ 1184.159501] bone-capemgr bone_capemgr.9: slot #9: cape-universaln
 conflict P9.31 (#5:BB-BONELT-HDMI)


 Pin Conflict. ^^

 Make sure you disable the cape you need to disable before loading that
 specific cape.


 Is there not a version of cape-universal that doesn't use the eMMC or HDMI
 pins?


 https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dtsmakes
  me think that P9-31 isn't requested by cape-universaln, yet the
 conflict still happens. Leaving the .dts files around might be helpful.


I think I found it:
https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/5





 Regards,

 --
 Robert Nelson
 http://www.rcn-ee.com/

  --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to the Google Groups
 BeagleBoard group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Charles Steinkuehler
On 5/14/2014 9:44 PM, Jason Kridner wrote:
 On Wed, May 14, 2014 at 9:57 PM, Jason Kridner jkrid...@gmail.com wrote:

 https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dtsmakes
  me think that P9-31 isn't requested by cape-universaln, yet the
 conflict still happens. Leaving the .dts files around might be helpful.

Look in: /opt/source/beaglebone-universal-io/

 I think I found it:
 https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/5

Thanks Jason!  Merged.

I always disable the HDMI (with audio) so didn't catch this one.

Robert:
This will need to get migrated to the kernel source as well.  Can you
handle that or should I send a patch (or pull request against ??) ?

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Robert Nelson
On Wed, May 14, 2014 at 9:51 PM, Charles Steinkuehler 
char...@steinkuehler.net wrote:

 On 5/14/2014 9:44 PM, Jason Kridner wrote:
  On Wed, May 14, 2014 at 9:57 PM, Jason Kridner jkrid...@gmail.com
 wrote:
 
 
 https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dtsmakesme
  think that P9-31 isn't requested by cape-universaln, yet the
  conflict still happens. Leaving the .dts files around might be helpful.

 Look in: /opt/source/beaglebone-universal-io/

  I think I found it:
  https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/5

 Thanks Jason!  Merged.

 I always disable the HDMI (with audio) so didn't catch this one.

 Robert:
 This will need to get migrated to the kernel source as well.  Can you
 handle that or should I send a patch (or pull request against ??) ?


No worries, i'll pull in that change tomorrow, i found a another half dozen
new cape dtbo's i need to add. ;)

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Robert Nelson
On Wed, May 14, 2014 at 10:15 PM, Jason Kridner jkrid...@beagleboard.orgwrote:




 On Wed, May 14, 2014 at 10:51 PM, Charles Steinkuehler 
 char...@steinkuehler.net wrote:

 On 5/14/2014 9:44 PM, Jason Kridner wrote:
  On Wed, May 14, 2014 at 9:57 PM, Jason Kridner jkrid...@gmail.com
 wrote:
 
 
 https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dtsmakesme
  think that P9-31 isn't requested by cape-universaln, yet the
  conflict still happens. Leaving the .dts files around might be helpful.

 Look in: /opt/source/beaglebone-universal-io/

  I think I found it:
  https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/5

 Thanks Jason!  Merged.

 I always disable the HDMI (with audio) so didn't catch this one.


 Still getting the error and trying to track it down.


Rename the file and echo it into the slots later once in userspace. (it has
the same name as the file built-into the kernel)

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-14 Thread Jason Kridner
On Wed, May 14, 2014 at 11:18 PM, Robert Nelson robertcnel...@gmail.comwrote:




 On Wed, May 14, 2014 at 10:15 PM, Jason Kridner 
 jkrid...@beagleboard.orgwrote:




 On Wed, May 14, 2014 at 10:51 PM, Charles Steinkuehler 
 char...@steinkuehler.net wrote:

 On 5/14/2014 9:44 PM, Jason Kridner wrote:
  On Wed, May 14, 2014 at 9:57 PM, Jason Kridner jkrid...@gmail.com
 wrote:
 
 
 https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dtsmakesme
  think that P9-31 isn't requested by cape-universaln, yet the
  conflict still happens. Leaving the .dts files around might be
 helpful.

 Look in: /opt/source/beaglebone-universal-io/

  I think I found it:
  https://github.com/cdsteinkuehler/beaglebone-universal-io/pull/5

 Thanks Jason!  Merged.

 I always disable the HDMI (with audio) so didn't catch this one.


 Still getting the error and trying to track it down.


 Rename the file and echo it into the slots later once in userspace. (it
 has the same name as the file built-into the kernel)


That did it!

BTW, did you see the pull request on cape-firmware? Are we not going to
encourage cape makers to push their .dts files there? Is there a good
upstream for them that doesn't involve our massive patch tree?



 Regards,

 --
 Robert Nelson
 http://www.rcn-ee.com/

 --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to the Google Groups
 BeagleBoard group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-03 Thread Hannes Hörting
Hello Charles!

Hey, thank you! I disable the HDMI in the uEnv.txt and now I can enable 
cape-universal!
I put cape-universal in the uEnv.txt and now its enabled after reboot!

I have to set up the UART ba myself, right?
echo uart  /sys/devices/ocp.3/P9_11_pinmux.25/state

enable P9_11 to UART Mode, right?

Can I set this in your 
cape-universal-00A0.dtshttps://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universal-00A0.dts
 by 
default?

Thank you!

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-03 Thread Hannes Hörting
And maybe there is somewhere a list of all possible states?
uart, default, timer are I know.

Because P9_23 bring with
cat/sys/class/gpio/gpio49/value
bring me a 1 when I close with 3.3V

P9_17 bring me a 1 when I close with GND.

I would all set to 1 if I put 3.3V.

Thanks

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-03 Thread Hannes Hörting
Sorry. You already answered:

Once loaded, all pins default to inputs with their power-on reset 
 default pull up/down settings.  To change the pin functions, use the 
 config-pin utility: 
 config-pin p9.24 uart 
 config-pin p9.25 high 
 Just type config-pin (with no options) to get usage info. 


Thanks 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-03 Thread Charles Steinkuehler
You beat me to the answer...use the config-pin utility!  :)

Let me know if you run into any problems.  I haven't tested every
combination of features and there was a lot of cut-and-paste, so there
could be some bugs.

On 5/3/2014 1:59 AM, Hannes Hörting wrote:
 Sorry. You already answered:
 
 Once loaded, all pins default to inputs with their power-on reset 
 default pull up/down settings.  To change the pin functions, use the 
 config-pin utility: 
 config-pin p9.24 uart 
 config-pin p9.25 high 
 Just type config-pin (with no options) to get usage info. 

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-01 Thread Hannes Hörting
Hello!

Can you please tell me how I have to use it?
I use the Image BBB-eMMC-flasher-debian-7.4-2014-04-18-2gb.img
With a newer Image I have the problem to have less space on the eMMC.

With the first line I get, the File exists:
nano /sys/devices/bone_capemgr.9/slots:
0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART1
 8: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART2
10: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4
11: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART5

I enabled (if it works) before the serial ports.

Can you explain please how to use?
Your GUI I also try, but how to use? Compiling the main.cpp bring error:
main.cpp:20:24: schwerwiegender Fehler: QApplication: Datei oder 
Verzeichnis nicht gefunden
Kompilierung beendet.

Thank you!

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-01 Thread Hannes Hörting
Hello!

Guess I passed now some steps:
https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/exporting-and-unexporting-an-overlay

Great instruction. I install dtc and can compile your files with sh 
make.sh

But there is just one problem:
echo cape-universal  /sys/devices/bone_capemgr.*/slots



I get:
bash: echo: write error: File exists

Can I add the line(s) manual in the slots? Because when I open the slot:
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

I can add BB-UART1 ... but not cape-universal.

Any idea how I can add the settings?

Thanks


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-01 Thread Charles Steinkuehler
On 5/1/2014 7:13 AM, Hannes Hörting wrote:
 Hello!
 
 Guess I passed now some steps:
 https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/exporting-and-unexporting-an-overlay
 
 Great instruction. I install dtc and can compile your files with sh 
 make.sh
 
 But there is just one problem:
 echo cape-universal  /sys/devices/bone_capemgr.*/slots
 
 I get:
 bash: echo: write error: File exists
 
 Can I add the line(s) manual in the slots? Because when I open the slot:
 0: 54:PF---
 1: 55:PF---
 2: 56:PF---
 3: 57:PF---
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 
 I can add BB-UART1 ... but not cape-universal.
 
 Any idea how I can add the settings?

You load *JUST* the cape-universal.  It provides user-mode selection of
pin multiplexing and also loads most useful hardware drivers (like the
UARTs).

Once loaded, all pins default to inputs with their power-on reset
default pull up/down settings.  To change the pin functions, use the
config-pin utility:

config-pin p9.24 uart
config-pin p9.25 high

Just type config-pin (with no options) to get usage info.

You can also provide a file list of pin settings to the program, to
setup everything at once.  There is even a GUI program to generate the
files, but it doesn't (yet) run on the BeagleBone.  Get the PC, Mac, or
x86 Linux version here:

https://github.com/strahlex/BBIOConfig/releases

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-01 Thread Hannes Hörting
Hi Charles!


Sorry for the question, but what did you mean with just load?
New BBB and set the first Commando:
echo cape-universal  /sys/devices/bone_capemgr.*/slots

And there I get Write Error. File exists.

Guess without this command I cannot proceed?

Hannes

Am Donnerstag, 1. Mai 2014 14:40:34 UTC+2 schrieb Charles Steinkuehler:
 On 5/1/2014 7:13 AM, Hannes Hörting wrote:
 
  Hello!
 
  
 
  Guess I passed now some steps:
 
  https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/exporting-and-unexporting-an-overlay
 
  
 
  Great instruction. I install dtc and can compile your files with sh 
 
  make.sh
 
  
 
  But there is just one problem:
 
  echo cape-universal  /sys/devices/bone_capemgr.*/slots
 
  
 
  I get:
 
  bash: echo: write error: File exists
 
  
 
  Can I add the line(s) manual in the slots? Because when I open the slot:
 
  0: 54:PF---
 
  1: 55:PF---
 
  2: 56:PF---
 
  3: 57:PF---
 
  4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 
  5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 
  
 
  I can add BB-UART1 ... but not cape-universal.
 
  
 
  Any idea how I can add the settings?
 
 
 
 You load *JUST* the cape-universal.  It provides user-mode selection of
 
 pin multiplexing and also loads most useful hardware drivers (like the
 
 UARTs).
 
 
 
 Once loaded, all pins default to inputs with their power-on reset
 
 default pull up/down settings.  To change the pin functions, use the
 
 config-pin utility:
 
 
 
 config-pin p9.24 uart
 
 config-pin p9.25 high
 
 
 
 Just type config-pin (with no options) to get usage info.
 
 
 
 You can also provide a file list of pin settings to the program, to
 
 setup everything at once.  There is even a GUI program to generate the
 
 files, but it doesn't (yet) run on the BeagleBone.  Get the PC, Mac, or
 
 x86 Linux version here:
 
 
 
 https://github.com/strahlex/BBIOConfig/releases
 
 
 
 -- 
 
 Charles Steinkuehler
 
 char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-05-01 Thread Charles Steinkuehler
On 5/1/2014 1:18 PM, Hannes Hörting wrote:
 Hi Charles!
 
 Sorry for the question, but what did you mean with just load?
 New BBB and set the first Commando:
 echo cape-universal  /sys/devices/bone_capemgr.*/slots
 
 And there I get Write Error. File exists.
 
 Guess without this command I cannot proceed?

You're probably having an issue with the audio pins if you haven't
disabled the HDMI cape (leaving the HDMIn without audio to load).

If HDMI is grabbing the audio pins, you need to load the universaln cape
which leaves the audio pins open:

echo cape-universaln  /sys/devices/bone_capemgr.*/slots

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Using GPIO

2014-04-30 Thread Hannes Hörting
Hello!

I install in my BBB Debian.
I can read the value Form Pin 12.
I can set the direction to in or out.

But I dont know which Pins has wich mode.
I want all 4 serial Ports, 12 inputs, 12 outputs and 2 analog inputs and 2 
analog outputs.

But cant set OR check the mode of the Pins.

AS far I dead I have to compile the kernel new, when I want change mode of Pins?

For help Im very pleased.

Thank you!

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-04-30 Thread Charles Steinkuehler
On 4/30/2014 1:57 PM, Hannes Hörting wrote:
 Hello!
 
 I install in my BBB Debian.
 I can read the value Form Pin 12.
 I can set the direction to in or out.
 
 But I dont know which Pins has wich mode.
 I want all 4 serial Ports, 12 inputs, 12 outputs and 2 analog inputs and 2 
 analog outputs.
 
 But cant set OR check the mode of the Pins.
 
 AS far I dead I have to compile the kernel new, when I want change mode of 
 Pins?
 
 For help Im very pleased.

You can do most of what you want using my universal cape overlay and the
config-pin command:

https://github.com/cdsteinkuehler/beaglebone-universal-io

Note these are pre-installed on the new Debian images for the
BeagleBone, so if you're testing with one of those you won't need to
download anything.

Also note that you don't have to do anything special to use the analog
input pins, they are always setup as analog inputs.  But there are no
analog outputs, unless you send PWM to a digital I/O pin and use an
external filter.

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Using GPIO

2014-04-30 Thread Hannes Hörting
Hello!

Thank you for your help. Will try to use tomorrow.

Hannes

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
BeagleBoard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.