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.

Unused pin configuration & Low Power Mode question

Other Parts Discussed in Thread: MSP430F5438A, MSP430F5438

Hi,

First of all, I am using a MSP430F5438A and MSP-EXP430f5438 board.

I have to realize a project in low power mode, so I need a long stand-by period with Real Time Clock enable to wake up temporarily the CPU, proccess some information, and come back to stand-by again.

To measure ONLY  the current consumption during this stand-by period and following the Users' Guide instructions, section 1.6, I have writen a little code:

#include  "msp430x54x.h"

#define YEAR 0x07DC // 2012
#define DATE 0x0817 // 23th august
#define HOUR 0x0009 // 9 a.m

void down_ports();

void RTC_conf();

void down_ports()
{
  P1OUT = 0x00;            /* All pins with low values */
  P2OUT = 0x00;
  P3OUT = 0x00;
  P4OUT = 0x00;
  P5OUT = 0x00;
  P6OUT = 0x00;
  P7OUT = 0x00;
  P8OUT = 0x00;
  P9OUT = 0x00;
  P10OUT = 0x00;
  P11OUT = 0x00;
  PJOUT = 0x00;

  P1DIR = 0xFF;        /* Configurate pins as ouputs */
  P2DIR = 0xFF;
  P3DIR = 0xFF;
  P4DIR = 0xFF;
  P5DIR = 0xFF;
  P6DIR = 0xFF;
  P7DIR = 0xFF;
  P8DIR = 0xFF;
  P9DIR = 0xFF;
  P10DIR = 0xFF;
  P11DIR = 0xFF;
  PJDIR = 0xFF;
}

void RTC_conf()
{
 
  RTCCTL0 |= 0x00;        /* Reset register ( flags & individual enable )*/
  RTCCTL1 &= 0xB0;       /* Binary input mode, run, ACLK as clock source*/
  RTCCTL1 |= 0x20;        /* Calendar Mode */
          
  RTCYEAR = YEAR;        /* Write year */
  RTCDATE = DATE;        /* Write date */
  RTCTIM1 = HOUR;        /* Write hour */
  RTCTIM0 = 0x3900;        /* Write minutes & seconds */
}

void main(void)
{
  WDTCTL = WDTPW+WDTHOLD;                   

  down_ports();


  RTC_conf();
   
  __bis_SR_register( LPM3_bits +  GIE );   
    
    /* infinte loop */
  for(;;)
  {
  }                   
}

As I have to use a clock, I have selected LPM3.

The pin voltage of  Avcc,Avss, RST/NMI matchs with the section 1.6 of Users' Guide.  I do not found LCDCAP and TEST pins in the board or schematic. The rest of pins showed in the guide are definide as "for USB device only", I supposse I do not have to work with them.

After this "little" introduction, my problems are these:

- When I measured with a common multimeter to get a initial value, only the msp430 consumption, not the entire board, I obtain a value of 0.004 mA, is to say, 4 uA, value aproximated to device datahseet. Measured between TP27 point and opened JP1 jumper, serial of course.

-But if I use a power supply, with high accuracy amperimeter included, it shows about 50 uA.

Both cases are powered with about 3.3 V.

If you know some configuration register or pin configuration I have forgotten or some advice or to tell me something that it is wrong, I would be glad to hear you.

