Hi all,
I am trying to flash a new bootloader on an Adafruit Feather M4 Express Board which contains an ATSAMD51J19 chip using ATMEL-ICE Programmer via SWD pins. I have never tried programming the SAMD51 chip with ICE via SWD pins. I always got the SAMD21 chips programmed and working via ICE without any issue and I am following the same connections(SWDIO, SWDCLK, RST, VTG, GND) for SAMD51 also. With the SAMD51J19 chip on the feather M4 I am able to recognise the chip, read fuses(Check attachment) but not able to program it even after putting USER_WORD_0.NVMCTRL_BOOTPROT to to 0x0F or 0 kbytes as per this tutorial. USER_WORD_0.NVMCTRL_BOOTPROT
Whenever I click on Memories->Program. I get the following error(Check attachment)
Could not activate interface, but found DAP with ID 0x2ba01477..
This usually indicates that the device is locked or in deep sleep. Try to do a chip erase to restore connectivity to the device. Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.
Can anyone help me figure out what the issue is here? Is it related with some fuse settings? If anyone has a Feather M4 and an ICE programmer can they try replicating to see if this error occurs?
I tried the same on an Adafruit ItsyBitsy M4 Express with an ATSAMD51G19A chip. It also shows the same error. (I am able to read device signature and fuses properly)
Any help is appreciated.
Thanking you in advance.