I probably should have added the fuse settings along with my original post. I'm putting the current settings at the bottom here side by side with a listing of "factory" settings that I found online. The settings I found are for a different board. Although it does have the same processor. There's no explanation of what the fuses do, just a listing from Atmel Studio, like the one from my board. I marked where the two differ.
I'm particularly curious about the NVMCTRL_BOOTPROT setting. As I read the data sheet, this controls the number of rows of memory reserved for the bootloader. However, the "factory" setting shows a value of 0x07. According to the datasheet pg. 389, this means 0 rows allocated for the bootloader. My board has a setting of 0x02, corresponding to 32 rows or 8192 bytes. Does the "factory" setting assume that code is loaded directly, without a bootloader?
Out of curiosity, I had looked at the bootloader size before I had this problem and it was set to 0x02. But, now I am thinking that perhaps the setting needs to be 0x07 so that the memory for the bootloader is not protected in order to burn it (and then the BOOTPROT fuse is set to 0x02 after the bootloader is programmed) Unfortunately, I need a PC to run Atmel Studio and I don't have access until Monday to try this.
Otherwise, there are other differences in the "factory" fuses and those for my board. I have not yet figured out what some of them do. So, if anyone notices any that need to be fixed and might prevent the bootloader from being uploaded, please let me know.
Here's the dump of settings from Atmel Studio:
Atmel-ICE
Debug host 127.0.0.1
Debug port 50447
Serial number J41800038005
Connection com.atmel.avrdbg.connection.cmsis-dap
Features 1
Firmware Version 1.1c
Hardware Version 0
Detected device
Device signature 0x10010305
Revision D
Datasheet information
SAMD21G18A-MU SAMD21G18A-MF SAMD21G18A-AU SAMD21G18A-AF
CPU CORTEX-M0PLUS
Flash size 256 KB
SRAM size 32 KB
VCC range 1.62 - 3.63 V 1.62 - 3.63 V 1.62 - 3.63 V 1.62 - 3.63 V
Maximum operating speed 48 MHz 48 MHz 48 MHz 48 MHz
Current fuses Factory fuses (?)
NVMCTRL_NVM_LOCK = 0x00 NVMCTRL_NVM_LOCK = 0x00
NVMCTRL_PSZ = 0x03 NVMCTRL_PSZ = 0x03
NVMCTRL_NVMP = 0x1000 NVMCTRL_NVMP = 0x1000
ADC_LINEARITY_0 = 0x08 ADC_LINEARITY_0 = 0x08
ADC_LINEARITY_1 = 0x04 ADC_LINEARITY_1 = 0x04
ADC_BIASCAL = 0x03 ADC_BIASCAL = 0x03
OSC32K_CAL = 0x37 *OSC32K_CAL = 0x3E
USB_TRANSN = 0x05 USB_TRANSN = 0x05
USB_TRANSP = 0x1D USB_TRANSP = 0x1D
USB_TRIM = 0x03 USB_TRIM = 0x03
DFLL48M_COARSE_CAL = 0x1C *DFLL48M_COARSE_CAL = 0x1E
DFLL48M_FINE_CAL = 0x200 DFLL48M_FINE_CAL = 0x200
ROOM_TEMP_VAL_INT = 0x1E ROOM_TEMP_VAL_INT = 0x1E
ROOM_TEMP_VAL_DEC = 0x06 *ROOM_TEMP_VAL_DEC = 0x00
HOT_TEMP_VAL_INT = 0x54 *HOT_TEMP_VAL_INT = 0x55
HOT_TEMP_VAL_DEC = 0x09 *HOT_TEMP_VAL_DEC = 0x00
ROOM_INT1V_VAL = 0xFF *ROOM_INT1V_VAL = 0xFB
HOT_INT1V_VAL = 0xFC *HOT_INT1V_VAL = 0xF7
ROOM_ADC_VAL = 0xB8D *ROOM_ADC_VAL = 0xB06
HOT_ADC_VAL = 0xD46 *HOT_ADC_VAL = 0xD0C
NVMCTRL_BOOTPROT = 0x02 *NVMCTRL_BOOTPROT = 0x07
NVMCTRL_EEPROM_SIZE = 0x07 NVMCTRL_EEPROM_SIZE = 0x07
BOD33USERLEVEL = 0x07 BOD33USERLEVEL = 0x07
BOD33_EN = [X]
BOD33_ACTION = 0x01 BOD33_ACTION = 0x01
WDT_ENABLE = [ ]
WDT_ALWAYSON = [ ]
WDT_PER = 0x0B WDT_PER = 0x0B
WDT_WINDOW_0 = [X]
WDT_WINDOW_1 = 0x05 WDT_WINDOW_1 = 0x05
WDT_EWOFFSET = 0x0B WDT_EWOFFSET = 0x0B
WDT_WEN = [ ]
BOD33_HYST = [ ]
NVMCTRL_REGION_LOCKS = 0xFFFF NVMCTRL_REGION_LOCKS = 0xFFFF
OTP1_WORD_0 = 0x10000300 (valid) OTP1_WORD_0 = 0x10000300 (valid)
OTP4_WORD_0 = 0x40004007 (valid) OTP4_WORD_0 = 0x40004007 (valid)
OTP4_WORD_1 = 0x71F4ADDC (valid) *OTP4_WORD_1 = 0x79F4AF9C (valid)
OTP4_WORD_2 = 0xFFFFFE00 (valid) OTP4_WORD_2 = 0xFFFFFE00 (valid)
TEMP_LOG_WORD_0 = 0xFF95461E (valid) *TEMP_LOG_WORD_0 = 0xFB05501E (valid)
TEMP_LOG_WORD_1 = 0xD46B8DFC (valid) *TEMP_LOG_WORD_1 = 0xD0CB06F7 (valid)
USER_WORD_0 = 0xD9FEC7FA (valid) *USER_WORD_0 = 0xD8E0C7FF (valid)
USER_WORD_1 = 0xFFFFFE5D (valid) USER_WORD_1 = 0xFFFFFC5D (valid)
** factory fuse information found from this webpage: