[beagleboard] Enabling PWM on boot

2019-11-10 Thread vinaydivakar1990
Hi,

I am trying to get the PWM enabled on boot up. I have added the BB-PWM1 and 
BB-PWM2 dtbo's in the uEnv.txt as shown below.

debian@beaglebone:/opt/scripts/tools$ sudo ./version.sh 
git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
eeprom:[A335BNLTBWA51712EW002601]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
2018.09-2-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.71-ti-r80]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/BB-UART3-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr3=/lib/firmware/BB-UART4-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-UART5-00A0.dtbo 
]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/BB-I2C2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr6=/lib/firmware/BB-BONE-AUDI-02-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr7=/lib/firmware/BB-ADC-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
uboot_overlay_options:[dtb_overlay=/lib/firmware/BB-PWM1-00A0.dtbo]
uboot_overlay_options:[dtb_overlay=/lib/firmware/BB-PWM2-00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
]
pkg:[bb-cape-overlays]:[4.4.20180928.0-0rcnee0~stretch+20180928]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video 
plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep 
admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[1.126856] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
568
dmesg | grep gpio-of-helper
[1.138722] gpio-of-helper ocp:cape-universal: ready
END

Now I try to generate PWM pulses on P9_14 which is EHRPWM1A. On checking 
the PWM directory, I see the following:

debian@beaglebone:/sys/class/pwm$ ls -l
total 0
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip0 -> 
../../devices/platform/ocp/4830.epwmss/48300100.ecap/pwm/pwmchip0
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip1 -> 
../../devices/platform/ocp/4830.epwmss/48300200.pwm/pwm/pwmchip1
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip3 -> 
../../devices/platform/ocp/48302000.epwmss/48302100.ecap/pwm/pwmchip3
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip4 -> 
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip4
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip6 -> 
../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip6
lrwxrwxrwx 1 root pwm 0 Nov 10 21:38 pwmchip7 -> 
../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip7

>From the above, the P9_14 seems to be mapped to pwmchip4 i.e. pwmchip4 -> 
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip4. Now I 
do the below to export the pin.

debian@beaglebone:/sys/class/pwm/pwmchip4$ echo 0 > export 
debian@beaglebone:/sys/class/pwm/pwmchip4$ ls -l
total 0
lrwxrwxrwx 1 root pwm0 Nov 10 21:38 device -> ../../../48302200.pwm
-rw-rw 1 root pwm 4096 Nov 10 21:50 export
-rw-rw-r-- 1 root pwm 4096 Nov 10 21:37 npwm
drwxrwxr-x 2 root pwm0 Nov 10 21:37 power
drwxrwxr-x 3 root pwm0 Nov 10 21:50 pwm-4:0
lrwxrwxrwx 1 root pwm0 Nov 10 21:38 subsystem -> 
../../../../../../../class/pwm
-rw-rw-r-- 1 root pwm 4096 Nov 10 21:37 uevent
-rw-rw 1 root pwm 4096 Nov 10 21:37 unexport

Now, I tried to generate the PWM as follows.

debian@beaglebone:/sys/class/pwm/pwmchip4$ cd pwm-4\:0/
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ ls 
capture  device  duty_cycle  enable  period  polarity  power  subsystem  
uevent
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ echo 10 > period
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ echo 8 > 
duty_cycle
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ echo 1 > enable
 
But I don't see any output on the scope. Then I configured the P9_14 to PWM 
mode following this thread 
. 

debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ sudo config-pin -q P9.14 
P9_14 Mode: default Direction: in Value: 0
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-4:0$ sudo config-pin P9.14 pwm
debian@beaglebone:/sys/class/pwm/pwmchip4/pwm-

[beagleboard] Re: BeagleBone Black UART not working

2019-11-10 Thread vinaydivakar1990
In your version.sh output I don't see the UART 1 enabled. Add the 
BB-UART1-00A0.dtbo to the uEnv.txt as shown below to enable it.

uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo

Then reset the device and should work. To test it, hook up a scope and send 
some characters via the terminal as shown here 

.

