{"id":1570,"date":"2013-06-22T02:16:54","date_gmt":"2013-06-22T00:16:54","guid":{"rendered":"http:\/\/raftaman.net\/?p=1570"},"modified":"2022-05-25T05:10:18","modified_gmt":"2022-05-25T03:10:18","slug":"updating-stk500-firmware","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1570","title":{"rendered":"Updating STK500 firmware"},"content":{"rendered":"<p>Unfortunately, <a href=\"http:\/\/www.atmel.com\/\">Atmel<\/a> does not ship a hex file for their <a href=\"http:\/\/www.atmel.com\/tools\/STK500.aspx\">STK500<\/a> development system that could be used to update the firmware using 3rd party tools like <a href=\"https:\/\/www.nongnu.org\/avrdude\">avrdude<\/a>. Instead, an encrypted <code>ebn<\/code>-file comes with the latest <a href=\"http:\/\/www.atmel.com\/microsite\/atmel_studio6\/\">Atmel Studio<\/a>. The tools that is used to flash the firmware onto the ATmega8535 is a bit dull, though.<\/p>\n<h2>Preparing serial connection<\/h2>\n<p>First, hook up the DB9 port on your STK500 that is marked as <strong>RS232 CTRL<\/strong> to your PC. Since the flash tool <code>AvrProg.exe<\/code> only searches for devices on <strong>COM1<\/strong>, make sure that you connected it to COM1 or if you use a USB-to-Serial converter, change its address to COM1 (Device Manager &rarr; Right-click on the COM port you wish to reassign &rarr; Properties &rarr; Port Settings &rarr; Advanced &rarr; COM Port Number &rarr; COM1). The port settings should read as <strong>9600 8N1<\/strong>.<\/p>\n<h2>Preparing the STK500<\/h2>\n<p>Now, power off the STK500 and make sure, the push button labeled <strong>PROGRAM<\/strong> is pressed while turning on the power again. The LED labeled <code>STATUS<\/code> shouldn&#8217;t be lit permanently (like it would in normal operation mode).<\/p>\n<h2>Flashing the firmware<\/h2>\n<p>Startup Atmel&#8217;s flash tool <code>AvrProg.exe<\/code> that is installed along with <a href=\"http:\/\/www.atmel.com\/microsite\/atmel_studio6\/\">Atmel Studio<\/a>. The default installation location is <code>%ProgramFiles%\\Atmel\\AVR Tools\\AvrProg\\AvrProg.exe<\/code>.<br \/>\n<code>%ProgramFiles%<\/code> is localized and depends on your architecture. It&#8217;s most likely going to be <code>C:\\Program Files<\/code> or <code>C:\\Program Files (x86)<\/code>.<\/p>\n<div id=\"attachment_1571\" style=\"width: 301px\" class=\"wp-caption aligncenter\"><a data-rokbox data-rokbox-album=\"p1570\" data-rokbox-caption=\"Load the firmware file using the &#039;Browse&#039; button and flash it.\" href=\"wordpress\/wp-content\/uploads\/2013\/06\/AVRprog.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1571\" src=\"wordpress\/wp-content\/uploads\/2013\/06\/AVRprog.png\" alt=\"Load the firmware file using the &#039;Browse&#039; button and flash it.\" width=\"291\" height=\"366\" class=\"size-full wp-image-1571\" \/><\/a><p id=\"caption-attachment-1571\" class=\"wp-caption-text\">Load the firmware file using the &#8216;Browse&#8217; button and flash it.<\/p><\/div>\n<p>Next, load the <code>STK500.ebn<\/code> firmware file by pushing the <code>Browse<\/code> button. The default location is <code>%ProgramFiles%\\Atmel\\AVR Studio 6.0\\tools\\STK500\\STK500.ebn<\/code>. After hitting <code>Flash &rarr; Program<\/code>, a progress bar should appear and shortly after the status indicator should tell you that the devices has been successfully programmed. <\/p>\n<div id=\"attachment_1573\" style=\"width: 301px\" class=\"wp-caption aligncenter\"><a data-rokbox data-rokbox-album=\"p1570\" data-rokbox-caption=\"Device was successfully programmed.\" href=\"wordpress\/wp-content\/uploads\/2013\/06\/AVRprogDone.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1573\" src=\"wordpress\/wp-content\/uploads\/2013\/06\/AVRprogDone.png\" alt=\"Device was successfully programmed.\" width=\"291\" height=\"366\" class=\"size-full wp-image-1573\" \/><\/a><p id=\"caption-attachment-1573\" class=\"wp-caption-text\">Device was successfully programmed.<\/p><\/div>\n<p>If you <strong>restart the STK500<\/strong> by turning off the power and turning it back on again, the firmware should be up and running. You can double-check with avrdude, for example.<\/p>\n<pre class=\"brush: bash; highlight: [7]; title: ; notranslate\" title=\"\">\r\n$ avrdude -p atmega32 -c stk500v2 -P \/dev\/ttyUSB0 -n -v\r\n&#x5B;...]\r\n         Programmer Type : STK500V2\r\n         Description     : Atmel STK500 Version 2.x firmware\r\n         Programmer Model: STK500\r\n         Hardware Version: 2\r\n         Firmware Version Master : 2.10\r\n         Topcard         : Unknown\r\n         Vtarget         : 5.1 V\r\n         SCK period      : 10.9 us\r\n         Varef           : 5.0 V\r\n         Oscillator      : 3.686 MHz\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Unfortunately, Atmel does not ship a hex file for their STK500 development system that could be used to update the firmware using 3rd party tools like avrdude. Instead, an encrypted ebn-file comes with the latest Atmel Studio. The tools that is used to flash the firmware onto the ATmega8535 is a bit dull, though. Preparing serial connection First, hook up&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=1570\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,58,23],"class_list":["post-1570","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-avr","tag-hardware","tag-windows"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1570"}],"version-history":[{"count":15,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions"}],"predecessor-version":[{"id":2754,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions\/2754"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}