Jump to content

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,


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()

// Add loop code
void loop()
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...