Skip to content

Program stalls when serial port is reopened at 1.0.5/1.0.6 #5004

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

Closed
thorv opened this issue Apr 1, 2021 · 3 comments
Closed

Program stalls when serial port is reopened at 1.0.5/1.0.6 #5004

thorv opened this issue Apr 1, 2021 · 3 comments
Assignees

Comments

@thorv
Copy link

thorv commented Apr 1, 2021

The program following is expected show "3", "6" on Serial, and then blink LED on GPIO 21.
It's OK on board package version 1.0.4, but NG on 1.0.5/1.0.6.
It shows only 3 but not 6, LED on GPIO 21 is not blinking
No debugging messages or core dump etc.

void setup() {
  Serial.begin(115200);
  Serial.println(__LINE__); //3
  delay(10);
  Serial.begin(115200);
  Serial.println(__LINE__); //6
  delay(10);
  pinMode(GPIO_NUM_21, OUTPUT);
 }

void loop() {
  digitalWrite(GPIO_NUM_21,HIGH);
  delay(500);
  digitalWrite(GPIO_NUM_21,LOW);
  delay(500);
}

So, we discussed at teratail.com (Japanese Q&A site) https://teratail.com/questions/326026 , concluded that the countermeasure to Issue #3878 seems to be causing this phenomenon.
I think it's the same phenomenon as #4948 but its impact will be more widespread than just M5Stack.

Hardware:

Board: Devkit-C/M5Stack
Core Installation version: 1.0.5/1.0.6
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Windows 10

TD-er added a commit to TD-er/ESPEasy that referenced this issue Apr 27, 2021
When calling Serial::begin() (on ESP32) you apparently need to give all parameters or else it may use default parameters (makes no sense!)
Serial::end() may cause a hang or crash -> timing issue

See crash/hang:
- espressif/arduino-esp32#5047
- espressif/arduino-esp32#5004
- espressif/arduino-esp32@81b7c47
- espressif/arduino-esp32#5112
- espressif/arduino-esp32#5032

Switch back to default:
- espressif/arduino-esp32#5026
@stale
Copy link

stale bot commented Jun 18, 2021

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Jun 18, 2021
@stale
Copy link

stale bot commented Jul 11, 2021

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Jul 11, 2021
@SuGlider SuGlider self-assigned this Jul 19, 2021
@SuGlider
Copy link
Collaborator

SuGlider commented Jul 19, 2021

Issue is solved with PR #5385 (in version 2.0.0Alpha)

@VojtechBartoska VojtechBartoska removed the Status: Stale Issue is stale stage (outdated/stuck) label Sep 22, 2021
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

3 participants