Jump to content
43oh

TM4C129 (the newest tiva lauchpad) Serial.available() problem


Recommended Posts

Hi guys i bring more bugs

 

So i was trying to send data by serial to my launchpad and i was feeling lazy so i use energia Serial.

Problem is Serial.available doesn't seem to work.

 

I try to send for example the number 256 and serial available just returns 2 istead of 3, but after i empty it, sundedly there's the 3rd byte and Serial.available returns 1 (it's not the number 5, it's realy the 6).

 

So i'm going to try to check what the problem is but i realy never worked with the UART so if anyone could help it would be apreciated

Link to post
Share on other sites

@L.R.A can you please post the Sketch you used.

 

I try to send for example the number 256 and serial available just returns 2 istead of 3, but after i empty it, sundedly there's the 3rd byte and Serial.available returns 1 (it's not the number 5, it's realy the 6).

 

Do you mean you send a string 256 and Serial.available() returns only 2?

Link to post
Share on other sites

@L.R.A can you please post the Sketch you used.

 

 

Do you mean you send a string 256 and Serial.available() returns only 2?

in the Serial monitor i send the number 256 (string) or even 99999 and the the Serial.available only says i sended 2 chars

Link to post
Share on other sites

On Energia 0101E0012 with a TM4C129 Serial.available() returns the correct number of characters with this test sketch:

void setup()
{
  Serial.begin(115200);
}

void loop(){
  if (Serial.available()){
    delay(1000);
    Serial.print(Serial.available());
    Serial.print(" characters received. They were: ");

    while(Serial.available()){
      Serial.print(Serial.read());
      Serial.print(",");
    }
    Serial.println();
  }
}

Does your program/sketch/code/whatver give the serial data enough time to be received? These chips are fast enough that I've found I need to wait for incoming data in places where I don't have to with an Arduino or MSP430G.

Link to post
Share on other sites
  • 3 weeks later...

We are having the same issue as described above.

 

i can't realy help with this right now, exams and stuff prevent me from that.

 

Starting next week i'll be in vacation and then i can try to see why Energia isn't working

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