Sign in to follow this  
Followers 0
Medsimo

MSP430G2553 SERIAL PORT NOT WORKING

6 posts in this topic

hello all !! I'd been worked with MSP430G25530 target for Frequency measurment ... I have a code but, when I use the Serial.print (). nothing show up. 

any helps please ?

 

my code :

 

Share this post


Link to post
Share on other sites

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

I started with this simple example (look below), and it does not show anything in the serial port either.

 

post-49504-0-41536600-1484583391_thumb.jpeg

post-49504-0-39257000-1484583396_thumb.jpeg

post-49504-0-94061700-1484583398_thumb.jpg

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

thank you Peter ;) 

I've been checking your code in  my device and ... I can not get anything in the serial monitor.

Share this post


Link to post
Share on other sites

If your launchpad is rev 1.5, based on the photo you posted your jumpers for TX RX may not be correct.

Take a look at the Energia reference here.

 

Bob

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  
Followers 0