Esp32 wroom unable to flash the code

i am unable to flash the code to esp 32 i am suing IDE 2.2.1

below is the error

Sketch uses 230493 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20968 bytes (6%) of dynamic memory, leaving 306712 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM5
Connecting...

A serial exception error occurred: Write timeout
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 1

I agree, and if guilty, hope the court will issue a sentence of conviction...

PS sorry, I couldn't resist... :wink:

Have you tried holding down the boot button during the upload attempt ?