On 11/26/2016 1:33 PM, Neil Jubinville wrote:
> 
> Here is my basic understanding - Focusing on PRU0:
> 
> Each PRU has 8K of  'dataram'  - This is where I expect  R1,R2,R3 ---- R31 to 
> be 
> stored. *Is this true? I see many people changing the reference at 
> *0x0000_0n00, 
> n = c24_blk_index[3:0],   do I need to set where the Rn's lay down in memory?

NO

The data ram is what it says...data ram.  The registers are what they
say...registers.  Registers are *NOT* data ram.  If you want the
register values to appear in memory, you have to write them out using
the SBBO instruction.

> Docs also state that the PRU 0 Data ram starts at *0x4a300000*;
> 
>      int registerStart;
>      registerStart = *(int*)0x4a300000;
>      printf("--> R0 = %d" + registerStart);
> 
> However I get a seg fault trying to print what is in R0 that way.  That was 
> more 
> to just do a direct look see if possible and go around all the interfaces.

0x4a300000 is a physical address.  You can use that if you are
directly accessing memory (via /dev/mem, bus-mastering DMA, or
something that doesn't use an MMU like the PRU core).  If you try to
access a physical address from a standard application that has not
been mapped into your process memory space, the MMU will forbid access
and your program seg-faults.

To access the PRU memory in your application, use the address provided
to you by the prussdrv_map_prumem function.

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c86ac4d1-9d7e-ce4d-9f90-e6701561a431%40steinkuehler.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to