{"id":255,"date":"2013-08-09T18:05:11","date_gmt":"2013-08-09T07:05:11","guid":{"rendered":"https:\/\/mindbleach.com\/words\/?p=255"},"modified":"2013-08-09T18:05:11","modified_gmt":"2013-08-09T07:05:11","slug":"clearing-debugwire","status":"publish","type":"post","link":"https:\/\/mindbleach.com\/words\/2013\/08\/09\/clearing-debugwire\/","title":{"rendered":"Atmel Studio: Clearing debugWIRE"},"content":{"rendered":"<p>debugWIRE is a fantastic bit of technology in many recent AVR chips, allowing you to set breakpoints, step through your code, and a bunch of other useful features. All you need is a programmer that supports it &#8211; the AVR Dragon for instance.<\/p>\n<p>In the Atmel Studio project, simply set the Debugger\/Programmer <em>Interface<\/em> to debugWIRE.<\/p>\n<p>The only fly in the ointment is that for extremely low-power applications, having the <em>DWEN<\/em> fuse and thus debugWIRE enabled will prevent the chip from fully sleeping, meaning your device is much more thirsty than expected.<\/p>\n<p>So you set the Debugger\/Programmer <em>Interface<\/em> back to ISP, and try to program your device again; <em>Failure!<\/em> In fact; CRYPTIC ERROR MESSAGE!<\/p>\n<p>TO CLEAR debugWIRE FROM A CHIP WITHIN Atmel Studio 6:<br \/>\n<span style=\"text-decoration: underline;\">Start a debug session on the chip<\/span>, then<br \/>\nGo to the &#8220;Debug&#8221; menu and select &#8220;Disable debugWIRE and close&#8221;.<\/p>\n<p>Now you can access the chip using ordinary ISP, and low-power devices will be more frugal.<\/p>\n<p>This may seem an obvious thing, but there are a number of &#8220;solutions&#8221; floating around, including people advocating hooking HVPP programmers into devices simply to clear DWEN!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>debugWIRE is a fantastic bit of technology in many recent AVR chips, allowing you to set breakpoints, step through your code, and a bunch of other useful features. All you need is a programmer that supports it &#8211; the AVR &hellip; <a href=\"https:\/\/mindbleach.com\/words\/2013\/08\/09\/clearing-debugwire\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,11],"tags":[28,33,34,32,29,30,31,27],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-avr","category-programming","tag-atmel","tag-atmel-studio","tag-atmel-studio-6","tag-c","tag-debugwire","tag-isp","tag-programming-2","tag-reminder"],"_links":{"self":[{"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/posts\/255"}],"collection":[{"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":3,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/posts\/255\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindbleach.com\/words\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}