{"id":1574,"date":"2021-01-04T13:39:45","date_gmt":"2021-01-04T12:39:45","guid":{"rendered":"https:\/\/www.rustimation.eu\/?p=1574"},"modified":"2021-01-06T10:41:00","modified_gmt":"2021-01-06T09:41:00","slug":"esp8266-flash-speicher-loeschen","status":"publish","type":"post","link":"https:\/\/www.rustimation.eu\/index.php\/esp8266-flash-speicher-loeschen\/","title":{"rendered":"ESP8266: Flash Speicher l\u00f6schen"},"content":{"rendered":"<h2>Ung\u00fcltige Speicheradresse<\/h2>\n<p>Wenn man mit dem Flashspeicher eines ESP8266 oder ESP32 basierenden Microcontrollers herumspielt, kann es vorkommen, dass man beim Laden und Ausf\u00fchren eines neu entwickelten Skripts eine <em>fatal exception<\/em> im Serial Monitor angezeigt bekommt. Es l\u00e4uft eine unendliche Fehlermeldung mit lauter hex-Werten durch.<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1577\" src=\"https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2021\/01\/FlashError-1024x651.jpg\" alt=\"\" width=\"604\" height=\"384\" srcset=\"https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2021\/01\/FlashError-1024x651.jpg 1024w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2021\/01\/FlashError-300x191.jpg 300w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2021\/01\/FlashError-768x488.jpg 768w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2021\/01\/FlashError.jpg 1231w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/p>\n<p><em>Abbildung 1: Exception bei fehlerhaftem Zugriff auf den Flashspeicher.<\/em><\/p>\n<p>Zuerst dachte ich: \"jetzt hast du das Teil geschrottet\". Mitnichten! Der Fehler Nummer 28 tritt immer dann auf, wenn man einen Bereich des Flashspeichers mit bestimmter Gr\u00f6\u00dfe beschrieben hat und sp\u00e4ter einen gr\u00f6\u00dferen Bereich als den vorher beschriebenen wieder auslesen will.<\/p>\n<p>Zum Beispiel hat man vorher diverse Parameter (z.B. aus einem Sketch des Beitrags <a href=\"https:\/\/www.rustimation.eu\/index.php\/esp8266-wifi-parameter-speichern\/\">ESP8266: WiFi Passwort etc. ohne Programmieren speichern<\/a>) mit insgesamt 120 Byte L\u00e4nge weggespeichert. Will man nun z.B. 150Byte auslesen, kommmt es zu dem oben dargestellten Fehler.<\/p>\n<p>Netterweise gibt es im Arduino IDE eine Einstellung unter <em>Werkzeuge<\/em>, die \"<em>Erase Flash<\/em>\" hei\u00dft. Dort kann man ausw\u00e4hlen, wie mit dem Flash Speicher beim n\u00e4chsten Programmiervorgang umgegangen werden soll. Mit der Auswahl \"All Flash Contents\" wird der Speicher komplett gel\u00f6scht und du kannst deinen neuen Sketch, welcher mehr Flash Speicher adressiert,\u00a0 ausf\u00fchren.\u00a0 Hilfreich ist das auch beim Verkaufen oder Verschenken eines gebrauchten ESP Moduls um die WLAN Zugangsparameter zu l\u00f6schen.<\/p>\n<p>Hinterher nicht vergessen, auf \"Only Sketch\" zur\u00fcckzustellen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1456 size-large\" src=\"https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2020\/12\/Loeschen-1024x576.jpg\" alt=\"\" width=\"604\" height=\"340\" srcset=\"https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2020\/12\/Loeschen-1024x576.jpg 1024w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2020\/12\/Loeschen-300x169.jpg 300w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2020\/12\/Loeschen-768x432.jpg 768w, https:\/\/www.rustimation.eu\/wordpress\/wp-content\/uploads\/2020\/12\/Loeschen.jpg 1280w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><br \/>\n<em>Abbildung 2: L\u00f6schen der gesch\u00fctzten EEPROM Bereiche<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ung\u00fcltige Speicheradresse Wenn man mit dem Flashspeicher eines ESP8266 oder ESP32 basierenden Microcontrollers herumspielt, kann es vorkommen, dass man beim Laden und Ausf\u00fchren eines neu entwickelten Skripts eine fatal exception im Serial Monitor angezeigt bekommt. Es l\u00e4uft eine unendliche Fehlermeldung mit lauter hex-Werten durch.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112,102,69],"tags":[107,100,117,116,118],"class_list":["post-1574","post","type-post","status-publish","format-standard","hentry","category-d1-mini","category-esp8266-esp32","category-tips-tricks","tag-arduino","tag-esp8266","tag-exception-28","tag-fehler-28","tag-flash-memory"],"_links":{"self":[{"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/comments?post=1574"}],"version-history":[{"count":1,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/posts\/1574\/revisions"}],"predecessor-version":[{"id":1598,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/posts\/1574\/revisions\/1598"}],"wp:attachment":[{"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/media?parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/categories?post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rustimation.eu\/index.php\/wp-json\/wp\/v2\/tags?post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}