2

So I was programming on my board with a ATSAM4S8Bu using an Atmel-ICE debugger happily when suddenly I was assaulted by this error message any time I tried to debug or deploy to my board:

Failed to launch program
Error: unexpected chip identifier 0x00000000

This error also sometimes gets shouted at me:

Could not activate interface, but found DAP with ID 0x2ba01477.

How rude of it! I tried reasoning with it but it is not having any of it. but seriously, it was fine one moment and the next this error has stopped me from further development so what does it mean and how do I fix this?

EDIT:

This error only seems to occur on my machine. It works on my colleagues, I tried reinstalling atmel-usb and atmel studio 6.2 but no luck :(

EDIT:

Some screen shots of the screen im shown in Tools->Device Programming and then trying to read the devices signature: 0x0000000 found when trying to view device signature This is the pop up i get when I try to read as well. This also contains the error i get when i try to debug

EDIT:

I also seem to get this error sometimes instead: The other error I get

wootank
  • 477
  • 1
  • 5
  • 18
  • restart the host computer? – yano Apr 26 '16 at 04:17
  • Tried it, didnt work @yano – wootank Apr 26 '16 at 04:28
  • 1
    I'm sure you're googling this, but just in case you didn't stumble across this.. it's a different chip but sounds like the same problem,, sounds like he had to increase his pdi clock? Hope you figure it out: http://www.avrfreaks.net/forum/fail-read-device-signature-unable-enter-programming-mode – yano Apr 26 '16 at 04:42
  • Thanks I tried increasing the clock but nothing really happened >< I edited my questions with more information @yano – wootank Apr 26 '16 at 21:44
  • I guess you tried decreasing the clock as well, right ? Although you're at the minimum already. Anyway that worked for me. I was on SAM21, SWD 2MHz (worked for months, problem also appeared suddenly) but now I had to slow it down to 500kHz. Maybe worth trying various speeds ? – fripon Jun 24 '16 at 15:20

1 Answers1

1

I've had this problem too and I have found a couple of solutions that I would like to share.

My PCB was using an ATSAM4E processor (that had never been programmed) with a Cortex debug header. I got the error message when I tried either method (SWD or JTAG).

Note: I was able to read the Device ID for a very short window after powering the PCB on or after pressing the reset button (Credit to Yaro and Yarooo). Often I would have to try multiple times to try and hit that short window. This confirmed to me that my circuit of the Cortex Debug header was correct.

jrb114 quotes in his post that there is an errata on the SAM3S datasheet that requires:

an external crystal or ceramic resonator on XIN/XOUT, or use the Main oscillator in bypass mode (applying a clock on XIN).
...
So what I did to make these boards work was provide a 1 MHz clock to XIN using a signal generator. Apply power to the PCB, then connect using the ATMEL-Ice. This connects fine. After that I set the GPNVM Bit 1 so we boot from flash, not SAMBA, programmed the device and it works fine.

My PCBs had an external crystal so I was a bit confused why my boards didn't work. So I put an oscilloscope on the XIN line and found that the crystal was not generating a waveform.

It turns out that on most of my boards, there was a short between one of the capacitors (for the crystal) to ground. No wonder my clock wasn't going.

On the other boards, the inductor that goes between VDD_OUT and VDD_PLL was not soldered correctly to the PCB, causing it to be open circuit.

Overall, it appears that this error is a result of not having a clock signal on XIN, whether it be incorrect wiring or not using an external crystal/resonator.

sa_leinad
  • 309
  • 1
  • 8
  • 24