Microcontrollers of the AVR, MSP430, STM32 families and my subjective impressions

Microcontrollers of the AVR, MSP430, STM32 families and my subjective impressions


Hello, inhabitants of Habr. In this article I want to share my impressions of the experience in programming microcontrollers of the AVR, MSP430, STM32 families.

Introduction

When I was a student, I was engaged in applied programming in Delphi and did not know grief, but I did not know happiness either. Until one day, in my fourth year, the subject “Microprocessor Controllers” visited me. Well, let's go.

AVR Microcontroller Family

The subject "Microprocessor controllers" was precisely devoted to programming microcontrollers using the Atmel AVR Atmega family as an example. Laboratory work on this subject consisted in programming debug boards with Atmega16 on assembler of this family in the AVR Studio 4.18 software environment.

The program was debugged using a simulator and sewn into the microcontroller using the LPT programmer built into the debug board using logic through the ponyprog2000 program. In these laboratory works, I got acquainted with the magical world of microcontrollers, which included “blinking an LED”, processing a button press, setting a hardware timer to work and processing interrupts generated by it, setting up UART and transmitting data through it, etc.

A wonderful new world has opened up to me. But then all this died down a bit until the next course, in which the programming of the same boards took place, but not in assembler, but in Pascal in the E-LAB environment. Few people know about this environment, but in vain. Indeed, long before any arduino there, this environment included many libraries for external devices that are easy to use. Do not believe?

See for yourself here . Here you have for E-LAB and JTAG-debuggers.
But at the time of writing the lab, JTAG debugging was not available. Therefore, we used the simulator built into E-LAB. As then, the E-LAB libraries allow you to create projects with RTOS, working on the principle of Round-robin.
Recent versions of E-LAB also support cooperative multitasking.
In principle, from these two cycles of laboratory work, I began my acquaintance with microcontrollers and, in particular, the AVR family. What can I say now?
AVR is the most popular microcontroller family in the world, I think.
Arduino mania only reinforced this. These easy-to-learn microcontrollers still remain the best solution for a first acquaintance. They allow you to gain experience in creating simple applications using the SPI, I2C, UART interfaces, allow you to understand the operation of I / O ports, interrupt subsystems. In fact, on this family you can learn the basics and make small and medium-sized projects. In the latest versions of AVR Studio, you can do projects in C.

And if you pick up a soldering iron, you can provide yourself with both a programmer and a JTAG debugger .
Have a desire to start? There is also a lot of things.
Atmel's proprietary debug boards and programmers are extremely expensive.
The main disadvantage of AVR is a weak computing core without auxiliary mathematical blocks, and eight-bit exacerbates the situation. Those. complex mathematical calculations can take a lot of time. The microcontroller may not have time to process the information collected or received. The last project for Atmega16 I did in C in the IAR Embedded Workbench for Atmel AVR development environment.

MSP430 Microcontroller Family

After the AVR family, the microcontroller world has already revealed to me some of its secrets.
And then a new subject came up, which was also dedicated to programming microcontrollers, but it was the Texas Instruments MSP430 family, namely the msp430f169 microcontroller on a debug board with a ziff panel and minimal wiring.
The development of the program for it and debugging took place in the IAR Embedded Workbench for MSP430 environment using the MSP-FET430UIF JTAG debugger.
First of all, in this family I liked the examples of programs for working with internal peripherals from the manufacturer. Well, it takes my hooking on JTAG and IAR from it. Having tried JTAG debugging once, you won’t want to return to development with just programming. Indeed, under JTAG debugging, you can step by step see what is happening in the registers in memory and where the code is currently executing, set breakpoints. Since that time, I got hooked on the IAR. After all, this is a cross-platform compiler released for many microcontroller families. It’s worth remembering the interface once and don’t have to relearn every time you switch to a new microcontroller family. Isn't this a miracle? But addictive.

The only disadvantage is the cost of the full version. In general, on this family I began my work as a microcontroller programmer. And a bunch of C language (essentially a cross-platform assembler), a cross-platform IAR development environment and JTAG debugging have always been with me.

The MSP430 family, in contrast to the AVR, is sixteen-digit and more productive due to the use of an integrated hardware multiplier.
The ability to use low power modes provides increased battery life when used in mobile portable devices. And the microcontrollers MSP430F5419 and MSP430F5438, with which I worked, at a frequency of 25 MHz are tightly tightened to ARM. So they are so powerful middle peasants. If you have a proprietary JTAG debugger, IAR for MSP-430, a normal debugging board, then working with them is a pleasure.

Microcontroller Family STM32

The last one I met was the STM32 family of STMicroelectronics.
ARM architecture itself is the door to many families.
Because for many of these microcontrollers from different companies, you will need only one JTAG-sender J-Link or its clone. And also if the IAR Embedded Workbench for ARM development environment is available, the doors are open .
A plus in the direction of the STM32 family is the presence of a built-in peripheral library, which allows you to quickly write your own user libraries with minimal labor, as well as a 32-bit kernel, unlike AVR and MSP430. The STM32 microcontroller line includes many options for their internal filling with built-in peripherals, from which the cost also varies. For example, the STM32L152VBT6 microcontroller based on the Cortex-M3 core, as microcontrollers of the MSP430 family, is aimed at low power consumption and operates at 32 MHz.

Another STM32F107VCT6 microcontroller also on the Cortex-M3 core is suitable for most tasks assigned to this class of devices and has a frequency of 72 MHz. It is immediately obvious that microcontrollers based on the Cortex-M3 core are much more suitable for “heavy” mathematics and processing than the MSP430 and AVR. I also worked with the “heavyweight” of this STM32F407VGT6 family on the Cortex-M4 core, whose frequency reaches up to 168 MHz. Big Brother was ideally suited for solving complex mathematical problems. In addition, it has a hardware FPU for floating point math. For the STM32 family, the DISCOVERY line of boards has been developed, which allows you to get a board with the built-in ST-Link JTAG debugger, and it can be used to program boards of your own design.

The result of their marketing policy allows you to integrate into the development of microcontrollers at minimal cost, while having branded boards and JTAG debuggers from the manufacturer.

Conclusion

In conclusion. That all considered families have their advantages. Everyone has fond memories.

Also popular now: