Summary of STM32F103 bootloader download and debugging process

Publisher:电子思维Latest update time:2018-08-19 Source: eefocusKeywords:STM32F103 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Recently, I participated in the driver debugging of the mobile payment project team, which mainly involved the bootloader download program for the STM32 microcontroller. The following is a summary of the problems found and solved.
1. For the use of FLASH_LOAD software, when the software cannot find the MCU, you need to check whether there is a software update on the st official website, because it is very likely that this MCU is a new version and there is no information about the chip in the previous software.
2. For the use of MCU and MCU download through ISP, you need to first confirm what the bootload version of the downloaded MCU is, because when the version is updated, some instructions will also be updated accordingly. For example, the two versions of version 2.X and version3.X have different instructions and representation formats for erasing internal flash. For version 2.X, the erase instruction is 0x43, the erase page address is represented by 1 byte, and the instruction to erase the entire space is 0xFF, 0x00. For version3.X, the erase instruction is 0x44, the erase page address is represented by 2 bytes, and the instruction to erase the entire space is 0xFF, 0xFF.
3. Before downloading via ISP, the upper end needs to send a 0x7F instruction to the MCU being downloaded. The MCU being downloaded will send 0x79 to the upper end, and a handshake protocol is successful. If 7F is not sent to the MCU being downloaded, but the write memory instruction is sent directly, the baud rate between the two will be different and normal communication will not be possible. Therefore, a handshake protocol must be performed before ISP downloading.
4. An empty STM32 itself does not have write or read protection, so there is no need to send a read and write protection instruction before downloading. Read and write commands for memory are also not required.
5. The correct ISP burning process should be as follows:
send 0x7F—>wait for 0x79—>send read bootload version command—>get bootload version—>send erase command according to bootload version—>send write memory instruction—>send FLASH address—>send bin data.

Keywords:STM32F103 Reference address:Summary of STM32F103 bootloader download and debugging process

Previous article:stm32 bootloader serial port upgrade program framework
Next article:How to use the BootLoader and APP program of STM32F4

Latest Microcontroller Articles
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号