00001
00034 #ifndef __SILICON_LABS_EFM32TG840F32_H__
00035 #define __SILICON_LABS_EFM32TG840F32_H__
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00041
00046
00052 typedef enum IRQn
00053 {
00054
00055 NonMaskableInt_IRQn = -14,
00056 HardFault_IRQn = -13,
00057 MemoryManagement_IRQn = -12,
00058 BusFault_IRQn = -11,
00059 UsageFault_IRQn = -10,
00060 SVCall_IRQn = -5,
00061 DebugMonitor_IRQn = -4,
00062 PendSV_IRQn = -2,
00063 SysTick_IRQn = -1,
00065
00066 DMA_IRQn = 0,
00067 GPIO_EVEN_IRQn = 1,
00068 TIMER0_IRQn = 2,
00069 USART0_RX_IRQn = 3,
00070 USART0_TX_IRQn = 4,
00071 ACMP0_IRQn = 5,
00072 ADC0_IRQn = 6,
00073 DAC0_IRQn = 7,
00074 I2C0_IRQn = 8,
00075 GPIO_ODD_IRQn = 9,
00076 TIMER1_IRQn = 10,
00077 USART1_RX_IRQn = 11,
00078 USART1_TX_IRQn = 12,
00079 LESENSE_IRQn = 13,
00080 LEUART0_IRQn = 14,
00081 LETIMER0_IRQn = 15,
00082 PCNT0_IRQn = 16,
00083 RTC_IRQn = 17,
00084 CMU_IRQn = 18,
00085 VCMP_IRQn = 19,
00086 LCD_IRQn = 20,
00087 MSC_IRQn = 21,
00088 AES_IRQn = 22,
00089 } IRQn_Type;
00090
00091
00096 #define __MPU_PRESENT 0
00097 #define __NVIC_PRIO_BITS 3
00098 #define __Vendor_SysTickConfig 0
00102
00108 #define _EFM32_TINY_FAMILY 1
00109 #define _EFM_DEVICE
00110 #define _SILICON_LABS_32B_PLATFORM_1
00111 #define _SILICON_LABS_32B_PLATFORM 1
00113
00114 #if !defined(EFM32TG840F32)
00115 #define EFM32TG840F32 1
00116 #endif
00117
00119 #define PART_NUMBER "EFM32TG840F32"
00122 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
00123 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
00124 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
00125 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
00126 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
00127 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
00128 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
00129 #define AES_MEM_BITS ((uint32_t) 0x10UL)
00130 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
00131 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
00132 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
00133 #define PER_MEM_BITS ((uint32_t) 0x20UL)
00134 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
00135 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
00136 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
00137 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
00138 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
00139 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x4000UL)
00140 #define RAM_CODE_MEM_END ((uint32_t) 0x10003FFFUL)
00141 #define RAM_CODE_MEM_BITS ((uint32_t) 0x14UL)
00144 #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL)
00145 #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL)
00148 #define FLASH_BASE (0x00000000UL)
00149 #define FLASH_SIZE (0x00008000UL)
00150 #define FLASH_PAGE_SIZE 512
00151 #define SRAM_BASE (0x20000000UL)
00152 #define SRAM_SIZE (0x00001000UL)
00153 #define __CM3_REV 0x201
00154 #define PRS_CHAN_COUNT 8
00155 #define DMA_CHAN_COUNT 8
00158 #define AFCHAN_MAX 63
00159 #define AFCHANLOC_MAX 7
00160
00161 #define AFACHAN_MAX 47
00162
00163
00164
00165 #define ACMP_PRESENT
00166 #define ACMP_COUNT 2
00167 #define USART_PRESENT
00168 #define USART_COUNT 2
00169 #define TIMER_PRESENT
00170 #define TIMER_COUNT 2
00171 #define LEUART_PRESENT
00172 #define LEUART_COUNT 1
00173 #define LETIMER_PRESENT
00174 #define LETIMER_COUNT 1
00175 #define PCNT_PRESENT
00176 #define PCNT_COUNT 1
00177 #define ADC_PRESENT
00178 #define ADC_COUNT 1
00179 #define DAC_PRESENT
00180 #define DAC_COUNT 1
00181 #define I2C_PRESENT
00182 #define I2C_COUNT 1
00183 #define AES_PRESENT
00184 #define AES_COUNT 1
00185 #define DMA_PRESENT
00186 #define DMA_COUNT 1
00187 #define LE_PRESENT
00188 #define LE_COUNT 1
00189 #define MSC_PRESENT
00190 #define MSC_COUNT 1
00191 #define EMU_PRESENT
00192 #define EMU_COUNT 1
00193 #define RMU_PRESENT
00194 #define RMU_COUNT 1
00195 #define CMU_PRESENT
00196 #define CMU_COUNT 1
00197 #define LESENSE_PRESENT
00198 #define LESENSE_COUNT 1
00199 #define RTC_PRESENT
00200 #define RTC_COUNT 1
00201 #define GPIO_PRESENT
00202 #define GPIO_COUNT 1
00203 #define VCMP_PRESENT
00204 #define VCMP_COUNT 1
00205 #define PRS_PRESENT
00206 #define PRS_COUNT 1
00207 #define OPAMP_PRESENT
00208 #define OPAMP_COUNT 1
00209 #define LCD_PRESENT
00210 #define LCD_COUNT 1
00211 #define HFXTAL_PRESENT
00212 #define HFXTAL_COUNT 1
00213 #define LFXTAL_PRESENT
00214 #define LFXTAL_COUNT 1
00215 #define WDOG_PRESENT
00216 #define WDOG_COUNT 1
00217 #define DBG_PRESENT
00218 #define DBG_COUNT 1
00219 #define BOOTLOADER_PRESENT
00220 #define BOOTLOADER_COUNT 1
00221 #define ANALOG_PRESENT
00222 #define ANALOG_COUNT 1
00223
00224 #include "core_cm3.h"
00225 #include "system_efm32tg.h"
00226
00229
00235 #include "efm32tg_aes.h"
00236 #include "efm32tg_dma_ch.h"
00237 #include "efm32tg_dma.h"
00238 #include "efm32tg_msc.h"
00239 #include "efm32tg_emu.h"
00240 #include "efm32tg_rmu.h"
00241 #include "efm32tg_cmu.h"
00242 #include "efm32tg_lesense_st.h"
00243 #include "efm32tg_lesense_buf.h"
00244 #include "efm32tg_lesense_ch.h"
00245 #include "efm32tg_lesense.h"
00246 #include "efm32tg_rtc.h"
00247 #include "efm32tg_acmp.h"
00248 #include "efm32tg_usart.h"
00249 #include "efm32tg_timer_cc.h"
00250 #include "efm32tg_timer.h"
00251 #include "efm32tg_gpio_p.h"
00252 #include "efm32tg_gpio.h"
00253 #include "efm32tg_vcmp.h"
00254 #include "efm32tg_prs_ch.h"
00255 #include "efm32tg_prs.h"
00256 #include "efm32tg_leuart.h"
00257 #include "efm32tg_letimer.h"
00258 #include "efm32tg_pcnt.h"
00259 #include "efm32tg_adc.h"
00260 #include "efm32tg_dac.h"
00261 #include "efm32tg_i2c.h"
00262 #include "efm32tg_lcd.h"
00263 #include "efm32tg_wdog.h"
00264 #include "efm32tg_dma_descriptor.h"
00265 #include "efm32tg_devinfo.h"
00266 #include "efm32tg_romtable.h"
00267 #include "efm32tg_calibrate.h"
00268
00271
00276 #define AES_BASE (0x400E0000UL)
00277 #define DMA_BASE (0x400C2000UL)
00278 #define MSC_BASE (0x400C0000UL)
00279 #define EMU_BASE (0x400C6000UL)
00280 #define RMU_BASE (0x400CA000UL)
00281 #define CMU_BASE (0x400C8000UL)
00282 #define LESENSE_BASE (0x4008C000UL)
00283 #define RTC_BASE (0x40080000UL)
00284 #define ACMP0_BASE (0x40001000UL)
00285 #define ACMP1_BASE (0x40001400UL)
00286 #define USART0_BASE (0x4000C000UL)
00287 #define USART1_BASE (0x4000C400UL)
00288 #define TIMER0_BASE (0x40010000UL)
00289 #define TIMER1_BASE (0x40010400UL)
00290 #define GPIO_BASE (0x40006000UL)
00291 #define VCMP_BASE (0x40000000UL)
00292 #define PRS_BASE (0x400CC000UL)
00293 #define LEUART0_BASE (0x40084000UL)
00294 #define LETIMER0_BASE (0x40082000UL)
00295 #define PCNT0_BASE (0x40086000UL)
00296 #define ADC0_BASE (0x40002000UL)
00297 #define DAC0_BASE (0x40004000UL)
00298 #define I2C0_BASE (0x4000A000UL)
00299 #define LCD_BASE (0x4008A000UL)
00300 #define WDOG_BASE (0x40088000UL)
00301 #define CALIBRATE_BASE (0x0FE08000UL)
00302 #define DEVINFO_BASE (0x0FE081B0UL)
00303 #define ROMTABLE_BASE (0xE00FFFD0UL)
00304 #define LOCKBITS_BASE (0x0FE04000UL)
00305 #define USERDATA_BASE (0x0FE00000UL)
00309
00314 #define AES ((AES_TypeDef *) AES_BASE)
00315 #define DMA ((DMA_TypeDef *) DMA_BASE)
00316 #define MSC ((MSC_TypeDef *) MSC_BASE)
00317 #define EMU ((EMU_TypeDef *) EMU_BASE)
00318 #define RMU ((RMU_TypeDef *) RMU_BASE)
00319 #define CMU ((CMU_TypeDef *) CMU_BASE)
00320 #define LESENSE ((LESENSE_TypeDef *) LESENSE_BASE)
00321 #define RTC ((RTC_TypeDef *) RTC_BASE)
00322 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
00323 #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE)
00324 #define USART0 ((USART_TypeDef *) USART0_BASE)
00325 #define USART1 ((USART_TypeDef *) USART1_BASE)
00326 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
00327 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
00328 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
00329 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
00330 #define PRS ((PRS_TypeDef *) PRS_BASE)
00331 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
00332 #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE)
00333 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
00334 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
00335 #define DAC0 ((DAC_TypeDef *) DAC0_BASE)
00336 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
00337 #define LCD ((LCD_TypeDef *) LCD_BASE)
00338 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
00339 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
00340 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
00341 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
00345
00350 #include "efm32tg_prs_signals.h"
00351 #include "efm32tg_dmareq.h"
00352 #include "efm32tg_dmactrl.h"
00353
00354
00358 #define MSC_UNLOCK_CODE 0x1B71
00359 #define EMU_UNLOCK_CODE 0xADE8
00360 #define CMU_UNLOCK_CODE 0x580E
00361 #define TIMER_UNLOCK_CODE 0xCE80
00362 #define GPIO_UNLOCK_CODE 0xA534
00368
00373 #include "efm32tg_af_ports.h"
00374 #include "efm32tg_af_pins.h"
00375
00378
00391 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
00392 REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
00393
00398 #ifdef __cplusplus
00399 }
00400 #endif
00401 #endif