avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

I just got a new Uno R3 board and successfully loaded it with ‘Blink’ and other projects that are from Arduino IDE installation. However I could not load the GRBL project (I tried latest GRBL 1.1h). Programming stops after about 96% and reports ‘avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10’ I tried multiple times using different USB cable and both Arduino IDE and avrdude from command line without success (attached programming log from avrdude output). Any ideas how to proceed?

Z:\Arduino>"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:grblUpload.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: reading input file "grblUpload.ino.hex"
avrdude: writing flash (29762 bytes):

Writing | ################################################
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
...

Genuine UNO? How big is sketch? Something connected to 0 and 1 pins? Is there running any APP on your OS which could overload it? Antivirus (try to switch off)?

You can try to change USB cable, or try different USB port respectively.
It can be also some problem with your UNO and if nothing help then you can try slower uploading speed. However, it requires different bootloader for slower speed and ISP programmer or another UNO for bootloading.

It's UNO R3 clone (https://core-electronics.com.au/uno-r3.html) The board is brand new and nothing except the usb cable is connected to it.

I created a project where I can control how much flash is used and figured out that I can only bootload about 28584 bytes of flash. Up to this size it reliably loads the code but if I go 100 or more bytes over I always get the error ‘avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10’

Hm, it looks like you have different bootsize. The boot region should be 512B on genuine UNO. If it is 4096 then max. program size is 28672. To check this you will need definitely the ISP programmer. Finally, I would load the original Optiboot bootloader and settings.

Yeah, reburn bootloader using an ISP programmer and that should sort it out. My guess it is a clone, and they got the BOOTSZ fuses wrong.

It turned out that the ATmega chip was defective. Even though the BOOTSZ fuse bits were set to '11' (using the AVR programmer) the chip internal fuse logic behaved as if they were set to zeroes and reserved the bootloader size to 2048 words. I replaced the chip and now my Uno board behaves as it should.