Upload to D1 R32 from Arduino IDE fails when SimpleFOCShield 2.0.4 is connected

I’d like to share the following information as I did not find it anywhere on the net:

If D1 R32 (ESP32 in Arduino Uno format) is used with SimpleFOCShield 2.0.4 and pin A0 (GPIO02) is not connected (e.g. current sensing not used), Arduino IDE fails to upload sketches with error message ‘Failed uploading: uploading error: exit status 2
A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0xb)! The chip needs to be in download mode.’

Reason for that seems to be that pin A0 (GPIO02) in this case is kept at about 2.9V by SimpleFOCShield but ESP32 requires pin GPIO02 to be strapped to 0 for download mode (see https://techoverflow.net/2021/11/18/what-is-download-mode-on-the-esp32 ).

Pulling down A0 (GPTIO02) (i.e. shortcut A0 to GND) at least during upload allows using Arduino IDE for upload without first removing simpleFOCshield from Arduino R1 D32.

1 Like

Hey @Kai-Krause thanks for sharing this!