How to reliably activate PRUSS on beaglebone?

4,622 views
Skip to first unread message

Jacek Radzikowski

unread,
May 4, 2013, 12:34:24 PM5/4/13
to beagleboard
Hello,

I start to experiment with programming PRUs on beaglebone, but I can't
find a way to reliably enable the subsystem with 3.8 kernels. Since it
is disabled in the default device tree, I used
cape-bone-nixie-00A0.dts from the kernel firmware as a template to
created my own DT overlay. Unfortunately loading the uio_pruss module
and applying the overlay though the cape manager does not always
result in UIO being enabled. A few times, using magical combinations
of rmmods and modprobes and applications and removals of my overlay
and the original overlay for NIXIE cape I managed to activate PRU and
successfully run examples from am335x_pru_package, but I can't find a
pattern when it works and when it doesn't. More often than uioX
devices appearing in /dev I can see error messages from the kernel
about incorrect state transision in PRUSS, unbalanced
pm_runtime_enable and an oops similar to this one:
http://pastebin.com/R94TsQnq
Is there a way to enable PRUs without casting magical spells?

Thank you,
j.



--
Given a choice between two theories, take the one which is funnier

cmicali

unread,
May 4, 2013, 2:44:26 PM5/4/13
to beagl...@googlegroups.com
I am having similar problems on the Beagle Bone Black.. I'm seeing these two messages during boot:

[    3.129749] omap_hwmod: pruss: failed to hardreset
[    7.125974] pruss_uio 4a300000.pruss: No children

I have my own overlay that is basically exactly like the nixie cape overlay just with the pwm bits removed.    The overlay and pinmuxes are loaded correctly but something is going wrong with initializing the pruss subsystem.  /sys/class/uio is empty as the driver is failing to load.

Anyone have any ideas?

cmicali

unread,
May 4, 2013, 2:50:55 PM5/4/13
to beagl...@googlegroups.com
Also FWIW this was working fine on the beaglebone with 3.8.6...

Jacek Radzikowski

unread,
May 4, 2013, 3:40:47 PM5/4/13
to beagl...@googlegroups.com
I found a magical combination that seems to work every time:

export slots=/sys/devices/bone_capemgr.7/slots
set -x
modprobe uio_pruss
sleep 2
rmmod uio_pruss
sleep 2
echo cape-bone-nixie > $slots
sleep 2
modprobe uio_pruss
sleep 2
echo cape-bone-nixie > $slots
sleep 2
rmmod uio_pruss
sleep 2
modprobe uio_pruss
sleep 2

An attempt to remove the overlay prior to inserting again results in
an OOPS: http://pastebin.com/i61rCrBR

j.
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

Jacek Radzikowski

unread,
May 4, 2013, 6:59:50 PM5/4/13
to beagl...@googlegroups.com
PRUSS works fine with kernel 3.2.42. from Angstrom 2012.05.
Well, nobody said that living on the bleeding edge of development was safe.

j.

cmicali

unread,
May 4, 2013, 7:01:42 PM5/4/13
to beagl...@googlegroups.com
Yeah - I am thinking something has regressed between 3.8.6 and 3.8.11... 3.8.6 was working great for me, and now I can't get it to work at all on .11

Jacek Radzikowski

unread,
May 4, 2013, 7:14:11 PM5/4/13
to beagl...@googlegroups.com
3.8 series has also problems with USB. As much as like DT and
capemanager, I'll have to stick with 3.2 for a while.

j.
Message has been deleted

Jacek Radzikowski

unread,
May 14, 2013, 10:07:16 PM5/14/13
to beagl...@googlegroups.com
I'd like to confirm that with Chrises fix PRU works well in 3.8.13
kernel on Angstrom.
Thanks for great job!

j.


On Sat, May 4, 2013 at 8:00 PM, Riad Wahby <kwa...@gmail.com> wrote:
> (Sorry if this is a double post; I wasn't a member of the group when I
> posted my initial reply, and I was notified that my reply was deleted.)
>
> Jacek,
>
> Thanks for your work towards activating the PRUSS under 3.8.x.
>
> I've been tuning up a Debian Wheezy install for the BeagleBone Black and
> keeping logs at http://github.jfet.org
>
> Thought you guys might want a couple more datapoints: both the 3.8.6 kernel
> from the latest Angstrom BBK image and the 3.8.8 kernel from Debian Wheezy
> fail to do anything useful with uio_pruss on the first try; using your
> magic, they both load up the driver just fine.
>
>
> On Saturday, May 4, 2013 6:14:11 PM UTC-5, Jacek Radzikowski wrote:
>>
>> 3.8 series has also problems with USB. As much as like DT and
>> capemanager, I'll have to stick with 3.2 for a while.
>>
>> j.
>

beagler001

unread,
May 15, 2013, 11:07:08 AM5/15/13
to beagl...@googlegroups.com
Hello Jacek,

Curious what your DTO file looked like for enabling PRU functionality. Why was this necessary? 

I too am having trouble with the PRU. I tried a script using your modprobe/rmmod/echo recipe above, but it didn't work. No matter what I do, I can't see any uio* files in /dev. 

I am running with kernel 3.8.12-bone17. 

Thanks.

Robert Nelson

unread,
May 15, 2013, 11:40:42 AM5/15/13
to beagl...@googlegroups.com
This was just fixed this week:
https://github.com/beagleboard/kernel/issues/37

However to get the fix, you need "3.8.13-bone18"..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Jacek Radzikowski

unread,
May 15, 2013, 2:01:29 PM5/15/13
to beagl...@googlegroups.com
Upgrade the kernel. 3.8.12-bone17 is borked.

j.

jesse...@gmail.com

unread,
Jul 12, 2013, 10:02:25 AM7/12/13
to beagl...@googlegroups.com
Stumbled upon this thread, is the uio_pruss still borked? Trying to get this working on my BBB 3.8.13-bone20.

-Jesse

Chris Micali

unread,
Jul 12, 2013, 10:23:46 AM7/12/13
to beagl...@googlegroups.com
It's fixed - working great for me on latest kernel
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/gqCjxh4uZi0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Przemek Klosowski

unread,
Jul 12, 2013, 4:34:09 PM7/12/13
to beagl...@googlegroups.com

It works for me but before modprobe uio_pruss you have to load device tree overlay by something like   echo BB-PRU... > /sys.../cape... Sorry I can't provide exact form as I'm typing on a tiny keyboard underwater in Florida:)

Jacek Radzikowski

unread,
Jul 12, 2013, 5:34:05 PM7/12/13
to beagl...@googlegroups.com
It should not even be necessary to manually load the module. Whenever
I load an overlay with PRUSS enabled, the device files appear in /dev/
automagically.

j.

Nathaniel Lewis

unread,
Jul 13, 2013, 9:15:30 PM7/13/13
to beagl...@googlegroups.com
I second that.  I spent a week pulling my hair out over PRUSS earlier this year only to discover they weren't enabled in the device tree overlay.  After that, they worked flawlessly
Reply all
Reply to author
Forward
0 new messages