Skip to content

Commit f439723

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

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
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: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The default installation automatically configures the port (High-speed if suppor
8181

8282
Default descriptors are provided for the following USB classes: CDC, MSC, and NCM.
8383

84-
> **⚠️ Important:** For demonstration purposes, all error handling logic has been removed from the code examples. Do not ignore proper error handling in actual development.
84+
> ⚠️ For demonstration purposes, all error handling logic has been removed from the code examples. Do not ignore proper error handling in actual development.
8585
8686
```c
8787
#include "tinyusb_default_config.h"
@@ -226,6 +226,34 @@ For self-powered devices, monitoring the VBUS voltage is required. To do this:
226226
tinyusb_driver_install(&tusb_cfg);
227227
}
228228
```
229+
230+
> ⚠️ **ESP32-P4**, USB OTG 2.0, High-speed doesn't have hardware detection of VBUS BVALID signal
231+
232+
To solve this, an additional software timer is implemented in the driver.
233+
234+
To filter glitches on the VBUS-monitor GPIO, a configurable `vbus_debounce_ms` parameter is available.
235+
236+
> **Note:** Default value of debounce timer is 250 ms
237+
238+
The default debounce interval might be changed during the driver configuration:
239+
240+
```c
241+
#include "tinyusb_default_config.h"
242+
#include "sdkconfig.h"
243+
244+
void app_main(void)
245+
{
246+
tinyusb_config_t tusb_cfg = TINYUSB_DEFAULT_CONFIG();
247+
248+
tusb_cfg.phy.self_powered = true;
249+
tusb_cfg.phy.vbus_monitor_io = GPIO_NUM_0;
250+
#if (CONFIG_IDF_TARGET_ESP32P4)
251+
tusb_cfg.phy.vbus_monitor_debounce_ms = 350; // new debounce value
252+
#endif
253+
tinyusb_driver_install(&tusb_cfg);
254+
}
255+
```
256+
229257
If external PHY is used:
230258

231259
```c

0 commit comments

Comments
 (0)