EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
efm32g890f128.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EFM32G890F128_H
35 #define EFM32G890F128_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /**************************************************************************/
46 /**************************************************************************/
52 typedef enum IRQn
53 {
54 /****** Cortex-M3 Processor Exceptions Numbers ********************************************/
58  BusFault_IRQn = -11,
60  SVCall_IRQn = -5,
62  PendSV_IRQn = -2,
63  SysTick_IRQn = -1,
65 /****** EFM32G Peripheral Interrupt Numbers ***********************************************/
66  DMA_IRQn = 0,
71  ACMP0_IRQn = 5,
72  ADC0_IRQn = 6,
73  DAC0_IRQn = 7,
74  I2C0_IRQn = 8,
76  TIMER1_IRQn = 10,
77  TIMER2_IRQn = 11,
84  LEUART0_IRQn = 18,
85  LEUART1_IRQn = 19,
87  PCNT0_IRQn = 21,
88  PCNT1_IRQn = 22,
89  PCNT2_IRQn = 23,
90  RTC_IRQn = 24,
91  CMU_IRQn = 25,
92  VCMP_IRQn = 26,
93  LCD_IRQn = 27,
94  MSC_IRQn = 28,
95  AES_IRQn = 29,
96 } IRQn_Type;
97 
98 /**************************************************************************/
103 #define __MPU_PRESENT 1
104 #define __VTOR_PRESENT 1
105 #define __NVIC_PRIO_BITS 3
106 #define __Vendor_SysTickConfig 0
110 /**************************************************************************/
116 #define _EFM32_GECKO_FAMILY 1
117 #define _EFM_DEVICE
118 #define _SILICON_LABS_32B_SERIES_0
119 #define _SILICON_LABS_32B_SERIES 0
120 #define _SILICON_LABS_GECKO_INTERNAL_SDID 71
121 #define _SILICON_LABS_GECKO_INTERNAL_SDID_71
122 #define _SILICON_LABS_32B_PLATFORM_1
123 #define _SILICON_LABS_32B_PLATFORM 1
125 /* If part number is not defined as compiler option, define it */
126 #if !defined(EFM32G890F128)
127 #define EFM32G890F128 1
128 #endif
129 
131 #define PART_NUMBER "EFM32G890F128"
134 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
135 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
136 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
137 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
138 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
139 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
140 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
141 #define AES_MEM_BITS ((uint32_t) 0x10UL)
142 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
143 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
144 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
145 #define PER_MEM_BITS ((uint32_t) 0x20UL)
146 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
147 #define RAM_MEM_SIZE ((uint32_t) 0x8000UL)
148 #define RAM_MEM_END ((uint32_t) 0x20007FFFUL)
149 #define RAM_MEM_BITS ((uint32_t) 0x15UL)
150 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
151 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x4000UL)
152 #define RAM_CODE_MEM_END ((uint32_t) 0x10003FFFUL)
153 #define RAM_CODE_MEM_BITS ((uint32_t) 0x14UL)
154 #define EBI_MEM_BASE ((uint32_t) 0x80000000UL)
155 #define EBI_MEM_SIZE ((uint32_t) 0x10000000UL)
156 #define EBI_MEM_END ((uint32_t) 0x8FFFFFFFUL)
157 #define EBI_MEM_BITS ((uint32_t) 0x28UL)
160 #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL)
161 #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL)
164 #define FLASH_BASE (0x00000000UL)
165 #define FLASH_SIZE (0x00020000UL)
166 #define FLASH_PAGE_SIZE 512
167 #define SRAM_BASE (0x20000000UL)
168 #define SRAM_SIZE (0x00004000UL)
169 #define __CM3_REV 0x200
170 #define PRS_CHAN_COUNT 8
171 #define DMA_CHAN_COUNT 8
172 #define EXT_IRQ_COUNT 31
175 #define AFCHAN_MAX 79
176 #define AFCHANLOC_MAX 4
177 
178 #define AFACHAN_MAX 37
179 
180 /* Part number capabilities */
181 
182 #define TIMER_PRESENT
183 #define TIMER_COUNT 3
184 #define USART_PRESENT
185 #define USART_COUNT 3
186 #define UART_PRESENT
187 #define UART_COUNT 1
188 #define LEUART_PRESENT
189 #define LEUART_COUNT 2
190 #define LETIMER_PRESENT
191 #define LETIMER_COUNT 1
192 #define PCNT_PRESENT
193 #define PCNT_COUNT 3
194 #define ACMP_PRESENT
195 #define ACMP_COUNT 2
196 #define DAC_PRESENT
197 #define DAC_COUNT 1
198 #define ADC_PRESENT
199 #define ADC_COUNT 1
200 #define I2C_PRESENT
201 #define I2C_COUNT 1
202 #define AES_PRESENT
203 #define AES_COUNT 1
204 #define DMA_PRESENT
205 #define DMA_COUNT 1
206 #define LE_PRESENT
207 #define LE_COUNT 1
208 #define MSC_PRESENT
209 #define MSC_COUNT 1
210 #define EMU_PRESENT
211 #define EMU_COUNT 1
212 #define RMU_PRESENT
213 #define RMU_COUNT 1
214 #define CMU_PRESENT
215 #define CMU_COUNT 1
216 #define EBI_PRESENT
217 #define EBI_COUNT 1
218 #define RTC_PRESENT
219 #define RTC_COUNT 1
220 #define PRS_PRESENT
221 #define PRS_COUNT 1
222 #define GPIO_PRESENT
223 #define GPIO_COUNT 1
224 #define VCMP_PRESENT
225 #define VCMP_COUNT 1
226 #define LCD_PRESENT
227 #define LCD_COUNT 1
228 #define HFXTAL_PRESENT
229 #define HFXTAL_COUNT 1
230 #define LFXTAL_PRESENT
231 #define LFXTAL_COUNT 1
232 #define WDOG_PRESENT
233 #define WDOG_COUNT 1
234 #define DBG_PRESENT
235 #define DBG_COUNT 1
236 #define BOOTLOADER_PRESENT
237 #define BOOTLOADER_COUNT 1
238 #define ANALOG_PRESENT
239 #define ANALOG_COUNT 1
240 
241 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
242 #include "system_efm32g.h" /* System Header */
243 
246 /**************************************************************************/
252 #include "efm32g_aes.h"
253 #include "efm32g_dma_ch.h"
254 #include "efm32g_dma.h"
255 #include "efm32g_msc.h"
256 #include "efm32g_emu.h"
257 #include "efm32g_rmu.h"
258 #include "efm32g_cmu.h"
259 #include "efm32g_ebi.h"
260 #include "efm32g_timer_cc.h"
261 #include "efm32g_timer.h"
262 #include "efm32g_usart.h"
263 #include "efm32g_leuart.h"
264 #include "efm32g_rtc.h"
265 #include "efm32g_letimer.h"
266 #include "efm32g_pcnt.h"
267 #include "efm32g_acmp.h"
268 #include "efm32g_prs_ch.h"
269 #include "efm32g_prs.h"
270 #include "efm32g_dac.h"
271 #include "efm32g_gpio_p.h"
272 #include "efm32g_gpio.h"
273 #include "efm32g_vcmp.h"
274 #include "efm32g_adc.h"
275 #include "efm32g_i2c.h"
276 #include "efm32g_lcd.h"
277 #include "efm32g_wdog.h"
278 #include "efm32g_dma_descriptor.h"
279 #include "efm32g_devinfo.h"
280 #include "efm32g_romtable.h"
281 #include "efm32g_calibrate.h"
282 
285 /**************************************************************************/
290 #define AES_BASE (0x400E0000UL)
291 #define DMA_BASE (0x400C2000UL)
292 #define MSC_BASE (0x400C0000UL)
293 #define EMU_BASE (0x400C6000UL)
294 #define RMU_BASE (0x400CA000UL)
295 #define CMU_BASE (0x400C8000UL)
296 #define EBI_BASE (0x40008000UL)
297 #define TIMER0_BASE (0x40010000UL)
298 #define TIMER1_BASE (0x40010400UL)
299 #define TIMER2_BASE (0x40010800UL)
300 #define USART0_BASE (0x4000C000UL)
301 #define USART1_BASE (0x4000C400UL)
302 #define USART2_BASE (0x4000C800UL)
303 #define UART0_BASE (0x4000E000UL)
304 #define LEUART0_BASE (0x40084000UL)
305 #define LEUART1_BASE (0x40084400UL)
306 #define RTC_BASE (0x40080000UL)
307 #define LETIMER0_BASE (0x40082000UL)
308 #define PCNT0_BASE (0x40086000UL)
309 #define PCNT1_BASE (0x40086400UL)
310 #define PCNT2_BASE (0x40086800UL)
311 #define ACMP0_BASE (0x40001000UL)
312 #define ACMP1_BASE (0x40001400UL)
313 #define PRS_BASE (0x400CC000UL)
314 #define DAC0_BASE (0x40004000UL)
315 #define GPIO_BASE (0x40006000UL)
316 #define VCMP_BASE (0x40000000UL)
317 #define ADC0_BASE (0x40002000UL)
318 #define I2C0_BASE (0x4000A000UL)
319 #define LCD_BASE (0x4008A000UL)
320 #define WDOG_BASE (0x40088000UL)
321 #define CALIBRATE_BASE (0x0FE08000UL)
322 #define DEVINFO_BASE (0x0FE081B0UL)
323 #define ROMTABLE_BASE (0xE00FFFD0UL)
324 #define LOCKBITS_BASE (0x0FE04000UL)
325 #define USERDATA_BASE (0x0FE00000UL)
329 /**************************************************************************/
334 #define AES ((AES_TypeDef *) AES_BASE)
335 #define DMA ((DMA_TypeDef *) DMA_BASE)
336 #define MSC ((MSC_TypeDef *) MSC_BASE)
337 #define EMU ((EMU_TypeDef *) EMU_BASE)
338 #define RMU ((RMU_TypeDef *) RMU_BASE)
339 #define CMU ((CMU_TypeDef *) CMU_BASE)
340 #define EBI ((EBI_TypeDef *) EBI_BASE)
341 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
342 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
343 #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE)
344 #define USART0 ((USART_TypeDef *) USART0_BASE)
345 #define USART1 ((USART_TypeDef *) USART1_BASE)
346 #define USART2 ((USART_TypeDef *) USART2_BASE)
347 #define UART0 ((USART_TypeDef *) UART0_BASE)
348 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
349 #define LEUART1 ((LEUART_TypeDef *) LEUART1_BASE)
350 #define RTC ((RTC_TypeDef *) RTC_BASE)
351 #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE)
352 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
353 #define PCNT1 ((PCNT_TypeDef *) PCNT1_BASE)
354 #define PCNT2 ((PCNT_TypeDef *) PCNT2_BASE)
355 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
356 #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE)
357 #define PRS ((PRS_TypeDef *) PRS_BASE)
358 #define DAC0 ((DAC_TypeDef *) DAC0_BASE)
359 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
360 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
361 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
362 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
363 #define LCD ((LCD_TypeDef *) LCD_BASE)
364 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
365 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
366 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
367 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
371 /**************************************************************************/
376 #include "efm32g_prs_signals.h"
377 #include "efm32g_dmareq.h"
378 #include "efm32g_dmactrl.h"
379 #include "efm32g_uart.h"
380 
381 /**************************************************************************/
385 #define MSC_UNLOCK_CODE 0x1B71
386 #define EMU_UNLOCK_CODE 0xADE8
387 #define CMU_UNLOCK_CODE 0x580E
388 #define TIMER_UNLOCK_CODE 0xCE80
389 #define GPIO_UNLOCK_CODE 0xA534
395 /**************************************************************************/
400 #include "efm32g_af_ports.h"
401 #include "efm32g_af_pins.h"
402 
405 /**************************************************************************/
418 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
419  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
420 
425 #ifdef __cplusplus
426 }
427 #endif
428 #endif /* EFM32G890F128_H */
EFM32G_ADC register and bit field definitions.
EFM32G_WDOG register and bit field definitions.
EFM32G_I2C register and bit field definitions.
EFM32G_DEVINFO register and bit field definitions.
EFM32G_GPIO register and bit field definitions.
EFM32G_LETIMER register and bit field definitions.
EFM32G_CALIBRATE register and bit field definitions.
EFM32G_CMU register and bit field definitions.
enum IRQn IRQn_Type
EFM32G_PCNT register and bit field definitions.
EFM32G_LEUART register and bit field definitions.
EFM32G_RTC register and bit field definitions.
EFM32G_USART register and bit field definitions.
EFM32G_DMA register and bit field definitions.
EFM32G_UART register and bit field definitions.
EFM32G_RMU register and bit field definitions.
EFM32G_ROMTABLE register and bit field definitions.
EFM32G_TIMER register and bit field definitions.
EFM32G_DMA_DESCRIPTOR register and bit field definitions.
EFM32G_DMACTRL register and bit field definitions.
EFM32G_AF_PINS register and bit field definitions.
EFM32G_MSC register and bit field definitions.
EFM32G_VCMP register and bit field definitions.
EFM32G_PRS_CH register and bit field definitions.
EFM32G_DMA_CH register and bit field definitions.
CMSIS Cortex-M3 System Layer for EFM32G devices.
EFM32G_PRS register and bit field definitions.
EFM32G_TIMER_CC register and bit field definitions.
EFM32G_DAC register and bit field definitions.
EFM32G_LCD register and bit field definitions.
EFM32G_GPIO_P register and bit field definitions.
EFM32G_AES register and bit field definitions.
EFM32G_EBI register and bit field definitions.
IRQn
Definition: efm32g890f128.h:52
EFM32G_EMU register and bit field definitions.
EFM32G_DMAREQ register and bit field definitions.
EFM32G_ACMP register and bit field definitions.