Skip to content

Commit dd70907

Browse files
authored
Merge branch 'espressif:master' into main
2 parents 9eece7c + c4fd383 commit dd70907

9 files changed

+112
-0
lines changed

cores/esp32/esp32-hal-tinyusb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ typedef struct {
6161

6262
static bool usb_otg_deinit(void * busptr) {
6363
// Once USB OTG is initialized, its GPIOs are assigned and it shall never be deinited
64+
// except when S3 swithicng usb from cdc to jtag while resetting to bootrom
65+
#if CONFIG_IDF_TARGET_ESP32S3
66+
return true;
67+
#else
6468
return false;
69+
#endif
6570
}
6671

6772
static void configure_pins(usb_hal_context_t *usb)

docs/source/troubleshooting.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ Sample code to check SDK WPA3 support at compile time:
123123
#warning "No WPA3 support."
124124
#endif
125125
126+
Serial not printing
127+
*******************
128+
129+
I have uploaded firmware to the ESP32 device, but I don't see any response from a Serial.print (HardwareSerial).
130+
131+
Solution
132+
^^^^^^^^
133+
134+
Newer ESP32 variants have two possible USB connectors- USB and UART. The UART connector will go through a USB->UART adapter, and will typically present itself with the name of that mfr (eg, Silicon Labs CP210x UART Bridge). The USB connector can be used as a USB-CDC bridge and will appear as an Espressif device (Espressif USB JTAG/serial debug unit). On Espressif devkits, both connections are available, and will be labeled. ESP32 can only use UART, so will only have one connector. Other variants with one connector will typically be using USB. Please check in the product [datasheet](https://products.espressif.com) or [hardware guide](https://www.espressif.com/en/products/devkits) to find Espressif products with the appropriate USB connections for your needs.
135+
If you use the UART connector, you should disable USB-CDC on boot under the Tools menu (-D ARDUINO_USB_CDC_ON_BOOT=0). If you use the USB connector, you should have that enabled (-D ARDUINO_USB_CDC_ON_BOOT=1) and set USB Mode to "Hardware CDC and JTAG" (-D ARDUINO_USB_MODE=0).
136+
USB-CDC may not be able to initialize in time to catch all the data if your device is in a tight reboot loop. This can make it difficult to troubleshoot initialization issues.
137+
126138
SPIFFS mount failed
127139
-------------------
128140
When you come across an error like this:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, app, ota_0, 0x10000, 4096K,
8+
uf2, app, factory,0x410000, 256K,
9+
ffat, data, fat, 0x450000, 11968K,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, app, ota_0, 0x10000, 2048K,
8+
ota_1, app, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
ffat, data, fat, 0x450000, 11968K,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
6+
nvs, data, nvs, 0x9000, 20K,
7+
otadata, data, ota, 0xe000, 8K,
8+
ota_0, app, ota_0, 0x10000, 2816K,
9+
uf2, app, factory,0x2d0000, 256K,
10+
ffat, data, fat, 0x310000, 960K,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
6+
nvs, data, nvs, 0x9000, 20K,
7+
otadata, data, ota, 0xe000, 8K,
8+
ota_0, app, ota_0, 0x10000, 1408K,
9+
ota_1, app, ota_1, 0x170000, 1408K,
10+
uf2, app, factory,0x2d0000, 256K,
11+
ffat, data, fat, 0x310000, 960K,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, app, ota_0, 0x10000, 4096K,
8+
uf2, app, factory,0x410000, 256K,
9+
ffat, data, fat, 0x450000, 3776K,
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, app, ota_0, 0x10000, 2048K,
8+
ota_1, app, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
ffat, data, fat, 0x450000, 3776K,

variants/doitESPduino32/pins_arduino.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,42 @@ static const uint8_t CLK = 6;
5353
static const uint8_t SD0 = 7;
5454
static const uint8_t SD1 = 8;
5555

56+
//Arduino Uno backward compatibility
57+
static const uint8_t A0 = 2;
58+
static const uint8_t A1 = 4;
59+
static const uint8_t A2 = 35;
60+
static const uint8_t A3 = 34;
61+
static const uint8_t A4 = 36;
62+
static const uint8_t A5 = 39;
63+
64+
static const uint8_t D0 = 3;
65+
static const uint8_t D1 = 1;
66+
static const uint8_t D2 = 26;
67+
static const uint8_t D3 = 25;
68+
static const uint8_t D4 = 17;
69+
static const uint8_t D5 = 16;
70+
static const uint8_t D6 = 27;
71+
static const uint8_t D7 = 14;
72+
static const uint8_t D8 = 12;
73+
static const uint8_t D9 = 13;
74+
static const uint8_t D10 = 5;
75+
static const uint8_t D11 = 23;
76+
static const uint8_t D12 = 19;
77+
static const uint8_t D13 = 18;
78+
79+
static const uint8_t TX = 1;
80+
static const uint8_t RX = 3;
81+
82+
#define PIN_WIRE_SDA SDA // backward compatibility
83+
#define PIN_WIRE_SCL SCL // backward compatibility
84+
85+
#define PIN_SPI_SS SS // backward compatibility
86+
#define PIN_SPI_MOSI MOSI // backward compatibility
87+
#define PIN_SPI_MISO MISO // backward compatibility
88+
#define PIN_SPI_SCK SCK // backward compatibility
89+
90+
#define PIN_A0 A0 // backward compatibility
91+
5692
// ESP-WROOM-32 does not have GPIO 14, 20(NC), 24, 28, 29, 30, 31, 36, 37, 38, 40+
5793
// All pins should be PWM capable. The board is a clone of WeMos D1 R32.
5894

0 commit comments

Comments
 (0)