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.

Controlling MDCTL15 via PRUSS

Other Parts Discussed in Thread: OMAPL138

Hello, 

I generated PRUSS code to control MDCTL15 register to put C674x mega module into disable state, but it is not working correctly.
Is it possible to control MDCTL15 via PRUSS ?


The power down scheme itself is followed by TRM (10.7.4.1 C674x Megamodule Clock OFF) .

PRUSS:
When PRUSS gets an event to power down DSP mega module, he does : 

  1. PSC0.MDCTL15.NEXT = 0x2 (Disable command setup)
  2. PSC0.PTCMD.GO[1] = 0x1 (Apply command)
  3. Polling PSC0.PTSTAT.GOSTAT[1] == 0 (Awaiting the condition of power down completion)

DSP:
After the above (1) and (2) sequence applied, an interrupt (caused by event #118) should be expected at DSP side, actually, but it did not happen.
Please note , when I generated #118 interrupt manually (via CCS), then I saw the control came to #118 ISR. So, ISR itself had been being registered correctly in the system.

The problem is that #118 event does not signal during the above PRUSS sequence.
I confirmed PSC0.MDCTL15.NEXT had no change even though PRUSS actually applied the above (1) and (2) sequence.
Please note, "local reset" worked when PSC0.MDCTL15.LRST = 0 in PRUSS - I'm saying this because the emulator connection for DSP hang up by doing this.
So PRUSS control code looks like working correctly...

Backgound:
I generated McASP driver code by using PRUSS for OMAPL137 and OMAPL138 and now it is working correctly.
I want to add "automatic power control" to my PRUSS driver code, i.e., if no audio is detected for long time, PRUSS put DSP into disable state and if valid audio is coming,
then, wake up DSP. 

Best Regards,
Kawada 

  • Some progress:

    Some bugs are present in my PRUSS code and they are fixed now.
    But the problem is still there...

    With my current code, now I can control power domain 0 (PD0) MDCTLx registers from PRUSS.
    For example, ARM (related to MDCTL14, PD0) can be powered on/off from PRUSS.
    But as for DSP (related to MDCTL15, PD1), not woring yet - MDCTL15 can be setup with disable state correctly,
    but PTCTL.GO[1] is not functional (no power transaction happens).

    Please note, I'm now using OMAPL137EVM (actually, it is a DA830EVM).
    In this series of processor, DSP(PD1) is master and ARM(PD0) is slave in system.
    So, now I'm wondering if master core's power control can't be achieved from PRUSS...
    Do you have any comment on this ?

    Best Regards,
    Kawada 

     

  • Any suggestions ?

    FYI, I generated very simple ARM code to power-down DSP from ARM side, but it does not work also.
    When DSP is in ON state, I run the following code from ARM side: 

    ==================================
    #define MDCTL15 0x01c10a3c
    #define PTCMD 0x01c10120
    #define PTSTAT 0x01c10128
    #define MDSTAT15 0x01c1083c

    int main(void) {

    unsigned int regval;
    unsigned int setval;

    regval = *(unsigned int *)MDCTL15;
    setval = (regval & ~0x3) | 0x2;

    *(unsigned int *)MDCTL15 = setval; // Make DSP disable state

    *(unsigned int *)PTCMD |= 0x2; // go power transition (power domain 1)

    while((*(unsigned int*)PTSTAT & 0x00000002) != 0);
    while((*(unsigned int*)MDSTAT15 & 0x0000001f) != 0x00000002); // Checking if DSP is disable state 

    return 0;
    }

    =====================================================

    At the red code, ARM gets stuck, i.e., DSP never go to disable state.

    Kawada