Jump to content
Sign in to follow this  
Medsimo

MSP430G2553 SERIAL PORT NOT WORKING

Recommended Posts

Hello Medsimo,

 

quick viewed into the attached Energia sketch, so far you forgot that Arduino/Energia do not want "int main()",

they expect "void loop()" instead.

a few more items which are suspect:

 

>  /*** Watchdog timer and clock Set-Up ***/
> WDTCTL = WDTPW + WDTHOLD;   // Stop watchdog timer
> BCSCTL1 = CALBC1_8MHZ;      // Set range
> DCOCTL = CALDCO_8MHZ;       // Set DCO step + modulation
 
the MSP-EXP430G2 board is defined and setup running at 16MHz, so if you go and change anything related
to that 16Mhz down to 8Mhz, you may get garbage even if you changed main()->loop().
it may send with 4800 baud.
 
your way to disable the WD may also cause problems.
 
below my guesswork
 
####
void setup() {
    
  Serial.begin (9600);
  delay(500);                                <==== some delay
  Serial.println("Setup done");     <==== quick check if setup() did finished.
}
 
void loop() {   <=== you need "void loop()" instead of "int main()"
  
  /*** Watchdog timer and clock Set-Up ***/
  //WDTCTL = WDTPW + WDTHOLD;   // Stop watchdog timer   <=== SUSPECT! So commented out.
  BCSCTL1 = CALBC1_8MHZ;      // Set range   <==== this and the one below, may cause 4800 baud!!!
  DCOCTL = CALDCO_8MHZ;       // Set DCO step + modulation
###

 

this should at least show you something on your terminal ~ 4800.

best regards

Peter ;-)

Share this post


Link to post
Share on other sites

Hello Medsimo,

 

i would reduce it even more, remove all except Serial.begin() and Serial.println()
 

in loop(), do some sort of 

int i;
delay(500);

Serial.println(i++);

 

then figure out that is going wrong with your com ports.

double-check the EXP-430G2 user manual, i mean the jumper settings for TX/RX!

i am not a windows user (a hater), so may not able to help much on windows.
however, i saw com port numbers changing similar to linux after flashing the EXP-MSP430G2.
so flash a reduced sketch, close energia, open energia, select com port and try again with serial monitor or a terminal program.
 

best regards

Peter ;-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×