diff options
| author | hathach <[email protected]> | 2020-04-10 20:25:53 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-04-10 20:25:53 +0700 |
| commit | 8953bc9255712cace4eb3e66b1e89961952bb639 (patch) | |
| tree | fea672446a2fa653a01cb4c3827cf424021968be /src | |
| parent | d8d5902ccb24a29aebde009dfe388c23ffd8a6d3 (diff) | |
added comment note for beta chip walkaround
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/espressif/esp32s2/dcd_esp32s2.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/portable/espressif/esp32s2/dcd_esp32s2.c b/src/portable/espressif/esp32s2/dcd_esp32s2.c index 099f3af3e..d1e670358 100644 --- a/src/portable/espressif/esp32s2/dcd_esp32s2.c +++ b/src/portable/espressif/esp32s2/dcd_esp32s2.c @@ -170,7 +170,17 @@ void dcd_init(uint8_t rhport) USB0.gusbcfg |= USB_FORCEDEVMODE_M; // force devmode USB0.gotgctl &= ~(USB_BVALIDOVVAL_M | USB_BVALIDOVEN_M | USB_VBVALIDOVVAL_M); //no overrides -#ifdef CONFIG_IDF_TARGET_ESP32S2BETA // needed for beta chip only + +#ifdef CONFIG_IDF_TARGET_ESP32S2BETA + // needed for beta chip only + // there was a bug in the phy logic that made the chip reset as soon as it transmitted anything. + // Setting the B override value made it ignore resets (any resets, generated by the faulty logic or not), + // which 'fixed' the problem well enough to test usb with it. + // Also, do note that the beta silicon run was very small and software support for it is not in mainstream esp-idf, + // as such you may consider phasing out support for it alltogether somewhere in the future + + // TODO we could safely remove this later (maybe after 2020) + //C. chip 7.2.2 hack ESP_LOGV(TAG, "DCD init - chip ESP32-S2 beta hack"); USB0.gotgctl = (0 << USB_BVALIDOVVAL_S); //B override value |
