Jump to content
curtis63

Serial Debug Window and Unplug required...

Recommended Posts

Good morning.

 

I've been using the MSP430 launchpad and programming it using Energia 18.

 

Anyway, for the whole time I've been using Energia, it very often have to unplug and plug back in my device in order to send it another build.  Have any of you seen this problem before?

 

Sometimes it works without having to unplug the hardware, however, over 50% of the time, I have to unplug the LaunchPad in order to upload new code to it from Energia.

 

It seems to get hung while attempting the upload.  So, to overcome this, I unplug the Launchpad, click the Upload button again, usually get an error, so I click Upload again and then it seems to start working.

 

Another problem I've been having is that half the time, the Serial Debug output window doesn't show any output.  I usually have to close it and re-open it in order to see the output.  Also, sometimes, it just doesn't show any output no matter how many times I close and re-open it.  

 

Is this just me, or is it a bit iffy with the debug window and the upload?

 

I'm doing all this on a Windows 8 box and have the latest Energia 18 on it.

 

Any ideas to make it so I don't have to keep on unplugging/plugging in my device with each upload?

 

Thanks much,
Curtis

 

Share this post


Link to post
Share on other sites

I have similar experience on macOS. Disconnecting the LaunchPad when the Serial port is open requires unplugging-plugging the LaunchPad.

 

As a solution, I program a hardware interrupt for the button PUSH2 to call Serial.end();.

// Prototypes
void PUSH2_ISR();


// Add setup code
void setup()
{
    pinMode(PUSH2, INPUT_PULLUP);
    attachInterrupt(PUSH2, PUSH2_ISR, FALLING);
    
    // ...
}

void PUSH2_ISR()
{
    Serial.end();
    while(true);
}

// Add loop code
void loop()
{
 
}

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

×