Also posted on reddit and Microchip forum, but couldn’t really get anything there.
I have a custom board I designed using the SAMD51J20A (same pinout as the SparkFun SAMD51 thing plus).
I have been trying to upload the bootloader .bin file (that I got from the Sparkfun github page) but I keep having problems uploading it to the board. The J-Link EDU is able to read the device signature, change the fuses, read the flash, etc., but when I go to upload the binary it gets stuck at some point (gives the same error every time, but sometimes the address is different). Photos of the error attached below.
Things I have tried:
-SWD speed at 400kHz, 100kHz, 32kHz, other various
-NVM_BOOTPROT fuse at 0kB
-NVMCTRL_REGION_LOCKS at 0x00000000 and 0xFFFFFFFF
-using a .elf file instead of .bin
-programming address at 0x0000, 0x2000, and 0x4000
Here are the current fuse settings:
AC_BIAS0 = 0x01
ADC0_BIASCOMP = 0x07
ADC0_BIASREFBUF = 0x04
ADC0_BIASR2R = 0x07
ADC1_BIASCOMP = 0x07
ADC1_BIASREFBUF = 0x04
ADC1_BIASR2R = 0x07
USB_TRANSN = 0x09
USB_TRANSP = 0x19
USB_TRIM = 0x06
ROOM_TEMP_VAL_INT = 0x1E
ROOM_TEMP_VAL_DEC = 0x00
HOT_TEMP_VAL_INT = 0x68
HOT_TEMP_VAL_DEC = 0x09
ROOM_INT1V_VAL = 0x00
HOT_INT1V_VAL = 0x00
ROOM_ADC_VAL_PTAT = 0xACF
HOT_ADC_VAL_PTAT = 0xD4F
ROOM_ADC_VAL_CTAT = 0xB62
HOT_ADC_VAL_CTAT = 0x952
BOD33_DIS =
BOD33USERLEVEL = 0x00
BOD33_ACTION = NONE
BOD33_HYST = 0x00
NVMCTRL_BOOTPROT = 0
NVMCTRL_SEESBLK = 0x06
NVMCTRL_SEEPSZ = 0x00
RAMECC_ECCDIS =
WDT_ENABLE =
WDT_ALWAYSON =
WDT_PER = CYC16384
WDT_WINDOW = CYC16384
WDT_EWOFFSET = CYC16384
WDT_WEN =
NVMCTRL_REGION_LOCKS = 0xFFFFFFFF
SW0_WORD_0 = 0x1E7079D (valid)
SW0_WORD_1 = 0x1B29 (valid)
TEMP_LOG_WORD_0 = 0x96801E (valid)
TEMP_LOG_WORD_1 = 0xD4FACF00 (valid)
TEMP_LOG_WORD_2 = 0xFF952B62 (valid)
USER_WORD_0 = 0xFF9A8000 (valid)
USER_WORD_1 = 0xAEECFF86 (valid)
USER_WORD_2 = 0xFFFFFFFF (valid)
Bootloaders I have tried uploading
Photos:
Gets to somewhere on the Program and verify bar and stops, then this error appears:
Also, does anyone have the uncompiled bootloader file? I might try to compile it myself because at this point I have tried just about everything I can think of.