Well, I'm officially stumped (and so are several other engineers)...
I have a custom PCB running an Atmel ATSAML21E18B microcontroller, which I'm trying to program through an Atmel ICE debugger / programmer. After some initial problems with the board (an ungrounded pin which has now been grounded), I managed to get a nice stable voltage of 3.3v running through the board from 3 AA batteries going through an LDO on the board.
The next step was to upload a simple test program which blinked a couple of LEDs on the board to make sure things were all nice and working. I plug the board into the Atmel ICE via a 10 pin SWD header on the board, open the device programmer in Atmel Studio and do a voltage read - 3.3v as expected. Try to get the device ID, and I get the following error:
I've tried knocking down the SWD clock to lower frequencies as suggested by a few people, but no luck. I also tried using the Atmel ICE on the L21 Xplained Pro board, and everything works fine there, so I know that the programmer isn't the issue.
I've had a few other engineers look at the boards and the schematics, and they can see no obvious errors. We all checked the datasheet to make sure that the connection between the mcu and the 10 pin header was as described in the datasheet.
Honestly, I have no idea what's going on here. Below is a copy of the schematic:
If anybody here has even the slightest inkling of what the issue might be, please tell me. My head hurts from banging it against the desk!