PM0042 Programmingmanual STM32F10xxxFlashprogramming Introduction This programming manual describes how to program the Flash memory of STM32F101xx STM32F102xx STM32F103xx STM32F105xx and STM32F107xx microcontrollers. For convenience these will be referred to as STM32F10xxx in the rest of this document unless otherwise specified. The STM32F10xxx embedded Flash memory can be programmed using in-circuit The in-circuit programming (ICP) method is used to update the entire contents of the Flash memory using the JTAG SWD protocol or the boot loader to load the user application into the microcontroller. ICP offers quick and efficient design iterations and eliminates unnecessary package handling or socketing of devices. In contrast to the ICP method in-application programming (IAP) can use any municationinterface supported by themicrocontroller (/OsUSB CAN ART ²CPI etc.) to download programming data into memory. IAP allows the user to re-program the have been previously programmed in the Flash memory using ICP. The Flash interface implements instruction access and data access based on the AHB (o) soo i ouo ss o s Read/Write protections and option bytes are also implemented. February 2010 Doc ID 13259 Rev 8 1/34 .st.
Contents PM0042 Contents Overview 1.1 Features 1.2 Flash module organization . 2 Reading/programming theSTM32F10xxx embedded Flashmemory12 2.1 Introduction 12 2.2 Read operation . 12 2.2.1 Instruction fetch 12 2.2.2 D-Code interface 13 2.2.3 Flash access controller 13 2.3 Flash program and erase controller (FPEC) 13 2.3.1 Key values 13 2.3.2 Unlocking the Flash memory - 14 2.3.3 Main Flash memory programming 14 2.3.4 Flash memory erase .15 2.3.5 Option byte programming 17 2.4 Protections 18 2.4.1 Read protection 18 2.4.2 Write protection 19 2.4.3 Option byte block write protection 20 2.5 Option byte description . 20 3 Register descriptions 24 3.1 Flash access control register (FLASH_ACR) 24 3.2 FPEC key register (FLASH_KEYR) . . 25 3.3 Flash OPTKEY register (FLASH_OPTKEYR) 25 3.4 Flash status register (FLASH_SR) . 26 3.5 Flash control register (FLASH_CR) 27 3.6 Flash address register (FLASH_AR) 28 3.7 Option byte register (FLASH_OBR) . 28 3.8 Write protection register (FLASH_WRPR) 29 3.9 Flash register map 30 2/34 Doc ID 13259 Rev 8
PM0042 Contents 4 Revision history ..31 Doc ID 13259 Rev 8 3/34
List of tables PM0042 Listoftables Table 1. Flash module organization (low-density devices) . Table 2. Flash module organization (medium-density devices) .8 Table 3. Flash module organization (high-density devices) .9 Table 4. Flash module organization (connectivity line devices) 10 Table 5. Flashmemory protection status. 19 Table 6. Option byte format 20 Table 7. Option byte organization. 21 Table 8. Description of the option bytes. 21 Table 9. Abbreviations 24 Table 10. Flash interface - register map and reset values Table 11. Document revision history 31 4/34 Doc ID 13259 Rev 8
PM0042 List of figures Listoffigures Figure 1. Programming procedure . Flash memory Page Erase procedure 14 Figure 2. 16 Figure 3. Flash memory Mass Erase procedure - 17 Doc ID 13259 Rev 8 5/34
STM32F10xxx闪存编程手册.pdf
![pdf,STM32F10xxx,手册,编程,闪存,材料设备](https://www.guifanku.com/wp-content/uploads/2025/02/thumb865202.jpg)