Take stm32 as an example to tell the secrets that you don't know after the microcontroller is powered on.

After the microcontroller is powered on, what is its command data written? What stories will happen inside it, this article will explain to you how its internal operation works.

After the MCU is powered on, if the crystal oscillator starts normally, the cpu will start to work under the driving of the crystal oscillator. The work of the CPU is to extract the instruction in each machine cycle to the specified place, then parse and execute it. The 51 MCU has only one clock source. Therefore, 51 single-chip microcomputer can only work with one kind of clock frequency. The frequency of a single-chip microcomputer is fixed and cannot be changed. After power-on, the single-chip microcomputer starts working at a fixed frequency, so 51 single-chip microcomputer also has no register for configuring system clock. , stm32 and other advanced microcontrollers are different, this type of microcontroller has multiple clock sources, after power-on, the microcontroller starts working at a certain fixed clock frequency, extracts instructions to the specified address, and then parses and executes them in the following program. You can change the operating clock and operating frequency of the system.

The secrets you don't know after the microcontroller is powered on

Unless there is no crystal to provide the clock, or the system is not powered, the CPU is impossible to stop working, the task of the cpu is to continuously extract the instructions, then parse and execute, and the microcontroller has a program before we download the program. The factory has already downloaded a part of the program in the microcontroller before leaving the factory. This part of the program will be executed after the microcontroller is powered on. For example: the bootloard program for ISP serial port download in stm32 system memory, the task of this code is to communicate with the downloader to download the code written by the user to the specified place.

After stm32 is powered on, it may start fetching instructions and parsing execution at three different addresses.

One: user FLASH; loaded inside the program downloaded by the user, if there is no program or the program is not correct, the microcontroller will run away,

Two: system memory: inside the factory to download the bootloard program for ISP serial port download, the task of this code is to communicate with the downloader to download the code written by the user to the specified place. If this part of the code is destroyed, the microcontroller will no longer be able to download the program through the serial port.

Three: on-chip memory SRAM; the code in the memory is not saved after power-down, if booted from here, the microcontroller will run away because the memory stored in the reset is 111111, cpu does not know what these mean.

Lana Vape E-liquids

LANA Vape E-liquids is so convenient, portable, and small volume, you can choose the flavors you like, then add into your lana vape.
We are China leading manufacturer and supplier of Disposable Vapes puff bars, lana vape e-liquids 30ml,lana vape e-liquids energy,
lana vape e liquids e-cig,lana vape e-liquids for pods, and e-cigarette kit, and we specialize in disposable vapes, e-cigarette vape pens,
e-cigarette kits, etc.

lana vape e-liquids 30ml,lana vape e-liquids energy,lana vape e liquids e-cig,lana vape e-liquids for pods,lana vape e-liquids salt nic

Ningbo Autrends International Trade Co.,Ltd. , https://www.supervapebar.com

Posted on