-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Serial.end() does not disconnect the Serial monitor #7359
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
Comments
@fanfanlatulipe26 - After checking the issue, it seems to be related to the way that IDF set the pins using IOMUX and then it doesn't disconnect them from the IO pads. I'm currently working on an UART detach function to fix it and then submit a PR. |
Although it is possible to see UART0 output in the default TX pin, when this pin is assigned to any other peripheral, it works fine. @fanfanlatulipe26 - please check the PR and, if possible, test it to ensure that this issue is solved. |
@SuGlider I don't know how to install your branch uart_detach_pins instead of my standard 2.0.5. I ended up copying your new HardwareSerial and esp32-hal_uart in my local 2.0.5 tree |
When idle or not used the pins are HIGH. The default TX/UART0 is HIGH when there is no serial transmission but after Seria.lend(), the line is set LOW. |
It really doesn't matter because after |
I have a question similar to this topic. The ESP32-S3 has two Micro-USB ports. One is labeled 'UART", the other is labeled "USB". I'm currently using the "USB' port to send HID Mouse/Keyboard data. Is it possible to also use this same "USB" port to send out serial data? |
@Ugobyte yes it is. You need to either enable "CDC On Boot" in the board menu, or start the USBSerial yourself: https://github.com/espressif/arduino-esp32/blob/master/libraries/USB/examples/USBSerial/USBSerial.ino |
Board
ESP-C3-32S-Kit and ESP32 Dev Kit
Device Description
ESP32 C3 board (or std ESP32)
Hardware Configuration
Nothing
Version
v2.0.5
IDE Name
Arduino IDE 1.8.19
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
921600
Description
Need to use UART0 after a while, on pins others than the default pins used by uart0, the USB adaptor/Serial monitor.
Even after a Serial.end() and a new begin assigning the new pins to use by the newSerial link, the output are still going to the Serial Monitor.
A logic analyzer show that the correct bit stream is also generated on the new output pin New_TX
There is also a lot of pulses on New_RX, even with a pull up resistor
I have the same behavior on a ESP32 Dev Kit v1 but here the New_RX signal is clean.
ESP32C3 only have 2 UARTs and re-assigning UART0 is a must.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: