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.

MSP430FR5994: Energia Serial.print()

Part Number: MSP430FR5994
Other Parts Discussed in Thread: ENERGIA, MSP430F5529

Hi!

I have MSP430FR5994 launch pad and trying to use serial output, but nothing happens. COM port and board set up correctly. Here is very simple program. LEDs are blinking, but I see no output.

#define RED RED_LED
#define GRN GREEN_LED

void setup() {
 pinMode(RED, OUTPUT);
 pinMode(GRN, OUTPUT);
 Serial.begin(9600);
}

void loop() {
 digitalWrite(RED, HIGH);
 digitalWrite(GRN, LOW);
 Serial.print("Red");
 delay(1000); //second
 digitalWrite(RED, LOW);
 digitalWrite(GRN, HIGH);
 Serial.print("Green");
 delay(1000);
}

Thank you,

Misha

  • Hi Misha,

    I assume you are sending this data to a console or terminal program on a PC.  Windows or Linux?

    If Windows PC, did you open device manager, look at Ports (COM & LPT) and you see MSPApplication Uart1(COM X)?  Are you selecting that COM X for your terminal application?

  • Hi Denis!

    Yes, I have a Windows machine and COM ports are set up correctly. 

    I actually tried this from CCS and it works

    #include <stdio.h>

    #include <msp430.h> 

    int main(void)

    {

    WDTCTL = WDTPW | WDTHOLD;

    printf("Hello World!\n");

    return 0;

    }

    Misha

  • Those use entirely different mechanisms.

    Energia uses the UART and the serial port to a terminal (There is a terminal in CCS, but it is different than the console)

    The printf() command sends the buffer via the JTAG to the console.

    To be equivalent, you need to use a UART Echo example for your MSP430. That will send characters to the terminal.

  • Hi Misha,

    I ran your original code on MSP430F5529 launchpad and it works in CCS.  The serial communication uses the back-channel UART connection to the programmer/debugger.  I had to use CCS because for some unknown reason after I installed Energia it gives me errors about the programmer firmware needing updating and I honestly can't figure out how to do that from Energia.

    Here is snapshot of my terminal app receiving the messages:

  • Ok, guys I figured it out. Thank you for pushing me in the right direction!
    This is what happened: initially I had problems with LaunchPad drivers and COM ports. After several reinstalls it finally started to work and I never looked back. Apparently, after last Windows and Lenovo updates Intel AMT somehow appeared on COM3 together with MSP UART1. Since Energia could load sketches it has never appeared to me that something can be wrong with COM ports again. I ended up disabling Intel AMT in BIOS and all started to work as it should.

    Thank you very much!!!
    Misha 

**Attention** This is a public forum