Electrical – Atmel ICE SAM connector pinout does not reflect the real pinout

atmelavr

Maybe I am just too slow, but I can't understand exactly how do you connect an ATMEL-ICE (6 pin connector, not the 10 pin) to a chip. I am using a SAMD21G (http://www.atmel.com/Images/Atmel-42181-SAM-D21_Datasheet.pdf)

I made a board, where I take the pins needed for the connection to the ATMEL-ICE. I am following this doc: https://github.com/femtoduino/femto-usb

As connection, I did connect all the ground (pin 5,18, 35 and 42), and connected the power pins (pin 6, 17, 36, 43 and 44) to the power rail, which give 3.3V to each of these pin.

Then I have the pin 45 and 46, which are SWCLK and SWDIO

From the doc linked, the pin should be:

ICE SAM port         Microcontroller
Pin 1 3.3v           3,3v (main power rail)
Pim 2 SWDIO          SWDIO (pin 46)
Pim 3 GND            GND (main GND line)
Pin 4 SWDCLK         SWDCLK (pin 45)
Pin 5 GND            GND (main GND line)

But I do not see the green led on the ICE go on; also when I read the voltage in Atmel Studio, I see -3.2 in the target voltage; which tell me that the connection is not matching the right pins.

I am using the cable included in the ICE, using the SAM port as described in the document. The user manual of the ICE has so many different connections, but I can't figure out exactly the correct pins to start to program the microcontroller.

Looking for some advice about how to connect the microcontroller to the Atmel-ICE at this point; since the pinout on that document seems to be wrong.

Best Answer

So, for some reason, the pinout are totally messed up because they are 2 different connections. The standard ICE cable holds 2 different connector, where one has less pin and a larger pin pitch (standard 100 mil but only 6 pin), while the other has all the pins but the pin pitch is very small (50 mil and 10 pin), but the connector on the ICE is 10 pin 100 mil, so you need an adapter.

I ended up solving the issue, making a self-made adapter for a 10 pin connector on standard 100 mil pitch, buying the flat cable and connectors, and using a breakout board that has the 10 pin connector ready for usage. The next step was to map the pins, and that came easy since the ICE guide has the pinout of the SAM port using SWD mapping:

SWDCLK    4
SWDIO     2
Reset     10
VTG       1
GND       3

These are all the pin needed; once connected the flat cable to the breakout board, I did connect these wires and I was able to write on the chip without problems. The voltage was correct, and the chip was correctly recognized in Atmel Studio.

I just wish someone would tell me what pin set to use, what port and suggest me to ditch the original cable that came with the ICE from the start; but hope that this will help others like me, that just started with microcontrollers