A Beginners Guide to Riverdi STM32 Embedded Displays
What is STM32?
STM32 is the 32-bit MCU chosen by our engineers to drive Riverdi Embedded Display series. In this brief introduction we will explain how this STMicroelectronics product is a cutting-edge technology. We also provide tips on where to start learning programming the STM32.
STM32 is a family of 32-bit microcontrollers based on the ARM Cortex-M core, developed and manufactured by STMicroelectronics. To make it all clear, let’s start with the basics and introduce the architecture of microcontroller.
The core principles of MCUs building blocks
When an engineer is designing a modern HMI device with visual information system, like display with a touchscreen, then he or she will start with deciding on microcontroller. One would have to start with selecting the core architecture. There are great and versatile ARM processing units with instruction set architectures (RISC – Reduced Instruction Set Computer), called microprocessor cores. ARM cores are widespread in large number of everyday use devices, such as smartphones. One of two main ARM core series, called Cortex-A, is used in consumer-grade devices, like Raspberry Pi single-board computers (SBCs), or smartphones.
The second part of ARM core family, known as Cortex-M, is intended for industrial grade applications. This is the ARM core series that abovementioned designer will be interested in. That’s why this is the building block selected by STMicroelectronics to create the STM32 MCUs. The Cortex-M based series has several types of cores with different performance and features. For example, there is a M0 (the cheapest low-performance core), the M3 (medium performance core), M4 (a efficient core with additional FPU or DSP support) and the newest and most powerful M7 core.
Why a core is not the MCU?
What’s important – ARM units are sold as IP core licenses, not as actual MCUs, they become MCUs later in the process. Core will not do its job by itself. It needs some support, i.e. from external memory and external interfaces. STMicroelectronics is the company that specializes in manufacturing MCUs by putting together components to form the final microcontroller.
What makes STMicroelectronics stand out in the market of MCUs? There are several reasons, but the main ones include:
- High performance real-time digital signal processing
- Low-power operation
- Versatile connectivity
- Ease of development and integration
- Useful programming tools & free libraries
These features make the STM32 microcontrollers widely acknowledged and applied in diverse applications. Those are some of the reasons why engineers at Riverdi have decided to use the STM32 as the core of our STM32 Embedded Displays.
STMicroelectronics vast portfolio
Thanks to the wide range of MCUs, it’s very easy to find the right model for your applications. Depending on the version, they have a low power consumption with quite limited resources, or models with very high computing speed and a lot of peripherals.
STMicroelectronics offers lots of solution-based product groups, free resources and prototypes. Supporting the prototyping process is a philosophy shared by Riverdi. We believe that fast & easy prototyping is crucial in design process, so we encourage trying out our samples. What also helps in the engineering process are design details, like pin compatibility, so you can replace MCUs to find the most fitting one.
How are the STM32 MCUs grouped?
Across ST’s range of MCUs there are several series grouped according to their features.
High Performance Units – powerful STM32s designed to transfer enormous amounts of data with high core clock rates. Those include the F4 with M4 core and FPU, sometimes upgraded with display controllers or MIPI support, the F7 with the latest M7 single-core, and the flagship H7 with dual-core (M7+M4). This powerful unit (STM32H757XIH6) is used by Riverdi.
Mainstream Units – general-purpose microcontrollers. They vary from the basic MCUs of F0 series, the F1s with high performance, yet simple architecture, up to G4 that offers a wide range of analogue peripherals.
Ultra Low Power Units – designed for lowest possible power consumption. Those include the 14-pin L0, the L4 with additional FPU, the L5 with upgraded graphic acceleration.
Wireless Units – featuring built-in support for wireless communications, like Bluetooth or RF 2.4 GHz.
Get a glimpse at the above mentioned series (image provided by STMicroelectronics):
To learn more about various features of STM32 MCUs visit the STMicroelectronics website (image provided by STMicroelectronics)
How to start programming the STM32 Embedded Displays by Riverdi ?
Here are the fundamentals of what a newcomer to the STM32 ecosystem needs to know about designing the STM32 Embedded Displays.
What hardware for STM32?
It is not recommended to start with unknown hardware manufacturers, especially, if you are new to embedded programming. Instead, go for well-established companies.
The Riverdi STM32 series is great to start with and learn, because we offer full documentation and there are free demos, presets and libraries to get your hands on working examples of code.
You could also try the official boards from ST (like Nucleo or Discovery series).
What documentation for STM32?
Documentation is in most cases a technical literature prepared by manufacturer to guide you through the complexity of microcontrollers. Those documents can help you learn all the MCUs features:
Getting Started Guide, which is a go-to for newcomers,
Datasheet, which is a comprehensive technical description of all MCU characteristics,
User Manual (or Guide), which gives in-depth instructions and parameters with helps to solve the most common issues,
Application Note, which gives more specific details on using a component in a specific application
Reference Manual, which gives a more detailed view on MCUs architecture,
Programming Manual, which provides the information required for application and system-level software development.
It is advised, before you actually use a specific MCU in your project, to take at least a brief look at the Datasheet. You should check the peripherals, the GPIOs, and other basic parameters, like the clock. The aim is to make sure that the given hardware meets requirements of your project.
What programming language for STM32?
The recommended programming language in STM32 is C. In case of writing code directly for microcontrollers – C is the best choice. It is also the foundation on which you can further expand your MCU expertise using other programming languages.
What framework for STM32?
To make your work smooth while programming the STM32s you will need the proper framework. Framework is a platform on which you write code and develop your project. Software frameworks may include support programs, compilers, code libraries, toolsets, and application programming interfaces (APIs). What are the available frameworks to choose from?
There is the recommended one, which is the STMicroelectronics ecosystem. It is made of two complementary levels: the Low Layer (LL) libraries and the Hardware Abstraction Layer (HAL). Low-level libraries are well-suited for optimizing hardware and operating on limited resources, but require a bit of know-how (acquirable through documentation). HAL, which is high-level library, might work better for newcomers. Both can be handled by the free STM32CubeIDE software.
There is Mbed by ARM, the online collaborative project for internet connected devices based on ARM Cortex-M. It uses C & C++ programming languages, which is good news for those fluent. A great solution for IoT devices. mBed OS is quite like Arduino. Speaking of Arduino, there are several boards directly supporting STM32. One of them is the STM32Duino project based on Nucleo boards.. Both those frameworks are all about simplicity, but the downside is that there are limited STM32 features in terms of hardware control, and the quality of libraries might not be guaranteed.
Last but not least is the Pure C language, which guarantees well optimized results in terms of performance. Pure C will use less memory and still be super fast. But those advantages come only with knowledge and experience, so it is not recommended for beginners.
What programming tools for STM32?
If you choose the recommended ST ecosystem approach, then you can start using a number of software tools provided by the STMicroelectronics for free. There are development tools, evaluation tools, development environment, embedded software and so on. Here are some of the main tools you should know about:
STM32CubeMX – a graphical tool for MCU configuration and generating initialization code;
STM32CubeIDE – all-in-one tool for advanced C/C++ development in STM32 ecosystem: microcontroller selector, peripheral configurator, code generator, compiler, debugger, and programmer;
STM32CubeProgrammer – all-in-one tool for programming STM32 products;
TouchGFX Designer – advanced graphic software framework for creating GUI in a WYSIWYG method;
STM32CubeMonitor – run-time monitoring tool to fine-tune and diagnose STM32 applications based on variables real-time visualization.
A brief look at TouchGFX Designer
TouchGFX Designer is a GUI-designer optimized for Riverdi products running on STM32 microcontrollers – Riverdi demo projects and presets are embedded in TouchGFX library. TouchGFX tool is an advanced software framework solution to create superb GUI using WYSIWYG method, which makes GUI design user-friendly. Riverdi partnership with STMicroelectronics can reduce prototyping time and cost and improve time-to-market efficiency of the project.
Where to learn more on STM32 Embedded Displays?
When selecting the learning method, one should always take into consideration what are the goals. Is it proficiency in prototyping, in programming, in GUI design? Is it overall knowledge how to apply the STM32 Embedded Displays in the final device? Is it amateur-driven curiosity? Considering goals will help you get there fast. Further questions concern available resources (like allocated time, money), learning patterns, and individual preferences. Fortunately, there is an increasing variety of sources to gain knowledge on STM32.
Video tutorials provide great way to learn about STM32 and you can find most of them on YouTube.
Firstly, please sign up to Riverdi University newsletter and subscribe to Riverdi YouTube channel. We share our knowledge and know-how to help you make the most out of your STM32-driven Riverdi Embedded Displays. We provide getting started guides, specific tutorials, unboxing videos, and much more.
Secondly, follow the official STMicroelectronics channel. ST runs live webinars and comprehensive MOOCs (Massive Open Online Courses), which are a priceless asset in learning MCU programming.
Blogs are great in solving specific issues. Most of them are free, but since the knowledge there is published as it is, on daily basis, then what you need to do is to look for exact solution. You also may stay up-to-date and follow incoming posts by signing up for a newsletter.
Riverdi offers constantly updated blog posts, getting started guides and knowledge sharing via series of Riverdi University articles and videos.
You may also try: Controllerstech’s blog: https://controllerstech.com/
Courses, both online and offline (the latter rather uncommon these days), provide a complete learning process in various levels of proficiency. However, please consider, that it’s a long-term commitment, and in most cases you’ll have to pay to be able to participate. Another approach worth considering is getting a free online course in C programming, since it will always come in handy in STM32 development.
Wikis & Guides
When looking for in-depth knowledge one should always reference to the manufacturers, like Riverdi or STMicroelectronics. Riverdi offers comprehensive documentation for each display, that will help you navigate through our STM32 Embedded Displays. We also share know-how through the Riverdi University and Display 101 series. What you might also try is to dive into the Guides and Tutorials issued by STMicroelectronics, like their vast Wiki devoted to STM32 MCUs.