EFM32 Zero Gecko Software Documentation  efm32zg-doc-5.1.2
efm32zg222f32.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EFM32ZG222F32_H
35 #define EFM32ZG222F32_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /**************************************************************************/
46 /**************************************************************************/
52 typedef enum IRQn
53 {
54 /****** Cortex-M0+ Processor Exceptions Numbers *****************************************/
57  SVCall_IRQn = -5,
58  PendSV_IRQn = -2,
59  SysTick_IRQn = -1,
61 /****** EFM32ZG Peripheral Interrupt Numbers ********************************************/
62  DMA_IRQn = 0,
65  ACMP0_IRQn = 3,
66  ADC0_IRQn = 4,
67  I2C0_IRQn = 5,
72  LEUART0_IRQn = 10,
73  PCNT0_IRQn = 11,
74  RTC_IRQn = 12,
75  CMU_IRQn = 13,
76  VCMP_IRQn = 14,
77  MSC_IRQn = 15,
78  AES_IRQn = 16,
79 } IRQn_Type;
80 
81 /**************************************************************************/
86 #define __MPU_PRESENT 0
87 #define __VTOR_PRESENT 1
88 #define __NVIC_PRIO_BITS 2
89 #define __Vendor_SysTickConfig 0
93 /**************************************************************************/
99 #define _EFM32_ZERO_FAMILY 1
100 #define _EFM_DEVICE
101 #define _SILICON_LABS_32B_SERIES_0
102 #define _SILICON_LABS_32B_SERIES 0
103 #define _SILICON_LABS_GECKO_INTERNAL_SDID 76
104 #define _SILICON_LABS_GECKO_INTERNAL_SDID_76
105 #define _SILICON_LABS_32B_PLATFORM_1
106 #define _SILICON_LABS_32B_PLATFORM 1
108 /* If part number is not defined as compiler option, define it */
109 #if !defined(EFM32ZG222F32)
110 #define EFM32ZG222F32 1
111 #endif
112 
114 #define PART_NUMBER "EFM32ZG222F32"
117 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
118 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
119 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
120 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
121 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
122 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
123 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
124 #define AES_MEM_BITS ((uint32_t) 0x10UL)
125 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
126 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
127 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
128 #define PER_MEM_BITS ((uint32_t) 0x20UL)
129 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
130 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
131 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
132 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
133 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
134 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x20000UL)
135 #define RAM_CODE_MEM_END ((uint32_t) 0x1001FFFFUL)
136 #define RAM_CODE_MEM_BITS ((uint32_t) 0x17UL)
139 #define FLASH_BASE (0x00000000UL)
140 #define FLASH_SIZE (0x00008000UL)
141 #define FLASH_PAGE_SIZE 1024
142 #define SRAM_BASE (0x20000000UL)
143 #define SRAM_SIZE (0x00001000UL)
144 #define __CM0PLUS_REV 0x001
145 #define PRS_CHAN_COUNT 4
146 #define DMA_CHAN_COUNT 4
147 #define EXT_IRQ_COUNT 19
150 #define AFCHAN_MAX 33
151 #define AFCHANLOC_MAX 7
152 
153 #define AFACHAN_MAX 25
154 
155 /* Part number capabilities */
156 
157 #define TIMER_PRESENT
158 #define TIMER_COUNT 2
159 #define ACMP_PRESENT
160 #define ACMP_COUNT 1
161 #define USART_PRESENT
162 #define USART_COUNT 1
163 #define IDAC_PRESENT
164 #define IDAC_COUNT 1
165 #define ADC_PRESENT
166 #define ADC_COUNT 1
167 #define LEUART_PRESENT
168 #define LEUART_COUNT 1
169 #define PCNT_PRESENT
170 #define PCNT_COUNT 1
171 #define I2C_PRESENT
172 #define I2C_COUNT 1
173 #define AES_PRESENT
174 #define AES_COUNT 1
175 #define DMA_PRESENT
176 #define DMA_COUNT 1
177 #define LE_PRESENT
178 #define LE_COUNT 1
179 #define MSC_PRESENT
180 #define MSC_COUNT 1
181 #define EMU_PRESENT
182 #define EMU_COUNT 1
183 #define RMU_PRESENT
184 #define RMU_COUNT 1
185 #define CMU_PRESENT
186 #define CMU_COUNT 1
187 #define PRS_PRESENT
188 #define PRS_COUNT 1
189 #define GPIO_PRESENT
190 #define GPIO_COUNT 1
191 #define VCMP_PRESENT
192 #define VCMP_COUNT 1
193 #define RTC_PRESENT
194 #define RTC_COUNT 1
195 #define HFXTAL_PRESENT
196 #define HFXTAL_COUNT 1
197 #define LFXTAL_PRESENT
198 #define LFXTAL_COUNT 1
199 #define WDOG_PRESENT
200 #define WDOG_COUNT 1
201 #define DBG_PRESENT
202 #define DBG_COUNT 1
203 #define BOOTLOADER_PRESENT
204 #define BOOTLOADER_COUNT 1
205 #define ANALOG_PRESENT
206 #define ANALOG_COUNT 1
207 
210 #define ARM_MATH_CM0PLUS
211 #include "arm_math.h" /* To get __CLZ definitions etc. */
212 #include "core_cm0plus.h" /* Cortex-M0+ processor and core peripherals */
213 #include "system_efm32zg.h" /* System Header */
214 
215 /**************************************************************************/
221 #include "efm32zg_aes.h"
222 #include "efm32zg_dma_ch.h"
223 #include "efm32zg_dma.h"
224 #include "efm32zg_msc.h"
225 #include "efm32zg_emu.h"
226 #include "efm32zg_rmu.h"
227 #include "efm32zg_cmu.h"
228 #include "efm32zg_timer_cc.h"
229 #include "efm32zg_timer.h"
230 #include "efm32zg_acmp.h"
231 #include "efm32zg_usart.h"
232 #include "efm32zg_prs_ch.h"
233 #include "efm32zg_prs.h"
234 #include "efm32zg_idac.h"
235 #include "efm32zg_gpio_p.h"
236 #include "efm32zg_gpio.h"
237 #include "efm32zg_vcmp.h"
238 #include "efm32zg_adc.h"
239 #include "efm32zg_leuart.h"
240 #include "efm32zg_pcnt.h"
241 #include "efm32zg_i2c.h"
242 #include "efm32zg_rtc.h"
243 #include "efm32zg_wdog.h"
244 #include "efm32zg_dma_descriptor.h"
245 #include "efm32zg_devinfo.h"
246 #include "efm32zg_romtable.h"
247 #include "efm32zg_calibrate.h"
248 
251 /**************************************************************************/
256 #define AES_BASE (0x400E0000UL)
257 #define DMA_BASE (0x400C2000UL)
258 #define MSC_BASE (0x400C0000UL)
259 #define EMU_BASE (0x400C6000UL)
260 #define RMU_BASE (0x400CA000UL)
261 #define CMU_BASE (0x400C8000UL)
262 #define TIMER0_BASE (0x40010000UL)
263 #define TIMER1_BASE (0x40010400UL)
264 #define ACMP0_BASE (0x40001000UL)
265 #define USART1_BASE (0x4000C400UL)
266 #define PRS_BASE (0x400CC000UL)
267 #define IDAC0_BASE (0x40004000UL)
268 #define GPIO_BASE (0x40006000UL)
269 #define VCMP_BASE (0x40000000UL)
270 #define ADC0_BASE (0x40002000UL)
271 #define LEUART0_BASE (0x40084000UL)
272 #define PCNT0_BASE (0x40086000UL)
273 #define I2C0_BASE (0x4000A000UL)
274 #define RTC_BASE (0x40080000UL)
275 #define WDOG_BASE (0x40088000UL)
276 #define CALIBRATE_BASE (0x0FE08000UL)
277 #define DEVINFO_BASE (0x0FE081B0UL)
278 #define ROMTABLE_BASE (0xF00FFFD0UL)
279 #define LOCKBITS_BASE (0x0FE04000UL)
280 #define USERDATA_BASE (0x0FE00000UL)
284 /**************************************************************************/
289 #define AES ((AES_TypeDef *) AES_BASE)
290 #define DMA ((DMA_TypeDef *) DMA_BASE)
291 #define MSC ((MSC_TypeDef *) MSC_BASE)
292 #define EMU ((EMU_TypeDef *) EMU_BASE)
293 #define RMU ((RMU_TypeDef *) RMU_BASE)
294 #define CMU ((CMU_TypeDef *) CMU_BASE)
295 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
296 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
297 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
298 #define USART1 ((USART_TypeDef *) USART1_BASE)
299 #define PRS ((PRS_TypeDef *) PRS_BASE)
300 #define IDAC0 ((IDAC_TypeDef *) IDAC0_BASE)
301 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
302 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
303 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
304 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
305 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
306 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
307 #define RTC ((RTC_TypeDef *) RTC_BASE)
308 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
309 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
310 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
311 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
315 /**************************************************************************/
320 #include "efm32zg_prs_signals.h"
321 #include "efm32zg_dmareq.h"
322 #include "efm32zg_dmactrl.h"
323 
324 /**************************************************************************/
328 #define MSC_UNLOCK_CODE 0x1B71
329 #define EMU_UNLOCK_CODE 0xADE8
330 #define CMU_UNLOCK_CODE 0x580E
331 #define TIMER_UNLOCK_CODE 0xCE80
332 #define GPIO_UNLOCK_CODE 0xA534
338 /**************************************************************************/
343 #include "efm32zg_af_ports.h"
344 #include "efm32zg_af_pins.h"
345 
348 /**************************************************************************/
361 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
362  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
363 
368 #ifdef __cplusplus
369 }
370 #endif
371 #endif /* EFM32ZG222F32_H */
IRQn
Definition: efm32zg222f32.h:52
EFM32ZG_PRS_CH register and bit field definitions.
EFM32ZG_DMA_CH register and bit field definitions.
EFM32ZG_PCNT register and bit field definitions.
EFM32ZG_DMA_DESCRIPTOR register and bit field definitions.
EFM32ZG_DEVINFO register and bit field definitions.
EFM32ZG_USART register and bit field definitions.
EFM32ZG_TIMER register and bit field definitions.
EFM32ZG_ACMP register and bit field definitions.
EFM32ZG_AES register and bit field definitions.
EFM32ZG_RTC register and bit field definitions.
EFM32ZG_WDOG register and bit field definitions.
EFM32ZG_DMA register and bit field definitions.
EFM32ZG_TIMER_CC register and bit field definitions.
EFM32ZG_MSC register and bit field definitions.
EFM32ZG_GPIO_P register and bit field definitions.
EFM32ZG_CALIBRATE register and bit field definitions.
EFM32ZG_VCMP register and bit field definitions.
enum IRQn IRQn_Type
EFM32ZG_LEUART register and bit field definitions.
EFM32ZG_RMU register and bit field definitions.
EFM32ZG_IDAC register and bit field definitions.
EFM32ZG_ADC register and bit field definitions.
CMSIS Cortex-M System Layer for EFM32 devices.
EFM32ZG_DMAREQ register and bit field definitions.
EFM32ZG_AF_PINS register and bit field definitions.
EFM32ZG_DMACTRL register and bit field definitions.
EFM32ZG_ROMTABLE register and bit field definitions.
EFM32ZG_PRS register and bit field definitions.
EFM32ZG_EMU register and bit field definitions.
EFM32ZG_GPIO register and bit field definitions.
EFM32ZG_I2C register and bit field definitions.
EFM32ZG_CMU register and bit field definitions.