title: Detecting ESP chip ID and MAC address through UART, but unable to flash / dump the code to detected chip
body: <p>I am trying to flash code to <code>ESP32-D0WD-V3</code> (revision 3) which is on custom board. I am able to get the Chip ID and MAC address of the device. But code is not flashing. I am getting the following error message:</p>
  <pre><code>esptool.py v3.1-dev
  Serial port COM3
  Connecting........__
  Chip is ESP32-D0WD-V3 (revision 3)
  Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
  Crystal is 40MHz
  MAC: c4:dd:57:93:7f:64
  Uploading stub...
  
  A fatal error occurred: Invalid head of packet (0x65)
  CMake Error at run_serial_tool.cmake:50 (message):
  python C:/espidf/esp-idf/components/esptool_py/esptool/esptool.py --chip
  esp32 failed.
  </code></pre>