On Tuesday, 15 October 2019 01:05:45 UTC+13, Mridul Ahuja wrote:
>
>
> I have a BeagleBone Black running *Debian 9.9 2019-08-03 4GB SD IoT *(
> https://beagleboard.org/latest-images). I want to integrate it with 
> Sim900a GSM module. But I can't get the UART working. I've connected the 
> pins P9.24 (UART1 TX) to RX of the module, P9.26 (UART1 RX) to TX of the 
> module, and P9.2 (DGND) to Gnd of the module. Also I've configured the pins 
> to work as UART by using sudo config-pin P9.24 uart
>
> I've tried other UARTs also but no luck. Any help please ?
>

-- 
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/ab7c9810-3c94-42b6-b259-8d9e4d0a2d19%40googlegroups.com.


[beagleboard] Re: No I2S signals from the BeagleBone Black

2019-11-05 Thread vinaydivakar1990
Finally got the audio working. Thanks.

On Wednesday, 14 August 2019 04:16:18 UTC+12, vinaydiv...@gmail.com wrote:
>
>
> I am unable to get the I2S signals from the beaglebone. Below are the 
> things I did.
>
>1. I first disabled the HDMI audio as described here 
>.
>2. I am using the P9.31 (SCLK), P9.28 (Data0) and P9.29(FSX/WS). 
>Running sudo /opt/scripts/tools/version.sh gives the following.
>
> debian@beaglebone:/boot$ sudo /opt/scripts/tools/version.sh
> [sudo] password for debian: 
> git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
> eeprom:[A335BNLT00C02315BBBK4ACD]
> model:[TI_AM335x_BeagleBone_Black]
> dogtag:[BeagleBoard.org Debian Image 2018-10-07]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
> 2018.09-2-g0b54a51eee]:[location: dd MBR]
> kernel:[4.14.71-ti-r80]
> nodejs:[v6.14.4]
> uboot_overlay_options:[enable_uboot_overlays=1]
> uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-BONE-AUDI-02.dtbo]
> uboot_overlay_options:[disable_uboot_overlay_audio=1]
> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
> uboot_overlay_options:[enable_uboot_cape_universal=1]
> pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
> ]
> pkg:[bb-cape-overlays]:[4.4.20180928.0-0rcnee0~stretch+20180928]
> pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
> pkg:[kmod]:[23-2rcnee1~stretch+20171005]
> pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
> pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
> groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev 
> users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi 
> tisdk weston-launch xenomai]
> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
> net.ifnames=0 quiet]
> dmesg | grep pinctrl-single
> [1.107553] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
> 568
> dmesg | grep gpio-of-helper
> [1.119437] gpio-of-helper ocp:cape-universal: ready
> END
>
>
>1. Running perl /opt/scripts/device/bone/show-pins.pl gives the 
>following.
>
> debian@beaglebone:/boot$ perl /opt/scripts/device/bone/show-pins.pl
> P8.25 / eMMC d00  U7 fast rx  up  1 mmc 1 d0 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.24 / eMMC d11  V7 fast rx  up  1 mmc 1 d1 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.05 / eMMC d22  R8 fast rx  up  1 mmc 1 d2 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.06 / eMMC d33  T8 fast rx  up  1 mmc 1 d3 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.23 / eMMC d44  U8 fast rx  up  1 mmc 1 d4 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.22 / eMMC d55  V8 fast rx  up  1 mmc 1 d5 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.03 / eMMC d66  R9 fast rx  up  1 mmc 1 d6 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.04 / eMMC d77  T9 fast rx  up  1 mmc 1 d7 
> mmc@481d8000 (pinmux_emmc_pins)
> P8.19  8 U10 fast rx down 7 gpio 0.22
> ocp/P8_19_pinmux (pinmux_P8_19_default_pin)
> P8.13  9 T10 fast rx down 7 gpio 0.23
> ocp/P8_13_pinmux (pinmux_P8_13_default_pin)
> P8.14 10 T11 fast rx down 7 gpio 0.26
> ocp/P8_14_pinmux (pinmux_P8_14_default_pin)
> P8.17 11 U12 fast rx down 7 gpio 0.27
> ocp/P8_17_pinmux (pinmux_P8_17_default_pin)
> P8.12 12 T12 fast rx down 7 gpio 1.12
> ocp/P8_12_pinmux (pinmux_P8_12_default_pin)
> P8.11 13 R12 fast rx down 7 gpio 1.13
> ocp/P8_11_pinmux (pinmux_P8_11_default_pin)
> P8.16 14 V13 fast rx down 7 gpio 1.14
> ocp/P8_16_pinmux (pinmux_P8_16_default_pin)
> P8.15 15 U13 fast rx down 7 gpio 1.15
> ocp/P8_15_pinmux (pinmux_P8_15_default_pin)
> P9.15 16 R13 fast rx down 7 gpio 1.16
> ocp/P9_15_pinmux (pinmux_P9_15_default_pin)
> P9.23 17 V14 fast rx down 7 gpio 1.17
> ocp/P9_23_pinmux (pinmux_P9_23_default_pin)
> P9.14 18 U14 fast rx down 7 gpio 1.18
> ocp/P9_14_pinmux (pinmux_P9_14_default_pin)
> P9.16 19 T14 fast rx down 7 gpio 1.19
> ocp/P9_16_pinmux (pinmux_P9_16_default_pin)
> P9.11 28 T17 fast rx down 7 gpio 0.30
> ocp/P9_11_pinmux (pinmux_P9_11_default_pin)
> P9.13 29 U17 fast rx down 7 gpio 0.31
> ocp/P9_13_pinmux (pinmux_P9_13_default_pin)
> P9.12 30 U18 fast rx down 7 gp

