• AVR Freaks

Hot!PIC32MM in Sleep Mode takes 5 mA ??!!

Page: 12 > Showing page 1 of 2
Author
wku
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2018/05/19 02:34:15
  • Location: Poland
  • Status: offline
2019/03/20 02:20:43 (permalink)
0

PIC32MM in Sleep Mode takes 5 mA ??!!

Hello Guys
I made measurements of power consumption for PIC32MM0256GPM048.  In Sleep mode takes 5 mA (this is results from my measurements), which is much different from the manufacturer's data, has anyone of you studied PIC32 in Power Saving modes? You have some of your measurements ?. The code I used to introduce PIC32 into the Sleep Mode below :
FRC = 8 MHz (but the clock in Sleep Mode Mode is turned off)

 
#include "mcc_generated_files/system.h"

int main(void) {
    // initialize the device
    SYSTEM_Initialize();
      
    SYSTEM_RegUnlock(); //unlock registers
    OSCCONbits.SLPEN=1; //enable Sleep mode
    SYSTEM_RegLock(); //lock registers
    asm volatile("wait"); //sleep/idle as per SLPEN

while (1)
{
    Nop();
}
   
}

 
 
post edited by wku - 2019/03/20 02:46:05

strefapic.blogspot.com
#1

37 Replies Related Threads

    Mysil
    Super Member
    • Total Posts : 3325
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 04:24:37 (permalink)
    +1 (1)
    Hi,
    Code in message #1 do not show what is done inside SYSTEM_Initialize(),
    so it is not possible to know what the pin settings are.
     
    Since hardware do not know what is connected to which pin,
    when Chip is Reset, then all pins are set to High Z tristate,
    and those pins that may be used as Analog inputs, have Digital input buffer Analog disabled.
     
    This do not mean that pins should remain in this state, if they are not used.
    Read section 'Unused pins' in PORTS chapter in Datasheet.
     
    Especially those pins that cannot be analog inputs,
    should Not be left floating as digital inputs.
    Even if the MOSFET gate inputs are high impedance gates, a input pin that float at intermediate voltage, may cause strange things to happen inside, with increased current flowing, or even oscillation.
    The subject have been discussed in some thread in this forum, less than a week ago. 
     
        Mysil
    #2
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 04:46:28 (permalink)
    0
    Hi Mysil
    All pins are set as digital outputs and pull-ups down. I generated the project with the help of MCC.
    In the attached file there is an image of the pin settings.
    post edited by wku - 2019/03/20 04:53:08

    Attachment(s)

    Attachments are not available: Download requirements not met

    strefapic.blogspot.com
    #3
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 07:47:07 (permalink)
    0
    Hi
    In this link there is a circuit board scheme on which I tested Power Saving in PIC32MM. The display is disconnected. I supply power externally with +3/3 V, voltage after the voltage regulator.
    Link :
    https://github.com/PICmaj...mat_20181216163112.png
     
    I included the LED2 current in the measurements.
    post edited by wku - 2019/03/20 07:51:44

    strefapic.blogspot.com
    #4
    JPortici
    Super Member
    • Total Posts : 692
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: online
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 07:58:27 (permalink)
    +1 (1)
    5mA in sleep is a LOT. do you happen to have the debugger / pickit connected while making measurements? That will explain the high current consumption (the programming pins are connected to a voltage translator powered by the target board)
    #5
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 08:01:54 (permalink)
    0
    Hi JPortici
    for current measurements I physically disconnect the PICkit3 from the board

    strefapic.blogspot.com
    #6
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 08:10:19 (permalink)
    0
     
    Sleep Mode
    Laboratory :

    Ucc 3.296 V (voltage after the voltage regulator LDO)
    Measured current consumed by the board: Icc = 8.2 mA
    Measured voltage drop on R1 (470) = 1.442 V hence I calculate LED1 current (see drawing of my development board for PIC32MM) Iled = 3.068 mA, so the current consumed by the MCU is : Icc - Iled = 5.13 mA

    strefapic.blogspot.com
    #7
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 08:22:21 (permalink)
    0
    Does anyone have any idea how such a large current in Sleep Mode comes from?

    strefapic.blogspot.com
    #8
    pcbbc
    Super Member
    • Total Posts : 1092
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: online
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 08:51:33 (permalink)
    +2 (2)
    Ucc 3.296 V (voltage after the voltage regulator LDO)
    Measured current consumed by the board: Icc = 8.2 mA

    Measure where?  Before of after the voltage regulator?
    #9
    NKurzman
    A Guy on the Net
    • Total Posts : 17492
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 08:58:51 (permalink)
    +1 (1)
    Did you include the Quiescent current of your voltage regulator?
    try looking at the Delta for "Icc" asleep and awake.
    #10
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 09:28:01 (permalink)
    0
    The LDO controller is not used, I supply from an external 3.3 V power , supply after the LDO

    strefapic.blogspot.com
    #11
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 09:46:03 (permalink)
    0
     In the appendix picture of how I supply the board during measurements.
     

    Attachment(s)

    Attachments are not available: Download requirements not met

    strefapic.blogspot.com
    #12
    NKurzman
    A Guy on the Net
    • Total Posts : 17492
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 09:49:19 (permalink)
    +1 (1)
    Hold the PIC in reset and check the Current.  Is should be very low.
     Backfeeding the LDO may still cause it to draw current.
    #13
    NKurzman
    A Guy on the Net
    • Total Posts : 17492
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 09:54:05 (permalink)
    #14
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 10:07:48 (permalink)
    0
    I do the current measurement after the LDO controller. LDO doesn't  to have a reverse current. ?
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Attachment(s)

    Attachments are not available: Download requirements not met

    strefapic.blogspot.com
    #15
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 10:23:51 (permalink)
    0
    on page 289 datasheet 3.7 mA this is for run mode and I have a sleep mode in which it should be about 250 uA

    strefapic.blogspot.com
    #16
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 10:36:34 (permalink)
    0
    Thank you NK urzman for your suggestion maybe there is a reason for this.
    I wonder if there is such a thing as the regulator's reverse current? LDO for example LM1117 / AMS1117 .
    I have to check this in the LDO documentation
     

    strefapic.blogspot.com
    #17
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 10:45:07 (permalink)
    0
    I measured the voltage at LDO , between Vout and Vin is 0.4 V . Since there is voltage there must be some current.

    strefapic.blogspot.com
    #18
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/20 10:59:18 (permalink)
    0
    Thank you all very much. I will prepare a plate without LDO and without unnecessary components. I'll come back and tell you how it worked out.
    I love you Smile: Smile

    strefapic.blogspot.com
    #19
    wku
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/05/19 02:34:15
    • Location: Poland
    • Status: offline
    Re: PIC32MM in Sleep Mode takes 5 mA ??!! 2019/03/21 11:17:38 (permalink)
    0
    Hello
     
    I got rid of the LDO regulator from the board and it is very well, the PIC320256GPM048 just as the factory released it consumes 2.8 mA of current. Now I can test Power Saving
    Here I am going to write my test article:
    https://strefapic.blogspo...wComment=1553192817858
    post edited by wku - 2019/03/21 11:30:43

    Attachment(s)

    Attachments are not available: Download requirements not met

    strefapic.blogspot.com
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5