EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1524 background imageLoading...
Page #1524 background image
Chapter 4. API Guides
2. If the application accidentally reconfigures the USB peripheral pins, or disables the USB peripheral, USB CDC
device will disappear from the system. After fixing the issue in the application, you will need to follow the Initial
Upload process to flash the application again.
3. If the application enters light sleep (including automatic light sleep) or deep sleep mode, USB CDC device will
disappear from the system.
4. USB CDC driver reserves some amount of RAM and increases application code size. Keep this in mind if
trying to optimize application memory usage.
5. By default, the low-level esp_rom_printf feature and ESP_EARLY_LOG are disabled when USB CDC
is used. These can be enabled using CONFIG_ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF option.
With this option enabled, esp_rom_printf can be used, at the expense of increased IRAM usage. Keep
in mind that the cost of esp_rom_printf and ESP_EARLY_LOG over USB CDC is signicantly higher
than over UART. This makes these logging mechanisms much less suitable forprintf debugging, especially
in the interrupt handlers.
6. If you are developing an application which uses the USB peripheral with the TinyUSB stack, this USB Console
feature can not be used. This is mainly due to the following reasons:
This feature relies on a different USB CDC software stack in ESP32-S2 ROM.
USB descriptors used by the ROM CDC stack may be different from the descriptors used by TinyUSB.
When developing applications which use USB peripheral, it is very likely that USB functionality will not
work or will not fully work at some moments during development. This can be due to misconfigured
USB descriptors, errors in the USB stack usage, or other reasons. In this case, using the UART console
for flashing and monitoring provides a much better development experience.
7. When debugging the application using JTAG, USB CDC may stop working if the CPU is stopped on a break-
point. USB CDC operation relies on interrupts from the USB peripheral being serviced periodically. If the
host computer doesnt receive valid responses from the USB device side for some time, it may decide to
disconnect the device. The actual time depends on the OS and the driver, and ranges from a few hundred
milliseconds to a few seconds.
4.33 Wi-Fi Driver
4.33.1 ESP32-S2 Wi-Fi Feature List
Support Station-only mode, AP-only mode, Station/AP-coexistence mode
Support IEEE 802.11B, IEEE 802.11G, IEEE 802.11N and APIs to configure the protocol mode
Support WPA/WPA2/WPA3/WPA2-Enterprise and WPS
Support AMPDU, HT40, QoS and other key features
Support Modem-sleep
Support the Espressif-specific ESP-NOW protocol and Long Range mode, which supports up to 1 km of data
traffic
Up to 20 MBit/s TCP throughput and 30 MBit/s UDP throughput over the air
Support Sniffer
Support both fast scan and all-channel scan
Support multiple antennas
Support channel state information
4.33.2 How To Write a Wi-Fi Application
Preparation
Generally, the most effective way to begin your own Wi-Fi application is to select an example which is similar to your
own application, and port the useful part into your project. It is not a MUST but it is strongly recommended that you
take some time to read this article first, especially if you want to program a robust Wi-Fi application. This article is
supplementary to the Wi-Fi APIs/Examples. It describes the principles of using the Wi-Fi APIs, the limitations of
the current Wi-Fi API implementation, and the most common pitfalls in using Wi-Fi. This article also reveals some
design details of the Wi-Fi driver. We recommend you to select an example .
Espressif Systems 1513
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish