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.

TMS320F28035: Need method to Wakeup the MCU

Part Number: TMS320F28035


Hi !

I am using the device TMS320F28035.

To this micro controller there are two inputs Voltage and current. Based on this Power is calculated and when the Power is below the range (MIN & MAX)  then device has to be in SLEEP. Once the power is within the range then the device can wake up.

So, i don't want to keep ADC active to monitor the Power during sleep.

Please suggest a method to Wake Up the micro controller once the Voltage or current is above threshold value ?

Thanks !

  • Hi Deepak,

    What method are you using to calculate the power?

    Also, what low power mode are you entering once that minimum value is reached?

    Thank you,

    Marlyn

  • I am calculating Power = (Vadc* Iadc)

    For Vadc & Iadc are 12-bit ADC which gives digital counts upto 2048.

    So When Vadc = 3.3v = 2048 counts. Same for Iadc.

    if (Power > MIN)&&(Power<MAX) {
    
          /*Do some process */
    
    }
    
    else {
    
    /* go to SLEEP.*/
    
    }

    Still now I have not decided low power mode. I will choose the one which consume less power.

  • Waiting for any Suggestions
  • Deepak,

    I apologize for the delay. 

    The lowest power mode you can do is HALT. This is because in HALT mode, all of the clocks are gated, meaning the ADC cannot be sampling data. However, for what you are trying to do I think IDLE would be better because peripherals can still be running.

    In IDLE mode the CPU clock is gated, but the peripheral clocks are still running allowing you to sample the ADC or whichever peripheral you would like. I know you said you did not want to keep the ADC active while it was in low power mode, but I don’t see how else you plan on measuring the power in that scenario otherwise.

    One way to do this is to have the EPWM periodically trigger an ADC sample which then triggers the CLA to calculate the power while the CPU is in low power mode by having the CLA access the ADC results registers. The CLA performs one task at a time, and when it is done it is able to notify the CPU by delivering a PIE interrupt. The CPU will be awoken by the CLA end of task interrupt, at which point it can quickly decide if the application should resume, or re-enter IDLE. Using the PWM->ADC->CLA->IDLE configuration will limit the time that the CPU is in active mode consuming power.

    You can change the rate at which you want the PWM to trigger an ADC sample or reduce the PLL frequency to extend the time you want the device to be in IDLE mode or vice versa.
     
    -Marlyn