you prolly dont care but does someone know a tool to get back into an instagram account? I stupidly lost the password. I love any assistance you can offer me.
Great having a silverback expert to listen to about the latest tech - as he can relate it to the legacy gear of the 60s and 70s. As someone a similar level of chronological endurance as Andreas, I encountered some of the items mentioned in the 70s. At University I did Fortran programming via punch cards - one 80 char line per card; don't drop your card stack and get them out of order. We had Digital Equipment Corp computers - though not their VAX line, rather the earlier PDP-11 which were accessed via hardcopy terminals (and a very few dumb terminals with VDU, cutting edge for the time). The oldest input method I worked with was having to submit code via paper tape, 7-hole type (so 7-bit) prepared on a teletype which had a keyboard, paper tape punch and tape reader. Like Telex but with full ASCII character set (Telex is 5-bit). That was painful - to correct just one error the old paper tape was copied to a new one up to the bad line, you type in the new line, and copy the rest of the tape. I also used the Teletypes as a primitive word processor to generate newsletters onto Gestetner stencils for printing newsletters for a club (photocopying still rather expensive). And who knows what a Gestetner stencil is?
Yea, during those days quality of typing and programming was on a different level because the limit was compute power. Today, the bottleneck is our time and no more computers. So our behavior is adapted...
@@AndreasSpiess yep, my friend and I developed a complete monitor and in-line assembler for MC146805, in 2K , using a ksr-33 as our "user interface", and sold the evaluation board in quite a few countries, as we actually beat Motorola in getting the eval board for MC146805 to the market. The "good old days" ;-)
I remembered that era. The IBM printer was huge, and open itself up automatically when it ran out of paper; graduated in '72. Feels like another life technologically.
I've only watched the introduction, and already in awe of your ability to get this work done! And, additionally, how responsive you are to viewer input... Respekt!
The small ST-Link sticks seem also be upgradeable if you try hard and plug- and unplug them several times. Quite a few viewers helped me to get the job done. Thank you!
Bluepills that come with the genuine ST chips are all 128K (yes the datasheet states 64) and can be overclocked to 128MHz. The usual problem with those is a wrong resistor (R10) that prevents some usb controllers from enumerating the device and awful USB micro connectors (like the one you got). Spent quite some time trying to find the problem when the issue was a bad connector. The stlink adapters (with 128K flash) or any stm32 for that matter can be flashed with "Black Magic Probe" firmware. That gives you another virtual serial port that you can connect to RX/TX of target micro, which simplifies the monitoring since there is only BMP connected to the computer. BMP also has support for TRACESWO so that is another added benefit.
you _can_ debug an Arduino UNO using PlatformIO. I don't know if they changed something recently, but it works fine. I don't know why anyone with an ounce of embedded experience would use the Arduino IDE instead of PlatformIO for anything.
I encountered the same issues with my cheap ST-Link clone. Unplugging it at the right moment allowed me with upgrade it. I was also able to use it for programming through the Arduino IDE.
Wow! Just uploaded! Watching it because it's Uncle Andreas testing my favorite boards! I've started using Bluepills now, and wonder why I wasn't using them before. Amazing microcontrollers with lots of customization options.
This was a large undertaking. You did a great job. Who could even speculate that in 2020 makers would have access to these type of chips to program and make awesome things with.
Oh, a correction: The bluepills (and pretty much all STM32's) do have a built in bootloader. They have a serial bootloader that is burned in the silicon itself and can be selected with the boot jumpers. They actually have 3 different bootloader slots, but the USB requires flashing and doesn't come installed by default.
I did not know about a serial bootloader. Maybe I did not find a lot of information about it because using SWD instead of Serial has lots of advantages.
@@AndreasSpiess Indeed. SWD is so much better. And that also highlights that limited documentation targeted at hobbyists might be one of the biggest stumbling blocks for these STM32 boards right now.
I had a maple mini that got stuck in DFU mode and kept the last code I uploaded to it until it cracked while I was installing/uinstalling different USB drives in hope to get it to respond to Arduino IDE. And of course bought other maple minis.
@@circadianrebel Maybe these people can't use google or the STMicro own search bar or don't know what an application note is? AN3155: USART protocol used in the STM32 bootloader AN4657: STM32 in-application programming (IAP) using the USART Also it is a shame that people think a "bootloader" is a development tool. Thank you Arduino... Instead a bootloader is a tool to provide updates to an end-user or to ease in-circuit flashing and .... yes, for development, too. But that is not its main purpose. What you do when using a bootloader on the STM32 platform is in fact that you block your way to (easy) access the USB-Stack and waste the opportunity of rich debugging. I really can't understand this with 3$ ST-Link clones out there in the wild or the ability to use a second Blue-Pill as full blown ST-Link v2 Programmer. Please excuse the rant (not directed at you), I had to get this off my head:) Bonus: AN3156 USB DFU protocol used in the STM32 bootloader - Lists chipfamilies with integrated USB Bootloader, no need to roll your own. As always: RTFM :)
I was about to shout "include any Teensy 4.x in the benchmarks"... and at the end on the video you included it, as the surprise !!! AWESOME! as always I tell you, this was an awesome video as always!
To get the most out of the STM32 boards try using the STM32CubeMX and STM32CubeIDE development tools. Not as straightforward as the Arduino IDE but great for configuring all the hardware features
You are right. But I use the Arduino IDE on this channel. It has many advantages, for example that we can use it for different architectures. And it has libraries. And most of my viewers use it. As you write, the cube environment is a very different world.... I had a short glimpse during the video production.
@@farvezfarook3422 Sure, but it's a closed program and hard/impossible to get running on anything but a few OS versions and hardware configurations. You can, however, use STM32CubeMX (which is based on Java) and PlatformIO (which sadly also limited their OS/Hardware support in the last months) to get a similar feature set.
I've found CubeMX is useful for figuring out what configurations are possible without reading the datasheet cover to cover, but the code it generates is pretty marginal, and the STM32 HAL documentation isn't great either. Configuring USB endpoints with the code gen from Cube MX had me going in circles for a week of evenings as an experienced programmer; switched to libopencm3 and it was a breath of fresh air compared to the HAL 😅
Hi Andreas, again an excellent video. i didn't understand everything, not because you are not clear but because I am still learning. However, I looked the whole video till the very last second because I find it addictive and would like to become versatile in these technologies. Being more or less of the same generation as you, I appreciated your jump in the past with which I am more comfortable. Congratulations.
I have quite a few viewers of our age. This is why I sometimes do these jumps back in time... And it is also good for me to remember. Do not forget: I had to learn all this stuff, too. My normal job is to build large ESP systems for big corporations... So it is possible!
I ordered some of the black pills to give them a spin. So far i mostly use arduinos, and AVR chips, but debugging through serial printing, or even just blinking leds is pretty annying, having a full live debugger support in vscode is going to be amazing if i get it to work. Your videos are constantly improving ee hobbyist life. I still frequently use the wire wrapping tool i got because of your video (never knew it even existed before) and love it.
Thanks a lot for the awesome video, you have spent a lot of time to make all the comparisons and give us the results ready. Thanks again. By the way, the small hand is very funny.
I hadn't put the link together in my head that STMicro is so often used in commercial applications. Now we can see why -- relatively high power in a relatively inexpensive package! My old Arduinos might need some new buddies... Thanks for the video!
I may not understand a lot of things related to microcontrollers and electronics (Still trying. I am only a computer science graduate), but boy does he deliver every single time. Bam bam bam. 💥💥 💥 Andreas has to be one of the top rated quality content creator/reviewer on youtube that exist today.
Andreas Spiess Thanks to you!! 🙏🙏We get to see some amazing stuffs on your channel. You make it lot easy for hobbyists/electronic enthusiasts to make the right choice of components for their projects and also reduce the hurdle of setting up some of the components which otherwise would be tedious for most beginners like me. What amazes me is you walk into such great lengths in deducing/deciphering the components and explaining them, making it easy for the viewers to make the right choices. I can only imagine the amount of hardwork and dedication that has gone into each of your videos. Respect and total support ✊
Your videos are very information dense. Other channels have alot of fluff and covey far less in more time. Thanks for doing what you do in the manner you do
Very helpful. I just got a F411 working with micropython 2 days ago. REPL for the win! No proprietary cube programmer tracker/spyware needed. I'm on Fedora Silverblue as well. So the toolchain is completely sandboxed, containerized, and independent of my OS. It will never break from Mr. Bill looking through my Windows and deciding to close his Gates. I used the micropython and mcauser github repos. I only needed the USB connection to the DFU bootloader for programming. The only hiccup I had was solved by reading the ../micropython/ports/stm32/README and using the suggested dfu-util (from Linux repos) instead of the utility packaged with micropython. This was probably due to the fact the user space I am running in is rootless. With Silverblue, a udev device rule needs to have permissions set to mode 0666 for the specific device while programming. Just having the user name added to the dialout group is not enough.
This is great! I've seen mention of a BlackPill 2.0 board based on the F411 chip by a company called WeAct. Supposedly micropython is supported on it through paltform.io? micropython seems the way forward, now that we have sufficient processing power. I'd love to see Andreas load up micropython on the F11 and the ESP32 and compare some real sensor-handling code!
@@cfeigel I haven't tried it with Platform IO yet. I can say, the python prompt works with a basic serial terminal emulator. I used sterm, a very simple terminal written recently in python 3. It's available with _pip install sterm_ and has easy to read and well commented source for hacking. I have also gotten as far as a connection to the onboard python prompt using PyCharm. I read a 2 page forum thread on μpy IDE options from 2018-19. The most recommended option there was the thonny.org IDE, PyCharm was a close second. PyCharm is available as a pre-containerized flatpak while thonny is not. Atom is also containerized, but it makes even more external IP calls than PyCharm. I whitelist firewall my workstation so I'm in control of most of my traffic. Punching holes in my firewall for an IDE is annoying. I probably won't use PyCharm either. I need to just suck it up and figure out the full jedi master Vim skilz
@@cfeigel Definitely use Thonny! I got it working in an isolated toolbox container with $ dnf install thonny. It's the easiest, cleanest, most functional embedded hardware IDE I've ever seen, intuitive too. No nonsense. BTW, if anyone does this F411 thing, be sure to get the W25Qxx flash sop8 memory chip you need. After installing μpy without the external flash there's only 45k of the 512k flash left. You need to set the configuration bits to put μpy in the flash chip and set the size of chip in the ../ports/stm32/boards/WEACT_F411CEU6/mpconfigboard.h file. Supported chips in the config file are the W25Q16, W25Q32, W25Q64, W25Q128, (2MB/4MB/8MB/16MB). There is not a setting available for the Q256, although the chip does exist. The W25Q128 can be purchased for around $2 for x5, shipped, on AliEx, yes, even now, to me, in California, a week ago (Sept 2020). Follow the μpy documentation to start and on the blackpill: >>> import pyb >>> pyb.LED(1).on() >>> pyb.LED(1).off() ((!)) mic drop
@@UpcycleElectronics Nice! Thanks for the tips! I'll have to give Thonny a try (in my copious free time). This has the makings of a nice How-To document!
Andreas I always appreciate your videos and I thank you for the clarity and seriousness of the contents. I am a professional user of STM32 and fortunately my work is also the hobby for which I use STM32 for my projects as well: I liked what he said about STM32 but I think those you say represent 10% of the STM ecosystem, very more complete and resourceful than what you say. I hope that this video will be followed by others to best represent a family of 1000+ components used in thousands of applications, from wearables to industrial controllers, from IOT to 3D printers. Good job!
I will not touch the commercial world and will stay with the Arduino IDE. This is a Maker channel and "Rapid Prototyping" is what we usually do. There are other platforms or channels for corporate education, I think. The second problem I see: If I would abandon Arduino IDE and join whatever other Ecosystem, I would lose 90% of my viewers because they would not like my decision :-( Too many other possibilities. Just read the comments in my "micropython" video. The only video I do not answer comments, BTW. Too many "fanboys"
Mr. Spiess I use the stm33f103c8t6 (blue pill) with the cheap clone stlink V2 debugger , my experience is positive. I faced no issues. Edit - I only use ARM Keil cause I like C.
It did not work with the CubeProgrammer, which is also used by the Arduino IDE. As said, it worked with PlatformIO. But in the meantime viewers pointed me in the direction of upgrading also the small programmers. And really I found one which was upgradeable. The first wo were not.
Thanks for another great video. I hope you will find the time in the future to test the power consumption for the stm32s, especially the L series boards.
Often it seems though that the problem is not so much the power consumption (in deep sleep at least) but the development boards having constantly on power LED's, serial to USB chips and non-LDO power regulators. One could think the STMicro boards for the low power STM's might have this thought out but I wouldn't bet on it.
Thanks for putting all of this information together, I always enjoy your videos. For a couple dollars more you could use a STM32F7 or H7.The F4 is rated 225 DMIPS while the F7 is 462 DMIPS and the H7 is 1177 DMIPS. They are more or less software compatible. So you get more than 5x the single/double integer performance of the F4. The H7 also has a double precision floating-point processor compared to single precision on the F4. The H7 NUCLEO board costs $29 for the official ST micro board. These will blow an ESP32 out of the water in single precision, double precision, or float.
Thanks for the info. I would not compare the H7 boards with the ESP. I would compare them with a Teensy. Then I assume they will be similar. Anyway, as said in the video: I have no usage for this power for the moment :-(
I'd like to offer another perspective as well. We used NXP chips for years in our product, but we were still considered low volume, a small company making just a few hundred pieces a year - NXP never ever contacted us ever. Later we thought of switching to STM32, even at the point of deciding which STM32 to use, ST sent out an FAE to help us choose and decide and sent us samples even though we are in Malaysia, the FAE helped us all the way. When we had doubts, they helped us check internally within their organisation which way was the best way to fix it. So to me, I really respect ST, they really make an effort.
Always interesting and useful. Thanks for the trip down memory lane: I learned FORTRAN on an IBM in high school (on punch cards) and did my computer science courses in college on a VAX.
Learned COBOL, Fortran, and BASIC on an NCR Century 101 in high school and programmed COBOL on an IBM 30xx series in the early 80's. Learned Pascal, C, C++, VB, VB.NET, C#.NET and have been using SQL Server since v6.5. Has been interesting IT evolve over the years.
5:47 Andreas, it is not fair to compare flash size with 3-4x more expensive ESP32. Compare it with Pro Mini or Nano which have 32k only. And 64k is not true because "genuine" bluepills have 128k. And they are cheaper than AVR Arduinos. A few months ago I purchased bunch of bluepills for $1.4 only. Perfect and cheaper AVR replacement. But cannot be compared to ESP8266/ESP32 - completely different applications. MCUs are not computers. Typical electronics engineer will not compare MIPS but rather number of SPI, I2C, CAN buses, speed of SPI/I2C, number of ADCs, general purpose IOs, lowpower modes, etc.
I do no more use a lot of Atmel chips for my projects. So I was not interested too much in this comparison. I agree with your remark on IO instead of MIPS. Last time I used IO operations in my benchmark and was criticized. Now I used MIPS and am criticized again ;-) I think that the Dhrystone benchmark has a good relation with typical programs using I/O and logic. I checked my Bluepills and the cube programmer only showed 64k. So I was probably unlucky.
@@AndreasSpiess I still use Pro Mini in some projects because of ... its size. I miss STM32 or ESP equivalent, less pins but smaller size (I know that there are small STM8 boards). And the price matters. If it didn't I could use expensive RPi or OrangePi for all projects :) I'm not criticizing you, but such comparizon WiFi chip vs no-Wifi has no sense. There is no the best solution. Everything depends on what you want to do.
@@AndreasSpiess If you have bluepill with original STM chip - it has 128k, if it is Chinese fake "CKS" it probably has 64k. How to check it. In Arduino IDE there are 2 options - 64 and 128k, long enough sketch crashes on real 64k.
To answer one of the last questions, teensy products (from 3.2 serie) is especially design for real time audio processing. For complex applications like quality reverb, vocoder or time/buffer based effects it requier lot of power. Then the add-on for arduino IDE "teensyduino" inclued lots of usefull libraries, like compliant MidiUSB and HID (keyboard / mouse / joystick / raw hid emulation) and a powerfull audio library with synthesizer patching tool in visual on-line editor, effects, samples manipulation (from on board sd card reader or rom)... As a digital artist, it's my prefered developpement boards for simplicity, power and good support (the developpers oftently answer you in person on the dedicated forum). But simplicity have a (little more) cost, so if you're not affraid and need lot of power in a small factor form, just go teensy!
My opinion: Blue Pills with an original STM32 processor work very well and I wholly recommend them for small to normal projects. But I program all of my STM32 using an ST-Link (the small ones, which can also be updated by the same procedure you showed). You can even modify the ST-Links to expose the SWDIO pin (which isn‘t really needed but you can do it...). You can even use FreeRTOS on a Blue Pill (only 2 tasks and a queue, but it works). With the larger ones FreeRTOS is a very nice way to structure your code. For bigger projects though the STM32F4 processors are definitely the right choice. And I mainly use STM32CubeIDE for development which I can also recommend. And thank you for another very good video, Andreas.
Thanks for sharing your experience. How do you deal with sensors (libraries) on with the CubeISE? And: After other comments, I found a third small programmer and this one was updateable. So I have 2 which cannot be updated and one which worked...
Andreas Spiess I first look here: stm32f4-discovery.net/, the author is employee of ST. Then I search whether somebody else has solved my problem and the fallback is to look in the STM32Duino project and Roger Clark‘s github repo.
During 1990 I tried to impress my girlfriend at the time and show her the various mainframe systems for the OEM computer company I was employed at.... at 2:00am in the morning. During normal working hours I had access to the computer room, but explaining to the company director what I was doing in the computer room at 2am might have proved difficult. . At the point my girlfriend and I returned to my car in the company carpark to depart which technically was "unauthorised access " a security guard arrived in his patrol car and very quickly entered the building to see what triggered the alarm system and fortunately for us did not see us in the carpark, so we were able to disappear unnoticed. . I wasn't aware that 24/7 computer room alarm monitoring service was installed as my access was normally during working hours. . I was an "idiot" logged in as "root" at 2:00am trying to impress my girlfriend and the company never found out what really occurred. . I had no malicious intentions as all I was trying to do was impress a lady who I was dating.
I’m glad you included Teensy at the end. For projects using sound they are very good, supporting I2S. And the add-on IDE is very easy to use. I was a PDP11 person, VAXes are a bit too modern!
So you started probably a little earlier than me... We had a PDP11 at my first job. But when I worked with DEC it was the high time of VAX... The Teensy seems to be a well maintained product and the upload worked flawlessly, you are right.
I think the add on IDE (for audio) only works for Teensy 3.x boards. I wanted to try some of that and bought a Teensy 4.1 only to notice this in the documentation after the fact. Teensy boards are quite expensive to buy from the Europe. I bought mine from The Pi Hut in UK, it was 29€. Wouldn't have bought unless I had other stuff for the same shipping cost.
Ristomatti Airo Thanks for highlighting the audio question about Teensy 4.x. As you say the documentation for the audio IDE tool is all about 3.x, but lots of talk in their forums about audio on the 4.x - confusing! Apparently 4.x doesn’t have a built-in DAC so that may limit it’s use unless you add an external DAC.
Two years ago, I ported OnStep, an open source telescope controller to the STM32F1. I used the Blue Pill, since it was cheap (US $2) and available from multiple sources (Amazon, eBay, AliExpress), unlike the Teensy at the time. The Blue Pills always came with 128K which is about enough for OnStep. Both STM32 and CKS chips worked perfectly with no issues for about a year and a half. Over 350 people built OnStep controllers based on the PCB I co-designed for the Blue Pill. We program the Blue Pill using PA9/PA10 and a USB to TTL adapter (FTDI, CP2102, CHG340). However, in the past few months we saw Blue Pills with only 64K and OnStep would not run. No idea what the issue is. It is impossible to guarantee that a Blue Pill has 128K before testing it, so this confuses users. We are looking into alternatives, including the Black Pill. I also ported OnStep to the STM32F4, and since we use stepper motors for it, I used a ready made 3D printer board (FYSETC S6 in this case). I program it using DFU without any issues.
@@AndreasSpiess It is definitely Arduino based. My github is just a fork of the main project, and not kept up to date, just when I have features and code changes. The project Wiki is here onstep.groups.io/g/main/wiki/3884 The Blue Pill is only one low cost platform that can run it. groups.io/g/onstep/wiki/STM32F103-Blue-Pill You will also find videos in my playlist for the project th-cam.com/video/tgzy1bFrGBc/w-d-xo.html Oh, and thank you for your videos. I learn a lot from them, and loved the 1970s memories. My memories on computers are from the early 80s!
Many Blue Pill boards have an incorrect resistor connected to USB which will cause many USB controllers to reject them. Even with the clone chips you should be able to get USB working if you replace the resistor with the correct value. But I agree, you should probably not buy Blue Pill boards.
Having the option of using an ST-LINK which enables debugging, USB bootloader is a big no for me. Also I use the cheap ST-LINK v2 without any problems. But I code using STM32CubeIDE, which is ST's official development environment, it is very good
The video comes out right when we are starting to learn about programming cortex M0's that must such a coincidence lool. Great video tho! Your channel is one of the best when learning about mcu's and rf stuff!
8:30 - I am really confused about the thing about that board being 'dual use'. I had a quick look at the datasheet etc. Nothing on there jumped out at me saying that it was particularly specialised for military applications. I find myself thinking, though, that almost anything is theoretically 'dual use'.
Excellent video! . The information re. ST-LINK was/is priceless. I had already bought two cheap ST-LINKs and blue pills on Aliexpress, so you saved me a lot of frustration when I would get around to them. . Re. IBM 360. I know the architecture very well. If "Interdata" or "Perkin Elmer" or "Concurrent Computer Corporation" (which were subsequent name changes) mean anything to you then you would know they were real time systems based on IBM 360 architecture. . It was called IBM 360 because there are 360 degrees in a circle, therefore "all round". In other words "All Round Solution" Clever hey! . I miss the old days!
Re ST-Links: It seems that some of the small programmers can be upgraded, too (1 out of three in my case). Re IBM360: I did not know that. These mainframes were our main enemy when I worked for DEC ;-) . And I remember "Perkin Elmer", for sure.
@@a1nelson I honestly have to tell you that this was classroom "hearsay". Several years ago (30?) I attended an IBM 360 architecture training course and this is what the instructor said. I would need to do more research to confirm if this is true. . . After further "Google research" I can confirm that the "IBM 360" had this name because 360 degrees means "all round", therefore "All Round Solution".
@@jackhoffman6120 Cool. I haven't been in the game quite long enough to have used a 360, but we did purchase a beefy AS/400 when they were the new hotness. Thanks for the history lesson and your research. I did develop a bit of software for DEC equipment way back in the day, but that's now so far back that I'm not even sure I could still do it. Haha
@@a1nelson As a student in the early 80s I wrote an entire unprotected (memory management was not used and reserved instructions enabled) operating system for a PDP-11 which conceptually was the same as MS-DOS (not Unix). The course tittle was "computer hardware" which required students to develop device drivers for various hardware elements of the PDP-11. By the time we got to the final project we had a "terminal driver" a "floppy disk driver" a "printer driver" and a very basic file system. The teachers were very clever because they didn't state in the curriculum that we would be developing an operating system, but only on completion of the course did I realise that I developed something as crappy (less refined) as MS-DOS. Did you know that Motorola 68K architecture was identical to DECs PDP-11? The instruction set is identical. Many systems were "clones" of others. Wang's VS was a copy of IBM's 370. Many of the leading design engineers would develop technology for one OEM and then move on to another OEM and develop technology based on the same ideas, so sometimes you could see trends occurring in the industry.
I too started with IBM360 in the 70's and also now marvel at the size, power & cost of Teensy4.1 Esp32 and Pi zero etc. Imagine what we will be impressed with in another 10 or 20 years :-)
The square, black STM32F407 boards shown early in the video are my favorite STM32 option. They come with a header for the very inexpensive and popular NRF wireless boards. You can just plug it right in and start writing code. That combination doesn't provide functionality that's directly equivalent to the ESP modules, but for many applications, it's cheap, effective and super easy to work with.
Yes. The final question: what is the application of very fast microcontrollers is a good one. I am sure they have many uses for commercial products. But as a hobbyist, I rarely find that low performance is a limitation for what I want.
I know. I just did not see boards on AliExpress with these chips. And no Wi-Fi lib for the Arduino. So for the moment they are not very useful for me...
If you break off the st-link from one of the nucleo boards, you can use it for other boards and also still connect it to the board you broke it off from.
Hi Andrea, Thanks for this complementary video. One thing is not right: I program these boards with a cheap STLink v2. I don't remember if I had to upgrade the firmware. Also one bad point regarding the STM32 is what you experimented: things stop working, board not correctly enumerated under windows even though you finger dance with the buttons and also the Arduino core STM32 is a work in progress. I also focus on STM32F401 chip now because it is much more performing then the STM32F103. But you can find blue pills with 128 kb flash (STM32F103CBT6). Apparently most actual blue pills have this chip. And since the bluepill is well known it is still interesting even though much less performing.
I tried now another one and it was updateable. Two were not and the third worked... So I would still be cautious because I did not know which one I get when I ordered.
@@AndreasSpiess Isn't it related to the firmware version? www.st.com/resource/en/release_note/dm00107009-firmware-upgrade-for-stlink-stlinkv2-stlinkv21-and-stlinkv3-boards-stmicroelectronics.pdf
In the meantime I was able to program all of them. I had to unplug and re-plug the sticks till they were upgradeable. I created a comment and pinned it so everybody sees it.
In the early 2000s i used to work at the university of alabama in their surplus warehouse, refurbishing and processing electronics and computer equipment so they could dispose of it, sell it, or reuse it. We would every so often get a 'mini' vax. About the size of a refrigerator.
Firmware guy here as my day job working on STM32 H7 and G0, alongside a ESP32 . Also home hobby guy, formerly on Arduino but now on ESP8266, 8285 and ESP32. Biggest issue I find for the ESP32 in commercial products is the immaturity of the IDF. It's constantly changing and has bugfixes almost daily. It makes developing a product on it a monumental pain in the bum. STM32 doesn't have this issue but the manufacturer hardware code is considerably more simple in terms of just am API to the hardware, not great for hobbyists. The ESP IDF has full working source code and projects, so much better for hobbyists. I love both to be honest, I have a soft spot for the ESPs, I really like them. Never used them in the Arduino environment though, in fact I've not used the Arduino IDE for many years
You are right. I can imagine that a stable development system is a big part of a business decision. Fur us Makers the "rapid prototyping" aspect is probably a bit more important...
@@AndreasSpiess Indeed. It is a nightmare when the boss says you want the new feature that's just been announced, so you update the API and everything else breaks because it is so fluid! On the other hand, for my home hobby projects it is awesome!
The early revisions of the chinese bluepills have an error in the design; there is a resistor with the wrong value. The result is the USB implementation is out of spec and unreliable. Depend on the PC's USB host controller and a couple other factors it may work fine, may work unreliably, or may fail entirely. There is a newer revision of the board that has the same STM32F103, but fixes the resistor value (and IIRC removes the 32.768kHz crystal used by the RTC). The new revision is on a black PCB so was often called the blackpill, which is just confusing with the new STM32F411 based boards also being called blackpills. You can replace the resistor on the original bluepill boards to fix the USB, but as you've probably figured out SWD is better anyways.
I read about the wrong resistors. So I checked all my boards and I was fortunate. Nothing to change. But all of them are blue. My Blackpills also had the right chips.
TIP for ST Nucleo users on W10:I made the mistake of connecting the "Nucleo 32 L432KC" board without having first installed the drivers of the "STlink-2". Now the Microsoft default drivers have been installed and even though the card is seen as a disk, I can't program it. I can't even delete the Microsoft drivers, since they reinstall themselves automatically. It's important to install first the driver and after you can connect the boards to avoid this. Andreas thank you for great contents.
@@AndreasSpiess I managed to solve by installing the drivers through the installation of STM32CubeIDE, after which I updated the firmware of the ST-LINK from: STM32CubeIDE> HELP> ST-LINK Upgrade.
This video came in a good moment for me because, my blue pills arrived this week and I spent a big amount of hours trying to program the USB bootloader int it, I get it working using Caleb Marting instructions, every others I tried didn't work for me, but I am waiting my st-link arrive to forget the USB for blue pill it is a strange manner to program a chip, every time you program the virtual com port goes out and get back again a great nonsense, at least for me. Thank you Andreas for this great video...
The board you show at 7:52 has an STlink that can be broken off the main board. That’s what I did and I use that STlink to program my bluepills with the Arduino IDE. This STlink has a number of pins to the right hand side of the usb connector and I use three of them for programming the bluepills..
I use only F7 chips when I build drones (even the f4 chips are getting dropped from several drone software projects because of flash and CPU limitations). One reason is I can run the IMU at much higher update speeds making for a much more stable and responsive drone. I also recently got a Color Maximite 2 which uses a Waveshare CoreH743I at its heart (480Mhz) and has a graphics accelerator. The F7 boards are not that much more expensive and provide another jump in performance over the F4's. I'm building a Micropython equivalent of the Color Maximite 2 and really enjoy working with the F7 series. Regarding the Teesny I use mine to update a RGB matrix board without flicker. I tried a ESP32 and can get it to work but had to do extra coding to reduce flicker. That was with a Teensy 3.1 board.
Thank you for sharing your experience. Not many people commented that they use the F7/H7 chips. But I agree. The boards are cheap compared with the smaller ones.
The Nucleo boards all have the built-in ST-Link V2 part, which does make it easier. The ST-Link part can be separated from the Nucleo part, and the ST-Link part can be used as a full ST-Link programmer/debugger on other STM boards that don't have an ST-Link, like the blue pills. It's an added value if you get at least a couple of the Nucleo boards at the beginning, even if you use other STM32 chips. The Nucleo boards can still be used with the separated ST-Link part, or with an actual ST-Link, just using a few jumper wires.
Yes, you are right and this seems to be the idea. I probably still would spend the few dollars for a debugger in a case. Because it is nicer looking...
Hey, You might as well use the CubeIDE to test the faster F7 (and maybe even H7) if they're not supported by the Arduino IDE. It's really quite simple, eclipse based IDE.
My problem was not the IDE when I looked at it. It was the completely different naming... And STM is not my main platform. Most of my projects still need WiFi
wanted to write about the same. I knew Arduino and PlatfoemIO. When I first looked at STM32s I tried Arduino and failed, tried PlatformIO and failed. Tried CubeIDE / CubeMX and had it blinking within an hour. All chips supported, not just some selected boards. Now I have a coin cell lora node that should run much longer than my ATTiny based node.
Thanks for your videos, in case you put an experimental experience regarding sdi12 sensors using stm32 it would be so helpful for many people, as there is no existing sdi12 sensor library for stm32 which easily cold be used.
Great comparison; I think also that ESP32 is more interesting than STM32f4 series for the main reason of Wifi. but, by far, Stm32F7 and H7 series are more powerful compared to ESP32 ; some of them include two cores, and they have a lot of capabilities and powerful functionalities.
When I was younger I worked for a tpm for digital equipment material, I can’t believe that the enormous Vax780 is so slow compared with a esp32 :) Very nice materials in any case, than I worked for Sony for almost 30 years, and now I’m unoccupied! :(
15:53 Still used for such purposes today :) TH-camr Martian Colonist (British phd in astronomy) talks about that in one of his videos. BTW not that long ago NASA was looking for fortran developer to make some changes in Voyagers probes. Can you imagine debugging with 19h ping?
If you know old languages of old frameworks you can earn quite some money, if they find you. And I hope they still have a mockup or test system around in Huston for debugging. Otherwise this would be a lazy job... When I started with Fortran I also had to wait sometimes hours for the output and we used our brains to avoid errors as much as possible. So maybe somebody knowing Fortran still works in this way...
@@AndreasSpiess Indeed, I was also allowed just 3 compilation a day: early morning, at lunch time and at the end of the day. And this was only possibly if you occasionally brought flowers or chocolates to the girls in charge of typing the punched cards. I now feel like a war veteran speaking endlessly of the old battles (and his young age). 😉
@@AndreasSpiess Yes, I always try to have it right the first time... I am indeed from the no debugger time ha! I looked a week for a missing hash... A9 #00 is load zero with no hashtag that was load it from address 00 which was random at start up... (6502)
Great video ! A request: show us an easy tutorial: a nanosecond timer with maybe powerful MCU .A trigger that switch on a device and a pin maybe analog with a threshold (512) that stops the timer . The time period last less than 50 nanoseconds.
@@AndreasSpiess ok i will search your info, but TOF use mcu and laser-infrared to measure ? or other way?IF so can i build to reverse way ,to measure the speed of light with distance and time?
I do embedded stuff for a living and the majority of gigs are on STM32 (of some sort). I use the STM32 System Workbench IDE (eclipse based) with CubeMX, or (better) Segger Embedded Studio. They're a very reliable choice and don't tend to have availability issues, never really had any serious unexpected problems, and - big win for the CubeMX addon for System Workbench, it's easy to migrate between devices when we decide we actually _do_ need CAN or whatever on a project;; the CubeMX code generation thing is pretty great for that.
Thank you for sharing your experience. For professional development these are probably good decisions. This channel is for Makers, where we do "rapid prototyping". This is why a lot of us use the Arduino IDE. Most of us anyway use ESPs as their main platform.
My Uni in Canada had two VAX 11/780s and they easily supported a hundred terminals. Not great raw power, but great I/O. When I didn't want to walk to the computing centre through a blizzard, I dialed into the DEC maintenance modem with my TRS-80 Model 3. Ssh - don't tell anyone!
So I have been working through all my microcontrollers to get them working with PlatformIO. It occurred to me the reason I sometimes blew up a Bluepills bootloader was caused by using wrong programming settings when switching between microcontrollers in the Arduino IDE (so many settings!). PlatformIO effectively makes that problem go away. To be honest I am reminded how fabulous and Arduino Uno like the Bluepills is with a bootloader installed. On the flipside dealing with the Blackpill has been a total pain to work with, I can't say I am loving it yet..
@@AndreasSpiess I got it to work, it turned out mostly to be some weird problem related to an old USB-3 port on my PC. First I tried to use the built-in WeAct bootloader.. but that is garbage. Now I am using DFU which works but is a pain pressing the button to program everytime. Also entering DFU mode is a bit flakey.. I would say that is the strength of the Bluepills HID bootloader as it behaves just like an Uno. Got my first ESP32 with USB-C yesterday, looks pretty nice but physically larger than I expected. At first it would not program without pressing the boot button, But I found a cheat of adding a 10uf cap on the EN pin that solved that. Loaded a little web server test program and connected it to my WiFi, overall a smooth experience.
The stlink clones have another neat trick: their swd pins are usually accessible if you take them apart, which makes them suitable for turning into a variety of small USB projects in a nice case. (Eg they can become a gpg key with Gnuk) There are also other debugger cores that can be installed on them. Their internals vary widely, though, so if you find one you like, buy more from that vendor. I recently bought a batch that ended up having tvs (transient/esd) protection on all the pins, wow!
14:46 This method never fails with Keil uVision (I used that for months when writing my masters thesis) nor with STM32Cube IDE (didn't existed back then). Frankly Arduino IDE ...eh, isn't my favourite.
I stick to the Arduino IDE on this channel because, if I would change, I would have 10 possibilities to go. And with all possibilities I would lose 90% of my viewers because they think I did the wrong decision ;-)
Great video! What do you think of the STM32 nucleo boards in combination with their HAL (hardware abstraction layer), which can be created with STM32CubeMX and the STM32CubeIDE (Eclipse C with integrated CubeMX)? It is more like classical programming in C rather than using the Arduino libraries but should be easier to use for standard-tasks than writing custom function handlers.
The st-link is now also available as version 3.0 for around a year. It has better speed, more capability can debug multiple serial signals but by default the big cable from the v2 is not included anymore.
It sounds as if our careers have some parallels. In the mid 1960s I taught myself Fortran from the programmer's manual and was running it on a 360/30. With a different company, we were using VAX 11/780 in around 1980
I was probably a little later. In the 1960 I was still too young for programming... I started in hte 1970 and around 1979 I had my first home computer (TRS-80).
I learned FORTRAN on an IBM 360 that used 80-column punch cards. To gain access to the university's 360 I had to take an upper level programming class. The professor just walked in, gave the required assignment to pass the class, and walked out. We did not see him again until the end of the semester. I use my Teensy 4.1 for "special" high speed aerospace data collection and control projects. I have not used it as much as I would like due to support and knowledge issues. If I run into a problem, I revert back to an STM32 or SAMD21. I need to collect data and not resolve hardware or software issues.
This was a real lazy teacher, I think. But it seems you found your way... Concerning support: Engineers are not known as the best documenters. Without some formal processes, documentation is always coming last... And sometimes never.
@@AndreasSpiess I did choose the class knowing the professor was lazy. In four weeks all in the class had completed the class requirements. That gave me ten weeks of access to the IBM 360 to run my aerospace and rocket propulsion programs. Yes, I developed bad programming habits that were not corrected until I worked with a great consultant, Carl Todd; he showed me a better method of subroutine programming. I also had to document everything for Carl's approval. Now, I fly the equivalent of an IBM 360 in my model rockets. Keep the videos coming. I do enjoy them. I'm currently working on projects utilizing the ESP8266.
Fortran and VAX bring old memories, like the punched cards and paper stripes. Each byte was counted and was optimized. Actually, count of bytes was more important than human time, while now programmers' time costs more. Same thing is with chip design today - use of high level languages and compiler, rather looking at every gate and flipflop. This allows us to use amazingly fast small controllers.
@@AndreasSpiess Agree! Perhaps we are all open minded about changing things our parents used to do, but very conservative about what we are used to. I did many projects with Arduino (Nano mostly), and gladly moved to ESP32, and now to Wemos mini - a whole new world. A whole new world. Yet I still keep many Nano's boards. Just in case......
This video cleared up so much confusion for me. Thanks! Are the Black Pill boot loaders located in a protected area of the flash where it does not get erased when larger scripts are written to it or if I set all flash bits to 0? Also, would love a video on the STM8.
That's why I switched from Arduino to STM development environment a couple of years ago. STM also has a code generator environment; don't need much coding.
I really wanted to use the teensy 4.1 for one of my projects but unfortunetly the suport isn't there! The datasheet has a bunch of marketing points and since it's a new board there aren't many people posting about how to use it. Perhaps you can make a video about it?
It is the job of those (non-sense) companies to release proper support documents, not Andreas. They have budget for marketing but not for documentation? Give me a break!!
Inline debugging: an absolute *must* have. Nice for hobbyists that for STM32 the cheapest $6 ST-LINK knock-off (like mine) works fine for this. TIL that the official ST-LINK is better for programming within Arduino environment, also good to know.
Great video, thanks! Ive had some good success with the WeAct BluePill-Plus and the supplied stm32duino compatible usb bootloader, had to use a ST-Link v2 to flash the bootloader without any problems.. it seems that WeAct is the same company that made the BlackPill..
Yeah, the Teensy ecosystem is amazing. I've not really played with the 4.x yet. But the 3.x line are fantastic. With the Snooze library, power consumption excellent. The audio GUI from PJRC is great. The forums & support are great. Only downsides I'm aware of are some people don't like anything closed source (the HalfKay bootloader & MKL02/MKL02 are required to program various Teensy's) and on that basis... I hope there are contingency plans to keep it going if anything ever happened to Paul (though I really hope nothing ever does of course!).
Thank you very much for the really good video. Could you do a comparison or projects with K210 chips as well? These emerging buggers and the topic of "edge computing" and AI inference are somewhat missing on this channel which is a bit sad. Keep up the excellent work. 👌
Everything AI/ML is still typically expensive and more or less vendor specific. It's also a very big rabbit hole to dive in. So is SDR/RF stuff which has been a topic several times but I assume it's because of Andreas' prior experience on the area. As an example, during the summer I bought a Jetson Nano to use it for IP camera object detection together with Node-RED. Eventually got it to work as I wanted but it was a lot of work. Countless hours of googling, waiting hours of library compilation, learning a little Python and in the end I still knew only the most basic terminology and had pretty much no idea what I was doing (just modifying example code). With that said, the edge computing stuff is an interesting topic. I just think we'll have to wait until it gets more mature tech with community maintained tools and easy to use abstraction libraries before we see any of it on this channel. This is just my opinion of course, Andreas is full of surprises! Do you happen to know of some hobbyist cheap solution that fits the criteria already existing?
BTW I had never heard of K210 and googled it a bit. Is this something you were talking about www.seeedstudio.com/Grove-AI-HAT-for-Edge-Computing-p-4026.html? I agree that's not prohibitely expensive. Didn't yet read of the potential applications but will now.
Ristomatti Airo Yes, this is what I was taking about. Google for MAIXbit and MAIXduino for example or for Huskylens to get an impression of what is possible. The boards are generally not more extensive than those of the ESP32 kind but they have way more power under the hood and can do some impressive stuff. This brings some fresh air to the work bench 😉
Seriously ! Very interesting video about comparison with different boards, specs, interesting information .. I liked the how is the effectiveness of the STM32 memories compared with the larger ones in ESP32, because of the RTOS and wifi background running in ESP32. But is it that the ESP32 would be more beneficial compared to STM32 in wifi applications because of the builtin wifi ?
The man with the Swiss accent does it again - another video of really useful information and comparisons. Thanks Andreas.
My pleasure!
No, he is : ' The " guy " with the Swiss' accent '. ;)
@@eddybash1342 I have different speakers on my computer...
@@MiniLuv-1984 yeah, I am so happy for you ! ;)
you prolly dont care but does someone know a tool to get back into an instagram account?
I stupidly lost the password. I love any assistance you can offer me.
Great having a silverback expert to listen to about the latest tech - as he can relate it to the legacy gear of the 60s and 70s. As someone a similar level of chronological endurance as Andreas, I encountered some of the items mentioned in the 70s.
At University I did Fortran programming via punch cards - one 80 char line per card; don't drop your card stack and get them out of order.
We had Digital Equipment Corp computers - though not their VAX line, rather the earlier PDP-11 which were accessed via hardcopy terminals (and a very few dumb terminals with VDU, cutting edge for the time).
The oldest input method I worked with was having to submit code via paper tape, 7-hole type (so 7-bit) prepared on a teletype which had a keyboard, paper tape punch and tape reader. Like Telex but with full ASCII character set (Telex is 5-bit).
That was painful - to correct just one error the old paper tape was copied to a new one up to the bad line, you type in the new line, and copy the rest of the tape.
I also used the Teletypes as a primitive word processor to generate newsletters onto Gestetner stencils for printing newsletters for a club (photocopying still rather expensive).
And who knows what a Gestetner stencil is?
Yea, during those days quality of typing and programming was on a different level because the limit was compute power. Today, the bottleneck is our time and no more computers. So our behavior is adapted...
This part I need to "borrow":
" a similar level of chronological endurance"
Since my first "computer" was an MEX6800D2 ....
@@AndreasSpiess yep, my friend and I developed a complete monitor and in-line assembler for MC146805, in 2K , using a ksr-33 as our "user interface", and sold the evaluation board in quite a few countries, as we actually beat Motorola in getting the eval board for MC146805 to the market. The "good old days" ;-)
I remembered that era. The IBM printer was huge, and open itself up automatically when it ran out of paper; graduated in '72. Feels like another life technologically.
that windows usb disconnect sound 12:57 left me scrambling by checking all usb port
:-))
you get what you deserve by running windows.
I was copying a really big file from my PC to HDD. 😅😅 mini heartattack.
I've only watched the introduction, and already in awe of your ability to get this work done! And, additionally, how responsive you are to viewer input... Respekt!
Now this answer took two days. But there were so many comments. An TH-cam sorts the wrong way round :-(
This guy is setting some high standards! Thanks for doing all of this for the community.
You are welcome! If we do it, we do it right (learned from my father ;-)
The small ST-Link sticks seem also be upgradeable if you try hard and plug- and unplug them several times. Quite a few viewers helped me to get the job done. Thank you!
Thanx, i wil try this.
Bluepills that come with the genuine ST chips are all 128K (yes the datasheet states 64) and can be overclocked to 128MHz. The usual problem with those is a wrong resistor (R10) that prevents some usb controllers from enumerating the device and awful USB micro connectors (like the one you got). Spent quite some time trying to find the problem when the issue was a bad connector. The stlink adapters (with 128K flash) or any stm32 for that matter can be flashed with "Black Magic Probe" firmware. That gives you another virtual serial port that you can connect to RX/TX of target micro, which simplifies the monitoring since there is only BMP connected to the computer. BMP also has support for TRACESWO so that is another added benefit.
One should remember and take into account when comparing ESP32 is that you have 2 cores both running 240MHZ. The rest just have one.
you _can_ debug an Arduino UNO using PlatformIO. I don't know if they changed something recently, but it works fine. I don't know why anyone with an ounce of embedded experience would use the Arduino IDE instead of PlatformIO for anything.
I encountered the same issues with my cheap ST-Link clone. Unplugging it at the right moment allowed me with upgrade it. I was also able to use it for programming through the Arduino IDE.
Wow! Just uploaded! Watching it because it's Uncle Andreas testing my favorite boards!
I've started using Bluepills now, and wonder why I wasn't using them before. Amazing microcontrollers with lots of customization options.
True. And the Blackpills offer even more...
@@AndreasSpiess Haven't used Blackspills yet, but gotta test them soon! So much improvement over the previous boards.
This was a large undertaking. You did a great job. Who could even speculate that in 2020 makers would have access to these type of chips to program and make awesome things with.
True. And I love it!
Oh, a correction: The bluepills (and pretty much all STM32's) do have a built in bootloader. They have a serial bootloader that is burned in the silicon itself and can be selected with the boot jumpers. They actually have 3 different bootloader slots, but the USB requires flashing and doesn't come installed by default.
I did not know about a serial bootloader. Maybe I did not find a lot of information about it because using SWD instead of Serial has lots of advantages.
@@AndreasSpiess Indeed. SWD is so much better. And that also highlights that limited documentation targeted at hobbyists might be one of the biggest stumbling blocks for these STM32 boards right now.
Second that.. All of Bluepills I ordered (2+ years ago) from China came with bootloader installed.
I had a maple mini that got stuck in DFU mode and kept the last code I uploaded to it until it cracked while I was installing/uinstalling different USB drives in hope to get it to respond to Arduino IDE. And of course bought other maple minis.
@@circadianrebel Maybe these people can't use google or the STMicro own search bar or don't know what an application note is?
AN3155: USART protocol used in the STM32 bootloader
AN4657: STM32 in-application programming (IAP) using the USART
Also it is a shame that people think a "bootloader" is a development tool. Thank you Arduino... Instead a bootloader is a tool to provide updates to an end-user or to ease in-circuit flashing and .... yes, for development, too. But that is not its main purpose. What you do when using a bootloader on the STM32 platform is in fact that you block your way to (easy) access the USB-Stack and waste the opportunity of rich debugging. I really can't understand this with 3$ ST-Link clones out there in the wild or the ability to use a second Blue-Pill as full blown ST-Link v2 Programmer.
Please excuse the rant (not directed at you), I had to get this off my head:)
Bonus: AN3156 USB DFU protocol used in the STM32 bootloader - Lists chipfamilies with integrated USB Bootloader, no need to roll your own.
As always: RTFM :)
I was about to shout "include any Teensy 4.x in the benchmarks"... and at the end on the video you included it, as the surprise !!! AWESOME! as always I tell you, this was an awesome video as always!
We TH-camrs have to tell a story to stay interesting ;-)
To get the most out of the STM32 boards try using the STM32CubeMX and STM32CubeIDE development tools. Not as straightforward as the Arduino IDE but great for configuring all the hardware features
You are right. But I use the Arduino IDE on this channel. It has many advantages, for example that we can use it for different architectures. And it has libraries. And most of my viewers use it.
As you write, the cube environment is a very different world.... I had a short glimpse during the video production.
With the cube IDE it is very easy to configure pin functions , adc ,timer ...etc
@@farvezfarook3422 Sure, but it's a closed program and hard/impossible to get running on anything but a few OS versions and hardware configurations. You can, however, use STM32CubeMX (which is based on Java) and PlatformIO (which sadly also limited their OS/Hardware support in the last months) to get a similar feature set.
I've found CubeMX is useful for figuring out what configurations are possible without reading the datasheet cover to cover, but the code it generates is pretty marginal, and the STM32 HAL documentation isn't great either. Configuring USB endpoints with the code gen from Cube MX had me going in circles for a week of evenings as an experienced programmer; switched to libopencm3 and it was a breath of fresh air compared to the HAL 😅
@@StephenHoldaway But don't see a great tutorial on how to use libopencm3.
Hi Andreas, again an excellent video.
i didn't understand everything, not because you are not clear but because I am still learning. However, I looked the whole video till the very last second because I find it addictive and would like to become versatile in these technologies.
Being more or less of the same generation as you, I appreciated your jump in the past with which I am more comfortable.
Congratulations.
I have quite a few viewers of our age. This is why I sometimes do these jumps back in time... And it is also good for me to remember.
Do not forget: I had to learn all this stuff, too. My normal job is to build large ESP systems for big corporations... So it is possible!
I ordered some of the black pills to give them a spin. So far i mostly use arduinos, and AVR chips, but debugging through serial printing, or even just blinking leds is pretty annying, having a full live debugger support in vscode is going to be amazing if i get it to work. Your videos are constantly improving ee hobbyist life. I still frequently use the wire wrapping tool i got because of your video (never knew it even existed before) and love it.
We loved this project so much, that we featured it in this weeks episode of The Electromaker Show!
Thank you, also for your very nice words! I wish you all the best with your show. I am already a subscriber.
Excellent explanation and video, many THANKS. Hope you make more video about STM32 projects with Arduino IDE.
The STM32 did not get a lot of tracktion in the Maker community :-(
nice jumps into history, like that.
Me too. They are nice memories. And they come with a reason like that video...
Thanks!
Thank you for your support!
Thanks a lot for the awesome video, you have spent a lot of time to make all the comparisons and give us the results ready. Thanks again. By the way, the small hand is very funny.
You are welcome! And it seens this small hand has some "fans"...
I hadn't put the link together in my head that STMicro is so often used in commercial applications. Now we can see why -- relatively high power in a relatively inexpensive package! My old Arduinos might need some new buddies... Thanks for the video!
Glad it was helpful! And enjoy the new "buddies"
I may not understand a lot of things related to microcontrollers and electronics (Still trying. I am only a computer science graduate), but boy does he deliver every single time. Bam bam bam. 💥💥 💥 Andreas has to be one of the top rated quality content creator/reviewer on youtube that exist today.
Thank you for your nice words. I am glad you like my videos.
Andreas Spiess Thanks to you!! 🙏🙏We get to see some amazing stuffs on your channel. You make it lot easy for hobbyists/electronic enthusiasts to make the right choice of components for their projects and also reduce the hurdle of setting up some of the components which otherwise would be tedious for most beginners like me. What amazes me is you walk into such great lengths in deducing/deciphering the components and explaining them, making it easy for the viewers to make the right choices. I can only imagine the amount of hardwork and dedication that has gone into each of your videos. Respect and total support ✊
Woah!!! That tiny teensy is FAST 😯😯😯. I wasn't really expecting that big of a surprise! Looking forward to a dedicated video on it.
As I said: I have no use for that performance. So I also have no idea for a video :-(
@@AndreasSpiess 😕. Still, lived this nice video!
@@AndreasSpiess I think there should be something interesting for your radio hobby and teensy 4
github.com/DD4WH/Teensy-ConvolutionSDR
Your videos are very information dense. Other channels have alot of fluff and covey far less in more time. Thanks for doing what you do in the manner you do
Thank you for your nice words. I create my videos in a way I would also like them on other channels.
Very helpful.
I just got a F411 working with micropython 2 days ago. REPL for the win! No proprietary cube programmer tracker/spyware needed.
I'm on Fedora Silverblue as well. So the toolchain is completely sandboxed, containerized, and independent of my OS. It will never break from Mr. Bill looking through my Windows and deciding to close his Gates.
I used the micropython and mcauser github repos. I only needed the USB connection to the DFU bootloader for programming. The only hiccup I had was solved by reading the ../micropython/ports/stm32/README and using the suggested dfu-util (from Linux repos) instead of the utility packaged with micropython. This was probably due to the fact the user space I am running in is rootless.
With Silverblue, a udev device rule needs to have permissions set to mode 0666 for the specific device while programming. Just having the user name added to the dialout group is not enough.
This is great! I've seen mention of a BlackPill 2.0 board based on the F411 chip by a company called WeAct. Supposedly micropython is supported on it through paltform.io?
micropython seems the way forward, now that we have sufficient processing power. I'd love to see Andreas load up micropython on the F11 and the ESP32 and compare some real sensor-handling code!
@@cfeigel
I haven't tried it with Platform IO yet. I can say, the python prompt works with a basic serial terminal emulator. I used sterm, a very simple terminal written recently in python 3. It's available with _pip install sterm_ and has easy to read and well commented source for hacking. I have also gotten as far as a connection to the onboard python prompt using PyCharm. I read a 2 page forum thread on μpy IDE options from 2018-19. The most recommended option there was the thonny.org IDE, PyCharm was a close second.
PyCharm is available as a pre-containerized flatpak while thonny is not. Atom is also containerized, but it makes even more external IP calls than PyCharm. I whitelist firewall my workstation so I'm in control of most of my traffic. Punching holes in my firewall for an IDE is annoying.
I probably won't use PyCharm either. I need to just suck it up and figure out the full jedi master Vim skilz
@@cfeigel
Definitely use Thonny! I got it working in an isolated toolbox container with $ dnf install thonny. It's the easiest, cleanest, most functional embedded hardware IDE I've ever seen, intuitive too. No nonsense.
BTW, if anyone does this F411 thing, be sure to get the W25Qxx flash sop8 memory chip you need. After installing μpy without the external flash there's only 45k of the 512k flash left.
You need to set the configuration bits to put μpy in the flash chip and set the size of chip in the ../ports/stm32/boards/WEACT_F411CEU6/mpconfigboard.h file. Supported chips in the config file are the W25Q16, W25Q32, W25Q64, W25Q128, (2MB/4MB/8MB/16MB). There is not a setting available for the Q256, although the chip does exist. The W25Q128 can be purchased for around $2 for x5, shipped, on AliEx, yes, even now, to me, in California, a week ago (Sept 2020).
Follow the μpy documentation to start and on the blackpill:
>>> import pyb
>>> pyb.LED(1).on()
>>> pyb.LED(1).off()
((!))
mic drop
@@UpcycleElectronics Nice! Thanks for the tips! I'll have to give Thonny a try (in my copious free time). This has the makings of a nice How-To document!
Andreas I always appreciate your videos and I thank you for the clarity and seriousness of the contents. I am a professional user of STM32 and fortunately my work is also the hobby for which I use STM32 for my projects as well: I liked what he said about STM32 but I think those you say represent 10% of the STM ecosystem, very more complete and resourceful than what you say. I hope that this video will be followed by others to best represent a family of 1000+ components used in thousands of applications, from wearables to industrial controllers, from IOT to 3D printers. Good job!
I will not touch the commercial world and will stay with the Arduino IDE. This is a Maker channel and "Rapid Prototyping" is what we usually do. There are other platforms or channels for corporate education, I think.
The second problem I see: If I would abandon Arduino IDE and join whatever other Ecosystem, I would lose 90% of my viewers because they would not like my decision :-( Too many other possibilities. Just read the comments in my "micropython" video. The only video I do not answer comments, BTW. Too many "fanboys"
Mr. Spiess I use the stm33f103c8t6 (blue pill) with the cheap clone stlink V2 debugger , my experience is positive. I faced no issues.
Edit - I only use ARM Keil cause I like C.
It did not work with the CubeProgrammer, which is also used by the Arduino IDE. As said, it worked with PlatformIO.
But in the meantime viewers pointed me in the direction of upgrading also the small programmers. And really I found one which was upgradeable. The first wo were not.
Thanks for another great video. I hope you will find the time in the future to test the power consumption for the stm32s, especially the L series boards.
Me too. They should be quite good.
Often it seems though that the problem is not so much the power consumption (in deep sleep at least) but the development boards having constantly on power LED's, serial to USB chips and non-LDO power regulators. One could think the STMicro boards for the low power STM's might have this thought out but I wouldn't bet on it.
Thanks for putting all of this information together, I always enjoy your videos. For a couple dollars more you could use a STM32F7 or H7.The F4 is rated 225 DMIPS while the F7 is 462 DMIPS and the H7 is 1177 DMIPS. They are more or less software compatible. So you get more than 5x the single/double integer performance of the F4. The H7 also has a double precision floating-point processor compared to single precision on the F4. The H7 NUCLEO board costs $29 for the official ST micro board. These will blow an ESP32 out of the water in single precision, double precision, or float.
Thanks for the info. I would not compare the H7 boards with the ESP. I would compare them with a Teensy. Then I assume they will be similar. Anyway, as said in the video: I have no usage for this power for the moment :-(
I'd like to offer another perspective as well. We used NXP chips for years in our product, but we were still considered low volume, a small company making just a few hundred pieces a year - NXP never ever contacted us ever. Later we thought of switching to STM32, even at the point of deciding which STM32 to use, ST sent out an FAE to help us choose and decide and sent us samples even though we are in Malaysia, the FAE helped us all the way. When we had doubts, they helped us check internally within their organisation which way was the best way to fix it. So to me, I really respect ST, they really make an effort.
Seems to be a good company. Thank you for sharing your experience!
Wow! You have organized an enormous amount of great information in this video. Many thanks from all of us!
Glad it was helpful!
I have the small ST-Link and works great on the Arduino IDE, I update the firmware on the STM32CubeProgrammer and everything works!
Great video!
You are right. I learned it from other viewers and tried all of my sticks. 1 of 3 was also upgradable...
Always interesting and useful. Thanks for the trip down memory lane: I learned FORTRAN on an IBM in high school (on punch cards) and did my computer science courses in college on a VAX.
There are quite a few viewers of our age with similar experience on this channel. At least according the many comments.
Learned COBOL, Fortran, and BASIC on an NCR Century 101 in high school and programmed COBOL on an IBM 30xx series in the early 80's. Learned Pascal, C, C++, VB, VB.NET, C#.NET and have been using SQL Server since v6.5. Has been interesting IT evolve over the years.
5:47 Andreas, it is not fair to compare flash size with 3-4x more expensive ESP32. Compare it with Pro Mini or Nano which have 32k only. And 64k is not true because "genuine" bluepills have 128k. And they are cheaper than AVR Arduinos. A few months ago I purchased bunch of bluepills for $1.4 only. Perfect and cheaper AVR replacement. But cannot be compared to ESP8266/ESP32 - completely different applications. MCUs are not computers. Typical electronics engineer will not compare MIPS but rather number of SPI, I2C, CAN buses, speed of SPI/I2C, number of ADCs, general purpose IOs, lowpower modes, etc.
Actually, the "genuine" C8T6 bluepills are 64k.
I do no more use a lot of Atmel chips for my projects. So I was not interested too much in this comparison.
I agree with your remark on IO instead of MIPS. Last time I used IO operations in my benchmark and was criticized. Now I used MIPS and am criticized again ;-) I think that the Dhrystone benchmark has a good relation with typical programs using I/O and logic.
I checked my Bluepills and the cube programmer only showed 64k. So I was probably unlucky.
@@AndreasSpiess I still use Pro Mini in some projects because of ... its size. I miss STM32 or ESP equivalent, less pins but smaller size (I know that there are small STM8 boards). And the price matters. If it didn't I could use expensive RPi or OrangePi for all projects :) I'm not criticizing you, but such comparizon WiFi chip vs no-Wifi has no sense. There is no the best solution. Everything depends on what you want to do.
@Philipp: How do you check tis fact? My Cube programmer showed 64k on all my newly purchased Bluepills.
@@AndreasSpiess If you have bluepill with original STM chip - it has 128k, if it is Chinese fake "CKS" it probably has 64k. How to check it. In Arduino IDE there are 2 options - 64 and 128k, long enough sketch crashes on real 64k.
To answer one of the last questions, teensy products (from 3.2 serie) is especially design for real time audio processing. For complex applications like quality reverb, vocoder or time/buffer based effects it requier lot of power. Then the add-on for arduino IDE "teensyduino" inclued lots of usefull libraries, like compliant MidiUSB and HID (keyboard / mouse / joystick / raw hid emulation) and a powerfull audio library with synthesizer patching tool in visual on-line editor, effects, samples manipulation (from on board sd card reader or rom)... As a digital artist, it's my prefered developpement boards for simplicity, power and good support (the developpers oftently answer you in person on the dedicated forum). But simplicity have a (little more) cost, so if you're not affraid and need lot of power in a small factor form, just go teensy!
Thank you for showing me some examples for the usage of this power.
My opinion: Blue Pills with an original STM32 processor work very well and I wholly recommend them for small to normal projects. But I program all of my STM32 using an ST-Link (the small ones, which can also be updated by the same procedure you showed). You can even modify the ST-Links to expose the SWDIO pin (which isn‘t really needed but you can do it...). You can even use FreeRTOS on a Blue Pill (only 2 tasks and a queue, but it works). With the larger ones FreeRTOS is a very nice way to structure your code. For bigger projects though the STM32F4 processors are definitely the right choice. And I mainly use STM32CubeIDE for development which I can also recommend.
And thank you for another very good video, Andreas.
Thanks for sharing your experience. How do you deal with sensors (libraries) on with the CubeISE?
And: After other comments, I found a third small programmer and this one was updateable. So I have 2 which cannot be updated and one which worked...
Andreas Spiess I first look here: stm32f4-discovery.net/, the author is employee of ST. Then I search whether somebody else has solved my problem and the fallback is to look in the STM32Duino project and Roger Clark‘s github repo.
So you can use "Arduino" libraries in a Cube project?
Andreas Spiess You can take the source and use it in your own project... -
Awesome episode, and quite extraordinary that you got access to tax authorities computers for student education at night, such trust at old times.
I agree. This would no more be possible today. Nobody would take this risk.
During 1990 I tried to impress my girlfriend at the time and show her the various mainframe systems for the OEM computer company I was employed at.... at 2:00am in the morning. During normal working hours I had access to the computer room, but explaining to the company director what I was doing in the computer room at 2am might have proved difficult.
.
At the point my girlfriend and I returned to my car in the company carpark to depart which technically was "unauthorised access " a security guard arrived in his patrol car and very quickly entered the building to see what triggered the alarm system and fortunately for us did not see us in the carpark, so we were able to disappear unnoticed.
.
I wasn't aware that 24/7 computer room alarm monitoring service was installed as my access was normally during working hours.
.
I was an "idiot" logged in as "root" at 2:00am trying to impress my girlfriend and the company never found out what really occurred.
.
I had no malicious intentions as all I was trying to do was impress a lady who I was dating.
I hope it helped ;-) We all did a lot but remember only the things we should not have done...
Same here. Asked to be locked into computer lab for nights to learn and program, but it was 90s and we had already IBMs.
Great video once again ! And Great for you to mention the History of Digital and the VAX machines, great times! Thanks once again for the video!
You are welcome! My history fitted well int this video...
I’m glad you included Teensy at the end. For projects using sound they are very good, supporting I2S. And the add-on IDE is very easy to use. I was a PDP11 person, VAXes are a bit too modern!
So you started probably a little earlier than me... We had a PDP11 at my first job. But when I worked with DEC it was the high time of VAX...
The Teensy seems to be a well maintained product and the upload worked flawlessly, you are right.
I think the add on IDE (for audio) only works for Teensy 3.x boards. I wanted to try some of that and bought a Teensy 4.1 only to notice this in the documentation after the fact. Teensy boards are quite expensive to buy from the Europe. I bought mine from The Pi Hut in UK, it was 29€. Wouldn't have bought unless I had other stuff for the same shipping cost.
Ristomatti Airo Thanks for highlighting the audio question about Teensy 4.x. As you say the documentation for the audio IDE tool is all about 3.x, but lots of talk in their forums about audio on the 4.x - confusing! Apparently 4.x doesn’t have a built-in DAC so that may limit it’s use unless you add an external DAC.
@@Richardincancale Interesting, it didn't occur to me to go check the forum. Thanks for the tip!
@@Richardincancale The audio tool interests me mainly as it's based on Node-RED and I love Node-RED. 😁
Two years ago, I ported OnStep, an open source telescope controller to the STM32F1. I used the Blue Pill, since it was cheap (US $2) and available from multiple sources (Amazon, eBay, AliExpress), unlike the Teensy at the time. The Blue Pills always came with 128K which is about enough for OnStep. Both STM32 and CKS chips worked perfectly with no issues for about a year and a half. Over 350 people built OnStep controllers based on the PCB I co-designed for the Blue Pill. We program the Blue Pill using PA9/PA10 and a USB to TTL adapter (FTDI, CP2102, CHG340).
However, in the past few months we saw Blue Pills with only 64K and OnStep would not run. No idea what the issue is. It is impossible to guarantee that a Blue Pill has 128K before testing it, so this confuses users. We are looking into alternatives, including the Black Pill.
I also ported OnStep to the STM32F4, and since we use stepper motors for it, I used a ready made 3D printer board (FYSETC S6 in this case). I program it using DFU without any issues.
Thank you for sharing your experience. Looking at your GitHub it seems you did not use the Arduino IDE for your project.
@@AndreasSpiess It is definitely Arduino based.
My github is just a fork of the main project, and not kept up to date, just when I have features and code changes.
The project Wiki is here onstep.groups.io/g/main/wiki/3884
The Blue Pill is only one low cost platform that can run it.
groups.io/g/onstep/wiki/STM32F103-Blue-Pill
You will also find videos in my playlist for the project
th-cam.com/video/tgzy1bFrGBc/w-d-xo.html
Oh, and thank you for your videos. I learn a lot from them, and loved the 1970s memories. My memories on computers are from the early 80s!
Many Blue Pill boards have an incorrect resistor connected to USB which will cause many USB controllers to reject them. Even with the clone chips you should be able to get USB working if you replace the resistor with the correct value. But I agree, you should probably not buy Blue Pill boards.
I knew about the fact and checked my boards. They all had the correct resistor...
Having the option of using an ST-LINK which enables debugging, USB bootloader is a big no for me. Also I use the cheap ST-LINK v2 without any problems. But I code using STM32CubeIDE, which is ST's official development environment, it is very good
@@gino.avanzini That's how a real engineer uses the STM32s. Using them with the "arduino" IDE is absurd.
The video comes out right when we are starting to learn about programming cortex M0's that must such a coincidence lool. Great video tho! Your channel is one of the best when learning about mcu's and rf stuff!
Thank you. MCUs and RF happen to be the most interesting things for me ;-)
Thank you for another enjoyable video full of useful information. Great job again.
My pleasure!
8:30 - I am really confused about the thing about that board being 'dual use'. I had a quick look at the datasheet etc. Nothing on there jumped out at me saying that it was particularly specialised for military applications. I find myself thinking, though, that almost anything is theoretically 'dual use'.
I also did not understand. Maybe it was a clerical error. Still, the effect for me was the same...
Excellent video!
.
The information re. ST-LINK was/is priceless. I had already bought two cheap ST-LINKs and blue pills on Aliexpress, so you saved me a lot of frustration when I would get around to them.
.
Re. IBM 360. I know the architecture very well. If "Interdata" or "Perkin Elmer" or "Concurrent Computer Corporation" (which were subsequent name changes) mean anything to you then you would know they were real time systems based on IBM 360 architecture.
.
It was called IBM 360 because there are 360 degrees in a circle, therefore "all round". In other words "All Round Solution" Clever hey!
.
I miss the old days!
I have never heard that explanation for the 360. That's a cool little detail. Was that actually used in there marketing literature?
Re ST-Links: It seems that some of the small programmers can be upgraded, too (1 out of three in my case).
Re IBM360: I did not know that. These mainframes were our main enemy when I worked for DEC ;-) . And I remember "Perkin Elmer", for sure.
@@a1nelson I honestly have to tell you that this was classroom "hearsay". Several years ago (30?) I attended an IBM 360 architecture training course and this is what the instructor said. I would need to do more research to confirm if this is true.
.
.
After further "Google research" I can confirm that the "IBM 360" had this name because 360 degrees means "all round", therefore "All Round Solution".
@@jackhoffman6120 Cool. I haven't been in the game quite long enough to have used a 360, but we did purchase a beefy AS/400 when they were the new hotness. Thanks for the history lesson and your research. I did develop a bit of software for DEC equipment way back in the day, but that's now so far back that I'm not even sure I could still do it. Haha
@@a1nelson As a student in the early 80s I wrote an entire unprotected (memory management was not used and reserved instructions enabled) operating system for a PDP-11 which conceptually was the same as MS-DOS (not Unix). The course tittle was "computer hardware" which required students to develop device drivers for various hardware elements of the PDP-11. By the time we got to the final project we had a "terminal driver" a "floppy disk driver" a "printer driver" and a very basic file system. The teachers were very clever because they didn't state in the curriculum that we would be developing an operating system, but only on completion of the course did I realise that I developed something as crappy (less refined) as MS-DOS. Did you know that Motorola 68K architecture was identical to DECs PDP-11? The instruction set is identical. Many systems were "clones" of others. Wang's VS was a copy of IBM's 370. Many of the leading design engineers would develop technology for one OEM and then move on to another OEM and develop technology based on the same ideas, so sometimes you could see trends occurring in the industry.
I too started with IBM360 in the 70's and also now marvel at the size, power & cost of Teensy4.1 Esp32 and Pi zero etc. Imagine what we will be impressed with in another 10 or 20 years :-)
You are right: Time will give us better electronics. But still, current times are ideal for me. We get a lot of good stuff for a decent budget...
The square, black STM32F407 boards shown early in the video are my favorite STM32 option. They come with a header for the very inexpensive and popular NRF wireless boards. You can just plug it right in and start writing code. That combination doesn't provide functionality that's directly equivalent to the ESP modules, but for many applications, it's cheap, effective and super easy to work with.
Unfortunately mine only has a 103 chip. It is quite old...
Yes. The final question: what is the application of very fast microcontrollers is a good one. I am sure they have many uses for commercial products. But as a hobbyist, I rarely find that low performance is a limitation for what I want.
Some viewers seem to be in audio and video (display). This needs some power.
Thank you for this in depth video Andreas. Given the omnipresent WiFi I think i am going to stick with Esp32.
You are right. Most of my projects profit from Wi-Fi. But for low power projects it might be an interesting choice.
There is alot of STM32 microcontrollers with WiFi capabilities, check out mbedOS and go to their hardware overview
I know. I just did not see boards on AliExpress with these chips. And no Wi-Fi lib for the Arduino. So for the moment they are not very useful for me...
If you break off the st-link from one of the nucleo boards, you can use it for other boards and also still connect it to the board you broke it off from.
Good tip. so far I did not try it. But maybe a good way to save money.
Hi Andrea, Thanks for this complementary video. One thing is not right: I program these boards with a cheap STLink v2. I don't remember if I had to upgrade the firmware. Also one bad point regarding the STM32 is what you experimented: things stop working, board not correctly enumerated under windows even though you finger dance with the buttons and also the Arduino core STM32 is a work in progress. I also focus on STM32F401 chip now because it is much more performing then the STM32F103. But you can find blue pills with 128 kb flash (STM32F103CBT6). Apparently most actual blue pills have this chip. And since the bluepill is well known it is still interesting even though much less performing.
I tried now another one and it was updateable. Two were not and the third worked... So I would still be cautious because I did not know which one I get when I ordered.
@@AndreasSpiess Isn't it related to the firmware version? www.st.com/resource/en/release_note/dm00107009-firmware-upgrade-for-stlink-stlinkv2-stlinkv21-and-stlinkv3-boards-stmicroelectronics.pdf
In the meantime I was able to program all of them. I had to unplug and re-plug the sticks till they were upgradeable. I created a comment and pinned it so everybody sees it.
great video! this overview saves tons of time!
Glad it helped!
Thanks for the great overview and comparision!
My pleasure!
In the early 2000s i used to work at the university of alabama in their surplus warehouse, refurbishing and processing electronics and computer equipment so they could dispose of it, sell it, or reuse it. We would every so often get a 'mini' vax. About the size of a refrigerator.
And very expensive when they were new...
Firmware guy here as my day job working on STM32 H7 and G0, alongside a ESP32 . Also home hobby guy, formerly on Arduino but now on ESP8266, 8285 and ESP32.
Biggest issue I find for the ESP32 in commercial products is the immaturity of the IDF. It's constantly changing and has bugfixes almost daily. It makes developing a product on it a monumental pain in the bum. STM32 doesn't have this issue but the manufacturer hardware code is considerably more simple in terms of just am API to the hardware, not great for hobbyists. The ESP IDF has full working source code and projects, so much better for hobbyists.
I love both to be honest, I have a soft spot for the ESPs, I really like them. Never used them in the Arduino environment though, in fact I've not used the Arduino IDE for many years
You are right. I can imagine that a stable development system is a big part of a business decision.
Fur us Makers the "rapid prototyping" aspect is probably a bit more important...
@@AndreasSpiess Indeed. It is a nightmare when the boss says you want the new feature that's just been announced, so you update the API and everything else breaks because it is so fluid! On the other hand, for my home hobby projects it is awesome!
The early revisions of the chinese bluepills have an error in the design; there is a resistor with the wrong value. The result is the USB implementation is out of spec and unreliable. Depend on the PC's USB host controller and a couple other factors it may work fine, may work unreliably, or may fail entirely. There is a newer revision of the board that has the same STM32F103, but fixes the resistor value (and IIRC removes the 32.768kHz crystal used by the RTC). The new revision is on a black PCB so was often called the blackpill, which is just confusing with the new STM32F411 based boards also being called blackpills.
You can replace the resistor on the original bluepill boards to fix the USB, but as you've probably figured out SWD is better anyways.
I read about the wrong resistors. So I checked all my boards and I was fortunate. Nothing to change. But all of them are blue.
My Blackpills also had the right chips.
TIP for ST Nucleo users on W10:I made the mistake of connecting the "Nucleo 32 L432KC" board without having first installed the drivers of the "STlink-2". Now the Microsoft default drivers have been installed and even though the card is seen as a disk, I can't program it. I can't even delete the Microsoft drivers, since they reinstall themselves automatically. It's important to install first the driver and after you can connect the boards to avoid this.
Andreas thank you for great contents.
Thank you for your tip!
@@AndreasSpiess I managed to solve by installing the drivers through the installation of STM32CubeIDE, after which I updated the firmware of the ST-LINK from: STM32CubeIDE> HELP> ST-LINK Upgrade.
Great content! Informative and clear, I was able to learn a lot.
Glad you enjoyed it!
Great, a new video! Thanks, Andreas!
Glad you liked it!
This video came in a good moment for me because, my blue pills arrived this week and I spent a big amount of hours trying to program the USB bootloader int it, I get it working using Caleb Marting instructions, every others I tried didn't work for me, but I am waiting my st-link arrive to forget the USB for blue pill it is a strange manner to program a chip, every time you program the virtual com port goes out and get back again a great nonsense, at least for me. Thank you Andreas for this great video...
This USB behavior is common for all boards using native USB. If you program it they stop to execute the USB code and are disconnected by the PC.
The board you show at 7:52 has an STlink that can be broken off the main board. That’s what I did and I use that STlink to program my bluepills with the Arduino IDE. This STlink has a number of pins to the right hand side of the usb connector and I use three of them for programming the bluepills..
You are right. These are full STlink programmers! A few other commenters also wrote they do it like that.
I use only F7 chips when I build drones (even the f4 chips are getting dropped from several drone software projects because of flash and CPU limitations). One reason is I can run the IMU at much higher update speeds making for a much more stable and responsive drone. I also recently got a Color Maximite 2 which uses a Waveshare CoreH743I at its heart (480Mhz) and has a graphics accelerator. The F7 boards are not that much more expensive and provide another jump in performance over the F4's. I'm building a Micropython equivalent of the Color Maximite 2 and really enjoy working with the F7 series.
Regarding the Teesny I use mine to update a RGB matrix board without flicker. I tried a ESP32 and can get it to work but had to do extra coding to reduce flicker. That was with a Teensy 3.1 board.
Thank you for sharing your experience. Not many people commented that they use the F7/H7 chips. But I agree. The boards are cheap compared with the smaller ones.
The Nucleo boards all have the built-in ST-Link V2 part, which does make it easier. The ST-Link part can be separated from the Nucleo part, and the ST-Link part can be used as a full ST-Link programmer/debugger on other STM boards that don't have an ST-Link, like the blue pills. It's an added value if you get at least a couple of the Nucleo boards at the beginning, even if you use other STM32 chips. The Nucleo boards can still be used with the separated ST-Link part, or with an actual ST-Link, just using a few jumper wires.
Yes, you are right and this seems to be the idea. I probably still would spend the few dollars for a debugger in a case. Because it is nicer looking...
Hey,
You might as well use the CubeIDE to test the faster F7 (and maybe even H7) if they're not supported by the Arduino IDE. It's really quite simple, eclipse based IDE.
My problem was not the IDE when I looked at it. It was the completely different naming... And STM is not my main platform. Most of my projects still need WiFi
wanted to write about the same. I knew Arduino and PlatfoemIO. When I first looked at STM32s I tried Arduino and failed, tried PlatformIO and failed. Tried CubeIDE / CubeMX and had it blinking within an hour. All chips supported, not just some selected boards. Now I have a coin cell lora node that should run much longer than my ATTiny based node.
I may give them a try. Thanks for the explanation
Check out the mbedOS.
You are welcome. A "test ride" is not very expensive...
@@AndreasSpiess i tried the black pill. Very nice board. But i miss the wireless. I may try it as an i2c slave for an esp01 or add an nrf24l01
The hilariously contrasting hand sizes at about 12:56 might be my favorite part of the video :D
You are right. This small hand seems to have a quite a few "fans"
Thanks for your videos, in case you put an experimental experience regarding sdi12 sensors using stm32 it would be so helpful for many people, as there is no existing sdi12 sensor library for stm32 which easily cold be used.
So far I never had a sensor with this interface :-(
A lovely video, thank you so much. Learned some useful info!
Glad you enjoyed it!
Very helpful, very informative! I loaded a reel-to-reel data tape onto a mainframe (Univac?) when I did work experience (14 years old).
This was hard work back then. Bytes per kg were small back then
Great comparison; I think also that ESP32 is more interesting than STM32f4 series for the main reason of Wifi. but, by far, Stm32F7 and H7 series are more powerful compared to ESP32 ; some of them include two cores, and they have a lot of capabilities and powerful functionalities.
I agree. But most of the time I do not need a lot of power.
Super video!
Danke!
When I was younger I worked for a tpm for digital equipment material, I can’t believe that the enormous Vax780 is so slow compared with a esp32 :)
Very nice materials in any case, than I worked for Sony for almost 30 years, and now I’m unoccupied! :(
Our industry is not easy if we approach a certain age. Good luck!
15:53 Still used for such purposes today :) TH-camr Martian Colonist (British phd in astronomy) talks about that in one of his videos. BTW not that long ago NASA was looking for fortran developer to make some changes in Voyagers probes. Can you imagine debugging with 19h ping?
If you know old languages of old frameworks you can earn quite some money, if they find you. And I hope they still have a mockup or test system around in Huston for debugging. Otherwise this would be a lazy job...
When I started with Fortran I also had to wait sometimes hours for the output and we used our brains to avoid errors as much as possible. So maybe somebody knowing Fortran still works in this way...
@@AndreasSpiess Indeed, I was also allowed just 3 compilation a day: early morning, at lunch time and at the end of the day. And this was only possibly if you occasionally brought flowers or chocolates to the girls in charge of typing the punched cards. I now feel like a war veteran speaking endlessly of the old battles (and his young age). 😉
@@AndreasSpiess Yes, I always try to have it right the first time... I am indeed from the no debugger time ha! I looked a week for a missing hash... A9 #00 is load zero with no hashtag that was load it from address 00 which was random at start up... (6502)
Mis respetos máster ❗muy útiles tus videos
Gracias!
Great video ! A request: show us an easy tutorial: a nanosecond timer with maybe powerful MCU .A trigger that switch on a device and a pin maybe analog with a threshold (512) that stops the timer . The time period last less than 50 nanoseconds.
What would be the use of such a timer?
@@AndreasSpiess An ambitious goal for a physics teacher like me, to measure the speed of light with a microcontroller
I would never use a microcontroller for that. But I am an engineer ;-) I get TOF sensors which do exactly that for a few dollars.
@@AndreasSpiess ok i will search your info, but TOF use mcu and laser-infrared to measure ? or other way?IF so can i build to reverse way ,to measure the speed of light with distance and time?
They measure the time the light needs to a reflector and back and provide this value to the MCU (through I2C)
I do embedded stuff for a living and the majority of gigs are on STM32 (of some sort). I use the STM32 System Workbench IDE (eclipse based) with CubeMX, or (better) Segger Embedded Studio. They're a very reliable choice and don't tend to have availability issues, never really had any serious unexpected problems, and - big win for the CubeMX addon for System Workbench, it's easy to migrate between devices when we decide we actually _do_ need CAN or whatever on a project;; the CubeMX code generation thing is pretty great for that.
Thank you for sharing your experience. For professional development these are probably good decisions.
This channel is for Makers, where we do "rapid prototyping". This is why a lot of us use the Arduino IDE. Most of us anyway use ESPs as their main platform.
Impressive test
Great job
Thanks for sharing your great video👍😀
Thank you. It took some time to create this video... But it was a lot of fun!
My Uni in Canada had two VAX 11/780s and they easily supported a hundred terminals. Not great raw power, but great I/O. When I didn't want to walk to the computing centre through a blizzard, I dialed into the DEC maintenance modem with my TRS-80 Model 3. Ssh - don't tell anyone!
Back then it was technically complicated to dial in. Today it is complicated because of all the corporate rules and the tools.
So I have been working through all my microcontrollers to get them working with PlatformIO. It occurred to me the reason I sometimes blew up a Bluepills bootloader was caused by using wrong programming settings when switching between microcontrollers in the Arduino IDE (so many settings!). PlatformIO effectively makes that problem go away. To be honest I am reminded how fabulous and Arduino Uno like the Bluepills is with a bootloader installed. On the flipside dealing with the Blackpill has been a total pain to work with, I can't say I am loving it yet..
So we had different experiences with the Blackpill. It worked ok here…
@@AndreasSpiess I got it to work, it turned out mostly to be some weird problem related to an old USB-3 port on my PC. First I tried to use the built-in WeAct bootloader.. but that is garbage. Now I am using DFU which works but is a pain pressing the button to program everytime. Also entering DFU mode is a bit flakey.. I would say that is the strength of the Bluepills HID bootloader as it behaves just like an Uno. Got my first ESP32 with USB-C yesterday, looks pretty nice but physically larger than I expected. At first it would not program without pressing the boot button, But I found a cheat of adding a 10uf cap on the EN pin that solved that. Loaded a little web server test program and connected it to my WiFi, overall a smooth experience.
The stlink clones have another neat trick: their swd pins are usually accessible if you take them apart, which makes them suitable for turning into a variety of small USB projects in a nice case. (Eg they can become a gpg key with Gnuk) There are also other debugger cores that can be installed on them. Their internals vary widely, though, so if you find one you like, buy more from that vendor. I recently bought a batch that ended up having tvs (transient/esd) protection on all the pins, wow!
Other viewers mentioned that you can flash them with Segger or blackbox. I will try this once. Seems to be possible also for the other ST-Links
@@AndreasSpiess yeah I don't think you can put segger jlink on the clones, but you can put it on the stlink built into the nucleo boards.
Exactly what I needed right now. Thanks.
Glad I could help!
20:17 Confusing: How to use Platform IO with Black Pills? I thought ST-Link isn't needed for them.
I always use the SWD port for debugging.
@@AndreasSpiess Thx. Now i need to learn what SWD port is :)
Software Defined?
I love your little embedded jokes.
Hope you are well, your voice sounds strained.
I am well and I do not know why my voice sounds differently...
14:46 This method never fails with Keil uVision (I used that for months when writing my masters thesis) nor with STM32Cube IDE (didn't existed back then). Frankly Arduino IDE ...eh, isn't my favourite.
I stick to the Arduino IDE on this channel because, if I would change, I would have 10 possibilities to go. And with all possibilities I would lose 90% of my viewers because they think I did the wrong decision ;-)
I got a big chuckle of the comment about the Swiss Army knife. 😀
:-)
Great overview of STM32’s I have been looking for an overview. I have done a lot of work with MSP430’s and have been looking for something faster.
Glad it was helpful!
Great video!
What do you think of the STM32 nucleo boards in combination with their HAL (hardware abstraction layer), which can be created with STM32CubeMX and the STM32CubeIDE (Eclipse C with integrated CubeMX)? It is more like classical programming in C rather than using the Arduino libraries but should be easier to use for standard-tasks than writing custom function handlers.
I do not know how they handle sensors (libraries). This is why many of us like the Arduino IDE.
The st-link is now also available as version 3.0 for around a year. It has better speed, more capability can debug multiple serial signals but by default the big cable from the v2 is not included anymore.
Thank you for the update. I was not aware of this fact and just ordered an original 2-1 from STM :-(
@@AndreasSpiess it's alright. The price for an st link v3 is around 25-35 €. But an original st link v2 costs around 20-25€. So yeah.
Teensy 4.1 soon :) Another great video, thank you.
As said: I have no plans for the Teensy for the moment...
It sounds as if our careers have some parallels. In the mid 1960s I taught myself Fortran from the programmer's manual and was running it on a 360/30. With a different company, we were using VAX 11/780 in around 1980
I was probably a little later. In the 1960 I was still too young for programming... I started in hte 1970 and around 1979 I had my first home computer (TRS-80).
I learned FORTRAN on an IBM 360 that used 80-column punch cards. To gain access to the university's 360 I had to take an upper level programming class. The professor just walked in, gave the required assignment to pass the class, and walked out. We did not see him again until the end of the semester.
I use my Teensy 4.1 for "special" high speed aerospace data collection and control projects. I have not used it as much as I would like due to support and knowledge issues. If I run into a problem, I revert back to an STM32 or SAMD21. I need to collect data and not resolve hardware or software issues.
This was a real lazy teacher, I think. But it seems you found your way...
Concerning support: Engineers are not known as the best documenters. Without some formal processes, documentation is always coming last... And sometimes never.
@@AndreasSpiess I did choose the class knowing the professor was lazy. In four weeks all in the class had completed the class requirements. That gave me ten weeks of access to the IBM 360 to run my aerospace and rocket propulsion programs. Yes, I developed bad programming habits that were not corrected until I worked with a great consultant, Carl Todd; he showed me a better method of subroutine programming. I also had to document everything for Carl's approval. Now, I fly the equivalent of an IBM 360 in my model rockets.
Keep the videos coming. I do enjoy them. I'm currently working on projects utilizing the ESP8266.
Fortran and VAX bring old memories, like the punched cards and paper stripes. Each byte was counted and was optimized. Actually, count of bytes was more important than human time, while now programmers' time costs more. Same thing is with chip design today - use of high level languages and compiler, rather looking at every gate and flipflop. This allows us to use amazingly fast small controllers.
This is exactly how I feel. But when I made my "Is it time to say goodby to Arduino" video I got a lot of resistance in the comments...
@@AndreasSpiess Agree! Perhaps we are all open minded about changing things our parents used to do, but very conservative about what we are used to. I did many projects with Arduino (Nano mostly), and gladly moved to ESP32, and now to Wemos mini - a whole new world. A whole new world. Yet I still keep many Nano's boards. Just in case......
This video cleared up so much confusion for me. Thanks!
Are the Black Pill boot loaders located in a protected area of the flash where it does not get erased when larger scripts are written to it or if I set all flash bits to 0?
Also, would love a video on the STM8.
I assume they are in a protected space, but I do not know.
Teensy 4.1 for driving px rgb panel matrix. Large matrix panel
So it is not only large, it must be huge ;-)
That's why I switched from Arduino to STM development environment a couple of years ago. STM also has a code generator environment; don't need much coding.
I probably would miss all the libraries...
I really wanted to use the teensy 4.1 for one of my projects but unfortunetly the suport isn't there! The datasheet has a bunch of marketing points and since it's a new board there aren't many people posting about how to use it. Perhaps you can make a video about it?
It is the job of those (non-sense) companies to release proper support documents, not Andreas. They have budget for marketing but not for documentation? Give me a break!!
I ordered the board mainly because some viewers wanted to see a comparison. For the moment I have no plans with it.
Hi thanks a lot. I am searching for the additional Boards Manager URLs. I cant see them in the video.
Google should find them. I cannot post links here.
Inline debugging: an absolute *must* have. Nice for hobbyists that for STM32 the cheapest $6 ST-LINK knock-off (like mine) works fine for this. TIL that the official ST-LINK is better for programming within Arduino environment, also good to know.
See my pinned comment. The small sticks also can be upgraded if you know how.
Great video, thanks! Ive had some good success with the WeAct BluePill-Plus and the supplied stm32duino compatible usb bootloader, had to use a ST-Link v2 to flash the bootloader without any problems.. it seems that WeAct is the same company that made the BlackPill..
They also have a nice GitHub page with a lot of info.
Yeah, the Teensy ecosystem is amazing. I've not really played with the 4.x yet. But the 3.x line are fantastic. With the Snooze library, power consumption excellent. The audio GUI from PJRC is great. The forums & support are great.
Only downsides I'm aware of are some people don't like anything closed source (the HalfKay bootloader & MKL02/MKL02 are required to program various Teensy's) and on that basis... I hope there are contingency plans to keep it going if anything ever happened to Paul (though I really hope nothing ever does of course!).
Good to know! This is my first Teensy and, as said, I have not yet a project needing this power.
Thank you very much for the really good video. Could you do a comparison or projects with K210 chips as well? These emerging buggers and the topic of "edge computing" and AI inference are somewhat missing on this channel which is a bit sad. Keep up the excellent work. 👌
Everything AI/ML is still typically expensive and more or less vendor specific. It's also a very big rabbit hole to dive in. So is SDR/RF stuff which has been a topic several times but I assume it's because of Andreas' prior experience on the area.
As an example, during the summer I bought a Jetson Nano to use it for IP camera object detection together with Node-RED. Eventually got it to work as I wanted but it was a lot of work. Countless hours of googling, waiting hours of library compilation, learning a little Python and in the end I still knew only the most basic terminology and had pretty much no idea what I was doing (just modifying example code).
With that said, the edge computing stuff is an interesting topic. I just think we'll have to wait until it gets more mature tech with community maintained tools and easy to use abstraction libraries before we see any of it on this channel. This is just my opinion of course, Andreas is full of surprises! Do you happen to know of some hobbyist cheap solution that fits the criteria already existing?
BTW I had never heard of K210 and googled it a bit. Is this something you were talking about www.seeedstudio.com/Grove-AI-HAT-for-Edge-Computing-p-4026.html? I agree that's not prohibitely expensive. Didn't yet read of the potential applications but will now.
Ristomatti Airo Yes, this is what I was taking about. Google for MAIXbit and MAIXduino for example or for Huskylens to get an impression of what is possible. The boards are generally not more extensive than those of the ESP32 kind but they have way more power under the hood and can do some impressive stuff. This brings some fresh air to the work bench 😉
@@MrCareyer I'll check these, looks interesting. If I see something cool, I'll tip Andreas about it on Patreon. :)
@MrCareyer: It is on my list...
Seriously ! Very interesting video about comparison with different boards, specs, interesting information ..
I liked the how is the effectiveness of the STM32 memories compared with the larger ones in ESP32, because of the RTOS and wifi background running in ESP32.
But is it that the ESP32 would be more beneficial compared to STM32 in wifi applications because of the builtin wifi ?
Wi-Fi was covered in my last comparison video...
@@AndreasSpiess oh .. ok so this comparison is about specifications regarding memory and performance ?
Yes.