Fmilburn 446 Posted September 4, 2016 Share Posted September 4, 2016 @@rord100 It isn't possible for others to replicate your findings since you are using a custom board with multiple things attached. Can you recreate your findings on a G2 LaunchPad? Try attaching the bells and whistles one thing at a time to isolate and see what might be causing it. Since you are using Energia, have you tried the functions that it makes available? i.e. sleep(), sleepSeconds(), suspend() and wakeup()? See for example this tutorial - it also demonstrates low power measurement with EnergyTrace and CCS. Note that at this time CCS does not support Energia v18 so use an earlier version. Quote Link to post Share on other sites
greeeg 460 Posted September 5, 2016 Share Posted September 5, 2016 P1_7, P1_6, P2_4, P2_3 are all connected to LEDs as your schematic shows. If you are using pull-downs on these pins you will probably have a small current flowing through these LEDs. Likely not enough to light them, but larger than the power drawn by the MSP430. Quote Link to post Share on other sites
NurseBob 111 Posted September 6, 2016 Share Posted September 6, 2016 Regarding the RST pin - typically the '430 devices want a pullup resistor between Vcc and RST. If it's not on the board, the device won't run. Also, your NC1-6 pins - are they all defined as PxOUT low and the PxDIR high? That's one low power configuration for "unconnected pins" page 41 of the family user guide. slau144j.pdf Secton 2.5 Connection of Unused PinsThe correct termination of all unused pins is listed in Table 2-3.Px.0 to Px.7 Open Switched to port function, output direction or input with pullup/pulldown enabledRST/NMI DVCC or VCC 47 k? pullup... Quote Link to post Share on other sites
rord100 1 Posted September 6, 2016 Author Share Posted September 6, 2016 P1_7, P1_6, P2_4, P2_3 are all connected to LEDs as your schematic shows. If you are using pull-downs on these pins you will probably have a small current flowing through these LEDs. Likely not enough to light them, but larger than the power drawn by the MSP430. Hi Greeeg, Thank you for your meticulousness and good comment. I changed the code accordingly and the current consumption during LPM4 is now ~ 0.29 ?A. Attached bellow is the amended code: void setup() { pinMode(P1_0,INPUT_PULLDOWN); pinMode(P1_1,INPUT_PULLDOWN); pinMode(P1_2,INPUT_PULLDOWN); //pinMode(P1_3,INPUT_PULLDOWN); This input will be set later pinMode(P1_4,INPUT_PULLDOWN); pinMode(P1_5,INPUT_PULLDOWN); pinMode(P1_6,INPUT_PULLUP); //LED pinMode(P1_7,INPUT_PULLUP); //LED pinMode(P2_0,INPUT_PULLDOWN); pinMode(P2_1,INPUT_PULLDOWN); pinMode(P2_2,INPUT_PULLDOWN); // pinMode(P2_3,INPUT_PULLUP); // LED This input will be set to output pinMode(P2_4,INPUT_PULLUP); // LED connected pinMode(P2_5,INPUT_PULLDOWN); // NC pinMode(P2_6,INPUT_PULLDOWN); pinMode(P2_7,INPUT_PULLDOWN); pinMode(P1_3,INPUT_PULLDOWN); //I changed this from pinMode(P1_3,INPUT_PULLUP); pinMode(P2_3,OUTPUT); //Enable output on P1_0 (onboard red LED) The P2_3 is where one of my LEDs is connected attachInterrupt(P1_3,Interrupt, RISING); //I changed this changed from attachInterrupt(P1_3,Interrupt, FALLING); } void loop() { LPM4; //whenever the loop runs, switch back into LPM4 //we could put code here that would run after every Interrupt - see warning in text. } void Interrupt(void) //Our interrupt routine { digitalWrite(P2_3,!digitalRead(P2_3)); //toggle the red LED }; Quote Link to post Share on other sites
rord100 1 Posted September 6, 2016 Author Share Posted September 6, 2016 Regarding the RST pin - typically the '430 devices want a pullup resistor between Vcc and RST. If it's not on the board, the device won't run. Also, your NC1-6 pins - are they all defined as PxOUT low and the PxDIR high? That's one low power configuration for "unconnected pins" page 41 of the family user guide. slau144j.pdf Secton 2.5 Connection of Unused Pins The correct termination of all unused pins is listed in Table 2-3. Px.0 to Px.7 Open Switched to port function, output direction or input with pullup/pulldown enabled RST/NMI DVCC or VCC 47 k? pullup... Hi NurseBob Thank you for your most educating remark. I was not aware of the family user guide. slau144j.pdf at all. I changed my target board HW accordingly (attached bellow). I tied the RST pin to Vcc via a 47K resistor and the devise is running. I defined the GPIOs as in the the code I previously posted to Greeeg above with current consumption of 0.29 ?A. Is there anything else I can do, in your opinion to lower current consumption to 0.1 ?A ? Thank you Low Power circuit.pdf Quote Link to post Share on other sites
rord100 1 Posted September 6, 2016 Author Share Posted September 6, 2016 @@rord100 It isn't possible for others to replicate your findings since you are using a custom board with multiple things attached. Can you recreate your findings on a G2 LaunchPad? Try attaching the bells and whistles one thing at a time to isolate and see what might be causing it. Since you are using Energia, have you tried the functions that it makes available? i.e. sleep(), sleepSeconds(), suspend() and wakeup()? See for example this tutorial - it also demonstrates low power measurement with EnergyTrace and CCS. Note that at this time CCS does not support Energia v18 so use an earlier version. Hi Fmilburn, Thank you for your remark. I tried your example, in the tutorial you mentioned above, on a brand - new MSP-EXP430G Luanchpad with a Fluke 187 multimeter connected in series with the Vcc pins of J3 after the jumper was removed and the circuit consumed 0.22 ?A during suspend mode. which is nice. Is there anything to do in your opinion to lower current consumption to 0.1 ?A ? Quote Link to post Share on other sites
roadrunner84 466 Posted September 6, 2016 Share Posted September 6, 2016 As on page 23 of the datasheet you should lower the voltage of your device as much as possible, probably to 1.8V to attain the lowest power consumption possible, as well as the temperature. Even then, the typical current is 0.1uA, the max is 0.5uA. Quote Link to post Share on other sites
Fmilburn 446 Posted September 7, 2016 Share Posted September 7, 2016 Somebody can correct me if I am wrong, but I seem to remember that the 20 pin G2553 has Port 3 internally, it just can't be accessed. Accordingly, those should be pulled low also. You will either have to add them to Energia in pins.h, or access the registers directly. As roadrunner84 says, lowering the voltage and slowing down the clocks reduces power also. Quote Link to post Share on other sites
NurseBob 111 Posted September 7, 2016 Share Posted September 7, 2016 Somebody can correct me if I am wrong, but I seem to remember that the 20 pin G2553 has Port 3 internally, it just can't be accessed. Accordingly, those should be pulled low also. You will either have to add them to Energia in pins.h, or access the registers directly. As roadrunner84 says, lowering the voltage and slowing down the clocks reduces power also. If I remember correctly, the OP was in LPM4 - there shouldn't be any clocks... On non-energia projects, even at 3.3V, I've seen my msp430F2013 at or below 0.1uA in LMP4. Having not run similar code on a G2553, I don't know if the same holds true, though. Quote Link to post Share on other sites
Fmilburn 446 Posted September 7, 2016 Share Posted September 7, 2016 If I remember correctly, the OP was in LPM4 - there shouldn't be any clocks... On non-energia projects, even at 3.3V, I've seen my msp430F2013 at or below 0.1uA in LMP4. Having not run similar code on a G2553, I don't know if the same holds true, though. You are right of course about the clocks in LPM4. I was thinking more in general I guess. Almost all of my contraptions have needed to wake up on their own at intervals.... Quote Link to post Share on other sites
rord100 1 Posted September 7, 2016 Author Share Posted September 7, 2016 @@rord100 It isn't possible for others to replicate your findings since you are using a custom board with multiple things attached. Can you recreate your findings on a G2 LaunchPad? Try attaching the bells and whistles one thing at a time to isolate and see what might be causing it. Since you are using Energia, have you tried the functions that it makes available? i.e. sleep(), sleepSeconds(), suspend() and wakeup()? See for example this tutorial - it also demonstrates low power measurement with EnergyTrace and CCS. Note that at this time CCS does not support Energia v18 so use an earlier version. Hi Fmilburn, Thank you for your remark. I tested your suggested code on new MSP-EXP430G using Fluke 187 multimeter connected in series to the Vcc pins of J3 after the jumper was removed and I measured 0.27 ?A which is good. Is there anything else I can do, in your opinion, to lower current consumption to 0.1 ?A ? Here is your the code I used: /* This example was derived from a posting by fmilburn3 Demonstrates a way to utilize LaunchPad low power modes with the sleep(), sleepSeconds(), suspend() and wakeup() functions in Energia. The LaunchPad will blink the red LED 3 times and demonstrate sleep() and sleepSeconds(). It then goes into suspend() but will wake up and start over again if the button is pushed. sleep() and sleepSeconds() use LPM3. suspend() uses LPM4. This example was derived from a posting by @[member=spirilis] at 43oh.com Created by Frank Milburn June 2015 Released into the public domain */ void setup() { for (int i =2; i < 20; i++) { pinMode(i, OUTPUT); digitalWrite(i, LOW); } pinMode(P1_3,INPUT_PULLUP); // this is the PUSH BUTTON pinMode(P1_0,OUTPUT); //Enable output on P1_0 (onboard red LED) attachInterrupt(P1_3,Interrupt, FALLING); } void loop() { // Flash the LED - use sleep and sleepSeconds to save power by going // into LPM3 for (int i = 0; i < 3; i++) { digitalWrite(RED_LED, HIGH); sleep(200); // use sleep for millis digitalWrite(RED_LED, LOW); sleepSeconds(1); // use sleepSeconds for seconds } // Suspend and go into LPM4 suspend(); } void Interrupt(void) { wakeup(); // wake up if button is pushed } Quote Link to post Share on other sites
Fmilburn 446 Posted September 7, 2016 Share Posted September 7, 2016 Hi Fmilburn, Thank you for your remark. I tested your suggested code on new MSP-EXP430G using Fluke 187 multimeter connected in series to the Vcc pins of J3 after the jumper was removed and I measured 0.27 ?A which is good. Is there anything else I can do, in your opinion, to lower current consumption to 0.1 ?A ? Here is your the code I used: Try the following one at a time and see what, if any, difference it makes. I would be interested in the results. 1) As suggested above, set port 3 to output direction and make pins low in setup() P3DIR = 0xFF; // set port 3 pin directions to output P3OUT = 0x00; // set port 3 pins low 2) Set the push button to be INPUT_PULLDOWN and the interrupt to be RISING - I doubt this will make any real difference 3) As suggested by roadrunner84, disconnect J4 completely and provide ~1.8V at J6 Quote Link to post Share on other sites
roadrunner84 466 Posted September 8, 2016 Share Posted September 8, 2016 If I remember correctly, the OP was in LPM4 - there shouldn't be any clocks... True, but lowing the voltage to 1.8V forces you to lower the clockspeed in those slivers of time you're not in LPM4, because you can't run at high speeds on that low a voltage. NurseBob 1 Quote Link to post Share on other sites
NurseBob 111 Posted September 8, 2016 Share Posted September 8, 2016 True, but lowing the voltage to 1.8V forces you to lower the clockspeed in those slivers of time you're not in LPM4, because you can't run at high speeds on that low a voltage. Good point. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.