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

T-Beam S3 core - enable USB CDC #3597

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

oseiler2
Copy link
Contributor

The current flag 'ARDUINO_USB_MODE=0' disables USB CDC, and enables USB OTG (which isn't used as far as I can see).
Changing to 'ARDUINO_USB_MODE=1' allows firmware updates via USB (eg the web flasher) without having to change into download mode first by pressing the BOOT button during power on/reset.

see https://thingpulse.com/usb-settings-for-logging-with-the-esp32-s3-in-platformio/
This is in line with other ESP32-S3 board definitions, eg https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/boards/t-beams3-supreme.json

@CLAassistant
Copy link

CLAassistant commented Apr 11, 2024

CLA assistant check
All committers have signed the CLA.

@oseiler2
Copy link
Contributor Author

oseiler2 commented Apr 11, 2024

image

@thebentern thebentern merged commit 8fd32f3 into meshtastic:master Apr 12, 2024
70 checks passed
@ndoo
Copy link
Contributor

ndoo commented Apr 16, 2024

This change is causing my T-Beam Supreme to not boot until the serial terminal is accessed, when connected to a USB host.

@ndoo
Copy link
Contributor

ndoo commented Apr 16, 2024

I believe, this is what is blocking.

espressif/arduino-esp32#7554

@oseiler2
Copy link
Contributor Author

Apologies, I can reproduce this issue now. Will try to find a fix.
@thebentern please revert this change for now if it's causing wider issues.

@oseiler2 oseiler2 deleted the T-Beam-S3-core-enable-usb-cdc branch April 16, 2024 21:11
@oseiler2
Copy link
Contributor Author

@ndoo could you please have a look at my PR #3652 and see if that fixes the problem for you?

@mrekin
Copy link
Contributor

mrekin commented Apr 17, 2024

@ndoo could you please have a look at my PR #3652 and see if that fixes the problem for you?

Little bit offtopic, but about same problem with esp32C3.
CDC starts working fine with
ARDUINO_USB_MODE=1 ARDUINO_USB_CDC_ON_BOOT=1
and the latest (2.0.15) arduino platform. With the current used 2.0.14 not working.
Just tested (but here a lot of new warnings while build)

@garethhcoleman
Copy link
Contributor

We ran into this problem very recently. Good comment here helps explain: espressif/arduino-esp32#7554 (comment)

We ended up setting cdc_on_boot to 1 and usb_mode to 0. I saw quite a few other esp32 S3 boards sharing this config.

Side benefit is that our usb vid:pid get passed to the host, so our board gets identified instead of just a generic JTAG debugger etc.

@ndoo
Copy link
Contributor

ndoo commented Apr 18, 2024

@ndoo could you please have a look at my PR #3652 and see if that fixes the problem for you?

No longer blocks boot when connected to my PC. However, do look at the various replies above, perhaps there is a better combination of flags to use.

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

Successfully merging this pull request may close these issues.

None yet

6 participants