Vssa and Vdda Pins on Stm32 Blue Pill

advertisement

Introduction to STM32 Microcontrollers

The STM32 series is based on the ARM Cortex-M3 core specially designed for embedded applications that require high performance, low cost, and low power consumption. This article introduces the definition, types, difference between the STM32 microcontroller and 51 microcontrollers as well as the basic system of STM32.

In this video we will have a look at the Blue Pill development board that is based around an STM32 32-bit ARM uC.

STM32 Beginner's Guide

Catalog

Ⅰ STM32 Microcontroller introduction

The STM32 series is based on the ARM Cortex-M3 core specially designed for embedded applications that require high performance, low cost, and low power consumption. It is divided into different products according to the core architecture: Among them, the STM32F series include: STM32F103 "enhanced" series, STM32F101 "basic" series, STM32F105, STM32F107 "interconnected" series, and enhanced series with a clock frequency of 72MHz, which is the highest performance product among similar products. The basic clock frequency is 36MHz, and the performance of 16-bit products is greatly improved at the price of 16-bit products. It is the best choice for users of 32-bit products. Both series have built-in flash memory of 32K to 128K, the difference is the combination of the maximum capacity of SRAM and the peripheral interface. When the clock frequency is 72MHz, the code is executed from the flash memory, and the STM32 consumes 36mA, which is equivalent to 0.5mA/MHz.

STM32

STM32

The microcontroller is a kind of integrated circuit chip, which uses VLSI technology to integrate the central processing unit CPU, random access memory RAM, read-only memory ROM, various I/O ports, interrupt systems, timers with data processing capabilities, counter and other functions (may also include display drive circuit, pulse width modulation circuit, an analog multiplexer, A/D converter, and other circuits) into a silicon chip to form a small and complete microcomputer system. Because 8-bit single-chip microcomputers have a simple internal structure, small size, and low cost, they are widely used in some simpler controllers. Common 8-bit microcontrollers mainly include Intel's 51 series, Atmel's AVR system, Microchip's PIC series, TI's MSP430 series, and so on. And STM32 is a kind of more powerful 32-bit microcontroller. The biggest difference between it and the 8-bit microcontroller is that it can not only use registers for programming but also use officially provided library files for programming, which is not only convenient for programming but also easier to transplant.

Ⅱ Difference between STM32 microcontroller and 51 microcontroller

The microcontroller is a device that integrates CPU (operation, control), RAM (data storage-memory), ROM (program storage), input and output devices (serial port, parallel port, etc.), and interrupt system on the same chip.

In our own personal computer, CPU, RAM, ROM, I/O are all individual chips, and then these chips are installed on a motherboard, which constitutes our PC motherboard, which is then assembled into a computer. The microcontroller concentrates these on one chip.

1.51 microcontroller

51 microcontroller is the most widely used 8-bit microcontroller and is the easiest single-chip microcomputer for beginners to learn. It was first introduced by Intel. Due to its typical structure and complete centralized management of bus dedicated registers, numerous logic bit operation functions, and rich control-oriented instruction system, it can be called a generation of "classic", which is the development of other microcontrollers foundation.

51 microcontroller features

The 51 microcontrollers have become a classic and easy-to-use chip. It mainly has the following characteristics.

From the internal hardware to the software, there is a complete set of bitwise operating systems called bit processors. The processing objects are not words or bytes but bits. It can not only process a bit of some special function registers on the chip, such as transfer, set, clear, test, etc., but also perform bit logic operations. Its functions are complete and easy to use.

At the same time, a dual-function address interval is specially opened in the on-chip RAM interval, which is extremely flexible to use. This function undoubtedly provides users with great convenience.

Multiplication and division instructions also bring convenience to programming. Many 8-bit microcontrollers do not have the function of multiplication. When doing multiplication, a subroutine call must be compiled, which is very inconvenient.

51 microcontroller shortcomings

(1) AD, EEPROM, and other functions need to be expanded, which increases the burden of hardware and software.

