{"id":15819,"date":"2019-12-01T11:01:18","date_gmt":"2019-12-01T16:01:18","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=15819"},"modified":"2019-12-01T11:01:23","modified_gmt":"2019-12-01T16:01:23","slug":"save-money-buy-misery-cheap-stm32-boards","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2019\/12\/01\/save-money-buy-misery-cheap-stm32-boards\/","title":{"rendered":"Save money, buy misery: cheap STM32 boards"},"content":{"rendered":"\n<p class=\"has-text-color has-dark-red-color\">(<em>I&#8217;m still writing this. It <span style=\"text-decoration: underline;\">will<\/span> change over time.<\/em>)<\/p>\n\n\n\n<p>\u00e2\u20ac\u0153<em>Use an STM32 Blue Pill or Black Pill micro-controller board<\/em>\u00e2\u20ac\u009d, they said. \u00e2\u20ac\u0153<em>So cheap, so powerful<\/em>\u00e2\u20ac\u009d, they said. \u00e2\u20ac\u0153<em>You&#8217;ll love it<\/em>\u00e2\u20ac\u009d, they said. <\/p>\n\n\n\n<p>Dear Reader, none of the above turned out to be true.<\/p>\n\n\n\n<p>For some time now I&#8217;ve been looking for a cheap, <abbr title=\"keyboard\/mouse\/joystick-emulating\">USB HID<\/abbr> micro-controller board that is somewhat more flexible than the ATMega32U4 (Arduinos Leonardo, Micro and Pro Micro; also the impossibly <em>smol<\/em> <a href=\"https:\/\/nionics.com\/product\/atto\/\">Atto<\/a>) and yet not quite as flexible as the <em>let&#8217;s-accidentally-overwrite-our-accessibility-code-with-the-holiday-snaps<\/em> CircuitPython boards from Adafruit. And for a while it looked like the STM32 boards might do it: they&#8217;ve got a 72 MHz ARM Cortex-M3 with at least 64 KB of Flash and 20 KB of SRAM and they&#8217;re under $5. Yay?<\/p>\n\n\n\n<p>Not quite. There are three main problems with the STM32 boards that get in the way of inexpensive electronic nerdery.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1: They may not actually <span style=\"text-decoration: underline;\">be<\/span> STM32 chips<\/h2>\n\n\n\n<p>Slightly grotty photos follow. One day I&#8217;ll get a better USB microscope.<\/p>\n\n\n\n<p>First, the chip from a \u00e2\u20ac\u0153Black Pill\u00e2\u20ac\u009d board bought recently:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-1024x768.jpg\" alt=\"\" class=\"wp-image-15820\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-1024x768.jpg 1024w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-320x240.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-160x120.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-768x576.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-1536x1152.jpg 1536w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32-1200x900.jpg 1200w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/stm32.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>flux blobs aside, this is clearly marked STM32 F103C8T6<\/figcaption><\/figure>\n\n\n\n<p>Compare with a \u00e2\u20ac\u0153Blue Pill\u00e2\u20ac\u009d bought last year:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-1024x768.jpg\" alt=\"\" class=\"wp-image-15821\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-1024x768.jpg 1024w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-320x240.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-160x120.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-768x576.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-1536x1152.jpg 1536w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32-1200x900.jpg 1200w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/12\/cs32.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>the very tentatively marked CS32F 103C8T6 and its possibly fake CKS (\u00e2\u20ac\u0153<a href=\"http:\/\/www.cksic.com\/en\/index.html\">China Key System<\/a>\u00e2\u20ac\u009d) logo<\/figcaption><\/figure>\n\n\n\n<p>Knock-offs are rife in the cheap end of the market, and at least this chip is <a href=\"https:\/\/www.cnx-software.com\/2019\/02\/10\/cs32-mcu-stm32-clone-bluepill-board\/\">honest<\/a> enough to say that it&#8217;s not from STMicroelectronics. While it may be possible to program these things with some <a href=\"https:\/\/www.eevblog.com\/forum\/beginners\/unexpected-idcode-flashing-bluepill-clone\/?PHPSESSID=i8649hb3tcjrtce6ph0tce2p22\">heroic faffing about<\/a>, consider balancing the effort required versus the time cost of doing so.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2: They may not have working USB<\/h2>\n\n\n\n<p>moar later (about the Blue Pill&#8217;s incorrect resistor)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3: The documentation is everywhere and nowhere and Google is <span style=\"text-decoration: underline;\">not<\/span> your friend<\/h2>\n\n\n\n<p>even moar later (about a very dedicated amateur&#8217;s hosting of the project documentation becoming too successful for him to afford)<\/p>\n\n\n\n<p>(<strong><em>Huge<\/em><\/strong> thanks to Andrew Klaassen who provided me his notes for getting some of these boards at least able to run Blink under Linux.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(I&#8217;m still writing this. It will change over time.) \u00e2\u20ac\u0153Use an STM32 Blue Pill or Black Pill micro-controller board\u00e2\u20ac\u009d, they said. \u00e2\u20ac\u0153So cheap, so powerful\u00e2\u20ac\u009d, they said. \u00e2\u20ac\u0153You&#8217;ll love it\u00e2\u20ac\u009d, they said. Dear Reader, none of the above turned out to be true. For some time now I&#8217;ve been looking for a cheap, USB HID [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[2207,3192,3191,3190,3189,2175],"class_list":["post-15819","post","type-post","status-publish","format-standard","hentry","category-goatee-stroking-musing-or-something","tag-arduino","tag-blackpill","tag-bluepill","tag-cs32","tag-stm32","tag-swearies"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-479","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=15819"}],"version-history":[{"count":2,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15819\/revisions"}],"predecessor-version":[{"id":15823,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15819\/revisions\/15823"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=15819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=15819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=15819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}