libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
stm32/h7/memorymap.h
Go to the documentation of this file.
1/*
2 * This file is part of the libopencm3 project.
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef LIBOPENCM3_MEMORYMAP_H
19#define LIBOPENCM3_MEMORYMAP_H
20
22
23/* --- STM32H7 specific peripheral definitions ----------------------------- */
24
25/* Memory map for all busses */
26#define FLASH_BASE 0x08000000U
27#define PERIPH_BASE 0x40000000U
28#define PERIPH_BASE_APB1 0x40000000U
29#define PERIPH_BASE_APB2 0x40010000U
30#define PERIPH_BASE_APB3 0x50000000U
31#define PERIPH_BASE_AHB1 0x40020000U
32#define PERIPH_BASE_AHB2 0x48020000U
33#define PERIPH_BASE_AHB3 0x51000000U
34#define PERIPH_BASE_AHB4 0x58000000U
35
36/* Table 8: Register boundary addresses */
37
38/* AHB4 Peripherals */
39#define GPIO_PORT_A_BASE 0x58020000U
40#define GPIO_PORT_B_BASE 0x58020400U
41#define GPIO_PORT_C_BASE 0x58020800U
42#define GPIO_PORT_D_BASE 0x58020C00U
43#define GPIO_PORT_E_BASE 0x58021000U
44#define GPIO_PORT_F_BASE 0x58021400U
45#define GPIO_PORT_G_BASE 0x58021800U
46#define GPIO_PORT_H_BASE 0x58021C00U
47#define GPIO_PORT_I_BASE 0x58022000U
48#define GPIO_PORT_J_BASE 0x58022400U
49#define GPIO_PORT_K_BASE 0x58022800U
50#define RCC_BASE 0x58024400U
51#define POWER_CONTROL_BASE 0x58024800U
52#define CRC_BASE 0x58024C00U
53#define BDMA_BASE 0x58025400U
54#define DMAMUX2_BASE 0x58025800U
55#define ADC3_BASE 0x58026000U
56#define HSEM_BASE 0x58026400U
57
58/* APB4 Peripherals */
59#define SAI4_BASE 0x58005400U
60#define IWDG1_BASE 0x58004800U
61#define RTC_BASE 0x58004000U
62#define VREF_BASE 0x58003C00U
63#define COMP1_BASE 0x58003800U
64#define LPTIM5_BASE 0x58003000U
65#define LPTIM4_BASE 0x58002C00U
66#define LPTIM3_BASE 0x58002800U
67#define LPTIM2_BASE 0x58002400U
68#define I2C4_BASE 0x58001C00U
69#define SPI6_BASE 0x58001400U
70#define LPUART1_BASE 0x58000C00U
71#define SYSCFG_BASE 0x58000400U
72#define EXTI_BASE 0x58000000U
73
74/* AHB3 Peripherals */
75#define DELAY_SDMMC1_BASE 0x52008000U
76#define SDMMC1_BASE 0x52007000U
77#define DELAY_QSPI_BASE 0x52006000U
78#define QUADSPI_BASE 0x52005000U
79#define FMC_BASE 0x52004000U
80#define JPEG_BASE 0x52003000U
81#define FLASH_MEM_INTERFACE_BASE 0x52002000U
82#define CHROMART_BASE 0x52001000U
83#define MDMA_BASE 0x52000000U
84#define GPV_BASE 0x51000000U
85
86/* APB3 Peripherals */
87#define WWDG1_BASE 0x50003000U
88#define LTDC_BASE 0x50001000U
89
90/* AHB2 Peripherals */
91#define DELAY_SDMMC2_BASE 0x48022800U
92#define SDMMC2_BASE 0x48022400U
93#define RNG_BASE 0x48021800U
94#define HASH_BASE 0x48021400U
95#define CRYPTO_BASE 0x48021000U
96#define DCMI_BASE 0x48020000U
97
98/* AHB1 Peripherals */
99#define USB2_OTG_FS_BASE 0x40080000U
100#define USB1_OTG_HS_BASE 0x40040000U
101#define ETHERNET_MAC_BASE 0x40028000U
102#define ADC1_ADC2_BASE 0x40022000U
103#define DMAMUX1_BASE 0x40020800U
104#define DMA2_BASE 0x40020400U
105#define DMA1_BASE 0x40020000U
106
107/* APB2 Peripherals */
108#define HRTIM_BASE 0x40017400U
109#define DFSDM1_BASE 0x40017000U
110#define SAI3_BASE 0x40016000U
111#define SAI2_BASE 0x40015C00U
112#define SAI1_BASE 0x40015800U
113#define SPI5_BASE 0x40015000U
114#define TIM17_BASE 0x40014800U
115#define TIM16_BASE 0x40014400U
116#define TIM15_BASE 0x40014000U
117#define SPI4_BASE 0x40013400U
118#define SPI1_BASE 0x40013000U
119#define USART6_BASE 0x40011400U
120#define USART1_BASE 0x40011000U
121#define TIM8_BASE 0x40010400U
122#define TIM1_BASE 0x40010000U
123
124/* APB1 Peripherals */
125#define CAN_MSG_BASE 0x4000AC00U
126#define CAN_CCU_BASE 0x4000A800U
127#define FDCAN2_BASE 0x4000A400U
128#define FDCAN1_BASE 0x4000A000U
129#define MDIOS_BASE 0x40009400U
130#define OPAMP_BASE 0x40009000U
131#define SWPMI_BASE 0x40008800U
132#define CRS_BASE 0x40008400U
133#define UART8_BASE 0x40007C00U
134#define UART7_BASE 0x40007800U
135#define DAC_BASE 0x40007400U
136#define HDMI_CEC_BASE 0x40006C00U
137#define I2C3_BASE 0x40005C00U
138#define I2C2_BASE 0x40005800U
139#define I2C1_BASE 0x40005400U
140#define UART5_BASE 0x40005000U
141#define UART4_BASE 0x40004C00U
142#define USART3_BASE 0x40004800U
143#define USART2_BASE 0x40004400U
144#define SPDIFRX1_BASE 0x40004000U
145#define SPI3_BASE 0x40003C00U
146#define SPI2_BASE 0x40003800U
147#define LPTIM1_BASE 0x40002400U
148#define TIM14_BASE 0x40002000U
149#define TIM13_BASE 0x40001C00U
150#define TIM12_BASE 0x40001800U
151#define TIM7_BASE 0x40001400U
152#define TIM6_BASE 0x40001000U
153#define TIM5_BASE 0x40000C00U
154#define TIM4_BASE 0x40000800U
155#define TIM3_BASE 0x40000400U
156#define TIM2_BASE 0x40000000U
157
158/* Debug/Trace Peripherals */
159#define DBGMCU_BASE 0x5C001000U
160
161#endif