STM8CubeMX: Choose Your MCU and Easily Configure It Thanks to This Intuitive Software

Internet of Things, Our products Leave a Comment

STM8CubeMX is a new software, downloadable from ST’s website, that ensures engineers choose the right STM8 microcontroller (MCU), and more easily configure it, to optimize their final product. As the STM32 and STM8 MCUs continue to be at the forefront of the “smart revolution”, their increasing popularity means they often end up in the hands of teams that may not have used an ST MCU before. STM8 is a fast and modern family of 8-bit MCUs that shine in a wide variety of applications, from consumer electronics, to automobiles, and low-power smart devices. Hence, to soften the learning curve, and enable greater efficiency, ST published STM8CubeMX, a new intuitive software.

STM8CubeMX: Choose an STM8 MCU and Change Your Mind

Selecting an STM8 MCU within STM8CubeMX (Click to enlarge)

Because there are hundreds of different STM8 MCUs, the first step is to select the right one for your project. Hence, the first panel displayed by STM8CubeMX is the MCU Selector, which allows users to choose a Series, Line, and Packaging. However, if they are completely unfamiliar with the STM8 family, they can define a series of parameters, like the amount of Flash and RAM, as well as the presence or absence of certain peripherals, and the system will offer a list of compatible products. Furthermore, if engineers are prototyping using a ST Development Board, they can choose the Board Selector, and find what they are currently using. This greatly simplifies the transition from prototyping to the final product, since the software easily replicates the board’s component.

One of the strengths of ST’s offering is the ability for engineers to switch from one MCU to another with very little modifications to their application’s code. As the chips are pin-to-pin compatible, they can easily change component for something more powerful, or requiring less energy, and still benefit from the settings of the previous MCU. STM8CubeMX employs the same philosophy by offering a tab called “MCUs Selection”, at the bottom of the Pinout view, the first interface displayed after choosing an STM8 MCU. It contains a list of chips that can easily be swapped in favor of the one currently selected. It is then possible to choose another component, import all the work previously saved, and the software will automatically apply all the modifications and customization to the new MCU.

Configuring and Customizing your STM8 MCU

The Pinout View in STM8CubeMX, with the peripherals on the left, the chip on the right and the alternative MCUs at the bottom (Click to enlarge)

The Pinout view is made out of the Chip panel, on the right, and the Peripheral Tree Pane on the left. The easiest way to start configuring the MCU’s pins is to select the relevant peripherals from the list displayed on the left panel. As you choose a peripheral, the appropriate pins used will light up in green and any potential conflicts with other peripherals will light up in red. This feature greatly facilitates the use of an STM8 MCU by first-time users, since the system assigns and configures pins. Hence, the necessary knowledge needed to start building a platform is reduced, and teams can more quickly focus on their product.

However, users with more knowledge and experience can directly map certain peripheral functions. Clicking on the pin offers a drop-down menu allowing them to select a particular function. Once it is selected, it is considered pinned, which means that selecting a peripheral from the peripheral tree will not impact the pinned signal. This is a particularly important feature, because experts in the STM8 family know that different or alternate functions can use the same pin, which greatly enhances the design’s overall flexibility, and pragmatism.

Clock Configuration and Power Consumption Calculator

The schematics view in STM8CubeMX’s clock configuration with the lock option opened (Click to enlarge)

The STM8CubeMX offers two graphical user interfaces that are fundamental in board designs : the Clock Configuration and the Power Consumption Calculator. The first one is a schematic overview of the clock path. It also provides a dynamic architecture, enabling engineers to define certain clock signals to better optimize the chip’s behavior. The software includes special error handling that ensures users get an alert when they enter an out-of-range value. To facilitate the whole process, the interface also provides some default configurations, and engineers can lock certain frequencies contained in the boxes with blue borders.

The other panel, the Power Consumption Calculator, helps foresee the MCU’s efficiency, meaning its power consumption in regard to the amount of computational throughput offered in DMIPS (Dhrystone Million Instructions per Second). This is especially important, because STM8 MCUs often end up in low-power systems that rely on a battery. Hence, without even leaving the STM8CubeMX software, engineers can start testing a design to see if it meets their requirements, and even find greater optimizations. Users can even select from a wide range of battery models to better simulate their final product. The system simply requires that the users add sequence steps, and the software will plot a graph of the evolution of the power consumption over time.

STM8CubeMX: A Design Partner

Generate a Report within STM8CubeMX

ST understands that sharing what users do with the STM8CubeMX is part of the equation, so once a team is done, they can just click on Generate Report in Project, and a PDF will list in detail all their work within the software, from the pin list and peripherals, to the power consumption simulations. One can also save the project and share it with another STM8CubeMX user. Finally, the application updates automatically with the latest components and specifications from ST. Users are thus sure that all their selections and values are up-to-date, and that none of the components are obsolete.

To know more about STM8CubeMX, a user manual with tutorials, found on ST’s website, will guide you through the software’s many different and powerful features.