Hi all,

I am new in this forum so please correct me if I miss something.
Currently I am struggeling with some modifications on an already working 
project from https://github.com/luigif/hcsr04 where a HCSR04 sonar is 
triggered via PRU. The sample works fine and I tried to move this to 
different pins because in the end I will need several of the sonars for my 
project. To move the sample to pin P9_27 (as trigger pin) and P9_31 (as 
echo pin) I adjusted the dts file and a of course the .p file accordingly. 
Accidantally I found the modified sample working when I set the GPIO pin 
manually to an output pin in /sys/class/gpio/. At the moment I remove the 
gpio pin from /sys/class/gpio the sample stops working again. Its strange 
to me because the output from my pin configuration looks correct after 
loading the overlay:
cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins
...
pin 115 (44e109cc) 00000007 pinctrl-single
...

Pin 115 (P9_27 as GPIO3_19) is set here as mode7, pull down enabled and 
output. But loading the overlay does not pull the the pin to ground as I 
can see with a multimeter. Has someone any idea?
More info:
I work with a BBB in revision C.1 on kernel 3.8.13 (bone47)
My dts configuration:
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";

/* identification */
part-number = "hcsr04_2";
version = "00A0";

exclusive-use =
"P9.31", "P9.27",
"gpio3_14", "gpio3_19";

fragment@10 {
target = <&am33xx_pinmux>;
__overlay__ {
pinctrl_hcsr04_2: pinctrl_hcsr04_2_pins {
pinctrl-single,pins = <
/*
Table of mux options:
Bit 0 \
Bit 1 |- Mode
Bit 2 /
Bit 3: 1 - Pull disabled, 0 - Pull enabled
Bit 4: 1 - Pull up, 0 - Pull down
Bit 5: 1 - Input, 0 – Output
*/

0x1CC 0x07 /* Trigger: P9_27 gpio3[19] GPIO115 out pulldown Mode: 7 */
0x1B8 0x27 /* Echo: P9_31 gpio3[14] GPIO110 in pulldown Mode: 7 */
>;
};
};
};

fragment@11 {
target = <&ocp>;
__overlay__ {
hcsr04_2 {
compatible = "bone-pinmux-helper","gpio","pruss";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hcsr04_2>;
status = "okay";
};
};
};

fragment@12{
target = <&pruss>;
__overlay__ {
status = "okay";
};
};
};


Thank you in advance!


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

Reply via email to