[beagleboard] No I2S signals from the BeagleBone Black

2019-08-13 Thread vinaydivakar1990


I am unable to get the I2S signals from the beaglebone. Below are the 
things I did.

   1. I first disabled the HDMI audio as described here 
   .
   2. I am using the P9.31 (SCLK), P9.28 (Data0) and P9.29(FSX/WS). Running 
   sudo /opt/scripts/tools/version.sh gives the following.

debian@beaglebone:/boot$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian: 
git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
eeprom:[A335BNLT00C02315BBBK4ACD]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
2018.09-2-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.71-ti-r80]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-BONE-AUDI-02.dtbo]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20180928.0-0rcnee0~stretch+20180928]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev 
users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi 
tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 
quiet]
dmesg | grep pinctrl-single
[1.107553] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[1.119437] gpio-of-helper ocp:cape-universal: ready
END


   1. Running perl /opt/scripts/device/bone/show-pins.pl gives the 
   following.

debian@beaglebone:/boot$ perl /opt/scripts/device/bone/show-pins.pl
P8.25 / eMMC d00  U7 fast rx  up  1 mmc 1 d0 
mmc@481d8000 (pinmux_emmc_pins)
P8.24 / eMMC d11  V7 fast rx  up  1 mmc 1 d1 
mmc@481d8000 (pinmux_emmc_pins)
P8.05 / eMMC d22  R8 fast rx  up  1 mmc 1 d2 
mmc@481d8000 (pinmux_emmc_pins)
P8.06 / eMMC d33  T8 fast rx  up  1 mmc 1 d3 
mmc@481d8000 (pinmux_emmc_pins)
P8.23 / eMMC d44  U8 fast rx  up  1 mmc 1 d4 
mmc@481d8000 (pinmux_emmc_pins)
P8.22 / eMMC d55  V8 fast rx  up  1 mmc 1 d5 
mmc@481d8000 (pinmux_emmc_pins)
P8.03 / eMMC d66  R9 fast rx  up  1 mmc 1 d6 
mmc@481d8000 (pinmux_emmc_pins)
P8.04 / eMMC d77  T9 fast rx  up  1 mmc 1 d7 
mmc@481d8000 (pinmux_emmc_pins)
P8.19  8 U10 fast rx down 7 gpio 0.22
ocp/P8_19_pinmux (pinmux_P8_19_default_pin)
P8.13  9 T10 fast rx down 7 gpio 0.23
ocp/P8_13_pinmux (pinmux_P8_13_default_pin)
P8.14 10 T11 fast rx down 7 gpio 0.26
ocp/P8_14_pinmux (pinmux_P8_14_default_pin)
P8.17 11 U12 fast rx down 7 gpio 0.27
ocp/P8_17_pinmux (pinmux_P8_17_default_pin)
P8.12 12 T12 fast rx down 7 gpio 1.12
ocp/P8_12_pinmux (pinmux_P8_12_default_pin)
P8.11 13 R12 fast rx down 7 gpio 1.13
ocp/P8_11_pinmux (pinmux_P8_11_default_pin)
P8.16 14 V13 fast rx down 7 gpio 1.14
ocp/P8_16_pinmux (pinmux_P8_16_default_pin)
P8.15 15 U13 fast rx down 7 gpio 1.15
ocp/P8_15_pinmux (pinmux_P8_15_default_pin)
P9.15 16 R13 fast rx down 7 gpio 1.16
ocp/P9_15_pinmux (pinmux_P9_15_default_pin)
P9.23 17 V14 fast rx down 7 gpio 1.17
ocp/P9_23_pinmux (pinmux_P9_23_default_pin)
P9.14 18 U14 fast rx down 7 gpio 1.18
ocp/P9_14_pinmux (pinmux_P9_14_default_pin)
P9.16 19 T14 fast rx down 7 gpio 1.19
ocp/P9_16_pinmux (pinmux_P9_16_default_pin)
P9.11 28 T17 fast rx down 7 gpio 0.30
ocp/P9_11_pinmux (pinmux_P9_11_default_pin)
P9.13 29 U17 fast rx down 7 gpio 0.31
ocp/P9_13_pinmux (pinmux_P9_13_default_pin)
P9.12 30 U18 fast rx down 7 gpio 1.28
ocp/P9_12_pinmux (pinmux_P9_12_default_pin)
P8.26 31  V6 fast rx down 7 gpio 1.29
ocp/P8_26_pinmux (pinmux_P8_26_default_pin)
P8.21 / eMMC clk  32  U9 fast rx  up  2 mmc 1 clk
mmc@481d8000 (pinmux_emmc_pins)
P8.20 / eMMC cmd

