BBB boots with pins in mode 5 (pru_out) with 3.3V instead of 0V

27 views
Skip to first unread message

Fabio Luis Girardi

unread,
Jul 17, 2020, 1:13:17 PM7/17/20
to BeagleBoard

Hi!

Sorry for the newbie question. I'm building a program to control pins P8.39 to P8.46 of a Beaglebone Black. Everything is ok, except the fact that when I unplug then plug again the power source on the board, these pins starts with 3.3V, that to me (and to the solution that I'm trying to develop) is a really big problem.

I'm only writing here because all examples that I found use mode 7 (GPIO). Nothing showing how to do that with mode 5 (PRU_OUT)

Here is the DTS file that I make to set up the pins to be used from PRU1


/*
 * This is a template-generated file from BoneScript
 */
/dts-v1/;
/plugin/;
/{
    compatible = "ti,beaglebone", "ti,beaglebone-black";
    part_number = "PRU1_FAST_GPIOs";
    exclusive-use =
        "P8.27",
        "P8.28",
        "P8.29",
        "P8.39",
        "P8.40",
        "P8.41",
        "P8.42",
        "P8.43",
        "P8.44",
        "P8.45",
        "P8.46",
        "P9.39",    // AIN0
        "P9.40",    // AIN1
        "P9.37",    // AIN2
        "P9.38",    // AIN3
        "P9.33",    // AIN4
        "P9.36",    // AIN5
        "P9.35",    // AIN6       
        "pr1_pru1_pru_r31",
        "pr1_pru1_pru_r30",
        "tscadc"; // hardware ip used
    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            bs_pinmode_PRU1_GPIOS: pinmux_bs_pru1_outputs {
                pinctrl-single,pins = <0x0e0 0x26
                                       0x0e8 0x26
                                       0x0e4 0x26
                                       0x0b8 0x05
                                       0x0bc 0x05
                                       0x0b0 0x05
                                       0x0b4 0x05
                                       0x0a8 0x05
                                       0x0ac 0x05
                                       0x0a0 0x05
                                       0x0a4 0x05
                                      >;
            };
        };
    };
    fragment@1 {
        target = <&ocp>;
        __overlay__ {
            bs_pinmode_P8_PR1_pinmux {
                compatible = "bone-pinmux-helper";
                status = "okay";
                pinctrl-names = "default";
                pinctrl-0 = <&bs_pinmode_PRU1_GPIOS>;
            };
        };
    };
  fragment@2 {
    target = <&tscadc>;
    __overlay__ {
      status = "okay";
      adc {
        ti,adc-channels = <0 1 2 3 4 5 6 7>;
        ti,chan-step-avg = <16 16 16 16 16 16 16 16>;
        ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98>;
        ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
      };
    };
  };   
};

Robert Nelson

unread,
Jul 17, 2020, 1:15:50 PM7/17/20
to Beagle Board
On Fri, Jul 17, 2020 at 12:13 PM Fabio Luis Girardi
<papelhi...@gmail.com> wrote:
>
> Hi!
>
> Sorry for the newbie question. I'm building a program to control pins P8.39 to P8.46 of a Beaglebone Black. Everything is ok, except the fact that when I unplug then plug again the power source on the board, these pins starts with 3.3V, that to me (and to the solution that I'm trying to develop) is a really big problem.

Some pins have odd startup states, just wire up a 74 logic inverter to
the pin to change the output on power-on..

Regards,

--
Robert Nelson
https://rcn-ee.com/
Reply all
Reply to author
Forward
0 new messages