stm32 download method serial port ISP\swd (JLink)

Publisher:Enchanted2023Latest update time:2018-08-22 Source: eefocusKeywords:stm32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. First look at the stm32 startup mode 

The boot mode of stm32 is determined by the boot0 and boot1 pins of the 32 chip. It is divided into embedded flash boot mode (normal boot mode), memory boot mode, and rom boot mode.

The corresponding relationship between the boot mode and the pin high and low levels is as follows. Within the four clock cycles of chip reset, the levels of boot0 and boot1 pins will be read to determine the operation of the chip.

model.

boot0=0, boot1=x ---------------- Embedded flash boot mode

boot0=1, boot1=1 ----------------Memory boot mode

boot0=1, boot1=0----------------rom boot mode (serial port isp download program)

2.Serial port isp download method

 ISP serial port download HEX program steps

1) Set boot0=1, boot1=0 

2) Use mcuisp or flashloader to download the program to the embedded flash

3) Set boot0=0, boot1=0 to run the program

3. jtag-swd download method

     The pins JTMS, JTCK, VCC, and GND are used to download and debug the program. The specific settings need to be studied.

     This is the pin and the wiring of the JLink is as follows

        JTMS--TMS/SWDIO

        JTCK--TCK/SWCLK

        VCC GND provides power for the entire board

------------------------------------------Gorgeous dividing line------------------------------

Three programming download methods for STM32


J-link can debug almost all arm chips, it is a good thing. Here are three ways to download programs for stm32:

1. J-Flash download (requires J-link)

2. MDK configuration download (requires J-link)

3. ISP download (serial port download, you need to use the officialhttp://www.segger.com/cms/jlink.html .

Open the run, first configure the cpu corresponding to the cpu of the development board,

 

 

 

Connect the development board and J-link to the computer, and then connect

 

The connection is successful as shown in the following figure:

 

Then select the hex file you want to download, open it with the shortcut key ctrl+O (or file/open), and select the file.

 

Then select Target/Auto to burn automatically. (Sometimes it is strange that it cannot be successful in one try. In this case, you need to burn again manually, Target/Erase chip-->Target/Erase sectors-->Target/Program && verify).

 

OK, the burning is successful.

----------------------------------------------------------------------------------------------

2. MDK configuration download, that is, online debugging and downloading in MDK. First, make sure that the j-link driver has been successfully installed. The rest of the work is just to set up MDK.

 

In fact, you can also choose J-LINK/J-TRACE.

Click setting to start setting.

Click add and select cpu.

 

 

OK, you can debug and download online:

 

----------------------------------------------------------------------------------------------

3.ISP download (serial port download)

(1) Download the software Flash_Loader_Demonstrator_V1.3_Setup.exe and click Next to install it. Note: The version is 1.3. I tried version 2.1 and it failed to connect successfully.

 

 

According to the prompts: Set the boot mode, set BOOT0=1, BOOT1=0, and then restart the system. Connect. No more words below, just look at the picture.

 

 

 

 

 

 

 

(2) Download using STMISP.EXE, which is an ISP application for STM32

 STMISP.rar   

Then without saying anything else, just post the pictures.

 

 

 


Keywords:stm32 Reference address:stm32 download method serial port ISP\swd (JLink)

Previous article:STM32 serial port one-key download circuit
Next article:Detailed explanation of STM32 ISP upgrade

Recommended ReadingLatest update time:2024-11-15 17:38

Detailed explanation of eight input and output modes of STM32
When I was reading the data sheet recently, I found that there are 8 types of GPIO configurations in Cortex-M3: (1) GPIO_Mode_AIN analog input  (2) GPIO_Mode_IN_FLOATING floating input (3) GPIO_Mode_IPD pull-down input (4) GPIO_Mode_IPU pull-up input (5) GPIO_Mode_Out_OD open drain output (6) GPIO_Mode_Out_PP push-pul
[Microcontroller]
STM32 serial port function_library function
Personal Records: The reason why I didn't succeed in the serial port experiment yesterday was that the previous one was always overwritten by the next one when calling USART_SendData continuously. I used to think that there should be no problem with ST's official library, so I didn't think about it in this regard. N
[Microcontroller]
STM32 development environment (tool) Keil MDK introduction
The STM32 microprocessor is based on the ARM core, so many ARM-based embedded development environments can be used for the STM32 development platform. Development tools can be used for STM32 development. Choosing a suitable development environment can speed up development progress and save development costs. This chap
[Microcontroller]
STM32 development environment (tool) Keil MDK introduction
STM32 AFIO
Maybe you think IO and AFIO are very simple. In fact, there are several misunderstandings that many people may not have noticed. When you only use a ready-made development board to learn, others have already helped you allocate resources, and all peripheral function learning is done according to the routines given to y
[Microcontroller]
STM32 AFIO
STM32 uses PWM + DMA to drive WS2812
Reference code: ----------------------------------WS2812B.c---------- -------------------------- #include "WS2812B.h" /* Buffer that holds one complete DMA transmission  *   * Ensure that this buffer is big enough to hold  * all data bytes that need to be sent  *   * The buffer size can be calculated as follows:  *
[Microcontroller]
STM32 FSMC simulation can run
After debugging the FSMC driver LCD program of STM32 for a few days, the program that could run after being compiled and downloaded on MDK had problems after being ported to IAR. (The following description is the phenomenon of running after power-on reset, but it runs normally during jlink debugging) The problem is th
[Microcontroller]
How to define variables in STM32 FLASH ROM
See if the logical address is uniformly addressed. If FLASH and RAM are in the same logical address space, const is used directly, such as arm, stm8, msp430, etc. If the logical address space of FLASH and RAM is separate, other methods must be used, usually special keywords, __flash, __code, etc. Such as AVR, 8051,
[Microcontroller]
STM32 usb_init.c and usb_int.c file analysis
The file usb_init.c is mainly for initialization. The function is very simple:  /****************************************************** **************************** * Function Name : USB_Init * Description: USB system initialization * Input : None. * Output : None. * Return : None. **********************************
[Microcontroller]
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号