[beagleboard] Why did my BeagleBone Black suddenly switched off and not powering up again?

2016-06-12 Thread vinaydivakar1990
Hi,

I have been using BBB for a while now and have developed embedded 
applications using it. This morning when I was working with my BBB, 
something strange happened, I powered my BBB and when I was about to SSH to 
the BBB, suddenly it just switched off. Then I unplugged and plugged in the 
adapter and saw that, the BBB does not power up while the power LED just 
blinks once and goes off. Then I tried to power my BBB through the USB and 
the same thing happens again i.e. Power LED flashes ones and then the BBB 
not responding while powered off.

Has this happened to anyone else?, After researching online, It says here 
Beagleboard:BeagleBoneBlack 
- eLinux.org 

 
its issue with PMIC due to high current intake, but I don't understand what 
I did for the BBB to draw high currents. I am using BBB Rev C. Please help?.

Can I power up the BBB from an adapter by connecting the adapters positive 
to P9_05 (VDD) and  negative to GND of BBB??


Regards
Vinay Divakar

-- 
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/b7d107ea-b896-4578-8ca5-73417a5bda46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: Issues with Enabling SPIDev on Beaglebone Black

2016-05-16 Thread vinaydivakar1990
Step 1 : Go to root@beaglebone: /boot#
Step 2 : Open uEnv.txt file
Step 3 : Inside the file

You will find these lines, so do the following: In case If you dont find 
these lines for your kernel, then just append the line 
"cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0" to the end of the file.

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0

Step 4 : Reboot your BBB
Step 5 : Go to /sys/devices/platform/bone_capemgr# cat slots or dmesg to 
check.

Then check if your SPI device has been loaded.

This works with Linux beaglebone kernel 4.1.18-ti-r53


