Skip to content

Commit 5581067

Browse files
committed
Merge branch 'docs/update_usb_docs_for_p4' into 'master'
docs(usb): update usb docs related to esp32p4 Closes AEG-2760 See merge request ae_group/esp-iot-solution!1363
2 parents fc9a1ca + 68042be commit 5581067

30 files changed

+342
-135
lines changed

docs/_static/usb/esp32p4_usb.png

124 KB
Loading

docs/en/usb/usb_device/usb_device_uac.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ USB Device UAC
33

44
:link_to_translation:`zh_CN:[中文]`
55

6-
`esp_device_uac` is a USB Audio Class driver library based on TinyUSB. It supports simulating an ESP chip as an audio device, with customizable audio sampling rates, microphone channels, and speaker channels.
6+
``esp_device_uac`` is a USB Audio Class driver library based on TinyUSB. It supports simulating an ESP chip as an audio device, with customizable audio sampling rates, microphone channels, and speaker channels.
77

88
Features:
99

@@ -16,7 +16,7 @@ USB Device UAC User Guide
1616

1717
- Development Board
1818

19-
1. Any ESP32-S2/ESP32-S3 development board with a USB interface can be used.
19+
1. Any ESP32-S2/ESP32-S3/ESP32-P4 development board with a USB interface can be used.
2020

2121
- USB MIC Callback Function
2222

docs/en/usb/usb_device/usb_device_uvc.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ USB Device UVC
33

44
:link_to_translation:`zh_CN:[中文]`
55

6-
``usb_device_uvc`` is a USB ``UVC`` device driver for ESP32-S2/ESP32-S3, which supports streaming JPEG frames to the USB Host. User can wrapper the Camera or any devices as a UVC standard device through the callback functions.
6+
``usb_device_uvc`` is a USB ``UVC`` device driver for ESP32-S2/ESP32-S3/ESP32-P4, which supports streaming JPEG frames to the USB Host. User can wrapper the Camera or any devices as a UVC standard device through the callback functions.
77

88
Features:
99

1010
1. Support video stream through the UVC Stream interface
11-
1211
2. Support both ``Isochronous`` and ``Bulk`` mode
13-
1412
3. Support multiple resolutions and frame rates
1513

1614
Add component to your project

docs/en/usb/usb_host/esp_msc_ota.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ User Guide
1515

1616
Hardware requirements:
1717

18-
- Any ESP32-S2/ESP32-S3 development board with a USB interface capable of providing external power.
18+
- Any ESP32-S2/ESP32-S3/ESP32-P4 development board with a USB interface capable of providing external power.
1919
- A USB flash drive using the BOT (Bulk-Only Transport) protocol and Transparent SCSI command set.
2020

2121
Partition Table:

docs/en/usb/usb_host/usb_stream.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,8 @@ USB Stream Config Reference
7676
4. The host will matches the descriptors of the connected devices according to the user parameters. If the device fails to meet the configuration requirements, the driver prompt warning message
7777
5. If the device meets user configuration requirements, the Host will continue to receive the IN stream (UVC and UAC mic), and will call the user’s callbacks when new frames ready.
7878

79-
1. The camera callback will be triggered after a new MJPEG image ready.
80-
The callback can block during processing, because which works in
81-
an independent task context.
82-
2. The mic callback will be triggered after :cpp:func:`mic_min_bytes` bytes
83-
data received. But the callback here must not block in any way,
84-
otherwise it will affect the reception of the next frame. If the
85-
block operations for mic is necessary, you can use the polling
86-
mode instead of the callback mode through
87-
:cpp:func:`uac_mic_streaming_read` api.
79+
1. The camera callback will be triggered after a new MJPEG image ready. The callback can block during processing, because which works in an independent task context.
80+
2. The mic callback will be triggered after :cpp:func:`mic_min_bytes` bytes data received. But the callback here must not block in any way, otherwise it will affect the reception of the next frame. If the block operations for mic is necessary, you can use the polling mode instead of the callback mode through :cpp:func:`uac_mic_streaming_read` api.
8881

8982
6. User can send speaker OUT stream using :cpp:func:`uac_spk_streaming_write` through a ringbuffer, the Host will fetch the data when USB is free to send.
9083
7. Use the :cpp:func:`usb_streaming_control` to control the stream suspend/resume, uac volume/mute control can also be support if the USB device has such feature unit;
@@ -96,8 +89,7 @@ Bug report
9689
ESP32-S2 ECO0 Chip SPI screen jitter when work with usb camera
9790
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9891

