Entering the world of STM32: Hex program burning

Publisher:平和的心态Latest update time:2016-06-08 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
During the Light Cube event, a small number of netizens said that they did not know how to burn the HEX program into the STM32 chip. In order to start the STM32 series basic tutorial that they had wanted to start for a long time, they began to "enter the STM32 world" on this rainy night in Beijing.

Most 51 MCU (STC series MCU) beginners know that when the 51 MCU is powered on, the program can be directed to the bootloader through the PC host software, so that the hex file of the new program can be downloaded to the MCU to complete the program upgrade or update. The STM32 MCU under the 32-bit Cortex-M3 core can also do this. This host software is called "Flash loader demonstrator"; after short-circuiting boot0 and VCC, it will enter the upgrade mode (System memory boot loader) after resetting again.

We need to download the chip burning tool software Flashloader demonstrator first. After downloading, we unzip and install this file, then we find STMicroelectronics flash loader.exe, this program is one of our protagonists - burning software. Another protagonist is our USB to serial port tool. Let me introduce how to use the software:

Prerequisites

Insert the USB to serial port tool into the computer and check the serial port number of the virtual serial port in the "Device Manager".

The programming process can be divided into six steps, namely, chip connection page, flash status page, chip information page, operation configuration page, option word configuration page, and operation progress bar page.

Step 1: Connect to the chip page

On this page, we mainly configure the serial port number, and the rest of the parameters can use the default values. Before clicking next, be sure to set the boot0 pin high and reset it. If everything is normal, the software will turn to the next page. Of course, if an error occurs, you need to repeat the above operation.

Entering the world of STM32: Hex program burning
 

 

hint:

"Cannot open the COMport": Check whether the correct serial port number is selected and confirm that this serial port is not used by other software.

“Unrecognized device”: Restarting the microprocessor may solve the problem.

"No response from the target": This error is caused by abnormal chip power supply or connection problem. In rare cases, the chip is broken.

Step 2: Display flash storage status

Entering the world of STM32: Hex program burning

As can be seen from the above picture, if the chip's flash is not read or write protected, the "Remove protection" button is gray; if the chip's flash is XX, then I don't need to say more about the function of this button^_^

Step 3: Chip information display

Entering the world of STM32: Hex program burning

This page is basically read-only, just take a look. For our beginner level netizens, just quickly skip it for now.

Step 4: Operation Configuration

This page is our main operation page. The entire flash programming and erasing is concentrated in this page. In this page, we can erase the existing flash content of the chip. We can download the hex program to the chip flash, we can also enable/remove the chip protection (disable/enable) function, or configure the advanced function of the option word.

Entering the world of STM32: Hex program burning

Here is a brief explanation. The erase function can choose to erase all (All) or to erase some sectors (selection). Click it and the page of the corresponding block will pop up.

Download flash (download), the software supports Intel hex, binary and S19 Motorola formats. For the rest, we can use the default settings.

Upload the internal flash content of the chip (upload). This function can read the internal flash of the chip and save it in the corresponding format. The format supports the three formats mentioned above.

Option word configuration, we will not use this configuration for the time being, and leave it for later advanced applications, and then we will come back to carefully study its powerful role and far-reaching significance.

Step 6: Progress bar display

In step 5, we will skip the option word configuration directly, so when it comes to step 6, there is nothing much to say about this page, just look at it.

Entering the world of STM32: Hex program burning

If a green progress bar appears and prompts that the download is successful, then congratulations! The program has been successfully downloaded into the chip. At this time, you need to set boot0 low, reset the microprocessor, and then the microprocessor will execute the new program!

Summarize:

The use of the software adheres to the concept of one-click service, and the chip operation can be completed by clicking next all the way. In addition, the second active serial port download pin has been marked in the PCB silk screen. When connecting with the USB to serial port, a cross connection must be made, that is, the Rxd of the PCB board is connected to the Txd of the USB to serial port; the Txd of the PCB board is connected to the Rxd of the USB to serial port; and the GND of the two must be connected.

Keywords:STM32 Reference address:Entering the world of STM32: Hex program burning

Previous article:S3C2440 Driver - Watchdog Driver Analysis
Next article:Is the programming protocol of the SWD interface of STM32 public?

Recommended ReadingLatest update time:2024-11-16 15:34

The principle, use and configuration of PWM peripherals in STM32
As for what PWM is, just search on Baidu. In fact, the content is simple. First of all, the PWM function in STM32 is implemented using a counter, which is similar to 51, but there are also differences. 51 uses the interrupt of the counter to adjust the duty cycle, which takes up the time of the MCU. However, STM32 use
[Microcontroller]
STM32 Series Chapter 20 - DAC
Features: 2 DAC converters: each converter corresponds to 1 output channel (corresponding to PA4 and PA5) 8-bit or 12-bit monotonic output In 12-bit mode, data is left-aligned or right-aligned Synchronous update function Noise waveform generation Triangle waveform generation Dual DAC channels convert simultaneo
[Microcontroller]
Brief Analysis of STM32 Bootloader Design
  Design Thoughts   The Bootloader is responsible for detecting whether there is a BIN file required for the firmware update in the SD card. If the required BIN file is detected, it will start copying the file to update the firmware. After the update is completed, it will jump to the specified address and start execut
[Microcontroller]
Brief Analysis of STM32 Bootloader Design
stm32 software simulation debugging
The following is a simulation step of the PWM waveform output by the PA8, PA9, and PA10 pins of the STM32RCT6 microcontroller. In addition, it also shows the software running process and how to view the real-time data of global variables. I have taken screenshots for each step, so please follow the steps step by step,
[Microcontroller]
stm32 software simulation debugging
STMicroelectronics STM32U0 creates the ultimate low-power MCU
ST (STMicroelectronics) recently launched the new STM32U0 microcontroller, this Cortex-M0+ core-based product can achieve a static power consumption of only 160nA in standby mode with a real-time clock (RTC), and as low as 16nA in shutdown mode, showing excellent energy-saving performance. In the CoreMark and SESIP
[Microcontroller]
STMicroelectronics STM32U0 creates the ultimate low-power MCU
STM32-Use of basic timer Timer
Preface: Recently, I have been debugging the timer function of the STM32L152 chip. This article summarizes how to use the basic timer of the STM32L152 chip. Hardware platform: STM32L152 Software platform: keil v5+cubeMX Function library: HAL library How to use basic timer The following is a brief description o
[Microcontroller]
STM32 uses TIMx_CH1 as Tx1F_ED counter clock
Environment: iar arm 5.3  stm32f103vbt6   Use PA.8 to externally input a 10Mhz square wave. Data 4 can be obtained from the systick interrupt.  4×5000 (prescale value)×1000 (tick interrupt time) = 20MHz  It belongs to double-edge detection. One PA.8 pulse has 2 edges, so the clock is doubled. Since TI1F_ED is used, it
[Microcontroller]
STM32 uses TIMx_CH1 as Tx1F_ED counter clock
Generation of C51HEX file and single-chip minimum system
In the previous article, we established the first single-chip C language project. However, in order to allow the compiled program to be written into the 51 chip through the programmer, we need to use the compiler to generate a HEX file first. Let's take a look at how to use KEIL uVISION2 to compile and generate a HE
[Microcontroller]
Generation of C51HEX file and single-chip minimum system
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号