On Monday, 16 May 2016 03:57:34 UTC+5:30, jb...@eng.ucsd.edu wrote:
>
> Hi Rudy,
>
> I am trying to enable SPI0 in BBB. I cannot access the link you gave. I 
> would appreciate if you could update the link or post the file in another 
> way.
>
> p.s. - I am using the kernel 4.4.8 and cannot find capemgr things... 
>
> On Monday, February 22, 2016 at 5:09:36 PM UTC-8, Rudy Misek wrote:
>>
>> Ok, compiled my own device tree overlays for SPI0, SPI1 and added 
>> CAPE=BB-UART1,BB-UART4,BB-UART5,BB-SPI0-01,BB-SPI1-01 to the 
>> /etc/default/capemgr file and it works.
>> Thanks for posting that Vinay!
>>
>> Just a note to my previous post UART2 and SPI0 share the same pins.
>>
>> Here is the link for SPI the device tree overlays I compiled, hopefully 
>> it will help someone out that is getting started with both the SPI's on the 
>> BBB: 
>> https://drive.google.com/drive/folders/0B_aq4xH2lZ0WVElpWWRLNW1uSGM
>>
>> After downloading: (these steps will enable SPI0 and SPI1)
>>  1. Disable HDMI, pins are used by SPI1: root@beaglebone:~# vim 
>> /boot/uEnv.txt
>>  2. Remove # from line: 
>> cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>>  3. Put the .dtbo files you downloaded from the link above in 
>> /lib/firmware on your BBB
>>  4. Add CAPE=BB-SPI0-01,BB-SPI1-01 to /etc/default/capemgr file: 
>> root@beaglebone:~# vim /etc/default/capemgr
>>  5. Reboot the BBB
>>  6. root@beaglebone:/sys/devices/bone_capemgr.*
>>  7. root@beaglebone:/sys/devices/bone_capemgr.9# cat slots
>>  You should see:
>>  ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI0-01
>>  ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI1-01
>> Now you're good to go with both SPI's :D
>>
>>
>>
>>
>> On Tue, Feb 23, 2016 at 9:27 AM, Rudy Misek  
>> wrote:
>>
>>> root@beaglebone:/sys/devices/bone_capemgr.9# cat 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
>>>  5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
>>>  6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
>>>  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
>>>  9: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4
>>> 10: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART5
>>> 11: ff:P-O-L Override Board Name,00A0,Override Manuf,ADAFRUIT-SPI0
>>> root@beaglebone:/sys/devices/bone_capemgr.9#
>>>
>>>
>>> On Tue, Feb 23, 2016 at 9:21 AM, Rudy Misek  
>>> wrote:
>>>
 Vinay is right, tried it out on a new BBB I just got, enabled UART1,2,4 
 and 5 plus ADAFRUIT-SPI0 by 
 adding CAPE=BB-UART1,BB-UART2,BB-UART4,BB-UART5,ADAFRUIT-SPI0
 to /ect/default/capemgr and rebooted.

 I can't load ADAFRUIT-SPI1 using the same method even though I have 
 disabled HDMI and HDMIN

 Vinay, have you been able to enable SPI1? 

 On Fri, Feb 19, 2016 at 7:59 PM,  wrote:

>
>
>1. Another solution is also simple, just include the line 
>"CAPE=ADAFRUIT-SP0" in /etc/default/capemgr file. Then reboot and all 
>should work fine.
>
> On Tuesday, 16 June 2015 20:09:14 UTC+5:30, Brendan Merna wrote:
>>
>> I'm trying to  enable SPI on boot up on my Beaglebone Black. I 
>> followed the wiki link below under the title 
>> SPI1 D1 Output and D0 Input
>>
>> I created the .dts file and compiled it. I then moved it to 
>> /lib/firmware/ and then enabled the device overlay tree. Finally, I 
>> changed 
>> the uenv.txt file by adding the text shown and I removed a pound sign at 
>> the end of the document. I did this because the boot command to enable 
>> the 
>> SPI wasn't working and I thought it wasn't reading the last command 
>> because 
>> of the pound sign. Unfortunately, now that I removed it, I reset my 
>> Beaglebone Black and it gets stuck in a state with the Power LED and 
>> USR0,USR1, USR2, and USR3 all stuck on. No blinking and my computer 
>> doesn't 
>> recognize its there. I'm powering through the USB port and have tried 
>> resetting and powering down numerous times. This same state keeps coming 
>> up. Can anyone help?
>>
>> Tutorial Link:
>> http://elinux.org/Beagl

[beagleboard] SPI0 not working - SPI0 pins of BBB conflicting with the 4D 7.0" LCD CAPE pins

