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.

resume wakeup source

Other Parts Discussed in Thread: TPS65930

Dear Experts,

Chip: OMAP3530, OS:WinCE6.14

When my platform go into suspend, there are two wakeup source will resume my platform.

The first one is resume button, the second is USB OTG.

(Is this normal situation ??)

But now, I want to disable the USB OTG wakeup source !!!

 

I print the wake sources sysIntr before PrcmSuspend() in power.c->OEMPowerOff

// Enable wake sources interrupts

    for (sysIntr = SYSINTR_FIRMWARE; sysIntr < SYSINTR_MAXIMUM; sysIntr++)

    {

       // Skip if sysIntr isn't allowed as wake source

       if (!OALPowerWakeSource(sysIntr)) continue;

 

OALMSG(1, (L"  sysIntr 0x%x\r\n", sysIntr));

       // Enable it as interrupt

       OEMInterruptEnable(sysIntr, NULL, 0);

    }

 

There is only one value I got: sysIntr 0x14.

It is strange that there are two wakeup souces but only one sysIntr,

thus I can't disable this wakeup source.

 

Anyone can tell me how to disable USB OTG wakeup source only ???

 

 

  • Can you tell us what action on OTG leads to device wakeup (ex: plugging in/out USB mouse, etc)?Is this on TI EVM or your custom board?

    To prevent OTG from waking up the device:

    1. You need to make sure there is no pending interrupt from OTG before going into Suspend.

    2. If 1 is satisfied, then enable DEBUG_PRCM_SUSPEND_RESUME in sources.cmn and rebuild BSP. This will dump the wakeup source when the device resumes. With this, you will be able to trace which SYSINTR/intr woke up the system and accordingly mask it. If the wakeup source is -1, then change the following code.

    for (sysIntr = SYSINTR_DEVICES; sysIntr < SYSINTR_MAXIMUM; sysIntr++)
            {           
            // Skip if sysIntr isn't allowed as wake source
            //if (!OALPowerWakeSource(sysIntr))
            //    continue;

            // When this sysIntr is pending we find wake source
            if (OEMInterruptPending(sysIntr))
                {
                g_oalWakeSource = sysIntr;
                break;
                }
            }

  •  

    Dear Madhvi,

     

    This is custom board.

    Below figure is the block diagram.

    ( OMAP USB OTG Controller -- TPS65930 USB OTG transceiver -- Connector )

     

    There are two "plugging in" situations will trigger platform from suspend to resume.

     

    situation A: PC ---(A type)--USB Cable--(Mini-B type)---Custom board

    ==> PC will provide 5v to TPS65930 VBUS. VBUS trigger ??

     

    situation B: No Device--(A-type receptacle)--USB Cable--(Mini-B type)---Custom board

    ==> Why will a different USB cable trigger platform to resume ? USB ID Pin trigger ??

     

    (A type)USB Cable(Mini-B type): USB ID pin is floating.

    (A-type receptacle)USB Cable(Mini-B type): USB ID ping is grounding.

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

    There are three pending interrupts I got:

    +OEMInterruptPending: sysIntr(17), Irqs(37)) ==> #define IRQ_GPTIMER1 37 //GPTimer module 1

    Pending  sysIntr (0x11)

    +OEMInterruptPending: sysIntr(33), Irqs(266))==> #define IRQ_GPIO_138 266 //GPIO5 bit 10

    Pending  sysIntr (0x21)

    +OEMInterruptPending: sysIntr(34), Irqs(267))==> #define IRQ_GPIO_139 267 //GPIO5 bit 11

    Pending  sysIntr (0x22)

     

    There is no pending interrupt from OTG before going into Suspend.

    And the wakeup source is not -1.

     

    Log information: 

    Before suspend: OEMInterruptEnable: sysIntr(20), Irqs(128)) ==>#define IRQ_GPIO_0 128 //GPIO1 bit 0

    ...

    PrcmSuspend();

    ...

    Resume: Wake due to SYSINTR 20

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

    Another question:

    PMIC TPS65930 will live under suspend and provide 1.8v for DRAM.

    Will TPS65930 detect USB OTG plugin action and triger platform to resume ?? but why  wakeup source is SYSINTR 20 (IRQ_GPIO_0 128) ??

     

     

     

  • hb chen said:

    PMIC TPS65930 will live under suspend and provide 1.8v for DRAM.

    Will TPS65930 detect USB OTG plugin action and triger platform to resume ?? but why  wakeup source is SYSINTR 20 (IRQ_GPIO_0 128) ??

     

    Since USB OTG is over TPS65930 Phy on your custom board, the OTG is interrupting TPS chip which in turn interrupts the OMAP over IRQ_GPIO_0 line. if you dont want OTG to interrupt TPS, then you will need to look at the TPS reference manual and see how to mask that interrupt during suspend.

    -Madhvi

  • Dear Madhvi,

    thx.

    I modify EnableWakeupInterrupt from TRUE to FALSE in otg.cpp:SetPowerState,

    case D3:

    case D4: 

    {

    m_pTransceiver->EnableWakeupInterrupt(FALSE);

    }