(2) Although the I/O pin is simple to use, it has no output capability at a high level. This is also the biggest weakness of the 51 series of microcontrollers.

(3) The running speed is too slow, especially the double data pointer, if it can be improved, it can bring great convenience to programming.

(4) 51 has poor protection capability, and it is easy to burn out the chip.

51 MCU microcontroller range

At present, it is widely used in teaching occasions and occasions where performance requirements are not high.

Most used devices: 8051, 80C51.

2.STM32 microcontroller

The STM32 series of microcontrollers launched by ST manufacturers. Friends in the industry know that this is a series of microcontrollers with high-cost performance, and its functions are extremely powerful. It is based on the ARM Cortex-M core specially designed for embedded applications that require high performance, low cost, and low power consumption; it also has first-class peripherals, 1μs dual 12-bit ADC, 4Mbit/s UART, 18 Mbit/s SPI, etc.

stm32f103c8t6

stm32f103c8t6

It also has a good performance in terms of power consumption and integration. Of course, it is slightly inferior to the power consumption of MSP430, but this does not affect the degree of enthusiasm for engineers. Because of its simple structure and easy-to-use tools, coupled with its powerful functions, it is well-known in the industry.

STM32 microcontroller features

(1) Core: ARM 32-bit Cortex-M3 CPU, maximum operating frequency 72MHz, 1.25DMIPS/MHz, single-cycle multiplication and hardware division.

(2) Memory: 32-512KB Flash memory and 6-64KB SRAM memory are integrated on-chip.

(3) Clock, reset, and power management: 2.0-3.6V power supply and I/O interface drive voltage, POR, PDR and programmable voltage detector (PVD), 4-16MHz crystal oscillator, embedded before leaving the factory-adjusted 8MHz RC oscillator circuit, internal 40 kHz RC oscillator circuit, PLL for CPU clock, 32kHz crystal oscillator with calibration for RTC.

(4) Debug mode: serial debug (SWD) and JTAG interface, up to 112 fast I/O ports, up to 11 timers, up to 13 communication interfaces.

STM32 commonly used devices

The most used devices: STM32F103 series, STM32 L1 series, STM32W series.

3.The difference between 51 and STM32

The 51 microcontroller is the collective name for all the microcontrollers compatible with the Intel 8031 instruction system. The ancestor of this series of microcontrollers is Intel's 8031 microcontroller. Later, with the development of flash ROM technology, the 8031 microcontroller has made considerable progress and become one of the most widely used 8bit microcontrollers, and its representative model is the AT89 series of ATMEL.

The STM32 microcontroller is a 32bit series microcontroller produced by ST (STMicroelectronics) using ARM's cortex-M3 as the core. Its internal resources (registers and peripheral functions) are much more than 8051, AVR, and PIC. It is basically close to the CPU of a computer and is suitable for mobile phones, routers, etc.

Ⅲ STM32 basic system introduction

The basic system of STM32 mainly involves the following parts:

1. Power supply

1) Regardless of whether the analog part and the AD part are used, VCC and GND, VDDA, VSSA, Vref (if the package has this pin) must be connected to the outside of the MCU, and cannot be left floating.

2) For each group of corresponding VDD and GND, at least one 104 ceramic capacitors should be placed for filtering, and the capacitor should be placed as close to the MCU as possible.

3) Use a multimeter to test whether the power supply voltage is correct. It is best to use a digital power supply when debugging to prevent overvoltage or overcurrent. It is best to test the voltage step by step from the incoming wire end to the chip power supply end.

2.reset and start

1) Boot pin has nothing to do with JTAG. It is only used to determine the starting address of the execution code after the MCU is started;

2) In the circuit design, the Boot pin may not be used, but an external resistor must be connected to the ground or power supply, and it must not be left floating; the storage media corresponding to the three boot modes of STM32 are all built-in in the chip. They are:

(1) User flash memory = Flash built into the chip.