2016-03-12 Thread vinaydivakar1990

Hello,

I have been working with BBB for a while using the 4D 4.3" LCD CAPE. The 
SPI0 worked well with the4D 4.3"LCD CAPE, but later when
I switched to the 4D 7.0" LCD CAPE, the SPI0 is not working and therefore 
no data is being acquired. After some search online,I got to know that the 
4D 7.0" LCD CAPE uses one of the SPI0 pins due to which my ADC and SPI0 
isn't working. Then I search for the .dts file that loads when the 7.0" LCD 
is connected, to disable that particular button on the CAPE that uses the 
SPI0 pin, but I did not find any .dts pertaining to this. From this,I 
presume that the SPI0 pin is allocated for the 7.0" LCD CAPE during the 
booting of kernel.

Then I used the "dmesg" command on terminal to check and I encountered a 
lines stating:





*" pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 
44e10800.pinmux; cannot claim for gpio-leds.8[0.841414] pinctrl-single 
44e10800.pinmux: pin-21 (gpio-leds.8) status -22[0.848693] 
pinctrl-single 44e10800.pinmux: could not request pin 21 on device 
pinctrl-single"*And I think, the P9_21 is the SPI0_D0 (Data Out) pin being 
used by the LCD CAPE keys- gpio0_3.


Has anyone come across this problem?. Looking forward to some support and 
solutions from experienced BBB users, to overcome this problem  and get my 
SPI0 working with the 4D 7.0" LCD CAPE.  


Thanks and Regards
Vinay Divakar

-- 
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] Re: Issues with Enabling SPIDev on Beaglebone Black

2016-02-19 Thread vinaydivakar1990


   1. Another solution is also simple, just include the line 
   "CAPE=ADAFRUIT-SP0" in /etc/default/capemgr file. Then reboot and all 
   should work fine.

On Tuesday, 16 June 2015 20:09:14 UTC+5:30, Brendan Merna wrote:
>
> I'm trying to  enable SPI on boot up on my Beaglebone Black. I followed 
> the wiki link below under the title 
> SPI1 D1 Output and D0 Input
>
> I created the .dts file and compiled it. I then moved it to /lib/firmware/ 
> and then enabled the device overlay tree. Finally, I changed the uenv.txt 
> file by adding the text shown and I removed a pound sign at the end of the 
> document. I did this because the boot command to enable the SPI wasn't 
> working and I thought it wasn't reading the last command because of the 
> pound sign. Unfortunately, now that I removed it, I reset my Beaglebone 
> Black and it gets stuck in a state with the Power LED and USR0,USR1, USR2, 
> and USR3 all stuck on. No blinking and my computer doesn't recognize its 
> there. I'm powering through the USB port and have tried resetting and 
> powering down numerous times. This same state keeps coming up. Can anyone 
> help?
>
> Tutorial Link:
> http://elinux.org/BeagleBone_Black_Enable_SPIDEV
>

-- 
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] Re: Issues with Enabling SPIDev on Beaglebone Black

2016-02-14 Thread vinaydivakar1990
The solution provided by emile works fine, but just to bring to notice, it 
has a glitch. If we add this line "echo BB-SPI1-01 > 
/sys/devices/bone_capemgr.9/slots" to /etc/rc.local file before exit 0, and 
then reboot from terminal, the BBB does not reboot. We have to manually 
power off and on the system. I don't know why this happens, but has to do 
something with addling this line in the /etc/rc.local file. 

On Tuesday, 16 June 2015 07:39:14 UTC-7, Brendan Merna wrote:
>
> I'm trying to  enable SPI on boot up on my Beaglebone Black. I followed 
> the wiki link below under the title 
> SPI1 D1 Output and D0 Input
>
> I created the .dts file and compiled it. I then moved it to /lib/firmware/ 
> and then enabled the device overlay tree. Finally, I changed the uenv.txt 
> file by adding the text shown and I removed a pound sign at the end of the 
> document. I did this because the boot command to enable the SPI wasn't 
> working and I thought it wasn't reading the last command because of the 
> pound sign. Unfortunately, now that I removed it, I reset my Beaglebone 
> Black and it gets stuck in a state with the Power LED and USR0,USR1, USR2, 
> and USR3 all stuck on. No blinking and my computer doesn't recognize its 
> there. I'm powering through the USB port and have tried resetting and 
> powering down numerous times. This same state keeps coming up. Can anyone 
> help?
>
> Tutorial Link:
> http://elinux.org/BeagleBone_Black_Enable_SPIDEV
>

