I have an ESP32-WROOM-32D module on a DevKitC-V4 board that I last used a couple of months ago. It worked just fine last time I used it, and it has just been sitting in a breadboard untouched since.
Now, today, I go to connect it to a new Windows 11 system, and it doesn't seem to want to work any more. First time I hooked it appeared not to run the last code I left on it. When attempting to re-program it, I get the dreaded "Invalid head of packet (0x01): Possible serial noise or corruption" (the exact byte value it reports changes - not always 0x01). Also, I sometimes get, bizarrely, a "This chip is ESP32-S2, not ESP32. Wrong chip argument?".

The following things didn't change the situation:
- Ensure voltages are good - solid 3.3V.
- Changed the USB cable.
- Remove the board from the breadboard.
- Changed baud rate to something slower - 115200, 9600 even.
I broke out the oscilloscope. Serial TX and RX look good, appears to be 115200. Time for the logic analyser...
Is it being reset into the bootloader properly with the appropriate EN/IO0 sequence? Yes. I can see on the logic analyser that it comes up and responds with:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
After that I can see that there are what appear to be properly-formatted commands and responses going back-and-forth, but things are... weird.

On a sample capture that resulted in a "Invalid head of packet (0x01): Possible serial noise or corruption" error, the communications (from ESP32's point of view) proceed as follows:
1. RX: A SYNC command.
2. RX: Another SYNC command.
3. TX: Eight SYNC responses.
4. RX: A GET_SECURITY_INFO command.
5. TX: Another eight SYNC responses?!
6. RX: A READ_REG command.
7. TX: A READ_REG response.
Nothing further, because esptool errors out at that point.
This is what I got out of esptool when run with the
--trace option:
esptool v5.0.0
Serial port COM3:
Connecting...
TRACE +0.000 --- Cmd SYNC (0x08) | data_len 36 | wait_response 1 | timeout 0.100 | data
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU ---
TRACE +0.000 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.110 No serial data received.
.
TRACE +0.053 --- Cmd SYNC (0x08) | data_len 36 | wait_response 1 | timeout 0.100 | data
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU ---
TRACE +0.000 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 1 bytes: 01
TRACE +0.000 Read 3 bytes: 080400
TRACE +0.000 Read 1 bytes: 12
TRACE +0.000 Read 11 bytes: 20555500000000c0c00108
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.014 Read 68 bytes:
0400122055550000 0000c0c001080400 | ... UU..........
1220555500000000 c0c0010804001220 | . UU...........
555500000000c0c0 0108040012205555 | UU........... UU
00000000c0c00108 0400122055550000 | ........... UU..
0000c0c0 | ....
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.017 Received full packet: 010804001220555500000000
TRACE +0.004 Received full packet: 010804001220555500000000
TRACE +0.000 Read 27 bytes:
0108040012205555 00000000c0c00108 | ..... UU........
0400122055550000 0000c0 | ... UU.....
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.000 Received full packet: 010804001220555500000000
TRACE +0.018 --- Cmd GET_SECURITY_INFO (0x14) | data_len 0 | wait_response 1 | timeout 3.000 | data ---
TRACE +0.000 Write 10 bytes: c00014000000000000c0
TRACE +0.000 Read 1 bytes: c0
TRACE +0.000 Read 1 bytes: 01
TRACE +0.000 Read 9 bytes: 080400122055550105
TRACE +0.000 Read 1 bytes: 00
TRACE +0.000 Read 11 bytes: 00c0c00108040012205555
TRACE +0.000 Received full packet: 010804001220555501050000
TRACE +0.211 --- Cmd READ_REG (0x0a) | data_len 4 | wait_response 1 | timeout 3.000 | data 00100040 ---
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.000 Read 89 bytes:
01050000c0c00108 0400122055550105 | ........... UU..
0000c0c001080400 1220555501050000 | ......... UU....
c0c0010804001220 555501050000c0c0 | ....... UU......
0108040012205555 01050000c0c00108 | ..... UU........
0400122055550105 0000c0c001080400 | ... UU..........
1220555501050000 c0 | . UU.....
TRACE +0.000 Read invalid data:
01050000c0c00108 0400122055550105 | ........... UU..
0000c0c001080400 1220555501050000 | ......... UU....
c0c0010804001220 555501050000c0c0 | ....... UU......
0108040012205555 01050000c0c00108 | ..... UU........
0400122055550105 0000c0c001080400 | ... UU..........
1220555501050000 c0 | . UU.....
TRACE +0.000 Remaining data in serial buffer:
A fatal error occurred: Invalid head of packet (0x01): Possible serial noise or corruption.
I have no idea why it's not working. Is the above sequence of communications normal? The multiple repeated SYNC responses don't seem right to me. I'm not sure what "head" part of any of the received responses it is complaining about. WTF is going on?