title: Error connecting DP: cannot read IDR-No connection could be made because target machine actively refused it
body: <p>I could program and debug this project for the first time. But the problem is that I can't <strong>reprogram or debug</strong> it again. There is no bootloader on the chip. The only way to communicate with this chip is SWD. As a debugger, I am using Atmel ice. The microchip is SAMD21E16B-U. The project is created by <a href="https://start.atmel.com/#project" rel="nofollow noreferrer">Atmel Start</a>. Visual Studio is used as an IDE to import the project.</p>
  <p>After debugging again, the error is:</p>
  <p><a href="https://i.stack.imgur.com/MJPbu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MJPbu.png" alt="enter image description here" /></a></p>
  <ul>
  <li>The problem may be because of setup. I am not sure what I missed. I followed the <a href="https://visualgdb.com/tutorials/arm/atmel/start/" rel="nofollow noreferrer">visualGDB website</a> for importing this project.</li>
  <li>I checked the power connection.</li>
  <li>There is no option for &quot;connect under reset&quot; on visualgdb debug setting. However, this option was available on STM chips.
  <a href="https://i.stack.imgur.com/Jh9Zi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jh9Zi.png" alt="enter image description here" /></a></li>
  </ul>
  <p>I really appreciate it if you can guide me on what I can do for reprogramming this chip? Or which information I should look for. Thanks for any helpful recommendations, in advance.</p>