(2) SRAM = RAM area built into the chip, which is the memory.

(3) System memory = a specific area inside the chip. A section of Bootloader is preset in this area when the chip leaves the factory, which is usually called ISP program. No one can modify or erase the content of this area after the chip leaves the factory, that is, it is a ROM area.

There are two pins BOOT0 and BOOT1 on each STM32 chip. The level state of these two pins when the chip is reset determines the area from which the program is executed after the chip is reset.

BOOT1=x BOOT0=0 Boot from user flash memory, this is the normal operating mode.

BOOT1=0 BOOT0=1 Boot from the system memory. The program function of this mode is set by the manufacturer.

BOOT1=1 BOOT0=1 Boot from the built-in SRAM, this mode can be used for debugging.

Use JTAG port or SWD mode to program and select to boot from user flash memory.

Choose to start from the system storage when programming the program in the serial port ISP mode

3.Programming interface

If you want to reduce the number of sockets, use SWD mode simulation. In this mode, if you use JLINK, you only need four wires. The four wires are: 3.3V, GND, SWDIO, SWCLK

Among them

The JTMS/SWDIO of STM32 is connected to the TMS of the JTAG port;

The JTCK/SWCLK of STM32 is connected to the TCK of the JTAG port.

If you want to use ULINK2, add one more "NRST", that is, five.

You can define this interface by yourself. You can connect the emulator and the target board with a DuPont wire jumper or a block conversion interface board when you use it.

4. The reasons for the failure of debugging and programming

1) The target chip is not connected properly and cannot work normally:

Solution: Ensure that the minimum system of the target board is properly connected and the chip can work normally: VDD, VDDA, VSS, and VDDS are all connected correctly, the reset circuit can be reset reliably, and the reset sources do not affect each other.

2) The originally burned code in the chip affects the new debugging operation:

The code originally burned in the chip is wrong, the chip is powered on and enters an undefined state, and the debug mode cannot be entered. The originally programmed code in the chip activates some peripherals or configures the SWJ pin as a normal I/O port.

Solution: Select the BOOT0/BOOT1 pin of the chip to boot from RAM, or erase the code in the chip first.

3) The chip has been read/write protected:

The debugging tool cannot read or write the Flash built into the chip. Solution: first use a debugging tool to release the read/write protection of the chip.

Frequently Asked Questions

  • 1.What is the STM32 microcontroller?

    STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics. Internally, each microcontroller consists of the processor core, static RAM, flash memory, debugging interface, and various peripherals.
  • 2.Why is STM32 so popular?

    STM32 Microcontrollers. The STM32 series of microcontrollers from ST Microelectronics is a popular, and very large, family of ARM-based 32-bit microcontrollers. While the STM32 microcontrollers are quite versatile and highly configurable, it is this very fact that makes them hard to initialize.
  • 3.How do you program an STM32?

    STM32 step-by-step  Step 1: Pre-requisites. Install the main tools to program STM32 and run the first example  Step 2: Blink LED example on the NUCLEO-L476RG board using STM32CubeMX and HAL.   Step 3: UART and new board introduction.   Step 4: Sensors usage with B-L475E-IOT01A.   Step 5: Build an IOT system.
  • These microcontrollers are used in a variety of applications, from simple printers to complex circuit boards in vehicles. As a result, the technical know-how of developing firmware and embedded systems using STM32 microcontrollers is an essential skill-set for an engineer in electronics and communications.
  • The STM32Wx MCUs bring wireless connectivity to the STM32 MCU portfolio. They cover Sub-GHz as well as 2.4 GHz frequency range operation. They are easy to use, reliable, and perfectly tailored for a wide range of industrial and consumer applications.

View More

torresupcout.blogspot.com

Source: https://www.utmel.com/blog/categories/microcontrollers/introduction-to-stm32-microcontrollers

Belum ada Komentar untuk "Vssa and Vdda Pins on Stm32 Blue Pill"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel