Jump to content
43oh

Energia MSP430F5529 RX Baud Rate Limit?


Recommended Posts

I'm trying to connect to a camera (Adafruit's VC0706) via SoftwareSerial to a MSP430F5529, and the camera is only able to transmit and receive at 38400 baud.  The board is able to transmit at 38400 successfully and receives a datastream back from the camera at 38400, but it is only displayed as gibberish on Energia's serial monitor.  I know the camera isn't transmitting gibberish because it gives an identical signal to an Arduino, which displays it correctly, but I'm not sure what else to do.  I saw on this forum that different boards sometimes have limits to the baud rates they can interpret, so could that be it?  If not, what else could cause it?

 

Apologies if I've left anything out - I'm still rather new at this.

Link to post
Share on other sites

Ok, this sounds silly, but how do you use softwareSerial to communicate with the computer and hardware serial to not communicate with the computer?  I know that you have to turn the RXD and TXD jumpers 90 degrees, but besides that I'm not sure how to define the serial inputs and outputs.

Link to post
Share on other sites

The F5529LP has two UARTs, both available as hardware serial ports- Serial is the backchannel UART to the PC and Serial1 is exposed on the boosterpack standard UART pins.

 

Sent from my Galaxy Note II with Tapatalk 4

There we go, that's perfect.

Serial.whatever for talking to the computer.

Serial1.whatever for the camera.

 

For using software for the computer and hardware for the camera what I was thinking was to remove both jumpers and make jumper wires to attach the softwareSerial ports to the programming section and more jumper wires to attach the HW serial pins to the camera.

 

Hardware for both is easier/better, though.

One thing to note on multiple HW serial things is that at least on the LM4/TM4 launchpad they all have to run at the same baud rate.

Link to post
Share on other sites

You don't need to worry about software serial anything.

 

You should be able to use the hardware serial backchannel (Serial.begin(baudrate)) to talk to the PC- no need to move jumpers.

And use P6.5 (TXD) and P6.4 (RXD) (Serial1.begin(baudrate)) to talk to the camera.

 

They both should support at least 115200 baud so 38400 shouldn't cause any problem with Serial1 talking to the camera.

Obviously with the appropriate Serial.print(); Serial1.print; et cetera.

 

So maybe:

 

void setup() {
  Serial.begin(115200);
  Serial1.begin(38400);
}
Link to post
Share on other sites

When I tried that one the LM4 Launchpad both serial ports became active, but ran at whatever the most recently declared speed was. In the above code they'd both end up going at 38400.

Whether that is the case with this board or not I don't know, nor do I know if it was a hardware issue (clock source maybe?) or an energia issue.

Both at 38400 should work just fine though.

Link to post
Share on other sites

Thank you!  Abcedarian's and bobnova's advice worked (and thanks too to spirilis and Rickata59 - I know you said the same thing, I just didn't know how to use it).  I'm communicating perfectly with the camera now, and don't have to worry about SoftwareSerial.  I'll note that I had to use 3.3 for TX and 3.4 for RX, but aside from that it worked without a hitch.

Link to post
Share on other sites
  • 2 years later...
2 hours ago, adalloul said:

I have a GPS module from Sparkfun that uses Rx and Tx.. Can I use Serial1 same as the camera? man these MSP's are pain

Bringing back threads from the dead!

Can you provide more context here?  The GPS shouldn't use the same UART as another device (camera? what kind?) but otherwise yeah, Serial1 should work...

Link to post
Share on other sites
7 hours ago, spirilis said:

Bringing back threads from the dead!

Can you provide more context here?  The GPS shouldn't use the same UART as another device (camera? what kind?) but otherwise yeah, Serial1 should work...

Yeah I am using VC0706 camera from adafruit link below, which uses Serial1 over P3_4 and P3_3. My GPS needs to communicate over UART same as the camera. However, for the GPS, I defined a tx pin and rx pin using the digital pins with SoftwareSerial (rx,tx) and it didn't work. The weirdest thing is the gps works perfectly with an arduino uno and mega.  

camera link : https://learn.adafruit.com/ttl-serial-camera?view=all 

gps link : http://www.kr4.us/venus-gps-logger-with-sma-connector.html?gclid=Cj0KEQjwmv7JBRDXkMWW4_Tf8ZoBEiQA11B2fqGRPuhktNFPyvZaPYk_xLK_ySCHRx9g-1Z_8A5RvboaAorz8P8HAQ

Link to post
Share on other sites
1 hour ago, adalloul said:

Yeah I am using VC0706 camera from adafruit link below, which uses Serial1 over P3_4 and P3_3. My GPS needs to communicate over UART same as the camera. However, for the GPS, I defined a tx pin and rx pin using the digital pins with SoftwareSerial (rx,tx) and it didn't work. The weirdest thing is the gps works perfectly with an arduino uno and mega.  

camera link : https://learn.adafruit.com/ttl-serial-camera?view=all 

gps link : http://www.kr4.us/venus-gps-logger-with-sma-connector.html?gclid=Cj0KEQjwmv7JBRDXkMWW4_Tf8ZoBEiQA11B2fqGRPuhktNFPyvZaPYk_xLK_ySCHRx9g-1Z_8A5RvboaAorz8P8HAQ

I haven't messed with energia in a while but I am pretty sure SoftwareSerial doesn't work on that chip... it was meant for the really small MSP430G2452 and similar which didn't have a hardware UART.  Arduino handles softwareserial better.  Maybe someone else has a better softwareserial implementation around here, I don't know though.

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