1. If you find it simple, it means ST has succeeded.
How did STM32 stand out among many microcontrollers back then? Because of the library functions.
Before this, microcontrollers like 51, AVR, PIC, MSP430 required searching for others’ code to “borrow” when writing a UART communication function, only to find that the existing code didn’t fully meet the requirements, leading to modifications, and slowly accumulating a personal library. When switching to another microcontroller, that accumulated knowledge often became useless.
STMicroelectronics created these library functions to lower the development threshold, right?
The trend is to allow developers to focus on more abstract applications without needing to delve too deeply into the microcontroller’s underlying workings. ST seized this trend and quickly captured the market.
What? Writing directly to registers? Assembly? Most applications for STM32 don’t require such flashy skills. What about cost sensitivity? If cost sensitivity is a concern, who would choose STM32? A microcontroller that costs a few cents and can only be programmed in assembly is worth considering.
2. What do we need to learn to get started with STM32?
-
To create a keyboard/mouse, learn the USB protocol.
-
To create a networked device, learn the underlying implementation of Ethernet and TCP/IP protocols.
-
To create a wireless device, you may need to learn the protocols for Bluetooth, Wi-Fi, or Zigbee.
In the final application, there may not be a library or package available, requiring you to write the low-level code yourself. If using modules, you may need to learn SPI, I2C, or SDIO interfaces to connect to the module.
To create a balancing robot, you need to learn PID algorithms.
To create a camera, you need to learn the SCCB protocol. If you want to go deeper, you may need to learn some image processing knowledge.
If this camera needs to connect to a PC for deeper processing, you’ll need to learn how to write a host program, possibly designing protocols or writing a server. At this point, you may need to learn server development knowledge and a programming language for writing servers, including but not limited to C++, Java, Python, or Node.js.
You may also need to learn a server framework. Servers usually have databases, so learning a simple NoSQL database is a good start, though MySQL and Oracle are also options.
If the host program requires a graphical interface, the simplest option might be C#, although C++ with Win32 API would be better.
If you want to implement facial recognition or image segmentation, you’ll need knowledge of machine learning, possibly using Python with TensorFlow or PyTorch frameworks. Other languages can also be used, but they may be more complex, and machine learning requires a foundation in mathematics, which can be quite challenging.
Nowadays, operations are often done on mobile devices; you might want to learn Android, starting with Java. If your phone happens to be an Apple, you’ll need to learn Objective-C.
If you want to go further and create a more complex device, you’ll first need to design your own board. At this point, PCB design knowledge is necessary, as well as understanding analog and digital electronics, and circuit principles.
On the software side, you may find that bare metal programming is no longer sufficient; you might need to learn about operating systems like uCOS or FreeRTOS, or even learn to write an operating system kernel yourself. If the system requires robustness and efficiency, you must delve deeply into operating systems, data structures, algorithms, optimization, and assembly language.
All these topics are extensive, and you’ll unknowingly have learned a part of computer science, gaining a basic understanding of it.
If everyone thinks this is a forced correlation, it is not. In summary, this is just a small robot using STM32 as a processing unit placed on the server side, capable of maintaining balance, recognizing faces, and being controlled from both PC and mobile devices.
Speech recognition, dialogue systems, and other functions have not been discussed, as these may require more knowledge of natural language processing and even reinforcement learning. You’ll find that the results are often unsatisfactory, not because your skills are lacking, but due to the limitations of the world. Congratulations, you can read papers, write papers, and contribute to breakthroughs in the fields of computer science and artificial intelligence.
What? You want to create a robotic unit like Boston Dynamics? That would be even more complicated. Otherwise, why do you think I got into this field?
3. When technology goes deep
Diving deep into technology can be daunting. For example, if you just learned about the Cortex architecture of STM32, how are its registers, instruction set, and memory implemented?
If you just understood these, what type of latches are used, and how does the instruction fetch and decode process work?
How is the adder implemented? If you just learned about transistors and Boolean logic, how do transistors work?
If you just learned about PNP and NPN, what is the common emitter characteristic curve?
Why do carriers move, and what is forward and reverse bias?
Why do phosphorus, silicon, and boron act as semiconductor materials and form electron flow? Can holes flow?
The key is not what STM32 can do, but what we can do with STM32. What level of products can we create? How competitive is the market? We should even consider whether we are meeting unmet user needs, thus filling market gaps.
Technology is not independent; it is topological.