99-
1. In earlier versions of the ESP32-S2 chip, USB transfers can cause SPI
100-
data contamination (esp32s2>=ECO1 and esp32s3 do not have this bug)
92+
1. In earlier versions of the ESP32-S2 chip, USB transfers can cause SPI data contamination (esp32s2>=ECO1 and esp32s3 do not have this bug)
10193
2. Software workaround
10294

10395
- ``spi_ll.h`` add below function

docs/en/usb/usb_overview/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ USB Host & Device
1818
USB Device Set Const COM <usb_device_const_COM>
1919
USB Signal Quality Test <usb_signal_quality>
2020
TinyUSB Guide <tinyusb_guide>
21-
Native TinyUSB Development Guide <tinyusb_development_guide>
21+
Native TinyUSB Development Guide <tinyusb_development_guide>

docs/en/usb/usb_overview/tinyusb_development_guide.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Developing with Native tinyusb
32
--------------------------------
43

@@ -58,6 +57,12 @@ Most of tinyusb's functionalities are controlled through macros, so we need to d
5857
5958
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_FULL_SPEED)
6059
60+
- **CFG_TUSB_RHPORT1_MODE**: Defines the connection method and speed to the USB Phy. The following method indicates a USB device with USB high speed.
61+
62+
.. code:: C
63+
64+
#define CFG_TUSB_RHPORT1_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
65+
6166
- **ESP_PLATFORM**: This macro needs to be enabled when using the esp-idf platform for compilation.
6267

6368
- **CFG_TUSB_OS**: Defines the operating system for tinyusb. If using FreeRTOS, this macro needs to be enabled. It can also be disabled if not using an OS.
@@ -78,6 +83,12 @@ Most of tinyusb's functionalities are controlled through macros, so we need to d
7883
7984
#define CFG_TUSB_DEBUG 0
8085
86+
- **CFG_TUSB_DEBUG_PRINTF**: Defines the log printing function for tinyusb.
87+
88+
.. code:: C
89+
90+
#define CFG_TUSB_DEBUG_PRINTF esp_rom_printf
91+
8192
- **CFG_TUD_ENABLED**: Set to 1 to enable tinyusb device functionality.
8293

8394
- **CFG_TUSB_MEM_SECTION**: This macro can be enabled to allocate tinyusb memory to a specific memory section.

docs/en/usb/usb_overview/tinyusb_guide.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,3 @@ In UVC devices, a single physical camera has a VC (video control) descriptor, an
206206
|-- Video Streaming
207207
208208
Refer to :doc:`/usb/usb_device/usb_device_uvc` for more information.
209-

docs/en/usb/usb_overview/usb_device_const_COM.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ Solution
8383
8484
Users have the option to download the script :download:`ignore_hwserial_usb_serial_jtag.bat <../../../_static/ignore_hwserial_usb_serial_jtag.bat>` , then run it with administrative privileges by right-clicking and selecting **Run as Administrator**.
8585

86-
8786
.. Note::
8887

8988
The above command is for Windows 10/11. For Windows 7 or other versions, the registry path is different. Please download the script :download:`ignore_hwserial_usb_serial_jtag_win7.bat <../../../_static/ignore_hwserial_usb_serial_jtag_win7.bat>` and run it with Administrative privileges.

docs/en/usb/usb_overview/usb_device_self_power.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ According to the USB protocol requirements, self-powered USB devices must detect
88

99
There are generally two methods for USB device VBUS detection: detection by USB PHY hardware, or \ **detection by software with the help of ADC/GPIO**\.
1010

11-
The internal USB PHY of ESP32S2/S3 does not support hardware detection logic, this function needs to be implemented by software with the help of ADC/GPIO. Among them, using the GPIO detection method is the simplest. The implementation is as follows:
11+
The internal USB PHY of ESP32S2/S3/P4 does not support hardware detection logic, this function needs to be implemented by software with the help of ADC/GPIO. Among them, using the GPIO detection method is the simplest. The implementation is as follows:
1212

1313
**For ESP-IDF 4.4 and earlier versions:**
1414

@@ -22,7 +22,7 @@ The internal USB PHY of ESP32S2/S3 does not support hardware detection logic, th
2222
*
2323
* @brief For USB Self-power device, the VBUS voltage must be monitored to achieve hot-plug,
2424
* The simplest solution is detecting GPIO level as voltage signal.
25-
* A divider resistance Must be used due to ESP32S2/S3 has no 5V tolerate pin.
25+
* A divider resistance Must be used due to ESP32S2/S3/P4 has no 5V tolerate pin.
2626
*
2727
* 5V VBUS ┌──────┐ ┌──────┐ GND
2828
* ───────┤ 100K ├─┬──┤ 100K ├──────

0 commit comments

Comments
 (0)