I am facing random issue in programming of SAMR21E19A:
Device used: SAMR21E19A
AtmelStudio: Atmel Studio 7.0.790. (even tried with latest build available on website)
As clear in following picture, once chip erase is successful, later when tried for Reset, error is thrown back. It indicates that security bit is not cleared. As per datasheet, once chiperase is successful, security bit should be cleared. And this is the only method to clear the security bit.
This issue is random. The same command works on similar other boards. Many boards are showing this issue and these are non-recoverable. That means, I tried using GUI interface as well, redone all connections, removed power supplies etc... but boards are non recoverable.
I am not using SWCLK, SWDIO pin for any other purpose, so these pins were in default configuration in previous software.
Connections are also as per guidelines. SWDIO, SWCLK, nRESET, VCC and GND are connected to JtagICE3. Connections are ok because few boards are working perfectly fine and failed boards were also working fine before.
Any help in this will be highly appreciable.