{"id":6989,"date":"2026-04-25T07:55:23","date_gmt":"2026-04-25T05:55:23","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=6989"},"modified":"2026-04-25T07:59:01","modified_gmt":"2026-04-25T05:59:01","slug":"esp32-arduino-setting-the-stack-size","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/","title":{"rendered":"ESP32 Arduino: Setting the Stack Size"},"content":{"rendered":"<p>I am getting old and usually forget the commands that I rarely use.<\/p>\n<p>My solution for this: <strong>Just ask AI<\/strong> !<\/p>\n<p>Lately I was running into the issue that my ESP32 Arduino test sketches were crashing because there was not enough stack, but this time <strong>ChatGPT completely failed me<\/strong>.<\/p>\n<p>I finally found the correct answer in the examples provided by Espressif and it is smiple. Just add the following line to your sketch:<\/p>\n<pre><code>\r\n\/\/ Increase the stack size to 60 K\r\nSET_LOOP_TASK_STACK_SIZE(60 * 1024);\r\n<\/code><\/pre>\n<p>I am sharing this in the hope that it might be helpful to others and that maybe some AI tools might pick this up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am getting old and usually forget the commands that I rarely use. My solution for this: Just ask AI ! Lately I was running into the issue that my ESP32 Arduino test sketches were crashing because there was not enough stack, but this time ChatGPT completely failed me. I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-6989","post","type-post","status-publish","format-standard","hentry","category-arduino"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ESP32 Arduino: Setting the Stack Size - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ESP32 Arduino: Setting the Stack Size - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"I am getting old and usually forget the commands that I rarely use. My solution for this: Just ask AI ! Lately I was running into the issue that my ESP32 Arduino test sketches were crashing because there was not enough stack, but this time ChatGPT completely failed me. I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-25T05:55:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-25T05:59:01+00:00\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"ESP32 Arduino: Setting the Stack Size\",\"datePublished\":\"2026-04-25T05:55:23+00:00\",\"dateModified\":\"2026-04-25T05:59:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/\"},\"wordCount\":102,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"articleSection\":[\"Arduino\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/\",\"name\":\"ESP32 Arduino: Setting the Stack Size - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"datePublished\":\"2026-04-25T05:55:23+00:00\",\"dateModified\":\"2026-04-25T05:59:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2026\\\/04\\\/25\\\/esp32-arduino-setting-the-stack-size\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ESP32 Arduino: Setting the Stack Size\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ESP32 Arduino: Setting the Stack Size - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/","og_locale":"en_US","og_type":"article","og_title":"ESP32 Arduino: Setting the Stack Size - Phil Schatzmann","og_description":"I am getting old and usually forget the commands that I rarely use. My solution for this: Just ask AI ! Lately I was running into the issue that my ESP32 Arduino test sketches were crashing because there was not enough stack, but this time ChatGPT completely failed me. I [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/","og_site_name":"Phil Schatzmann","article_published_time":"2026-04-25T05:55:23+00:00","article_modified_time":"2026-04-25T05:59:01+00:00","author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"ESP32 Arduino: Setting the Stack Size","datePublished":"2026-04-25T05:55:23+00:00","dateModified":"2026-04-25T05:59:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/"},"wordCount":102,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"articleSection":["Arduino"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/","url":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/","name":"ESP32 Arduino: Setting the Stack Size - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"datePublished":"2026-04-25T05:55:23+00:00","dateModified":"2026-04-25T05:59:01+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2026\/04\/25\/esp32-arduino-setting-the-stack-size\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"ESP32 Arduino: Setting the Stack Size"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=6989"}],"version-history":[{"count":8,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6989\/revisions"}],"predecessor-version":[{"id":6997,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6989\/revisions\/6997"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=6989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=6989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=6989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}