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.

external signal failed to wake up the dsp from the standby

Other Parts Discussed in Thread: TMS320F28335

hello,

       For some reason, we could not wake up the dsp from the standby mode.  On the oscilloscope, we saw that the external signal correctly pulled the gpio pin from high to low.  however the dsp did not generate an interrupt.

any idea?

best,

JIe

  • JIe,

    Which device are you using?

    Could you post the code where you setup the interrupts and your ISR?

    Regards,

    Alvaro

  •  we used TMS320F28335. attached is the example code.

    thank you.

    Jie

     
    DINT;
    DRTM;
    
    
    InitSysCtrl();
     
    // Make GPIO23 wakeup from HALT/STANDBY Low Power Modes
    EALLOW;
    GpioCtrlRegs.GPAPUD.bit.GPIO23 		= 0;    // Pull up
    GpioCtrlRegs.GPAMUX2.bit.GPIO23 	= 0; 	// GPIO23 = GPIO23
    GpioCtrlRegs.GPADIR.bit.GPIO23 		= 0;  	// GPIO23 = input
    GpioIntRegs.GPIOLPMSEL.bit.GPIO23 	= 1;	//GPIO23 will wake the device
    EDIS;
    
    InitPieCtrl();
    IER = 0x0000;
    IFR = 0x0000;
    InitPieVectTable()
     
    EALLOW;  
    PieVectTable.WAKEINT = &DSP_WAKEUP_ISR;
    EDIS;   
    
    IER |= M_INT1;
    PieCtrlRegs.PIEIER1.bit.INTx8 = 1;
    PieCtrlRegs.PIEACK.bit.ACK1 = 1;
    EINT;  
    ERTM;   
    SysCtrlRegs.LPMCR0.bit.QUALSTDBY = 2;	
    
    EALLOW;
    if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 1) 
    {
          SysCtrlRegs.LPMCR0.bit.LPM = 0x0001;  
    }
    EDIS;
    
    asm(" IDLE");                           // Device waits in IDLE until falling edge on GPIO0/XNMI pin
    
    
    
    
    /* ----------------------------------------------- */
    /* ISR for WAKEINT     */
    /* ------------------------------------------------*/
    interrupt void DSP_WAKEUP_ISR(void)
    {
        DINT;
        DRTM;
        myfunct; // to pull the gpio from low to high
        EnableDog();  
        PieCtrlRegs.PIEIER1.bit.INTx8 = 0;
        IER |= M_INT1 | M_INT14;// Enable CPU interrupts which is connected to CPU-Timer 0 and CPU-Timer2
        SetDBGIER(M_INT1 | M_INT14);// Want to enable INT1 and INT14 in the DBGIER. Real-time debug events.
        EINT;   // Enable Global interrupt INTM
        ERTM;   // Enable Global realtime interrupt DBGM   
    }
    

     

  • Hi Jie,

    When you say it doesn't wake up the MCU, what do you mean by this?  Is CCS not returning or is it not performing the rest of the code?  If CCS is not returning, try toggling a GPIO in an infinite loop in your WAKE ISR to see if the problem is with the MCU coming out of LPM or CCS picking up the returned connection.

    Kris

  • Hi Kris,

          MCU never comes out of LPM.   i had a breakpoint on wake isr. the  code never goes there.

    best,

    Jie

     

  • Jie,

    CCS sometimes has trouble detecting when the MCU comes out of LPM and won't reestablish the connection.  This is why I suggested toggling an IO instead of a breakpoint because then you can check the physical pin and not rely on the software.

    Kris

  • Hi, Kris,

       i tested as you suggested, by adding a toggling i/o in the isr routine.  the result is the same that mcu did not come out of the LPM. 

    any idea what could prevent mcu from out of LPM?

    best,

    Jie

  • Hi Kris,

      we found the problem is caused by SetDBGIER(M_INT1 | M_INT14) in our main().  After we commended out the line, dsp wakes up fine from the LPM.

    thanks.

    Jie

  • Hi Jie,

    Great news!  It sounds like you have everything working, so please go ahead and click "Verify Answer" on your post with the solution.  That way others who search the forum can see that the question is resolved and quickly find what the answer was.  Thanks,

    Kris