On 9/26/2014 10:33 AM, Ray Madigan wrote:
>
> My pru code looks like this:
>
> for (i = 0; i < 3; i++){
> waitForHost()
> // " CLR R31, R31, 30 \n"
> // " WBS R31, 30 \n"
> // " CLR R31, R31, 30 \n"
<snip>
> As is, the first time the host reads the debug location, its value is 2 and
> never is 0 or 1.
> It is as if the first time the pru is notified, it runs to completion, not
> stoping for the waitForHost at the top of the loop.
You can't clear bits in the status register, you have to clear whatever
is generating the status bit directly. That's either an input pin or
(in your case) the interrupt from the local INTC.
So try clearing the actual interrupt bit, and the PRU code should then
wait as expected for the next "handshake". I suspect the PRU is
currently running to completion because you're never clearing the
interrupt that kicks things off, so waitForHost() doesn't actually do
anything after the first "wait" and simply falls through from then on.
--
Charles Steinkuehler
[email protected]
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.