Jump to content
jayachar88

Software UART support in Energia, and interaction with processing

Recommended Posts

On the 'Serial Communication' wiki entry, I see that the 'Software UART' case has not been elaborated or explained, unlike the Hardware UART feature available on v1.5 Launchpads. Can it be used to communicate with a Processing sketch running on PC (running Linux) ?

 

Can someone please confirm that they have got the serial communication working (bidrectional) between MSP launchpad ?

Share this post


Link to post
Share on other sites

Yes it does work. The wiki needs to be finished. If you use the g2231 or the g2452 Energia automatically defines Serial as a TimerSerial object. The jumpers need to be set the default settings when using software serial. Also note that on the g2231 running at 1MHz we automatically limit the speed to a max of 4800. Currently there is no provision for using TimerSerial on the g2553.

Share this post


Link to post
Share on other sites

Thanks @Rickta59. Can you clarify the cost of using TimerSerial in terms of RAM, program memory ? Since this uses a timer resource, is there any other library or function that cannot be used, which also requires timer ?

Share this post


Link to post
Share on other sites

And, I understand that there are no VCOM drivers required on Linux ?? Surprisingly material on Launchpad Wiki (including comments there), and some Q&A on Stackexchange indicated that the Virtual COM port of Launchpad uses a hybrid driver model, which is why serial comm with Launchpad on Linux was problemmatic. I guess that is either incorrect or history!

Share this post


Link to post
Share on other sites

There is a known issue with the CDC drivers in linux. something about a buffer overflo when no one is listening (work around is dont send data before you have something listening to the com port, or apply the CDC driver patch and reload the module)

 

but otherwise I have not had any other problems with serial communications with the launchpad,

Share this post


Link to post
Share on other sites

There is a known issue with the CDC drivers in linux. something about a buffer overflo when no one is listening (work around is dont send data before you have something listening to the com port, or apply the CDC driver patch and reload the module)

 

but otherwise I have not had any other problems with serial communications with the launchpad,

 

Ah okay. This is much better than what I'd read earlier. Are you aware of the the CD driver patch location ?

Share this post


Link to post
Share on other sites

this is one of the threads for the issue, and I know there are more....

 

http://forum.43oh.com/topic/2296-linux-serial-communication-working-wmodified-cdc-acm-module/#entry20250

 

if you are unsure on how to apply the patch, many of us here are able to assist you in applying it.

Share this post


Link to post
Share on other sites
Currently there is no provision for using TimerSerial on the g2553.

 

Timerserial works on the 2553 just fine. You just have to create an instance with a name other than Serial.

 

#include <TimerSerial.h>

TimerSerial TS;

void setup(){
TS.begin(9600);
}

void loop() {
TS.println{"Hello World");
delay(1000);
}

Share this post


Link to post
Share on other sites

Timerserial works on the 2553 just fine. You just have to create an instance with a name other than Serial.

 

#include <TimerSerial.h>

TimerSerial TS;

void setup(){
TS.begin(9600);
}

void loop() {
TS.println{"Hello World");
delay(1000);
}

 

I didn't find this to work. One minor problem must be corrected the '{' opening literal "Hello World" must be changed to '('. With both jumpers removed and a logic analyzer on the USART Pins I only get a brief high-low-high transition on P1.2 and nothing on P1.1.

 

Not obvious from most of the documentation, don't forget that the use of the serial monitor puts limitations on the max baud rate of 9600 even though the serial monitor offers options of higher baud rates.

Share this post


Link to post
Share on other sites

Hi,

 

Happy new year!

 

I don't know on current Energia release but at least in 006 and I think in 008 TimerSerial was working perfectly with the 2553.

In fact, for some reasons it was even working better than hardware serial for me, but the CPU overhead was important of course.

 

Yan.

Share this post


Link to post
Share on other sites

Hi,

 

Happy new year!

 

I don't know on current Energia release but at least in 006 and I think in 008 TimerSerial was working perfectly with the 2553.

In fact, for some reasons it was even working better than hardware serial for me, but the CPU overhead was important of course.

 

Yan.

Do you know if i want the G2553 to communicate with a wifi module can Timer serial work for pin 1.1 and pin 1.2?

Share this post


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.

Guest
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...