Thanks for your time.

  • Are you sure that the ampmeter of the power supply can measure currents up to an accuracy of 1uA? Could it be that the power supply instrument is not accurate enough?

  • Well, as I did not remeber the model of the device exactly ( it is in another lab), and to try to explain its functionality, I named "power supply", when I was refering to a DC power analyzer whose "Ammeter accuracy": Up to 0.025% + 8 nA, up to 18 bits" (according to its datasheet)

    Sorry for the misunderstanding, it was my fault. Thanks for your attention.

  • Is T da S said:
    I do not found LCDCAP and TEST pins in the board or schematic.

    Did you also look at the device datasheet? The 5438 does nto have an LCD controller (only 6x devices have) and therefore no need for an LCDCAP. And the TEST/SBWTCLK pin is clearly visible in the pinout picture.

    Is T da S said:
    The rest of pins showed in the guide are definide as "for USB device only", I supposse I do not have to work with them.

    Right. The 5438 also has no USB controller and therefore no pins associated with it.

    Is T da S said:
    -But if I use a power supply, with high accuracy amperimeter included, it shows about 50 uA.

    This one shows the total circuit power consumption, not only the MSP currend draw.
    The board contains other peripherals such as external pullups etc. So the current somehow fows 'around' the MSP. On 3.3V, 50µA is just 66kOhm load on 3.3V.

  • If the MSP chip is in a socket, can you take it out and measure the current consumption? Is it 0.0 uA without the MSP430?

  • Please be sure to have no connection to the emulator or any serial port (like the LCD-port). You can realize a precise measurement with the own ADC12 of the msp430f5438 and a very few parts just on your board. I will tell a bit at EDERC2012 in Amsterdam about it.

  • Jens-Michael Gross said:

    The 5438 does nto have an LCD controller (only 6x devices have) and therefore no need for an LCDCAP. And the TEST/SBWTCLK pin is clearly visible in the pinout picture.

    Yes, the TEST/SWBTCLK is clearly visible, I do not know what I was doing in that moment to not see it. About LCD , I do not  have used in any of my projects, so I am not very informed.

    Jens-Michael Gross said:

    This one shows the total circuit power consumption, not only the MSP currend draw.

    The board contains other peripherals such as external pullups etc. So the current somehow fows 'around' the MSP. On 3.3V, 50µA is just 66kOhm load on 3.3V.

    I think the problem is here. Or I do not  have undesrtood the schematic, or it is not clear at all.

    I am going to try to explain the stpes that I follow to measure clearer than I am able to.

    - I am using the schematics showed on "Annex D – MSP- EXP430F5438 Experimenter board schematics" ( Date 04/01/2008, REV0-02).

    - According to board userguide, JP1 is used to measure the current consumption of the MSP430F5438.

    To measure with the multimeter, I remove JP1 and JP2 jumpers (JP3 opened too). The ammeter is placed between TP27 and JP1, and the power supply connections as showed in this poor schematic ( the "()" showed side to JPX represents the pin of the jumper according to the mentioned schematic):


                                 Vcc
                                  |
                                  |
    --------|     |---------|-----------------(A)--------|-------------------------------------------*-----------..........------------|

           (1) JP2(2)    (1)JP1      Ammeter       JP1(2)               430 PWR line               TP27                             GND              
                                                                                                                                                                  

    By this way, I obtain about 4 uA.                                                                             

    When I use the DC power analyzer, the connection are as showed ( JP2 and JP3 opened too) :


    (DC_power_analyzer)------------|---|----------------------------------------*-------------...........-------------------|
                                              (1)JP1(2)             430 PWR     line              TP27                                      GND

    By this way I obtain about 50 uA in the analyzer screen. While I was writing this post, I have connnected an ammeter in substitution of DC power analizer by this way:


    Vcc ( power supply) |-------------(A)--------------|---|----------------------------------------------------------*----------.........----------|
                                      (1)JP1(2)          430 PWR line                                  TP27                                  GND

    I obtain a similar value with the normal multimeter,~45 uA.
    So, yes, you are right like always :), by this way I am measuring more current than the consumed by the chip only. As the line is labeled like MSP430  PWR, the user guide says that the function of JP1 is the current measurement of MSP430F5438 and in the schematic, the VDCC label is only routed to the chip, I considered that the current supplied by the DC analyzer  would be the same than flows in the 430 PWR labeled line, but it seems thar other electrical elements are using the supplied current.  As I connect the DC analyzer in JP1 (1) ,with the jumper closed,and this pin is shorted to Vcc "label", I am supplying voltage to any pin that is routed to it, isn' it? Am I wrong?


    If this argumentation is correct, how can I measure the uC current only? Openning JP1 and connecting the analyzer in the pin nearest to TP27 [JP1 (2)] instead of my initial connection?

    Thanks to all for answering my question, and sorry for this large post (and my marvellous "schematics"), but I am trying to give you all possible information to easier understanding.

  • Yes, JP1-1 is "VCC" and supplies everything except the MSPs DVCC pin. JP1-2 is only conencted to the MSPs DVCC pin.

    If you connect your supply directly to JP1-2, you're only feedign the MSP and therefore only measuring the MSP current.

    However, this may be sort of a milkmaid's calculation. When the surrounding peripherals are not powered, this may influence the MSP itself, maybe causing a larger current than else.

    P.s.: your schematics were good, however, the proportional font is making them a bit difficult to read. For those cases you should manually select a monospaced font like Courier:

    Vcc ( power supply)
    |-------------(A)--------------|---|----------------------------------------------------------*----------.........----------|

                                        (1)JP1(2)          430 PWR line                                      TP27                              GND

    Edit: On the reply page, the proprotional font 'drawings' did look way worse than on the normal thread view.

  • And as a help:

    I would download the hardware design of the board (http://www.ti.com/lit/zip/slac228), take  EAGLE (free version is ok) and export the netlist - so you will see all connections for each signal line and can find out which peripherals and other parts are connected to the msp430.

  • Jens-Michael Gross said:
    On the reply page, the proprotional font 'drawings' did look way worse than on the normal thread view.

    In the preview message, the schematics are shown correctly, but when I posted, they had been modificated. I edited the post for a comfortable reading in the post, but I do not know if it changes in answer screen. Next time I will use this font that you said.

    Jens-Michael Gross said:
    If you connect your supply directly to JP1-2, you're only feedign the MSP and therefore only measuring the MSP current.

    But connecting here the DC power analyzer, I keep measuring about 50 uA in front of 4 uA of ammeter.

    Today I will try to do more test, but all I have done it gives me similar values. Moreover the surrounding peripherals consumption, I think the given schematics are not very clear. For example, if I choose the  USB power in SW1, and open all JPX, so the circuit would be open and thus it would not work, but it runs normally. I do not know if I am missing some connection or label in the schematics to explain it.

    There is an AVCC pin ( pin #11 in the schematics) with AVCC label near to it, if I connect the power supply in this point, and I measure here the current consumption, would obtain only the MSP430 current consumption? The chip power consumption is a critical part of the design, so I am so insistent with it.

    I will try to remove the MSP from the board (if it is possible), and test if there is power consumption in other points of the board that makes reaching these 50 uA.

    In the lab I am not software administrator, so I can not install any program, but it would be very useful to have the PCB of the board.

    And an extra question about RTC, in the page 42 of datasheet, "(7)Current for watchdog timer and RTC clocked by ACLK included. ACLK = VLO." How could I use the VLO to clock source for RTC with a proper functionality? In the diagram for UCS in the Users' Guide, I only watch clock frequency divider, so I do not know how I can get the 32 kHz frequency necessary to the correct function of  the RTC (according to the guide, the frequency must be set to 32768 Hz for a proper operation, I configurated with 10 kHz from the VLO and the RTC does not work correctly).

    Thanks to all for your time answering my doubts.

    PD: some off-topic :-)

    Jens-Michael Gross said:
    However, this may be sort of a milkmaid's calculation.

    Does the expression "milkmaid's calculation" exist in English? In my mother language exists, but I do not if it is direct translation for your mother language or a regular expression I do not know.

    UPDATED INFO:

    - I have removed the chip of the socket, connected the power supply and the current measurement is 0 uA.

    - With all opened jumpers , select battery as power supply ( 3.3 V  connecting "+Vcc"  at JP1(1)) and with the interruptor selected in "BATT" position, I always obtain a 1.5 V in the point of the board labeled as TP27 (as it is shorted, it is the same point like JP1(2)).

  • Is T da S said:
    In the preview message, the schematics are shown correctly, but when I posted, they had been modificated.

    I think the default font for thread page and editor are different. Only if you manually select a font and size, the two will match. And a monospace fint like courier is good for posting code (with indentation) and "ASCII-art".

    Is T da S said:
    But connecting here the DC power analyzer, I keep measuring about 50 uA in front of 4 uA of ammeter.

    I meant with JP1 removed. Else you're still feeding the outside circuitry. However, not feeding the outside circuitry may result in increased MSP current consumption. So the 'final' test would be to feed the measured supply into JP2-2 and an independent source of same voltage into JP1-1 (or VCC).

    AVCC supply pin powers the analog circuitry like reference generator or DAC. It is, however, connected to DVCC with clamp diodes (same for AVSS and DVSS).
    If precision is required for the analog parts, you should decouple AVCC from DVCC by a series resistor and a bypass capacitor and route AVSS separately to DVSS to the supply GND (so current ripples of DVSS won't affect AVSS GND reference level).

    Is T da S said:
    ow could I use the VLO to clock source for RTC with a proper functionality?

    Not at all. It just means that this value includes the operating current for RTC and watchdog, but without the current required for teh watch crystal (whcih is provided separately and somewhat depends on the crystal)

    Is T da S said:
    Does the expression "milkmaid's calculation" exist in English?

    Well, it's seldom used - maybe adopted from German or French (where this originates from). But I've seen it in several occasions. The more common term is 'naive fallacy'.

  • Netlist Exported from MSP-EXP430F5438.sch at 27.08.2012 18:40:34
    EAGLE Version 5.11.0 Copyright (c) 1988-2010 CadSoft
    Net      Part     Pad      Pin        Sheet
    430_PWR  JP1      2        2          1
             R33      2        2          1
             R36      1        1          1
             TP27     1        TP         1
    AVCC     C22      1        1          1
             C56      +        +          1
             IC4      11       AVCC       1
             R33      1        1          1
    DVCC     C25      1        1          1  
             C27      1        1          1
             C33      1        1          1
             C5       1        1          1
             C55      +        +          1
             IC4      16       DVCC1      1
             IC4      38       DVCC3      1
             IC4      64       DVCC2      1
             IC4      87       DVCC4      1
             R36      2        2          1
    -------------------------------------------------------
    R33  10 Ohm Resistor for supply of AVCC pin 11
    R36   0 Ohm Resistor for supply of DVCC pins 167, 38, 64, 87
    -------------------------------------------------------
    For me MSP430 current "consumption" is the current that enters AVCC and DVCC and also leaves the chip via AVSS pin 12 and DVSS pin 15, 37, 63, 88. Not included is the current flow out of P8.7 pin 67 as well as all the currents flowing in or out of MSP430 via other pins.
    And the current consumption of the MSP430 can be a lot higher than 4uA when internal consumers are switched on (e.g. clock sources) or in an unstable condition (e.g. floating input pins).
    -------------------------------------------------------
    To the RTC: if it should used in the traditional way to use REAL time one needs a very stable 32768 Hz clock with xtal precision - usually with xtal use via XIP pin 13 and XOUT pin 14.
    -------------------------------------------------------
    Remark: the EAGLE software runs on each usual PC, so you do not need a special design station.

     

  • Thanks for your help Jens and tilmann.

    Jens-Michael Gross said:
    I meant with JP1 removed. Else you're still feeding the outside circuitry. However, not feeding the outside circuitry may result in increased MSP current consumption. So the 'final' test would be to feed the measured supply into JP2-2 and an independent source of same voltage into JP1-1 (or VCC).

    So, I connect a common power supply at JP1-1 and the DC analyzer in JP2-2 (by this way, both "+V" terminals are shorted, aren't they?) But if JP1 is opened, there is a opened circuit, and the current would not flow by 430 PWR. Maybe you wanted to say JP1-2 instead of JP1-1 or I do not have understood correctly and the jumper has to be closed or maybe I do not have understood your idea altogether.

    The thing that I  am thinking right now is: with JP1 removed, connecting the power supply in JP1-1 and the DC analyzer in JP1-2 to measure the current supplied, both with the same voltage value of course.

    In other hand, if I want to use the RTC in calendar mode I MUST use the XT1 or some external clock in XT2, that can supply the required frequency, isn't it?

    And finally, with the correct configuration (in LPM3 or LPM4) and a code created for long stand-by periods (the uC onlyworks at full speed some second every long standby periods), is it not possible to achieve a values about the one I obtain? (or in a similar range) This is a standby consumption is critical to the project, and with all problems that I have found it, I start to think that all my ideas are wrong.

    Thanks again.

    About "milkmaid's calculation" theme :), in Spanish is used too, but I did not know that it exists in other language

  • Is T da S said:
    o, I connect a common power supply at JP1-1 and the DC analyzer in JP2-2 (by this way, both "+V" terminals are shorted, aren't they?)

    I meant JP1-2. The precision DC only sources the MSP while the other one sources the circuitry. So yes, your second thought is right.

    Is T da S said:
    if I want to use the RTC in calendar mode I MUST use the XT1 or some external clock in XT2, that can supply the required frequency, isn't it?

    Yes. Internal clocks are too unprecise for RTC use and also aren't available to the RTC module anyway.

    Is T da S said:
    And finally, with the correct configuration (in LPM3 or LPM4)

    LPM4 usually means 'LPM3 and also disabled ACLK', which probably (depends on device and other factors) means shutting off the clock for the RTC, or, if the clock is kept active by the RTC, LPM4 reverts into LPM3.

    Is T da S said:
    This is a standby consumption is critical to the project, and with all problems that I have found it, I start to think that all my ideas are wrong.

    Well, you cannot eat the cake and keep it. Running a precision clock source consumes energy. Maybe you can spare another few µA, but there's a limit of what you can switch off without losing required functionality.

    Maybe you shoudl go for a smaller MSP? 5438A has large flash that is powered ina ctive mode, and much ram that requires power for data retention. Read a few other datasheets and you may find an MSP with lower standby current.
    The 5x family has some members with RTC_B module which has a sidekick-supply for the RTC and its crystal. I think it is lower power than the RTC_A on the 5428.

    Is T da S said:
    About "milkmaid's calculation" theme :), in Spanish is used too, but I did not know that it exists in other language

    It derives from a French story, even though its usage doesn't exaclty match the story. There, the milkmaid made correct calculations but didn't foresee that she would stumble and spill the milk that was the base of their calculation of the bright future. In common usage, it rather refers to a calculation based on a false assumption.

    However, this term is used in German too, and the Swiss call it 'Milkbooklet calculation'. Well, the Swiss are bankers. :)

  • Hello again,

    Right now, I have tested this circuit:


             V1cc         V2cc
               |           |
               |          (A)
               |           |
    -------|   |-------|   |-----------------------*--------(uC)----------|
       JP2-1    JP2-2 JP1-1   JP1-2              430 PWR      TP27                     GND

    V1cc = V2cc = 3.3 V. They are two separate sources from the same power supply. Of course, they are shorted to the same ground (JP3 is opened too).

    With this circuit and the code I had posted, the ammeter "(A)" shows about 4 uA. It is a ammeter of a common multimeter (it supposed it can  measure until 0.000 mA), DC analyzer is not avaliable now, but with this way I have measured, could I obtain a similar value in the analyzer?

    If I close JP1, disconnect V2cc and connect the ammeter in the same position but in V1cc line, I obtain about 800 uA,  is correct this current to power the entire board?  In the board users' guide, there are not values to compare. Some comment about this?Too high, too low, no problem?

    Jens-Michael Gross said:
    Well, you cannot eat the cake and keep it. Running a precision clock source consumes energy. Maybe you can spare another few µA, but there's a limit of what you can switch off without losing required functionality.


    Maybe I did not explain well. I meant if with LPM3, is a doable value the one that I have obtained or something aproximated?. According to datasheet, it seems yes. Is to say, and with this question all message is summarized: is the circuit correct and are the values obtained doable/achievable? (Supposing all connections are correct and no failures by my part).

    Thanks again for all your time invested in this post and sorry for so many questions. I hope to be near to the objective or not too far at least :).

    If there is some problem in the final visualization, I will edit the message, but I think I have follow all the steps to publish the post clearly.


  • Is T da S said:
    With this circuit and the code I had posted, the ammeter "(A)" shows about 4 uA. It is a ammeter of a common multimeter (it supposed it can  measure until 0.000 mA), DC analyzer is not avaliable now, but with this way I have measured, could I obtain a similar value in the analyzer?

    Looks right. In the first case, only the MSP and its decoupling capacitors are powered, and also the AVCC input. Nothing else.
    Using a simple Ameter may introduce an error. The current draw of a working MSP introduces a high-frequency current pulsation (MCLK and higher), which is often not detected and properly measured by cheap Ameters. However, in LPM3, the PCU is not clocking so these high-frequewnt ripples do not appear.

    Is T da S said:
    If I close JP1, disconnect V2cc and connect the ammeter in the same position but in V1cc line, I obtain about 800 uA,  is correct this current to power the entire board?  In the board users' guide, there are not values to compare. Some comment about this?Too high, too low, no problem?

    Checking the circuitry, the whole board has some more circuitry powered than jsu the MSP. Wile the accelerometer is powered by P6.0 por tpin, other parts like the LCD backlight driver and LCD circuit or the Audio out amplifier, both get VCC applied permanently. Even though these parts are inactive by default, so they do not consume their operating current, their standby current may well be 800µA.

**Attention** This is a public forum