PICKIT4 and ATSAMC21N18A

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all.

 

I've seen a few posts here about using a PICKIT to program / debug ATSAM parts with various problems. I am currently receiving the "Error: No device detected. Error 4109" message and tried everything I can from those posts to no avail.

 

I've been monitoring the SWD lines and see some activity on SWDIO and SWCLK but none at all on RESET - not sure if this is a cause or symptom of the problem? I'm using a SAMC21N Xplained dev board so am ruling out that it's some hardware mistake. I am using the connections found here; not using SWO as this is not on the dev board nor available for this part. As advised in another post I added a 3k3 pull-up to RESET - it did pull it up to 3.3V from about 2.8 where it was sitting without the pull-up. When I connect using the dev board's own EDGB programmer / debugger I do see the reset line move, and the other 2 signals too, as expected. I have tried with 2 PICKITs and the same result for each.

 

Can anyone shed any light on what might be happening?

 

TIA.

L

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why using pic to debug? Cannot use atmel ice? 
reset is not needed in the communication, the essential are SWDIO, SWCLK, VCC and GND. In error 4109 means you don’t have any communications at all, check the wiring, core voltages , etc. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have since obtained an Atmel ICE but had a few pickits lying around and would have liked to use them.

 

reset is not needed in the communication

 

I don't think that's true. The signal is included in the SWI description, plus I see it move (at least when programming) when using the Atmel ICE.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You only need RESET if you disable SWD or JTAG in software.

At least that is what happens with AVR JTAG.   e.g. with JTD

 

I have never disabled SWD or JTAG on a SAM device.

But I have done this on STM32.   Which is why debug hardware contains the Reset signal.

 

Simple enough.   Connect your PK4 or ATMEL-ICE with the Reset signal.    Run a program / debug session.

Rinse and repeat without the Reset pin.

 

Oh,  you might find that your experiments are easier to do in Keil UV5.  

The debugger-attach and program-run behaviour is configured with a few tick boxes.

PK4 and ATMEL-ICE just appear as regular CMSIS-DAP debuggers.

 

David.

Last Edited: Wed. Apr 20, 2022 - 06:41 AM