espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.66k stars 7.29k forks source link

ESP32 S3 Serial Console Example doesn't work (IDFGH-7690) #9233

Open SinanAkkoyun opened 2 years ago

SinanAkkoyun commented 2 years ago

----------------------------- Delete below -----------------------------

Reminder: If your issue is a general question, starts similar to "How do I..", or is related to 3rd party development kits/libs, please discuss this on our community forum at https://esp32.com instead.

INSTRUCTIONS

Before submitting a new issue, please follow the checklist and try to find the answer.

If the issue cannot be solved after the steps before, please follow these instructions so we can get the needed information to help you in a quick and effective fashion.

  1. Fill in all the fields under Environment marked with [ ] by picking the correct option for you in each case and deleting the others.
  2. Describe your problem.
  3. Include debug logs from the "monitor" tool, or coredumps.
  4. Providing as much information as possible under Other items if possible will help us locate and fix the problem.
  5. Use Markdown (see formatting buttons above) and the Preview tab to check what the issue will look like.
  6. Delete these instructions from the above to the below marker lines before submitting this issue.

IMPORTANT: If you do not follow these instructions and provide the necessary details, your issue may not be resolved.

----------------------------- Delete above -----------------------------

Environment

Problem Description

The advanced serial console example doesn't work with an ESP32-S3. It totally works with an ESP32-PICO-D4 in the exact same environment

Expected Behavior

S3 advanced console example should work

Actual Behavior

Serial Connection dies right when the command prompt should appear.

Steps to reproduce

  1. Clone the advanced console example
  2. Set Target to ESP32 S3 Internal UART
  3. flash the advanced example onto an S3 board and test via interal UART

Code to reproduce this issue

The stock advanced console example code.

Thank you very much for all the awesome examples. I hope this will soon work on S3!

igrr commented 2 years ago

If you are connecting the USB cable to tinyS3 board's USB port, this means that you are most likely using the built-in USB port, not the UART (schematic). You can use the serial console if you attach an external USB-Serial converter to the TX/RX/GND pins of the board, though.

If that doesn't help, could you please explain the "actual behavior" in a bit more detail? What does "dies" mean in this context?

SinanAkkoyun commented 2 years ago

Hi igrr, thanks for replying! Yes, exactly, I am then using the internal USB controller. But given that I can use the internal USB just fine for flashing and normal serial IO, why shouldn't it work with the console example?

igrr commented 2 years ago

The example you are trying to compile (console/advanced) is written to work specifically with the UART driver. It's not impossible to modify the example to work with USB, however supporting both in the same example will probably make the code too complex. Perhaps we should rename it to advanced_uart to make the purpose of the example clear.

There is another example, console/basic, which does support 3 interfaces: UART, USB_OTG and USB_SERIAL_JTAG. You could try that one, see its README for details. You probably need to use USB_SERIAL_JTAG peripheral since USB_CDC console isn't supported on ESP32-S3 yet.

aircable commented 1 year ago

I have been trying to get the system/console/advanced_usb_cdc to work and I can't. Flashing on the internal port and monitor. The output does not appear and the input gives: Writing to serial is timing out.

This is the unchanged example on the S3, USB only. Any idea what's wrong?