-- 
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] Device Tree for SPI0 not loading during Beaglebone Black Boots up

2016-02-14 Thread vinaydivakar1990
 

I am presently using Debian GNU/Linux 7.9 (wheezy) on the BBB. Everything 
works fine until I reboot the BBB. Before rebooting, I do the following to 
verify If the SPI0 is enabled.

   1. 
   
   root@beaglebone:/sys/devices/bone_capemgr.9# echo ADAFRUIT-SPI0 > slots
   
*Output* : root@beaglebone:/sys/devices/bone_capemgr.9# cat 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 5: ff:P-O-L 
Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI *8: ff:P-O-L Override 
Board Name,00A0,Override Manuf,ADAFRUIT-SPI0*

The 8th slot is loaded with SPI 0. 
   
   1. root@beaglebone:~# ls -al /dev/spidev*

*Output* : crw-rw---T 1 root spi 153, 0 Feb 14 05:53 /dev/spidev1.0

Its showing spidev1.0, so its fine

   1. root@beaglebone:~# cat 
   /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups

*Output*: group: spi0_pins_s0 pin 84 (44e10950), pin 85 (44e10954), pin 86 
(44e10958),

Its showing the SPI pins.

   1. root@beaglebone:~# sudo nano /boot/uEnv.txt 

I opened the uEnv.txt file and added this line, so that the SPI0 DT will 
load during system boot up

optargs=capemgr.enable_partno=ADAFRUIT-SPI0

Problem: Why isn't my SPI0 DT being loaded during system boot up?, after a 
reboot I did steps 1,2 and 3 mentioned above to check, but noticed that the 
DT fails to load after rebooting. why is this happening? 

-- 
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] Segmentation fault error while trying to set the direction of the GPIO pin to perform read operation

2016-02-07 Thread vinaydivakar1990
Hi Everyone,

I am new to beaglebone black linux and looking for some support for the 
issue I am facing. I have been following Derek Molleys video tutorials on 
how to configure and program the GPIO's here 
http://derekmolloy.ie/beaglebone/beaglebone-gpio-programming-on-arm-embedded-linux/.
 
Everything was going fine, until I encountered this weird bug that has to 
do something with the memory segments I believe. Searched on net and came 
across someone who had faced the same issue here 
https://groups.google.com/forum/#!topic/beagleboard/Xe-oIuQOeI8, did the 
respective changes in the code as suggested, yet I keep getting  
segmentation fault error and the execution stops while displaying "Could 
not set the direction of the pin". Here is the code I am trying to fix,

#include 
#include 
#include 
#include 
using namespace std;
#define MAX 64

int flashGPIOLED(int, int);
int readbutton(int);

int main()
{
//flashGPIOLED(60, 5);
 readbutton(15);
}


