I'm trying to get some C code to do some frequency measurements on the PRU 
GPIOs, and then to write the results to the PRU shared RAM so it can be 
retrieved and acted upon by the linux loader C code.
So the PRU C code executes, and I have some values ready to store. My 
initial method of attack to achieve this was to write some inline assembly 
to store the results to the shared memory. But I'm having trouble with this 
- the clpru compiler will not permit me to use the MOV command inline (is 
this just me or is it a thing?).

void shm_test()
{
  __asm__ __volatile__
  (
    " MOV    r3, 0x00002222 \n"       // r3 will store the freq
    " MOV    r0, 0x00000008 \n"       // going to write the result to this 
address
    " SBBO   r3, r0, 0, 4 \n"         // store the count at this address
  );
}
The above will not compile (MOV and SBBO seem to be forbidden by the 
compiler).

When I've been looking for examples of using C code on the PRU the methods 
used to write to the shared memory seem rather complex (and many use inline 
assembly that is pretty opaque to me) - e.g Fabien Le Mentec's pruss_c 
example from his pru_sdk repo: 
http://www.embeddedrelated.com/showarticle/603.php
Can someone point me to a decent example of getting C on the PRU to write 
to shared RAM (e.g. 0x00010000).
Cheers,
Jon Ross

-- 
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.

Reply via email to