// Setup file for basic PRU GPIO Blinking LED
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
part-number = "PRU-GPIO-BLINK";
version = "00A0";
// This overlay uses the following resources
exclusive-use = "P8.12";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
gpio_pins: pinmux_gpio_pins {
pinctrl-single,pins = <
0x034 0x06
>;
};
};
};
fragment@1 {
target = <&pruss>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpio_pins>;
};
};
};
root@beaglebone:/lib/firmware# dtc -O dts -o /lib/firmware/PRU-GPIO-BLINK-00A0.dtbo -b 0 -@ PRU-GPIO-BLINK.dts
root@beaglebone:/lib/firmware# echo "PRU-GPIO-BLINK" > /sys/devices/platform/bone_capemgr/slots
On top of the above I tried following the exercise here: http://elinux.org/EBC_Exercise_30_PRU_via_remoteproc_and_RPMsg
dtb=am335x-boneblack-emmc-overlay.dtb
#include "am33xx-pruss-rproc.dtsi
cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,univ-emmc
I think I know exactly what is wrong. You need to activate the Remoteproc PRU framework. This is no longer active by default.Robert Nelson's script which is available via Github repository will fix the problem.I have been working on detailed documentation of the entire process to activate the framework and set up the C compiler:More specifically, look at this PDF file:
https://github.com/Greg-R/pruadc1/blob/master/doc/PRUADC1latex/PRUADC1.pdfGo to the chapter "Setting Up the Remoteproc PRU and Compiler on the Beaglebone Green".Now, the chapter is not completely finished. I am still seeing a problem with the configurationAt boot, the PRU firmwares are not starting correctly. I don't understand why this is.
However, you can do this:rmmod pru_rprocand thenmodprobe pru_rprocThe firmwares will start running.More investigation, required, but at least there is some path to getting things working for now.I will do some more work on this later today.Regards,Greg
On Tuesday, November 8, 2016 at 11:42:25 AM UTC-5, Zach B wrote:I have spent a solid 12 hours trying to get the PRU's on the beaglebone to work. So far I seem to be completely stuck at the getting the device overlay to work as well as enabling the remoteproc. I have tried to piece together all of the information I have found on the internet but it is either out of date or extremely fragmented. I can't seem to find a current working example or I hit a wall when following along as said previously.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/ce0bf666-a685-4e22-adc6-6bab07d7b73d%40googlegroups.com.
echo PRU-GPIO-BLINK > /sys/devices/platform/bone_capemgr/slots
-bash: echo: write error: No such file or directory
PRU-GPIO-BLINK.dts
PRU-GPIO-BLINK-00A0.dtb
-bash: echo: write error: File exists
[ 2117.571792] bone_capemgr bone_capemgr: part_number 'PRU-GPIO-BLINK', version 'N/A'
[ 2117.571876] bone_capemgr bone_capemgr: slot #10: override
[ 2117.571920] bone_capemgr bone_capemgr: Using override eeprom data at slot 10
[ 2117.571967] bone_capemgr bone_capemgr: slot #10: 'Override Board Name,00A0,Override Manuf,PRU-GPIO-BLINK'
[ 2117.573674] bone_capemgr bone_capemgr: slot #10: PRU-GPIO-BLINK conflict P8.11 (#4:univ-emmc)
[ 2117.582657] bone_capemgr bone_capemgr: slot #10: Failed verification
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/18dbb804-b0c2-495f-bd95-14a933c84022%40googlegroups.com.
On Nov 12, 2016 10:39 AM, "Greg" <soapy...@comcast.net> wrote:
>
> Is there a better way to get the job done? Or better "don't touch that"?
Yeap, the reliably way to unload the cape is to reboot.. this is why the cape universal with config-pin is so useful.. config-pin allows us to map a pin as function A then change it to function B without rebooting.
Regards,
Get that here:Once again, using the above image, don't touch device tree files (except one very trivial change to activate Remoteproc) and use config-pin to change pin modes to PRU. All ready to go on this image.Get Remoteproc activated and see if you can get the Remoteproc related kernel modules to appear in lsmod.I've attempted to very carefully describe the process in the PDF file here and did a bunch of updates last weekend:Regards,Greg
On Monday, November 14, 2016 at 10:17:40 PM UTC-5, Zach B wrote:Hey everyone so I took one step forward and one step back. With the last bit of help from Robert I was able to properly disable the universal overlay and load my own. It appears that my device overlay loads correctly. When I went to test things today however I can't seem to get the remote_proc to turn on by following the elinux example like last time. I follow all of the steps. I get no errors, but nothing happens. I haven't looked through the boot dmesg yet so it could be in there. Is there another way to manually turn on the remote_proc?On a different note after reading some of your comments I am a bit confused. Is the device tree overlay the proper way to go about setting the header pins to the PRU or not? Also is there a command line method to working with the PRUs that would let me test the pins to ensure they are working?I tried compiling a simple c script to run the PRU but I keep getting the error pruss/prussdrv.h: no such file or directory. Are the pruss files something that needs to be included on my LIBRARY path or LD_LIBRARY path or is it an extra package I need to download?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/3fbe8061-3943-4180-b56a-d8998af92af9%40googlegroups.com.
dtb=am335x-boneblack-overlay.dtb
[ 697.537395] remoteproc1: 4a334000.pru0 is available
[ 697.537435] remoteproc1: Note: remoteproc is still under development and considered experimental.
[ 697.537450] remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 697.537926] remoteproc1: Unsupported class: 254
[ 697.546973] pru-rproc 4a334000.pru0: booting the PRU core manually
[ 697.547013] remoteproc1: powering up 4a334000.pru0
[ 697.547250] pru-rproc 4a334000.pru0: rproc_boot failed
[ 697.557946] remoteproc1: releasing 4a334000.pru0
[ 697.559696] pru-rproc: probe of 4a334000.pru0 failed with error -12
Enter code here...; blink.p: demonstration of PRU on the BeagleBone Black
; blink LED connected to P8_11 ten times
.origin 0
.entrypoint TOP
TOP:
MOV r1, 10 ; blink counter
BLINK:
SET r30, r30, 15 ; set GPIO output 15
MOV r0, 0x00a00000 ; delay counter
DELAY:
SUB r0, r0, 1
QBNE DELAY, r0, 0 ; loop until r0 == 0 (delay)
CLR r30, r30, 15 ; clear GPIO output 15
MOV r0, 0x00a00000 ; delay counter
DELAY2:
SUB r0, r0, 1
QBNE DELAY2, r0, 0 ; loop until r0 == 0 (delay)
SUB r1, r1, 1
QBNE BLINK, r1, 0 ; loop until r1 = 0 (blink counter)
MOV r31.b0, 32 + 3
HALT
pasm -b blink2.asm
config-pin overlay cape-univversala
config-pin-q P9_31
config-pin P9_31 pruout
Thanks for the information Greg.Robert & everyone,I was digging into that link you sent about which universal overlay gets loaded at boot. I have tried modifying my uEnv.txt file to enable different overlays but i cant' seem to get config-pin to work for P9_31 and P9_29. It responds that config-pin isn't set up for those pins but when I run
config-pin overlay cape-univversalait seems to load just fine but when I call either:
config-pin-q P9_31
config-pin P9_31 pruoutit says that it is unable to access the "state" of that pin or set the "pinmux". What's the right way to enable config-pin on all of the pins so that I can set the PRU pins I need to "pruout"?Zach
Uncomment '#include "am33xx-pruss-rproc.dtsi"' in the following files as desired
/opt/source/dtb-4.4-ti/src/arm/am335x-boneblack-overlay.dts
/opt/source/dtb-4.4-ti/src/arm/am335x-boneblack-audio.dts
/opt/source/dtb-4.4-ti/src/arm/am335x-boneblack-hdmi-overlay.dts
/opt/source/dtb-4.4-ti/src/arm/am335x-boneblack-emmc-overlay.dts
##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb
##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
dtb=am335x-boneblack-overlay.dtb
/opt/source/beaglebone-universal-io/
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/41cefc20-ff0c-49ba-a780-8d25bf4216da%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
init:
LDI32 R21, 0x55555555 LDI32 R1, 0x00000000 LDI32 R2, 0x00000020 XOUT 10, &R21, 4 NOP XIN 10, &R1, 4; MOV R1, R21
SUB R2, R2, 1 MOV R30, R1 NOP
read_loop: SUB R2, R2, 1 LSR R30, R30, 1 NOP QBNE read_loop, R2, 0 QBA init HALT
Thanks Jason, those were two great examples.Has anyone had any trouble with the scratch pad between PRUs? I'm using it to pass values between the two systems and it doesn't appear to be working at all. I even created a test script that has a PRU load a value into bank 0 and then read it back out into a separate register and it doesn't appear to be working. I get nothing back out of bank0. Is there some control register that you have to set to activate these banks?Here is the code I am using to test
init:
LDI32 R21, 0x55555555LDI32 R1, 0x00000000LDI32 R2, 0x00000020XOUT 10, &R21, 4NOP
XIN 10, &R1, 1
; MOV R1, R21SUB R2, R2, 1MOV R30, R1NOPread_loop:SUB R2, R2, 1LSR R30, R30, 1NOPQBNE read_loop, R2, 0QBA initHALT
The MOV command works just fine but the XIN command does nothing. The register remains empty. Any thoughts?
Zach
On Tuesday, November 29, 2016 at 10:16:37 AM UTC-5, Jason Reeder wrote:
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/77f4936f-70fa-49b5-b45b-8d6c38b3937e%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.