Jamesgrr 1 Posted October 22, 2018 Share Posted October 22, 2018 Hi, I'm working on a board with an FR2433, and also doing testing with the FR2433 Launchpad. I am trying to troubleshoot high current using SleepSeconds() With Suspend, I can get 1.5ua but sleep seconds is around 18ua, I believe it should be far lower based on the datasheet for LPM3. I am using a ucurrent gold so feel confident about the measurement. I set all my pins (1-22) to OUTPUT LOW and have also tried with INPUT_PULLDOWN Any assistance here would be greatly appreciated. Thankyou. Quote Link to post Share on other sites
Jamesgrr 1 Posted October 22, 2018 Author Share Posted October 22, 2018 Using Driverlib without energia I am able to get VERY low consumption (less than .5ua) Would love to know how this can be integrated with Energia SleepSeconds. Thanks. WDT_A_hold(WDT_A_BASE); P2SEL0 |= BIT0 + BIT1; // P2.0: XOUT; P2.1: XI1 //CSCTL4 = SELMS__DCOCLKDIV | SELA__XT1CLK; // MCLK=SMCLK=DCO; ACLK=XT1 // Port Configuration all un-used pins to output low P1OUT = 0x00; P2OUT = 0x00; P3OUT = 0x00; P1DIR = 0xff; P2DIR = 0xff; P3DIR = 0xff; PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode // to activate previously configured port settings PMM_turnOffRegulator(); __bis_SR_register(LPM3_bits + GIE); // Enter LPM3 __no_operation(); // For debug Quote Link to post Share on other sites
Jamesgrr 1 Posted October 22, 2018 Author Share Posted October 22, 2018 I think messing with the power regulator is no good. My 'implementation' of it with Energia breaks SleepSeconds and the device restarts. Any assistance with getting current using SleepSeconds below 17ua would be greatly appreciated. Quote Link to post Share on other sites
NurseBob 111 Posted October 25, 2018 Share Posted October 25, 2018 Have you looked at what's happening "under the hood" with CCS or similar? All things considered, I find it amazing that the current is as low as it is. Energia is a great place to start and experiment, but it's not intended to replace coding that is far closer to the metal, er, silicon. Given it's heritage as a msp430 version of the Arduino, it's a very impressive piece of work. But, to manage the supporting classes, and the ever-present loop, it is constrained if your're looking for ultra-low power apps. You have already demonstrated that differential with your driverlib version. mph 1 Quote Link to post Share on other sites
Jamesgrr 1 Posted October 29, 2018 Author Share Posted October 29, 2018 Yes this is the conclusion I have come too. I believe Energia' implementation of the Watchdog here is what causes the higher usage. It is very impressive that it manages to get even close. I think it is abit misleading to call SleepSeconds() true LPM3 though. It would be great to see some other implementation though; as the MSP430 is capable of sub 1ua sleep. Perhaps I will experiment with a library in the future to make this possible. Thanks for your response. RobMaker 1 Quote Link to post Share on other sites
LIJsselstein 9 Posted November 25, 2018 Share Posted November 25, 2018 Energia on the msp430fr2xxx-4xxx range falls back to using the REFO 32kHz clock when the external 32kHz crystal is not populated. REFO is a nice stable/accurate clock, but when you look it up in the datasheet (e.g. p24 in FR2433) you’ll notice the consumption is 15uA. See also line 139 in wiring.c. So, to get really low power with Energia (~1uA in LPM3 with sleep/sleepSeconds), either customise wiring.c to use VLO clock instead of REFO (but you loose clock accuracy) or add external LF crystal. Using driverlib/CCS without ext. LF crystal is basically the same: lowest power=inaccurate clock, a bit less low power=accurate clock. Quote Link to post Share on other sites
Jamesgrr 1 Posted November 26, 2018 Author Share Posted November 26, 2018 Thanks, this is indeed the case. I believe this is the section in question here. It's abit weird because the comment above suggests that it should fall back to VLO? But actually uses REFO. Additionally, in 'MSP430FR2433.h" there is no define for setting ALCK to VLO, unlike the FR5xx boards. /* If starting the XTAL timed out then fall back to VLO */ if(!timeout) { /* ACLK = VLO = ~ 12 KHz */ vlo_freq = 8000; /* Source ACLK from REFO */ CSCTL4 |= SELA__REFOCLK; If I look at where SELA_REFOCLK is defined, I can see there is no way to direcctly do this #define SELA__XT1CLK (0x0000) /* ACLK Source Select XT1CLK */ #define SELA__REFOCLK (0x0100) /* ACLK Source Select REFOCLK * This is unlike the FR2355 which has #define SELA__XT1CLK (0x0000) /* XT1CLK with divider (must be no more than 40 kHz) */ #define SELA__REFOCLK (0x0100) /* REFO (internal 32-kHz clock source) */ #define SELA__REFOCLK_H (0x0001) #define SELA__VLOCLK (0x0200) /* VLO (internal 10-kHz clock source) */ #define SELA__VLOCLK_H (0x0002) #define SELA__RESERVED (0x0300) /* Reserved */ #define SELA__RESERVED_H (0x0003) I have tried defining VLOCLK to use in Wiring. But this has been unsuccessful. I am not too familiar with the 2355 so will need to see why this is different, but a cursory look at the datasheet doesn't spot anything too different in their Clock System. Any insights as to why these are different and how to use VLO for ACLK would be greatly appreciated. (here is also the chance that I have dived into a rabbit hole here and am completely misunderstanding this) Quote Link to post Share on other sites
Jamesgrr 1 Posted November 26, 2018 Author Share Posted November 26, 2018 Based on what I am learning here: https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/749845/2768754#2768754 It appears that the "Enhanced Clock System" isn't available on this chip. Which is what limits ACLK to REFO. Will update if I learn more about using it with the RTC module. Quote Link to post Share on other sites
LIJsselstein 9 Posted November 26, 2018 Share Posted November 26, 2018 I believe that the documentation in wiring.c is wrong so I suggested a fix for that in this PR. I didn’t know that VLO could not be chosen for ACLK on the FR2433...so thanks for that. This topic on E2E essentially mirrors this thread. Quote Link to post Share on other sites
Jamesgrr 1 Posted November 26, 2018 Author Share Posted November 26, 2018 Yes, I have been asking around to try find out as much as I can about this. From Energia and Ti perspective. Thanks for that PR. 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.