EFM32 Tiny Gecko Software Documentation  efm32tg-doc-5.1.2
efm32tg842f32.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EFM32TG842F32_H
35 #define EFM32TG842F32_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,
79  LESENSE_IRQn = 13,
80  LEUART0_IRQn = 14,
82  PCNT0_IRQn = 16,
83  RTC_IRQn = 17,
84  CMU_IRQn = 18,
85  VCMP_IRQn = 19,
86  LCD_IRQn = 20,
87  MSC_IRQn = 21,
88  AES_IRQn = 22,
89 } IRQn_Type;
90 
91 /**************************************************************************/
96 #define __MPU_PRESENT 0
97 #define __VTOR_PRESENT 1
98 #define __NVIC_PRIO_BITS 3
99 #define __Vendor_SysTickConfig 0
103 /**************************************************************************/
109 #define _EFM32_TINY_FAMILY 1
110 #define _EFM_DEVICE
111 #define _SILICON_LABS_32B_SERIES_0
112 #define _SILICON_LABS_32B_SERIES 0
113 #define _SILICON_LABS_GECKO_INTERNAL_SDID 73
114 #define _SILICON_LABS_GECKO_INTERNAL_SDID_73
115 #define _SILICON_LABS_32B_PLATFORM_1
116 #define _SILICON_LABS_32B_PLATFORM 1
118 /* If part number is not defined as compiler option, define it */
119 #if !defined(EFM32TG842F32)
120 #define EFM32TG842F32 1
121 #endif
122 
124 #define PART_NUMBER "EFM32TG842F32"
127 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
128 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
129 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
130 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
131 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
132 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
133 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
134 #define AES_MEM_BITS ((uint32_t) 0x10UL)
135 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
136 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
137 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
138 #define PER_MEM_BITS ((uint32_t) 0x20UL)
139 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
140 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
141 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
142 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
143 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
144 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x4000UL)
145 #define RAM_CODE_MEM_END ((uint32_t) 0x10003FFFUL)
146 #define RAM_CODE_MEM_BITS ((uint32_t) 0x14UL)
149 #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL)
150 #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL)
153 #define FLASH_BASE (0x00000000UL)
154 #define FLASH_SIZE (0x00008000UL)
155 #define FLASH_PAGE_SIZE 512
156 #define SRAM_BASE (0x20000000UL)
157 #define SRAM_SIZE (0x00001000UL)
158 #define __CM3_REV 0x201
159 #define PRS_CHAN_COUNT 8
160 #define DMA_CHAN_COUNT 8
161 #define EXT_IRQ_COUNT 23
164 #define AFCHAN_MAX 63
165 #define AFCHANLOC_MAX 7
166 
167 #define AFACHAN_MAX 47
168 
169 /* Part number capabilities */
170 
171 #define ACMP_PRESENT
172 #define ACMP_COUNT 2
173 #define USART_PRESENT
174 #define USART_COUNT 2
175 #define TIMER_PRESENT
176 #define TIMER_COUNT 2
177 #define LEUART_PRESENT
178 #define LEUART_COUNT 1
179 #define LETIMER_PRESENT
180 #define LETIMER_COUNT 1
181 #define PCNT_PRESENT
182 #define PCNT_COUNT 1
183 #define ADC_PRESENT
184 #define ADC_COUNT 1
185 #define DAC_PRESENT
186 #define DAC_COUNT 1
187 #define I2C_PRESENT
188 #define I2C_COUNT 1
189 #define AES_PRESENT
190 #define AES_COUNT 1
191 #define DMA_PRESENT
192 #define DMA_COUNT 1
193 #define LE_PRESENT
194 #define LE_COUNT 1
195 #define MSC_PRESENT
196 #define MSC_COUNT 1
197 #define EMU_PRESENT
198 #define EMU_COUNT 1
199 #define RMU_PRESENT
200 #define RMU_COUNT 1
201 #define CMU_PRESENT
202 #define CMU_COUNT 1
203 #define LESENSE_PRESENT
204 #define LESENSE_COUNT 1
205 #define RTC_PRESENT
206 #define RTC_COUNT 1
207 #define GPIO_PRESENT
208 #define GPIO_COUNT 1
209 #define VCMP_PRESENT
210 #define VCMP_COUNT 1
211 #define PRS_PRESENT
212 #define PRS_COUNT 1
213 #define OPAMP_PRESENT
214 #define OPAMP_COUNT 1
215 #define LCD_PRESENT
216 #define LCD_COUNT 1
217 #define HFXTAL_PRESENT
218 #define HFXTAL_COUNT 1
219 #define LFXTAL_PRESENT
220 #define LFXTAL_COUNT 1
221 #define WDOG_PRESENT
222 #define WDOG_COUNT 1
223 #define DBG_PRESENT
224 #define DBG_COUNT 1
225 #define BOOTLOADER_PRESENT
226 #define BOOTLOADER_COUNT 1
227 #define ANALOG_PRESENT
228 #define ANALOG_COUNT 1
229 
230 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
231 #include "system_efm32tg.h" /* System Header */
232 
235 /**************************************************************************/
241 #include "efm32tg_aes.h"
242 #include "efm32tg_dma_ch.h"
243 #include "efm32tg_dma.h"
244 #include "efm32tg_msc.h"
245 #include "efm32tg_emu.h"
246 #include "efm32tg_rmu.h"
247 #include "efm32tg_cmu.h"
248 #include "efm32tg_lesense_st.h"
249 #include "efm32tg_lesense_buf.h"
250 #include "efm32tg_lesense_ch.h"
251 #include "efm32tg_lesense.h"
252 #include "efm32tg_rtc.h"
253 #include "efm32tg_acmp.h"
254 #include "efm32tg_usart.h"
255 #include "efm32tg_timer_cc.h"
256 #include "efm32tg_timer.h"
257 #include "efm32tg_gpio_p.h"
258 #include "efm32tg_gpio.h"
259 #include "efm32tg_vcmp.h"
260 #include "efm32tg_prs_ch.h"
261 #include "efm32tg_prs.h"
262 #include "efm32tg_leuart.h"
263 #include "efm32tg_letimer.h"
264 #include "efm32tg_pcnt.h"
265 #include "efm32tg_adc.h"
266 #include "efm32tg_dac.h"
267 #include "efm32tg_i2c.h"
268 #include "efm32tg_lcd.h"
269 #include "efm32tg_wdog.h"
270 #include "efm32tg_dma_descriptor.h"
271 #include "efm32tg_devinfo.h"
272 #include "efm32tg_romtable.h"
273 #include "efm32tg_calibrate.h"
274 
277 /**************************************************************************/
282 #define AES_BASE (0x400E0000UL)
283 #define DMA_BASE (0x400C2000UL)
284 #define MSC_BASE (0x400C0000UL)
285 #define EMU_BASE (0x400C6000UL)
286 #define RMU_BASE (0x400CA000UL)
287 #define CMU_BASE (0x400C8000UL)
288 #define LESENSE_BASE (0x4008C000UL)
289 #define RTC_BASE (0x40080000UL)
290 #define ACMP0_BASE (0x40001000UL)
291 #define ACMP1_BASE (0x40001400UL)
292 #define USART0_BASE (0x4000C000UL)
293 #define USART1_BASE (0x4000C400UL)
294 #define TIMER0_BASE (0x40010000UL)
295 #define TIMER1_BASE (0x40010400UL)
296 #define GPIO_BASE (0x40006000UL)
297 #define VCMP_BASE (0x40000000UL)
298 #define PRS_BASE (0x400CC000UL)
299 #define LEUART0_BASE (0x40084000UL)
300 #define LETIMER0_BASE (0x40082000UL)
301 #define PCNT0_BASE (0x40086000UL)
302 #define ADC0_BASE (0x40002000UL)
303 #define DAC0_BASE (0x40004000UL)
304 #define I2C0_BASE (0x4000A000UL)
305 #define LCD_BASE (0x4008A000UL)
306 #define WDOG_BASE (0x40088000UL)
307 #define CALIBRATE_BASE (0x0FE08000UL)
308 #define DEVINFO_BASE (0x0FE081B0UL)
309 #define ROMTABLE_BASE (0xE00FFFD0UL)
310 #define LOCKBITS_BASE (0x0FE04000UL)
311 #define USERDATA_BASE (0x0FE00000UL)
315 /**************************************************************************/
320 #define AES ((AES_TypeDef *) AES_BASE)
321 #define DMA ((DMA_TypeDef *) DMA_BASE)
322 #define MSC ((MSC_TypeDef *) MSC_BASE)
323 #define EMU ((EMU_TypeDef *) EMU_BASE)
324 #define RMU ((RMU_TypeDef *) RMU_BASE)
325 #define CMU ((CMU_TypeDef *) CMU_BASE)
326 #define LESENSE ((LESENSE_TypeDef *) LESENSE_BASE)
327 #define RTC ((RTC_TypeDef *) RTC_BASE)
328 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
329 #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE)
330 #define USART0 ((USART_TypeDef *) USART0_BASE)
331 #define USART1 ((USART_TypeDef *) USART1_BASE)
332 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
333 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
334 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
335 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
336 #define PRS ((PRS_TypeDef *) PRS_BASE)
337 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
338 #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE)
339 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
340 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
341 #define DAC0 ((DAC_TypeDef *) DAC0_BASE)
342 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
343 #define LCD ((LCD_TypeDef *) LCD_BASE)
344 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
345 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
346 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
347 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
351 /**************************************************************************/
356 #include "efm32tg_prs_signals.h"
357 #include "efm32tg_dmareq.h"
358 #include "efm32tg_dmactrl.h"
359 
360 /**************************************************************************/
364 #define MSC_UNLOCK_CODE 0x1B71
365 #define EMU_UNLOCK_CODE 0xADE8
366 #define CMU_UNLOCK_CODE 0x580E
367 #define TIMER_UNLOCK_CODE 0xCE80
368 #define GPIO_UNLOCK_CODE 0xA534
374 /**************************************************************************/
379 #include "efm32tg_af_ports.h"
380 #include "efm32tg_af_pins.h"
381 
384 /**************************************************************************/
397 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
398  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
399 
404 #ifdef __cplusplus
405 }
406 #endif
407 #endif /* EFM32TG842F32_H */
EFM32TG_MSC register and bit field definitions.
CMSIS Cortex-M3 System Layer for EFM32TG devices.
EFM32TG_DAC register and bit field definitions.
enum IRQn IRQn_Type
EFM32TG_LETIMER register and bit field definitions.
EFM32TG_DMACTRL register and bit field definitions.
EFM32TG_LESENSE_ST register and bit field definitions.
EFM32TG_LEUART register and bit field definitions.
EFM32TG_PCNT register and bit field definitions.
EFM32TG_RMU register and bit field definitions.
EFM32TG_WDOG register and bit field definitions.
EFM32TG_PRS register and bit field definitions.
EFM32TG_RTC register and bit field definitions.
EFM32TG_ACMP register and bit field definitions.
EFM32TG_EMU register and bit field definitions.
IRQn
Definition: efm32tg842f32.h:52
EFM32TG_PRS_CH register and bit field definitions.
EFM32TG_CALIBRATE register and bit field definitions.
EFM32TG_LESENSE register and bit field definitions.
EFM32TG_CMU register and bit field definitions.
EFM32TG_DMA_CH register and bit field definitions.
EFM32TG_DEVINFO register and bit field definitions.
EFM32TG_LCD register and bit field definitions.
EFM32TG_I2C register and bit field definitions.
EFM32TG_DMA_DESCRIPTOR register and bit field definitions.
EFM32TG_DMA register and bit field definitions.
EFM32TG_ROMTABLE register and bit field definitions.
EFM32TG_ADC register and bit field definitions.
EFM32TG_GPIO_P register and bit field definitions.
EFM32TG_USART register and bit field definitions.
EFM32TG_TIMER_CC register and bit field definitions.
EFM32TG_TIMER register and bit field definitions.
EFM32TG_VCMP register and bit field definitions.
EFM32TG_DMAREQ register and bit field definitions.
EFM32TG_LESENSE_BUF register and bit field definitions.
EFM32TG_LESENSE_CH register and bit field definitions.
EFM32TG_GPIO register and bit field definitions.
EFM32TG_AF_PINS register and bit field definitions.
EFM32TG_AES register and bit field definitions.