This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DDR read from PRU1 on AM3359 (Beaglebone)

Other Parts Discussed in Thread: AM3359

Dear friends,
i'm doing some code to implement a 8bit parallel port using the PRUSS-ICSS of the AM3359,
and i'm running into troubles because i can't read some DDR values from the C31 constant table address of PRU1.
Obviously i'm previously filling some known data into the right DDR addresses externally from PRUs.

Here is my code snippet:
// Clear SYSCFG[STANDBY_INIT] to enable OCP master port
LBCO    r0, C4, 4, 4
CLR        r0, r0, 4         
SBCO    r0, C4, 4, 4

//Enable PMAO
LBCO    r0, C4, 0x28, 4
SET        r0, r0, 1    //set bit 0
SET        r0, r0, 1    //set bit 1
SBCO    r0, C4, 0x28, 4

// Configure the programmable pointer register for PRU1 by setting c31_pointer[15:0]  
// field to 0x50000000.  This will make C31 point to 0x80500000 (DDR memory).
MOV     r0, 0x50000000
MOV     r1, 0x2402C
ST32    r0, r1
LBCO    r10, CONST_DDR, 0, 4           
// r10 should now contain desired data

The strange thing is that if i run the same code on PRU0 (only changing the offset of CTPPR1 to 2202C)
it run perfectly.
If i run on PRU1 instead i get some uninitialized data from DDR (i can't get the address where it is pointing to)
On both cases on C31 i read "0x80500000" (correct).

Is there any limitation on reading from PRU1 to DDR addresses?

Thanks for any help.

Sandro Viti

  • Hi,

    There is a typo bug in the above code where you enable PMAO. You are enabling this only for PRU1 and not PRU0. Explains why this work for PRU0.

    If you are enabling address offset using PMAO - you need to add 0x80000 to actual address to read the value at corresponding address.

    Otherwise if you remove above code to Enable PMAO it should work fine.