Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial printing issues. #18

Open
fcooper opened this issue Nov 14, 2018 · 6 comments
Open

Serial printing issues. #18

fcooper opened this issue Nov 14, 2018 · 6 comments
Assignees
Milestone

Comments

@fcooper
Copy link

fcooper commented Nov 14, 2018

I am having issues getting basic serial print usage working.

OS: Windows 10 64bit
IDE Version: Energia 1.8.7E21
Board: MSP_EXP432E401Y
Core: MSP432 EMT Red v5.23.1

When uploading the below code serial monitor outputs garbage text. However, doing a soft reset (hitting reset button) fixes this issue.
This code results in garbage text output:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly: 
  Serial.println("hey");
}

image

Root cause is likely the same but this code doesn't generate any output when you upload it. Doing a soft reset output text but its garbage text.

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.print("hey");
}

void loop() {
  // put your main code here, to run repeatedly: 

}

image

Sometimes a delay fixes some of these issues. But with the below example it outputs text but its still has some garbage included.

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  delay(10000);
  Serial.print("hey");
}

void loop() {
  // put your main code here, to run repeatedly: 

}

image

@robertinant robertinant added this to the 5.23.2 milestone Nov 14, 2018
@robertinant
Copy link
Member

I have just verified that this is a XDS110 emulator issue. The issue has been reported to the Engineering team that maintains the XDS110.

@robertinant robertinant modified the milestones: 5.23.2, 5.25.0 May 2, 2019
@robertinant robertinant self-assigned this May 2, 2019
@fcooper
Copy link
Author

fcooper commented Aug 5, 2019

It looks this problem is due to a silicon UART issue documented in the MSP432P401 errata.
http://www.ti.com/lit/er/slaz610r/slaz610r.pdf Errata: USCI46

@robertinant
Copy link
Member

robertinant commented Aug 5, 2019

I think the errata is about receiving and not transmitting.
"UART may receive the first byte incorrectly".

@fcooper
Copy link
Author

fcooper commented Aug 9, 2019

Your right. So do we know what the problem is?

@robertinant
Copy link
Member

This is a XDS110 issue that is being worked on by TI. Will keep this open to update when a fix is available in the XDS110 firmware.

@fcooper
Copy link
Author

fcooper commented Nov 12, 2019

So it seems like the root cause has been identified.

The corrupted characters are due to the debugger not fully configuring its uart before taking the MSP432 out of reset. Therefore, MSP432 can output characters to the debugger's uart before its ready.

The issue with no UART output is due to the debugger UART buffer becoming full before its able to clear it out by sending it to the PC. The current firmware just didn't try outputting anything once this happen.

Still waiting to incorporate the new debugger firmware into Energia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants