I just received in boards that I had designed which are using the SAME51J20A as the main controller for a CAN bus data logger.. I am having a LOT of trouble getting it to properly verify the program after flashing. First here's a few details before I write up the rest of this post.
IDE - Atmel Studio 7
Programmer - Atmel-ICE using SWD
MCU - ATSAME51J20A being supplied with 3.3V from a power supply
The error I get can be seen below.. However, the address, expected, and actual values are always different after flashing.
Verifying Flash...Failed! address=0x00a6 expected=0x00 actual=0x30
I have read a couple threads about people using the D21 Xplained boards and having similar issues, but theirs are always saying the actual=0xFF (They were erasing the chips, but zero programming was happening afterwards).. My issue is that 1 out of 20 times I can get it to flash, and verify properly (Which my applications then runs and is seen by turning on an LED at startup). I've also had times where it programs, but fails to verify, yet the program still seems to be acting fine, and then the third and most common problem is where I program, fail to verify, and the program doesn't appear to run at all.
I am able to connect to the device, read the device signature, and read/modify fuses. The problem seems to be.. not intermittent (the inverse of that? lol).. I can SOMETIMES get it to flash and verify fine.. So I am thinking it has something to do with either the board layout, or my bench setup.
Hopefully you guys can help me out!