April 2016 DocID028270 Rev 2 1/1896
1
RM0410
Reference manual
STM32F76xxx and STM32F77xxx advanced ARM
®
-based
32-bit MCUs
Introduction
This reference manual targets application developers. It provides complete information on
how to use the STM32F76xxx and STM32F77xxx microcontroller memory and peripherals.
The STM32F76xxx and STM32F77xxx is a family of microcontrollers with different memory
sizes, packages and peripherals.
For ordering information, mechanical and electrical device characteristics please refer to the
datasheets.
For information on the ARM
®
Cortex
®
-M7 with FPU core, please refer to the Cortex
®
-M7
with FPU Technical Reference Manual.
Related documents
Available from STMicroelectronics web site www.st.com:
• STM32F76xxx and STM32F77xxx datasheets
• STM32F7 Series Cortex
®
-M7 processor programming manual (PM0253)
www.st.com
DocID028270 Rev 2 2/1896
RM0410 Contents
48
Contents
1 Documentation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
1.1 List of abbreviations for registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
1.2 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
1.3 Peripheral availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2 System and memory overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.1 System architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.1.1 Multi AHB BusMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.1.2 AHB/APB bridges (APB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.1.3 CPU AXIM bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.4 ITCM bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.5 DTCM bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.6 CPU AHBS bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.7 AHB peripheral bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.1.8 DMA memory bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.1.9 DMA peripheral bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.1.10 Ethernet DMA bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.1.11 USB OTG HS DMA bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.1.12 LCD-TFT controller DMA bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.1.13 DMA2D bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.2 Memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.2.2 Memory map and register boundary addresses . . . . . . . . . . . . . . . . . . 74
2.3 Embedded SRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.4 Flash memory overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
2.5 Boot configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3 Embedded Flash memory (FLASH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.2 Flash main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.3 Flash functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.3.1 Flash memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Contents RM0410
3/1896 DocID028270 Rev 2
3.3.2 Read access latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.3.3 Flash program and erase operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.3.4 Unlocking the Flash control register . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.3.5 Program/erase parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.3.6 Switching from single bank to dual bank configuration . . . . . . . . . . . . . 91
3.3.7 Flash erase sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.3.8 Flash programming sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
3.3.9 Flash Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.4 FLASH Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.4.1 Option bytes description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.4.2 Option bytes programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.5 FLASH memory protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.5.1 Read protection (RDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.5.2 Write protections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
3.6 One-time programmable bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.7 FLASH registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.7.1 Flash access control register (FLASH_ACR) . . . . . . . . . . . . . . . . . . . 105
3.7.2 Flash key register (FLASH_KEYR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.7.3 Flash option key register (FLASH_OPTKEYR) . . . . . . . . . . . . . . . . . . 106
3.7.4 Flash status register (FLASH_SR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.7.5 Flash control register (FLASH_CR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
3.7.6 Flash option control register (FLASH_OPTCR) . . . . . . . . . . . . . . . . . . 110
3.7.7 Flash option control register (FLASH_OPTCR1) . . . . . . . . . . . . . . . . . 112
3.7.8 Flash interface register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4 Power controller (PWR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.1 Power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
4.1.1 Independent A/D converter supply and reference voltage . . . . . . . . . . 116
4.1.2 Independent USB transceivers supply . . . . . . . . . . . . . . . . . . . . . . . . . 116
4.1.3 Independent SDMMC2 supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.1.4 Independent DSI supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.1.5 Battery backup domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
4.1.6 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4.2 Power supply supervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.2.1 Power-on reset (POR)/power-down reset (PDR) . . . . . . . . . . . . . . . . . 123
4.2.2 Brownout reset (BOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
DocID028270 Rev 2 4/1896
RM0410 Contents
48
4.2.3 Programmable voltage detector (PVD) . . . . . . . . . . . . . . . . . . . . . . . . 124
4.3 Low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.3.1 Debug mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.3.2 Run mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.3.3 Low-power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.3.4 Sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.3.5 Stop mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.3.6 Standby mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
4.3.7 Programming the RTC alternate functions to wake up the device from
the Stop and Standby modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.4 Power control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
4.4.1 PWR power control register (PWR_CR1) . . . . . . . . . . . . . . . . . . . . . . 139
4.4.2 PWR power control/status register (PWR_CSR1) . . . . . . . . . . . . . . . . 142
4.4.3 PWR power control/status register 2 (PWR_CR2) . . . . . . . . . . . . . . . 143
4.4.4 PWR power control register 2 (PWR_CSR2) . . . . . . . . . . . . . . . . . . . 145
4.5 PWR register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
5 Reset and clock control (RCC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
5.1 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
5.1.1 System reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
5.1.2 Power reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
5.1.3 Backup domain reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
5.2 Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
5.2.1 HSE clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
5.2.2 HSI clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.2.3 PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.2.4 LSE clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.2.5 LSI clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.2.6 System clock (SYSCLK) selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.2.7 Clock security system (CSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.2.8 RTC/AWU clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
5.2.9 Watchdog clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5.2.10 Clock-out capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5.2.11 Internal/external clock measurement using TIM5/TIM11 . . . . . . . . . . . 157
5.2.12 Peripheral clock enable register (RCC_AHBxENR,
RCC_APBxENRy) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
5.3 RCC registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Contents RM0410
5/1896 DocID028270 Rev 2
5.3.1 RCC clock control register (RCC_CR) . . . . . . . . . . . . . . . . . . . . . . . . . 160
5.3.2 RCC PLL configuration register (RCC_PLLCFGR) . . . . . . . . . . . . . . . 162
5.3.3 RCC clock configuration register (RCC_CFGR) . . . . . . . . . . . . . . . . . 165
5.3.4 RCC clock interrupt register (RCC_CIR) . . . . . . . . . . . . . . . . . . . . . . . 167
5.3.5 RCC AHB1 peripheral reset register (RCC_AHB1RSTR) . . . . . . . . . . 170
5.3.6 RCC AHB2 peripheral reset register (RCC_AHB2RSTR) . . . . . . . . . . 173
5.3.7 RCC AHB3 peripheral reset register (RCC_AHB3RSTR) . . . . . . . . . . 174
5.3.8 RCC APB1 peripheral reset register (RCC_APB1RSTR) . . . . . . . . . . 174
5.3.9 RCC APB2 peripheral reset register (RCC_APB2RSTR) . . . . . . . . . . 178
5.3.10 RCC AHB1 peripheral clock register (RCC_AHB1ENR) . . . . . . . . . . . 181
5.3.11 RCC AHB2 peripheral clock enable register (RCC_AHB2ENR) . . . . . 183
5.3.12 RCC AHB3 peripheral clock enable register (RCC_AHB3ENR) . . . . . 184
5.3.13 RCC APB1 peripheral clock enable register (RCC_APB1ENR) . . . . . 184
5.3.14 RCC APB2 peripheral clock enable register (RCC_APB2ENR) . . . . . 188
5.3.15 RCC AHB1 peripheral clock enable in low-power mode register
(RCC_AHB1LPENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5.3.16 RCC AHB2 peripheral clock enable in low-power mode register
(RCC_AHB2LPENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
5.3.17 RCC AHB3 peripheral clock enable in low-power mode register
(RCC_AHB3LPENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
5.3.18 RCC APB1 peripheral clock enable in low-power mode register
(RCC_APB1LPENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
5.3.19 RCC APB2 peripheral clock enabled in low-power mode register
(RCC_APB2LPENR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.3.20 RCC backup domain control register (RCC_BDCR) . . . . . . . . . . . . . . 201
5.3.21 RCC clock control & status register (RCC_CSR) . . . . . . . . . . . . . . . . 202
5.3.22 RCC spread spectrum clock generation register (RCC_SSCGR) . . . . 204
5.3.23 RCC PLLI2S configuration register (RCC_PLLI2SCFGR) . . . . . . . . . 205
5.3.24 RCC PLLSAI configuration register (RCC_PLLSAICFGR) . . . . . . . . . 208
5.3.25 RCC dedicated clocks configuration register (RCC_DCKFGR1) . . . . 209
5.3.26 RCC dedicated clocks configuration register (DCKCFGR2) . . . . . . . . 211
5.3.27 RCC register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
6 General-purpose I/Os (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
6.2 GPIO main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
6.3 GPIO functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
6.3.1 General-purpose I/O (GPIO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220