-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
FIX: Allow use of UART0 with enabled USB_CDC_CONSOLE #21496
Conversation
With reducing the build variants (no different builds for CDC and UART) this is a side effect of auto detecting how the MCU is connected to the PC. |
Which I see as a problem If I choose a CPU/Board where the USB/CDC is available for debug in order to dedicate every UART for external peripherals, what can I do to insure I will always have every UART available for those peripherals when USB is not plugged ? I understand the need for a fallback mode in standard builds but how can I prevent that auto mode when I don't want it ? |
Disable Tasmota console could be a way. |
It would require a different build to debug (one with console) and run (without console) |
How? I searched the docs and found only To summarize:
I would expect, that the serial console is deactivated automatically, if I explicitly use the third uart by any driver... nevertheless if compiled with CDC console (and fallback) or not. So I'm unsure if this is
In this case, I would really appreciate a warning being printed here: Thanks, Roland |
This PR has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
Description:
When tasmota is compiled with
USE_USB_CDC_CONSOLE
, the ´ClaimSerial` method will return immediately and will not release UART0This makes sense, as long as USB is used for console, but if we fall back to serial, because no USB is connected, we must release the console, so that all 3 UARTs on the ESP32 can be used.
(Possible broken since rPraml@84ced0f)
In my case I tried to connect 3 SML meters to a ESP32 and I always had some garbage in the web console, when all 3 UARTs were used, as the serial data was read by the SML driver and the SerialConsole.
Related issue (if applicable): fixes #20324
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass