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

V2.0.15 USB OTG Serial.println() works WITHOUT a Serial.begin() #9532

Open
1 task done
def1149 opened this issue Apr 18, 2024 · 3 comments
Open
1 task done

V2.0.15 USB OTG Serial.println() works WITHOUT a Serial.begin() #9532

def1149 opened this issue Apr 18, 2024 · 3 comments
Assignees

Comments

@def1149
Copy link

def1149 commented Apr 18, 2024

Board

Adafruit Feather ESP32-S2

Device Description

N/A

Hardware Configuration

N/A

Version

latest master (checkout manually)

IDE Name

Arduino IDE 2.3.2

Operating System

Windows 10

Flash frequency

80 Mhz

PSRAM enabled

yes

Upload speed

921600

Description

Serial.print() works WITHOUT a Serial.open()

Sketch

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  Serial.println("\nThis Prints !!??");
  delay(2000);
}

Debug Message

N/A

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@def1149 def1149 added the Status: Awaiting triage Issue is waiting for triage label Apr 18, 2024
@lucasssvaz lucasssvaz added Peripheral: UART and removed Status: Awaiting triage Issue is waiting for triage labels Apr 19, 2024
@SuGlider
Copy link
Collaborator

SuGlider commented Apr 19, 2024

@def1149 - Adafruit Feather ESP32-S2 uses Native USB CDC to print using the Serial object from Arduino.
It has no UART<->USB chip, therefore its USB port is directly connected to the S2 USB pins.

Indeed, Serial.println("\nThis Prints !!??") works because USBCDC::begin() is called in the Arduino Initialization, before the sketch starts in app_main().

I think that there is a reason for that, maybe related to being able to print Debug messages before the Sketch starts, if necessary.

@SuGlider
Copy link
Collaborator

@me-no-dev - The call to Serial.begin() in main.cpp->void app_main() started with #5422 followed by #5466 and then finally in #6341

In #5422 there is the commit d425a3f that says "USB CDC should also be started in main".
Is it still valid? Do you remember the reason for that?

@SuGlider SuGlider changed the title V2.0.15 Serial,println() works WITHOUT a Serial.begin() V2.0.15 USB OTG Serial.println() works WITHOUT a Serial.begin() Apr 19, 2024
@me-no-dev
Copy link
Member

@SuGlider sorry, I did not understand this is USB. It would then make sense that it's ON

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

4 participants