Skip to content

Commit ed53b4e

Browse files
committed
docs(esp_tinyusb): Updated CHANGELOG.md and README.md
1 parent f804977 commit ed53b4e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

device/esp_tinyusb/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## [Unreleased]
22

33
- Fixed forward compatibility with TinyUSB 0.19
4+
- Added VBUS monitoring feature for ESP32P4 USB OTG 2.0 (HS)
45

56
## 2.0.1
67

device/esp_tinyusb/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,30 @@ If external PHY is used:
245245
}
246246
```
247247

248+
> **Note:** VBUS monitoring on **ESP32-P4** (USB OTG 2.0, High-speed)
249+
>
250+
> For **ESP32-S2**/**ESP32-S3**, VBUS monitoring (driving the BVALID signal) is handled in hardware.
251+
> For **ESP32-P4** (USB OTG 2.0), it is implemented in the driver.
252+
> To achieve this, an additional software timer is used in the driver. To avoid and filter glitches on the VBUS-monitor GPIO, a configurable vbus_debounce_ms parameter is available in the driver configuration.
253+
> Default value: 250 ms
254+
> If the default value isn’t enough, or if the device does not detach from the USB host port, you can increase the debounce interval:
255+
>
256+
> ```c
257+
> #include "tinyusb_default_config.h"
258+
> void app_main(void)
259+
> {
260+
> tinyusb_config_t tusb_cfg = TINYUSB_DEFAULT_CONFIG();
261+
>
262+
> tusb_cfg.phy.self_powered = true;
263+
> tusb_cfg.phy.vbus_monitor_io = GPIO_NUM_0;
264+
>#if CONFIG_IDF_TARGET_ESP32P4
265+
> tusb_cfg.phy.vbus_monitor_debounce_ms = 350; // example override
266+
>#endif
267+
> tinyusb_driver_install(&tusb_cfg);
268+
> }
269+
>
270+
> ```
271+
248272
## USB Device Classes: usage, installation & configuration
249273
250274
### USB Serial Device (CDC-ACM)

0 commit comments

Comments
 (0)