Other Parts Discussed in Thread: ENERGYTRACE, MSP430FR5969
Dear,
I am starting my way with MSP430FR4133.
I have some tests with EnergyTrace, free run mode, I remove the UART jumpers and also the LED jumpers of the Launchpad.
For the following code, I obtain a 60 uW value for LPM3, which is clearly incorrect. However, the code is so simple but I am not able to see what am I missing, maybe because of jet-lag ;)
So, give me your opinions and tell me what I am doing so wrong in my first steps with this MCU!
#include <msp430.h> /// /// @brief Inits GPIOs in low-power mode and functions /// void gpio_init() { P1DIR = 0xFF; P2DIR = 0xFF; P3DIR = 0xFF; P4DIR = 0xFF; P5DIR = 0xFF; P6DIR = 0xFF; P7DIR = 0xFF; P8DIR = 0xFF; P1REN = 0xFF; P2REN = 0xFF; P3REN = 0xFF; P4REN = 0xFF; P5REN = 0xFF; P6REN = 0xFF; P7REN = 0xFF; P8REN = 0xFF; P1OUT = 0x00; P2OUT = 0x00; P3OUT = 0x00; P4OUT = 0x00; P5OUT = 0x00; P6OUT = 0x00; P7OUT = 0x00; P8OUT = 0x00; // remove GPIO default high-impedance and applies previous PM5CTL0 &= ~LOCKLPM5; } /// /// @brief SuperLoop /// /// Inits, senses and sends /// int main(void) { // stop watchdog timer WDTCTL = WDTPW | WDTHOLD; // init stuff gpio_init(); // Enter LPM __bis_SR_register(LPM3_bits + GIE); }