A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x17)! The chip needs to be in download mode.

  • My M5STACK CORE started behaving like this. It seems if I hit the power button just after the Arduino IDE starts the "connecting..." dialog then it will upload. This is kind of a pain because the device is in another building and I am remoted in.

    Any Ideas?