{"id":4295,"date":"2019-11-13T20:00:42","date_gmt":"2019-11-13T19:00:42","guid":{"rendered":"https:\/\/msalamon.pl\/?p=4295"},"modified":"2025-12-27T18:34:41","modified_gmt":"2025-12-27T17:34:41","slug":"why-i-dont-write-posts-based-on-the-bluepill-board","status":"publish","type":"post","link":"https:\/\/msalamon.pl\/en\/why-i-dont-write-posts-based-on-the-bluepill-board\/","title":{"rendered":"Why I Don&#8217;t Write Posts Based on the BluePill Board?"},"content":{"rendered":"\n<p>Lately, lots of people have been asking me to port my code to <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">STM32F103C8T6<\/a>. I\u2019m reluctant to take on this task because HAL is fairly easy to port. Besides, I\u2019d like to teach programming, not copying code \ud83d\ude42 There are also a few other issues I have an internal problem with when it comes to this popular board from China.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h1 class=\"wp-block-heading\">BluePill with STM32F103C8T6<\/h1>\n\n\n\n<p>I\u2019ll start with what <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">this board<\/a> actually is. It\u2019s a small and incredibly cheap Chinese development board proudly called \u201cminimal development board for STM32\u201d. In fact, it has the minimum components needed for the microcontroller to operate. Even a bit more than the minimum, because it includes a user LED and a USB Slave connector.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=banner&amp;utm_campaign=bluepill&amp;utm_content=bluepill\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"400\" src=\"http:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2.jpg\" alt=\"\" class=\"wp-image-1263\" srcset=\"https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2.jpg 1200w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-300x100.jpg 300w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-1024x341.jpg 1024w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-768x256.jpg 768w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-24x8.jpg 24w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-36x12.jpg 36w, https:\/\/msalamon.pl\/wp-content\/uploads\/2019\/11\/BluePill-baner2-160x53.jpg 160w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>The specifications of the microcontroller soldered onto the PCB are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cortex-M3 core, the oldest of the family<\/li>\n\n\n\n<li>Clock up to 72 MHz<\/li>\n\n\n\n<li>64 kB Flash<\/li>\n\n\n\n<li>20 kB SRAM<\/li>\n\n\n\n<li>2 x I2C<\/li>\n\n\n\n<li>2 x SPI<\/li>\n\n\n\n<li>CAN<\/li>\n\n\n\n<li>3x USART<\/li>\n\n\n\n<li>2 x ADC<\/li>\n\n\n\n<li>Built-in RTC<\/li>\n\n\n\n<li>4 x timer<\/li>\n<\/ul>\n\n\n\n<p>Compared to a popular Arduino, it looks quite powerful. All the more so because it breaks out 31 GPIO pins on the board compared to 19 pins on the Arduino Uno.<\/p>\n\n\n\n<p>So why do I avoid writing articles based on it?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting the programmer<\/h3>\n\n\n\n<p>Getting started with <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a> is not just about buying this board. The only exception is flashing with the Arduino bootloader, but that\u2019s not what my blog is about.<\/p>\n\n\n\n<p>If you want to write using the HAL libraries or \u201con registers\u201d, you\u2019ll need an ST-Link programmer plugged in. And here it\u2019s nice, because there\u2019s a header for this programmer broken out on separate pin headers. However, this is a minimal connection, which I personally do not recommend. This connector lacks the RESET signal.<\/p>\n\n\n\n<p>What happens if you don\u2019t connect RESET? In the best case, nothing \u2013 you\u2019ll program it normally. In the worst case? The IDE will throw that it either can\u2019t find the microcontroller, or some other connection error. The MCU simply won\u2019t always \u201callow\u201d you to hook into a running program.<\/p>\n\n\n\n<p>At least once a week I get an email that something is wrong with the <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a>, and usually connecting RESET helps.<\/p>\n\n\n\n<p>Therefore, the only sensible connection is the one with RESET. Unfortunately, this pin on the board is placed far away from the SWD-like connector.<\/p>\n\n\n\n<p>On the Nucleo boards I use, the programmer is on-board and connected the way I want. I plug in miniUSB and it works \u2013 simple. Additionally, I avoid wiring with jumpers and a breadboard. If I\u2019m using the programmer on a Nucleo, I need to have it on the desk anyway.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connect under reset<\/h2>\n\n\n\n<p>You may have different feelings when working with <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a>, but I never have confidence that even a correctly connected microcontroller will work right away.<\/p>\n\n\n\n<p>Often there\u2019s also a need to explicitly tell the programmer that it must connect under reset. I\u2019ve solved this issue many times with readers over email.<\/p>\n\n\n\n<p>I don\u2019t like spending an excessive amount of time on \u201cconfiguration\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">USB issues<\/h2>\n\n\n\n<p>With these BluePills you can encounter various problems with the USB interface. The most common is probably a hardware issue. In one PCB population variant, the USB D+ pull-up resistor R10 is 10k instead of 1k5. The effect? The system can\u2019t detect the device. You can re-solder it, or buy a correctly populated one.<\/p>\n\n\n\n<p>If you end up with a counterfeit chip, USB may not work correctly, or at all. And while we\u2019re on the topic of counterfeits\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Counterfeits of counterfeits<\/h2>\n\n\n\n<p>This is the worst. Are you sure the STM32F103C8T6 is a genuine chip? Does ST even know about it? Maybe it\u2019s like BMW M3s, of which more are driving around just in Poland than ever came off the production line? \ud83d\ude42<\/p>\n\n\n\n<p>I wouldn\u2019t be so sure about the authenticity of chips from China. That may also be where the reset problems come from. When buying on Aliexpress, you can\u2019t be sure you have a chip from ST, even if it says so on it. Trust me.<\/p>\n\n\n\n<p>Sometimes it happens that these chips are labeled as STM32F103C<strong>B<\/strong>T6. Interestingly, in the vast majority of cases, the microcontrollers from the BluePill show 128 kB according to the programmer, not 64 kB. Often that \u201cextra\u201d 64 kB is unusable and broken \ud83d\ude42<\/p>\n\n\n\n<p>I managed to source boards for my store that work the way I want. However, I can\u2019t give a 100% guarantee that they\u2019re originals. When buying on your own, you don\u2019t know if you\u2019ll get lucky.<\/p>\n\n\n\n<p>Sometimes it\u2019s obvious you\u2019re dealing with a fake. Instead of STM32F103C8T6, the chip will have <strong>CS32F103C8T6<\/strong> engraved. Supposedly they work the same, but even the microcontroller ID is different, which requires some work to be able to use it. I\u2019ve never checked whether they \u201cwork the same\u201d. I value my nerves more than saving a few PLN.<\/p>\n\n\n\n<p>Many people have also written to me for help with this counterfeit chip, and it turned out they had a fake. <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=post&amp;utm_campaign=bluepill\">If you want a board from a verified source \u2014 you\u2019re welcome.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Breadboard<\/h2>\n\n\n\n<p>I do often use breadboards, but for every project I cut their number down to the bare minimum. Maybe that\u2019s why I don\u2019t have gray hair yet, while some of my friends do.<\/p>\n\n\n\n<p>Alright Mateusz, but what are you nitpicking about? I very often use a logic analyzer. That means I need to hook into the same pin twice. Nucleo has some pins duplicated, which is a huge advantage for me.<\/p>\n\n\n\n<p><a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a> brings out each pin only once. That means right from the start I have to plug the entire board into a breadboard and wire everything with jumpers.<\/p>\n\n\n\n<p>Believe me, the fewer wires the better. Especially when you have little desk space and a cat\u2026<\/p>\n\n\n\n<p>With such a flimsy connection, you often get a combo of an intermittent programmer or other similar quirks. It also becomes easy to get a short. No. I just don\u2019t want to get annoyed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">31 GPIO is not that much<\/h2>\n\n\n\n<p>The STM32 in this package may have more pins than an Arduino, but that\u2019s still not a lot. Add a larger LCD, an SD card, I2C and SPI sensors, and it already gets tight.<\/p>\n\n\n\n<p>I definitely prefer to take a 64-pin Nucleo, which has about 50 GPIO. It\u2019s ideal for my use cases. If that\u2019s still not enough \u2013 there are even bigger ones.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">However, sometimes I\u2019ll use it<\/h2>\n\n\n\n<p>There are moments when I will use today\u2019s protagonist. Most often these are projects where I know in advance that I\u2019ll want to put the whole dev board into the enclosure. Then I don\u2019t have to design a complicated PCB. I\u2019ll drop in a <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a> because of its size.<\/p>\n\n\n\n<p>Do I still use it otherwise? Rather not\u2026 I\u2019ve got a few private pieces lying in the closet gathering a lot of dust.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><figure><a href=\"https:\/\/sklep.msalamon.pl\/kategoria-produktu\/dev-boardy\/stm32-nucleo\/?utm_source=blog&amp;utm_medium=banner&amp;utm_campaign=bluepill&amp;utm_content=nucleo\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/msalamon.pl\/wp-content\/uploads\/2020\/07\/Nucleo-64-baner.jpg\" alt=\"\" width=\"1200\" height=\"400\" class=\"aligncenter wp-image-1593 size-full\" srcset=\"https:\/\/msalamon.pl\/wp-content\/uploads\/2020\/07\/Nucleo-64-baner.jpg 1200w, https:\/\/msalamon.pl\/wp-content\/uploads\/2020\/07\/Nucleo-64-baner-300x100.jpg 300w, https:\/\/msalamon.pl\/wp-content\/uploads\/2020\/07\/Nucleo-64-baner-1024x341.jpg 1024w, https:\/\/msalamon.pl\/wp-content\/uploads\/2020\/07\/Nucleo-64-baner-768x256.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\"><\/a><\/figure><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>If you\u2019ve made it this far, I\u2019m really glad. I had to get this off my chest, because lately I\u2019ve had a lot of questions like \u201cwill you convert this to F103?\u201d. Maybe one day I\u2019ll adapt the code. I don\u2019t promise. But I strongly encourage you to try on your own.<\/p>\n\n\n\n<p>If you come to me with a problem during porting, I\u2019ll be happy to help. I won\u2019t help you with \u201cdo the whole thing for me\u201d. I encourage learning and independence.<\/p>\n\n\n\n<p>As for the <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a>, it\u2019s an interesting board. The price certainly does its job and, if you\u2019re aware of the board\u2019s shortcomings, you can use it with confidence. However, I will discourage beginners. You need to learn to program, not fight weird problems.<\/p>\n\n\n\n<p>I\u2019m not forbidding you to use the <a href=\"https:\/\/sklep.msalamon.pl\/produkt\/stm32f103c8t6-dev-board-2\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=bluepill&amp;utm_content=Text\">BluePill<\/a>, but I hope that when you choose it you\u2019ll keep in mind that it\u2019s not perfect.<\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;4295&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;0&quot;,&quot;greet&quot;:&quot;&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Why I Don\\u0026#039;t Write Posts Based on the BluePill Board?&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 0px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\"><\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Lately, lots of people have been asking me to port my code to STM32F103C8T6. I\u2019m reluctant to take on this task because HAL is fairly easy to port. Besides, I\u2019d like to teach programming, not copying code \ud83d\ude42 There are also a few other issues I have an internal problem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3324,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[160],"tags":[175,176,174,177],"class_list":["post-4295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-stm32","tag-electronics","tag-programming","tag-stm32","tag-stm32cubemx"],"_links":{"self":[{"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/posts\/4295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/comments?post=4295"}],"version-history":[{"count":3,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/posts\/4295\/revisions"}],"predecessor-version":[{"id":4394,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/posts\/4295\/revisions\/4394"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/media\/3324"}],"wp:attachment":[{"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/media?parent=4295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/categories?post=4295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msalamon.pl\/en\/wp-json\/wp\/v2\/tags?post=4295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}