On 11/27/2016 6:35 PM, Neil Jubinville wrote:
> 
> Description of the program:
> 
> An LED toggles on and off from a set delay time in R2.
> 
> A separate C program loads the PRU program, starts the core and then prompts 
> the 
> user for a Time to do a delay.   Upon the user entering a time, the c program 
> writes that value to dataram and reads back the mapped memory from the PRU to 
> show.
> 
> The PRU loop does a SBBO each time as well as a LBBO for a single R2 .   My 
> LBBO 
> call however is not returning the proper value, I am likely using the wrong 
> pointer value.
> 
> Here is where I believe the problem is, how I interpret what register address 
> to 
> start at by setting an arbitrary r9 to the start.
> 
> *ldi            r9, 9  //  offset to the start of the third 32 bit value *
> *lbbo r2, r9, 0 ,4  // read 4 bytes from there and store it into r2*

First, 9 is not the proper offset for the third 32-bit value (that
would be 12, or 3 values * 4 bytes/value).

Second, you are reading *AND* writing the memory location you are
trying to monitor in your PRU code.  That means a new value will
*ONLY* be picked up if the ARM side updates the value in between the
write and the read.  You should structure your code so that for any
given memory location, only one side (ARM or PRU) writes the values.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e9c69c98-f487-45c2-7412-3f657fe14d70%40steinkuehler.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to