没有合适的资源?快使用搜索试试~ 我知道了~
首页STM32的IAP固件升级
资源详情
资源评论
资源推荐

June 2011 Doc ID 13801 Rev 12 1/55
AN2606
Application note
STM32™ microcontroller
system memory boot mode
Introduction
The bootloader is stored in the internal boot ROM memory (system memory) of STM32
devices. It is programmed by ST during production. Its main task is to download the
application program to the internal Flash memory through one of the available serial
peripherals (USART, CAN, USB, etc.). A communication protocol is defined for each serial
interface, with a compatible command set and sequences.
The main features of the bootloader are the following:
● It uses an embedded serial interface to download the code with a predefined
communication protocol
● It transfers and updates the Flash memory code, the data, and the vector table sections
This application note presents the general concept of the bootloader. It describes the
supported peripherals and hardware requirements to be considered when using the
bootloader of any STM32 device currently in production. However the specifications of the
low-level communication protocol for each supported serial peripheral are documented in
separate documents. For specifications of the USART protocol used in the bootloader
please refer to AN3155. For the specification of CAN protocol used in the bootloader please
refer to AN3154. For the specification of DFU (USB Device) protocol used in the bootloader
please refer to AN3156.
www.st.com

Contents AN2606
2/55 Doc ID 13801 Rev 12
Contents
1 Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 General bootloader description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 Bootloader activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Exiting System memory boot mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Bootloader identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 STM32F101xx, STM32F102xx, STM32F103xx,
medium-density and high-density value line bootloader . . . . . . . . . . 10
4.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5 STM32F105xx and STM32F107xx device bootloader . . . . . . . . . . . . . . 13
5.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6 STM32F101xx and STM32F103xx XL-density device bootloader . . . . 19
6.1 Dual bank boot feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.4 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.5 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7 STM32L15xx Medium-density Ultralow power device bootloader . . . 26
7.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.2 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

AN2606 Contents
Doc ID 13801 Rev 12 3/55
7.4 Important considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.5 Bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8 STM32F205/215xx, and STM32F207/217xx bootloader . . . . . . . . . . . . 31
8.1 Bootloader V2.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.1.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.1.2 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.1.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.1.4 Important considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.1.5 Bootloader V2.x versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.2 Bootloader V3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.2.1 Bootloader configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.2.2 Bootloader hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.3 Bootloader selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.2.4 Important considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
8.2.5 Bootloader version V3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
9 Device-dependent bootloader parameters . . . . . . . . . . . . . . . . . . . . . . 45
10 Bootloader timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.1 USART bootloader timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.2 USB bootloader timing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 51
11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

List of tables AN2606
4/55 Doc ID 13801 Rev 12
List of tables
Table 1. Boot pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 2. Embedded bootloaders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 3. STM32F10xxx configuration in System memory boot mode . . . . . . . . . . . . . . . . . . . . . . . 10
Table 4. STM32F10xxx bootloader versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 5. STM32F105xx/107xx configuration in System memory boot mode . . . . . . . . . . . . . . . . . . 13
Table 6. STM32F105xx and STM32F107xx bootloader versions. . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 7. Boot pin and BFB2 bit configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 8. STM32F10xxx XL-density configuration in System memory boot mode . . . . . . . . . . . . . . 21
Table 9. XL-density bootloader versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 10. STM32L15xxx configuration in System memory boot mode. . . . . . . . . . . . . . . . . . . . . . . . 26
Table 11. STM32L15xxx bootloader versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 12. STM32F2xx configuration in System memory boot mode . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table 13. STM32F2xx Voltage Range configuration using bootloader V2.x . . . . . . . . . . . . . . . . . . . 36
Table 14. STM32F2xx bootloader V2.x versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 15. STM32F2xx configuration in System memory boot mode . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 16. STM32F2xx Voltage Range configuration using bootloader V3.x . . . . . . . . . . . . . . . . . . . 44
Table 17. STM32F2xx bootloader V3.x versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Table 18. Bootloader device-dependant parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 19. USART bootloader timings for low/medium/high-density and
value line devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 20. USART bootloader timings for XL-density line devices . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 21. USART bootloader timings for connectivity line devices (PA9 pin low) . . . . . . . . . . . . . . . 49
Table 22. USART bootloader timings for connectivity line devices (PA9 high). . . . . . . . . . . . . . . . . . 49
Table 23. USART bootloader timings for STM32L15xx medium-density
ultralow power devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 24. USART bootloader timings for STM32F205/215xx and
STM32F207/217xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 25. USB minimum timings for connectivity line devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 26. USB minimum timings for STM32F205/215xx,
and STM32F207/217xx devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Table 27. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

AN2606 List of figures
Doc ID 13801 Rev 12 5/55
List of figures
Figure 1. Bootloader for STM32F10xxx with USART1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 2. Bootloader selection for STM32F105xx and STM32F107xx devices . . . . . . . . . . . . . . . . . 17
Figure 3. Bootloader selection for STM32F10xxx XL-density devices. . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 4. Bootloader selection for STM32L15xxx devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 5. Bootloader V2.x selection for STM32F2xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 6. Bootloader V3.x selection for STM32F2xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 7. USART bootloader timing waveforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 8. USB bootloader timing waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
剩余54页未读,继续阅读



















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0