ATSAMR21B18 Programming Issues. Is my chip damaged?

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

Hello, recently I have been programming my ATSAMR21B18 module with the Atmel ICE. I had programmed it with an example application "APPS_SIMPLE_EXAMPLE_STAR". I programmed the same application onto the R21 Xplained Pro and was able to verify that the two boards were wirelessly communicating with each other. However, after making some light code changes like toggling GPIO pins and reconfiguring some clock parameters, I noticed that the device would hang.

 

For an external reason, this module was de-soldered and re-soldered onto a separate board with the same PCB design. After doing so, I am now experiencing severe difficulties in trying to even debug the module. It takes roughly 20 tries before a successful debugging session is created. When unsuccessful I get a range of errors like: "No Device Connected", "Cannot write memory address 41002100", "Could not activate interface", or "Timed out waiting for chip erase to complete". These persist after writing the original example application to the device. Is this a sign of chip damage, or could there be something else causing this? Thanks.

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

Some things that can cause problems, in no particular order:

 

  1. Use of sleep - also puts the debug access to sleep, so the debugger can't connect / loses connection;
     
  2. Using the debug pins as GPIO, or disabling them (eg, for power saving) - this will obviously break the debug connection;
     
  3. Changing the clock speed to something that needs wait-states, but omitting to configure the necessary wait-states.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your reply. As stated earlier, I am able to rarely program the module. In one of these rare successful attempts, I was able to re-program the module with the example application which worked without issue originally. However, I am still experiencing the same programming errors. Would any of the possible causes you provided lead to these errors persisting?