Hi,
We are trying to get the GPIO toggle example running on the beaglebone black.
At this point we succeeded in the following: running the RProc echo example from the TI hands on lab which works. Writing and loading a custom device tree overlay to set the pinmux although we are not sure whether the pins get configured correctly.
We did some tests by setting the pinmode with pull-up and pull-down resistors which we measured using a multimeter. So we are sure the device tree overlay is loaded correctly. But we are not able to toggle pins from the PRU.
The device tree overlay code (PRU cape dtsi file adapted to overlay):
`
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “EMS-PRU-CUSTOM”;
version = “00A0”;
/* This overlay uses the following resources */
exclusive-use =
“P9.30”,
“P9.31”,
“P9.27”,
“P9.25”,
“P9.29”,
“P9.28”,
“P8.44”,
“P8.41”,
“P8.42”,
“pru0”,
“pru1”,
“pruss”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
pru_pru_pins: pinmux_pru_pru_pins { // The PRU pin modes
pinctrl-single,pins = <
0x1a4 0x2e /* mcasp0_fsr, OMAP_MUX_MODE6 | AM33XX_PIN_INPUT, PRU CAPE SW1 /
0x1ac 0x2e / mcasp0_ahclkx, OMAP_MUX_MODE6 | AM33XX_PIN_INPUT, PRU CAPE SW2 /
0x19c 0x05 / mcasp0_ahclkr, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE Red LED /
0x198 0x05 / mcasp0_axr0, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE Orange LED /
0x190 0x05 / mcasp0_aclkx, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE Blue LED /
0x194 0x05 / mcasp0_fsx, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE Green LED /
0x0ac 0x05 / lcd_data3, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE RGB_0 LED, HDMI Conf. /
0x0b0 0x05 / lcd_data4, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE RGB_1 LED, HDMI Conf. /
0x0b4 0x05 / lcd_data5, OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT, PRU CAPE RGB_2 LED, HDMI Conf. */
;
};
};
};
fragment@1 { // Enable the PRUSS
target = <&pruss>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&pru_pru_pins>;
};
};
};
`
The code of the GPIO toggle example remained the same (toggling some bits of R30 ). The outfile was moved to /lib/firmware and symlinked to am335x-pru0-fw which was then loaded by removing and reloading pru_rproc.
Is there a way to check how the pinmux is configured? Also using the uEnv.txt we prevented any universal capes from loading on boot (cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=disable) and are using dtb=am335x-boneblack-overlay.dtb
We are running out of ideas why the GPIO’s are not toggling. Perhaps something is missing in the dts file? Are we overlooking something?
Thanks in advance