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.

OMAP-L138: L138 DSP megamodule power down.

Part Number: OMAP-L138

I refer to SPRUFK5A, TMS320C674x DSP Megamodule , section 9.2.4, the CPU can be powered-down by issuing an IDLE instruction.
The entire C674x megamodule can be powered-down using the following procedure. Other than the options previously specified, it is not possible to power-down only part of the C674x megamodule.
Powering-down the C674x megamodule is completely under software control by programming the megamodule power-down (MEGPD) bit in the power-down controller command register (PDCCMD).
The following software sequence is required to power-down the C674x megamodule:
1. Enable power-down by setting the MEGPD field to 1 in the PDCCMD register.
2. Enable the CPU interrupt(s) that you want to wake-up the C674x megamodule. Disable all other interrupts.
3. Execute the IDLE instruction

I create a DSP BIOS idle task to execute the IDLE instruction. 


bios.IDL.create("IdleTask");
bios.IDL.instance("IdleTask").order = 1;
bios.IDL.instance("IdleTask").comment = "Idle Task";
bios.IDL.instance("IdleTask").fxn = prog.extern("IdleTask");
bios.IDL.instance("IdleTask").calibration = 0;

void IdleTask( void )
{

asm(" idle");

}

My question if I could enable power-down by setting the MEGPD field to 1 in the PDCCMD register only once. The subsequence IDLE instruction in "idle task" can power down the DSP Megamodule?

Or I need to set the  MEGPD field to 1 in the PDCCMD register every time IdleTask is executed?

void IdleTask( void )
{

*(volatile uint32_t *)(0x01810000) |= 0x00010000;// set MEGPD=1 Sleep mode

  {

   asm(" idle");

  }

}

  • How are you planning to use the MEGMD DSP IDLE function

    If this is something you get into your application periodically and then go back to "active"/ mode, as part of getting to the active mode , you should ensure MEGMD is set back to 0. It will also be set to 0 if the device was powered off or reset (power on reset default is 0) , so I would recommend ensuring it set to 1 when you the application to go to megamodule idle state, so that it is self contained.