energia / msp430-lg-core

15 stars 12 forks source link

MSP430FR4311 — Issue with Serial #54

Closed rei-vilo closed 6 years ago

rei-vilo commented 6 years ago

The following basic sketch doesn't display anything on none of the two serial ports from the MSP430FR4311 LaunchPad.

The same sketch with the same USB cable works fine on the MSP430FR6989 LaunchPad.

All jumpers except CTS and RTS are set. I'm facing the same issue on both macOS and Windows. I'm using MSP430 boards package release 1.0.3.

#define LED RED_LED

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

void loop() {
  Serial.println(millis());
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
StefanSch commented 6 years ago

Unfortunately the RED LED and the UART TX are mapped to the same pin. So each time you toggle the RED LED the UART pin is reconfigured. Use #define LED GREEN_LED

rei-vilo commented 6 years ago

Thanks! I've just forget about this confusing RED LED and UART TX mapped to the same pin!