libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
efm32/lg/memorymap.h
Go to the documentation of this file.
1/*
2 * This file is part of the libopencm3 project.
3 *
4 * Copyright (C) 2015 Kuldeep Singh Dhaka <kuldeepdhaka9@gmail.com>
5 *
6 * This library is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBOPENCM3_EFM32_MEMORYMAP_H
21#define LIBOPENCM3_EFM32_MEMORYMAP_H
22
24
25#define PERIPH_BASE (0x40000000U)
26
27/* Device information */
28#define DI_BASE (0x0FE08000U)
29
30/* all names are "DI_" + <reg> */
31#define DI_CMU_LFRCOCTRL MMIO32(DI_BASE + 0x020)
32#define DI_CMU_HFRCOCTRL MMIO32(DI_BASE + 0x028)
33#define DI_CMU_AUXHFRCOCTRL MMIO32(DI_BASE + 0x030)
34#define DI_ADC0_CAL MMIO32(DI_BASE + 0x040)
35#define DI_ADC0_BIASPROG MMIO32(DI_BASE + 0x048)
36#define DI_DAC0_CAL MMIO32(DI_BASE + 0x050)
37#define DI_DAC0_BIASPROG MMIO32(DI_BASE + 0x058)
38#define DI_ACMP0_CTRL MMIO32(DI_BASE + 0x060)
39#define DI_ACMP1_CTRL MMIO32(DI_BASE + 0x068)
40#define DI_CMU_LCDCTRL MMIO32(DI_BASE + 0x078)
41#define DI_DAC0_OPACTRL MMIO32(DI_BASE + 0x0A0)
42#define DI_DAC0_OPAOFFSET MMIO32(DI_BASE + 0x0A8)
43#define DI_EMU_BUINACT MMIO32(DI_BASE + 0x0B0)
44#define DI_EMU_BUACT MMIO32(DI_BASE + 0x0B8)
45#define DI_EMU_BUBODBUVINCAL MMIO32(DI_BASE + 0x0C0)
46#define DI_EMU_BUBODUNREGCAL MMIO32(DI_BASE + 0x0C8)
47#define DI_DI_CRC MMIO16(DI_BASE + 0x1B0)
48#define DI_CAL_TEMP_0 MMIO8(DI_BASE + 0x1B2)
49#define DI_ADC0_CAL_1V25 MMIO16(DI_BASE + 0x1B4)
50#define DI_ADC0_CAL_2V5 MMIO16(DI_BASE + 0x1B6)
51#define DI_ADC0_CAL_VDD MMIO16(DI_BASE + 0x1B8)
52#define DI_ADC0_CAL_5VDIFF MMIO16(DI_BASE + 0x1BA)
53#define DI_ADC0_CAL_2XVDD MMIO16(DI_BASE + 0x1BC)
54#define DI_ADC0_TEMP_0_READ_1V25 MMIO16(DI_BASE + 0x1BE)
55#define DI_DAC0_CAL_1V25 MMIO32(DI_BASE + 0x1C8)
56#define DI_DAC0_CAL_2V5 MMIO32(DI_BASE + 0x1CC)
57#define DI_DAC0_CAL_VDD MMIO32(DI_BASE + 0x1D0)
58#define DI_AUXHFRCO_CALIB_BAND_1 MMIO8(DI_BASE + 0x1D4)
59#define DI_AUXHFRCO_CALIB_BAND_7 MMIO8(DI_BASE + 0x1D5)
60#define DI_AUXHFRCO_CALIB_BAND_11 MMIO8(DI_BASE + 0x1D6)
61#define DI_AUXHFRCO_CALIB_BAND_14 MMIO8(DI_BASE + 0x1D7)
62#define DI_AUXHFRCO_CALIB_BAND_21 MMIO8(DI_BASE + 0x1D8)
63#define DI_AUXHFRCO_CALIB_BAND_28 MMIO8(DI_BASE + 0x1D9)
64#define DI_HFRCO_CALIB_BAND_1 MMIO8(DI_BASE + 0x1DC)
65#define DI_HFRCO_CALIB_BAND_7 MMIO8(DI_BASE + 0x1DD)
66#define DI_HFRCO_CALIB_BAND_11 MMIO8(DI_BASE + 0x1DE)
67#define DI_HFRCO_CALIB_BAND_14 MMIO8(DI_BASE + 0x1DF)
68#define DI_HFRCO_CALIB_BAND_21 MMIO8(DI_BASE + 0x1E0)
69#define DI_HFRCO_CALIB_BAND_28 MMIO8(DI_BASE + 0x1E1)
70#define DI_MEM_INFO_PAGE_SIZE MMIO8(DI_BASE + 0x1E7)
71#define DI_UNIQUE_0 MMIO32(DI_BASE + 0x1F0)
72#define DI_UNIQUE_1 MMIO32(DI_BASE + 0x1F4)
73#define DI_MEM_INFO_FLASH MMIO16(DI_BASE + 0x1F8)
74#define DI_MEM_INFO_RAM MMIO16(DI_BASE + 0x1FA)
75#define DI_PART_NUMBER MMIO16(DI_BASE + 0x1FC)
76#define DI_PART_FAMILY MMIO8(DI_BASE + 0x1FE)
77#define DI_PROD_REV MMIO8(DI_BASE + 0x1FF)
78
79#define AES_BASE (PERIPH_BASE + 0xE0000)
80#define PRS_BASE (PERIPH_BASE + 0xCC000)
81#define RMU_BASE (PERIPH_BASE + 0xCA000)
82#define CMU_BASE (PERIPH_BASE + 0xC8000)
83#define EMU_BASE (PERIPH_BASE + 0xC6000)
84#define USB_BASE (PERIPH_BASE + 0xC4000)
85#define DMA_BASE (PERIPH_BASE + 0xC2000)
86#define MSC_BASE (PERIPH_BASE + 0xC0000)
87#define LESENSE_BASE (PERIPH_BASE + 0x8C000)
88#define LCD_BASE (PERIPH_BASE + 0x8A000)
89#define WDOG_BASE (PERIPH_BASE + 0x88000)
90#define PCNT2_BASE (PERIPH_BASE + 0x86800)
91#define PCNT1_BASE (PERIPH_BASE + 0x86400)
92#define PCNT0_BASE (PERIPH_BASE + 0x86000)
93#define LEUART1_BASE (PERIPH_BASE + 0x84400)
94#define LEUART0_BASE (PERIPH_BASE + 0x84000)
95#define LETIMER0_BASE (PERIPH_BASE + 0x82000)
96#define BURTC_BASE (PERIPH_BASE + 0x81000)
97#define RTC_BASE (PERIPH_BASE + 0x80000)
98#define TIMER3_BASE (PERIPH_BASE + 0x10C00)
99#define TIMER2_BASE (PERIPH_BASE + 0x10800)
100#define TIMER1_BASE (PERIPH_BASE + 0x10400)
101#define TIMER0_BASE (PERIPH_BASE + 0x10000)
102#define UART1_BASE (PERIPH_BASE + 0x0E400)
103#define UART0_BASE (PERIPH_BASE + 0x0E000)
104#define USART2_BASE (PERIPH_BASE + 0x0C800)
105#define USART1_BASE (PERIPH_BASE + 0x0C400)
106#define USART0_BASE (PERIPH_BASE + 0x0C000)
107#define I2C1_BASE (PERIPH_BASE + 0x0A400)
108#define I2C0_BASE (PERIPH_BASE + 0x0A000)
109#define EBI_BASE (PERIPH_BASE + 0x08000)
110#define GPIO_BASE (PERIPH_BASE + 0x06000)
111#define DAC0_BASE (PERIPH_BASE + 0x04000)
112#define ADC0_BASE (PERIPH_BASE + 0x02000)
113#define ACMP1_BASE (PERIPH_BASE + 0x01400)
114#define ACMP0_BASE (PERIPH_BASE + 0x01000)
115#define VCMP_BASE (PERIPH_BASE + 0x00000)
116
117#endif