SAMD21 Programming with Atmel ICE Fail to Write
Whats is the fuse setting of NVMCTRL_BOOTPROT?

it should be:

NVMCTRL_BOOTPROT = 0x07

which will set your memory location to 0x00 (no bootloader).

NVMCTRL_BOOTPROT sets the amount of space to allocate for the bootloader in flash memory. Setting this fuse to 0x07 tells the chip you are not allocating space for a bootloader and the programmer will start to write at address 0x00, which is the beginning of flash memory. If you are programming with an Atmel ICE, you are not using a bootloader.