I have the same issue as Error while burning boot loader (Atmega328p).
The following procedure works without issue in Windows 7 & 10, as well as Mac OS 10.13 &10.14. However, the procedure does NOT work in Mac OS 11.6 (I haven't tested in 10.15 or 12.x).
The following items are identical:
-All hardware, including the computer, the Arduino, the cabling, etc.
-All "test files", including avrdude, the device hex file to upload, the ArduinoAsISP.hex file, etc. I'm literally downloading the same zip file onto each OS version and running it.
-The avrdude commands, which I am running in Terminal.
Here are the commands I run on each OS version:
0: navigate to directory:
cd <directory of unzipped file>
Result: Works as expected.
...
1: Write ArduinoAsISP:
avrdude -v -p atmega328p -b 115200 -c arduino -P /dev/cu.usbmodem1311 -D -Uflash:w:"/Volumes/RAM Disk/ArduinoAsISP.hex":i -u
Result: Works as expected.
...
2: Write downstream hex file onto DUT:
'avrdude -C "/Volumes/Test/avrdudemac.conf" -v -p atmega328p -b 19200 -c stk500v1 -U flash:w:"/Volumes/testfw328p.hex":i -P /dev/cu.usbmodem1311 -u`
Result:
Mac OS 10.13 & 10.14, and Windows 7 & 10:
Works as expected.
Mac OS 11.6 (incorrect):
avrdude fails to upload the firmware, returning (in summary):
stk500_getparm(): (a) protocol error, expect=0x10, resp=0x14
stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
'...`
The only difference is the operating system. Everything else is the same (hardware, avrdude, config file, ArduinoAsISP, etc). I've tried this with multiple different computers, multiple different hardware setups, etc... in fact, several people at my company have tried this on their dev hardware/machines with identical results.
My guess is this is a timing issue that's caused by the OS itself.
"Have I tried adding a 10 uF capacitor?" In short, no... because we have ~QTY30,000 units deployed in the field, so not a practical solution.