int readbutton(int inputpin)
{
cout << "Scanning input pin: " << inputpin << "active" << endl;
FILE *ButtonHandle = NULL;
char Inputpin_no[4],Inputpin_val[2], Inputpin_dir[MAX],setValue[MAX];
sprintf(Inputpin_no,"%d",inputpin);
sprintf(Inputpin_val,"/sys/class/gpio/gpio%d/value",inputpin);
sprintf(Inputpin_dir,"sys/class/gpio/gpio%d/direction",inputpin);

//Export the pin
if((ButtonHandle = fopen("/sys/class/gpio/export","ab"))==NULL)
{
  printf("Could not export the pin\n");
  return 1;
}
strcpy(setValue,Inputpin_no);
fwrite(&setValue, sizeof(char), 2, ButtonHandle);
fclose(ButtonHandle);

//Set the direction of the pin
if((ButtonHandle = fopen(Inputpin_dir, "rb+"))==NULL)
{
  printf("Could not set the direction\n");
  return 
1;-> Control 
comes here and display "Could not set the direction and segmentation fault
}
strcpy(setValue,"in");
fwrite(&setValue, sizeof(char), 3, ButtonHandle);
fclose(ButtonHandle);

//Read the input pin
if((ButtonHandle = fopen(Inputpin_val, "rb+"))==NULL)
{
  printf("Cannot open the value handle\n");
  return 1;
}
fread(&setValue, sizeof(char),1,ButtonHandle);
fclose(ButtonHandle);
cout << "The value of the input pin is: " << setValue[0] << endl;

//Unexport the pin
if((ButtonHandle = fopen("sys/class/gpio/unexport", "ab"))==NULL)
{
  printf("Could not unexport\n");
  return 0;
}
strcpy(setValue,Inputpin_no);
fwrite(&setValue, sizeof(char), 3, ButtonHandle);
fclose(ButtonHandle);
}


 
int flashGPIOLED(int GPIOPin, int times)
{
cout << "GPIO LED BLINKING DEMO OF PIN:" << GPIOPin << "STARTS" << endl;
FILE *LEDHandle = NULL;
char setValue[4], GPIOString[4], GPIOValue[MAX], GPIODirection[MAX];
sprintf(GPIOString, "%d", GPIOPin);
sprintf(GPIOValue, "/sys/class/gpio/gpio%d/value", GPIOPin);
sprintf(GPIODirection, "/sys/class/gpio/gpio%d/direction", GPIOPin);

//Export the pin
if((LEDHandle = fopen("/sys/class/gpio/export","ab"))==NULL)
{
  printf("Cannot  export the GPIO pin\n");
  return 1;
}
strcpy(setValue,GPIOString);
fwrite(&setValue, sizeof(char), 2, LEDHandle);
fclose(LEDHandle);

//Set the direction of the Pin
if((LEDHandle = fopen(GPIODirection, "rb+"))==NULL)
{
  printf("Cannot open direction handle\n");
  return 1;
}
strcpy(setValue, "out");
fwrite(&setValue, sizeof(char), 3, LEDHandle);
fclose(LEDHandle);

//Flash the LED int times
for(int i=0 ; i<2*times ; i++)
{
  if((LEDHandle = fopen(GPIOValue, "rb+"))==NULL)
   {
printf("Cannot open value handle\n");
return 1;
   }
if(i%2 == 1)
strcpy(setValue,"0");
if(i%2 == 0)
strcpy(setValue,"1");
fwrite(&setValue, sizeof(char), 1, LEDHandle);
fclose(LEDHandle);
sleep(1);
  }
//Unexport the pin
if((LEDHandle = fopen("/sys/class/gpio/unexport","ab"))==NULL)
{
  printf("Cannot unexport the GPIOPin\n");
  return 1;
}
strcpy(setValue, GPIOString);
fwrite(&setValue, sizeof(char),2,LEDHandle);
fclose(LEDHandle);

cout << "GPIO LED Flash sequence of pin:" << GPIOPin << "ended" << 
endl;
return 0;
}

I have been trying for a while to fix this segmentation fault problem. I 
don't understand whats wrong with the above code that is causing this 
problem. Any advise and help regarding this would be great
Thank you all in advance.

Regrads
~VD

-- 
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/opto

[beagleboard] Why is eclipse prompting me for password when trying to connnect to BBB through remote systems?

2016-02-01 Thread vinaydivakar1990





Hi Everyone,

I have recently started getting my hands on with the BBB and have been 
following Derek Molleys blog. Presently I am following his video on cross 
compiling using eclipse luna in chapter 7 
http://exploringbeaglebone.com/chapter7/. However I am facing a bit of a 
problem here trying to have access to my BBB using the remote systems on 
eclipse. The problem is as follows:

When I try to connect to the BBB, a window pops up stating that I am using 
the default username and password as shown in the image, as I had not set 
any password for my BBB. Then, once I click "OK", then another window pops 
up as shown in the image, prompting for requirement of password in order to 
access the files on my BBB.

Now, I do not know what password is it asking for? and why is it prompting 
for a password, as I haven't set any?. Can anyone provide me some support 
on resolving this issue and shed some light If I am doing anything wrong?. 

Thank you all in advance!


Regards
~VD


-- 
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.