EZR32 Happy Gecko Software Documentation  ezr32hg-doc-5.1.2
ezr32hg320f64r69.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EZR32HG320F64R69_H
35 #define EZR32HG320F64R69_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 /****** EZR32HG Peripheral Interrupt Numbers ********************************************/
62  DMA_IRQn = 0,
65  ADC0_IRQn = 4,
66  I2C0_IRQn = 5,
71  LEUART0_IRQn = 10,
72  PCNT0_IRQn = 11,
73  RTC_IRQn = 12,
74  CMU_IRQn = 13,
75  VCMP_IRQn = 14,
76  MSC_IRQn = 15,
77  AES_IRQn = 16,
80  USB_IRQn = 19,
81  TIMER2_IRQn = 20,
82 } IRQn_Type;
83 
84 /**************************************************************************/
89 #define __MPU_PRESENT 0
90 #define __VTOR_PRESENT 1
91 #define __NVIC_PRIO_BITS 2
92 #define __Vendor_SysTickConfig 0
96 /**************************************************************************/
102 #define _EFM32_HAPPY_FAMILY 1
103 #define _EFM_DEVICE
104 #define _EZR32_HAPPY_FAMILY 1
105 #define _EZR_DEVICE
106 #define _SILICON_LABS_32B_SERIES_0
107 #define _SILICON_LABS_32B_SERIES 0
108 #define _SILICON_LABS_GECKO_INTERNAL_SDID 77
109 #define _SILICON_LABS_GECKO_INTERNAL_SDID_77
110 #define _SILICON_LABS_32B_PLATFORM_1
111 #define _SILICON_LABS_32B_PLATFORM 1
113 /* If part number is not defined as compiler option, define it */
114 #if !defined(EZR32HG320F64R69)
115 #define EZR32HG320F64R69 1
116 #endif
117 
119 #define PART_NUMBER "EZR32HG320F64R69"
122 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
123 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
124 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
125 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
126 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
127 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
128 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
129 #define AES_MEM_BITS ((uint32_t) 0x10UL)
130 #define USBC_MEM_BASE ((uint32_t) 0x40100000UL)
131 #define USBC_MEM_SIZE ((uint32_t) 0x40000UL)
132 #define USBC_MEM_END ((uint32_t) 0x4013FFFFUL)
133 #define USBC_MEM_BITS ((uint32_t) 0x18UL)
134 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
135 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
136 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
137 #define PER_MEM_BITS ((uint32_t) 0x20UL)
138 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
139 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
140 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
141 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
142 #define DEVICE_MEM_BASE ((uint32_t) 0xF0040000UL)
143 #define DEVICE_MEM_SIZE ((uint32_t) 0x1000UL)
144 #define DEVICE_MEM_END ((uint32_t) 0xF0040FFFUL)
145 #define DEVICE_MEM_BITS ((uint32_t) 0x12UL)
146 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
147 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x20000UL)
148 #define RAM_CODE_MEM_END ((uint32_t) 0x1001FFFFUL)
149 #define RAM_CODE_MEM_BITS ((uint32_t) 0x17UL)
152 #define FLASH_BASE (0x00000000UL)
153 #define FLASH_SIZE (0x00010000UL)
154 #define FLASH_PAGE_SIZE 1024
155 #define SRAM_BASE (0x20000000UL)
156 #define SRAM_SIZE (0x00002000UL)
157 #define __CM0PLUS_REV 0x001
158 #define PRS_CHAN_COUNT 6
159 #define DMA_CHAN_COUNT 6
160 #define EXT_IRQ_COUNT 20
163 #define AFCHAN_MAX 42
164 #define AFCHANLOC_MAX 7
165 
166 #define AFACHAN_MAX 27
167 
168 /* Part number capabilities */
169 
170 #define TIMER_PRESENT
171 #define TIMER_COUNT 3
172 #define USART_PRESENT
173 #define USART_COUNT 1
174 #define USARTRF_PRESENT
175 #define USARTRF_COUNT 1
176 #define IDAC_PRESENT
177 #define IDAC_COUNT 1
178 #define ADC_PRESENT
179 #define ADC_COUNT 1
180 #define LEUART_PRESENT
181 #define LEUART_COUNT 1
182 #define PCNT_PRESENT
183 #define PCNT_COUNT 1
184 #define I2C_PRESENT
185 #define I2C_COUNT 1
186 #define AES_PRESENT
187 #define AES_COUNT 1
188 #define DMA_PRESENT
189 #define DMA_COUNT 1
190 #define LE_PRESENT
191 #define LE_COUNT 1
192 #define USBC_PRESENT
193 #define USBC_COUNT 1
194 #define USBLE_PRESENT
195 #define USBLE_COUNT 1
196 #define USB_PRESENT
197 #define USB_COUNT 1
198 #define MSC_PRESENT
199 #define MSC_COUNT 1
200 #define EMU_PRESENT
201 #define EMU_COUNT 1
202 #define RMU_PRESENT
203 #define RMU_COUNT 1
204 #define CMU_PRESENT
205 #define CMU_COUNT 1
206 #define PRS_PRESENT
207 #define PRS_COUNT 1
208 #define GPIO_PRESENT
209 #define GPIO_COUNT 1
210 #define VCMP_PRESENT
211 #define VCMP_COUNT 1
212 #define RTC_PRESENT
213 #define RTC_COUNT 1
214 #define HFXTAL_PRESENT
215 #define HFXTAL_COUNT 1
216 #define LFXTAL_PRESENT
217 #define LFXTAL_COUNT 1
218 #define USHFRCO_PRESENT
219 #define USHFRCO_COUNT 1
220 #define WDOG_PRESENT
221 #define WDOG_COUNT 1
222 #define DBG_PRESENT
223 #define DBG_COUNT 1
224 #define MTB_PRESENT
225 #define MTB_COUNT 1
226 #define BOOTLOADER_PRESENT
227 #define BOOTLOADER_COUNT 1
228 #define ANALOG_PRESENT
229 #define ANALOG_COUNT 1
230 
231 /**************************************************************************/
236 #define RF_USARTRF_LOCATION 5
237 #define RF_USARTRF_CS_PORT 2
238 #define RF_USARTRF_CS_PIN 0
239 #define RF_USARTRF_CLK_PORT 2
240 #define RF_USARTRF_CLK_PIN 3
241 #define RF_USARTRF_MISO_PORT 2
242 #define RF_USARTRF_MISO_PIN 2
243 #define RF_USARTRF_MOSI_PORT 2
244 #define RF_USARTRF_MOSI_PIN 1
245 #define RF_INT_PORT 2
246 #define RF_INT_PIN 4
247 #define RF_SDN_PORT 0
248 #define RF_SDN_PIN 2
254 #define ARM_MATH_CM0PLUS
255 #include "arm_math.h" /* To get __CLZ definitions etc. */
256 #include "core_cm0plus.h" /* Cortex-M0+ processor and core peripherals */
257 #include "system_ezr32hg.h" /* System Header */
258 
259 /**************************************************************************/
265 #include "ezr32hg_aes.h"
266 #include "ezr32hg_dma_ch.h"
267 #include "ezr32hg_dma.h"
268 #include "ezr32hg_usb_diep.h"
269 #include "ezr32hg_usb_doep.h"
270 #include "ezr32hg_usb.h"
271 #include "ezr32hg_msc.h"
272 #include "ezr32hg_emu.h"
273 #include "ezr32hg_rmu.h"
274 #include "ezr32hg_cmu.h"
275 #include "ezr32hg_timer_cc.h"
276 #include "ezr32hg_timer.h"
277 #include "ezr32hg_usart.h"
278 #include "ezr32hg_prs_ch.h"
279 #include "ezr32hg_prs.h"
280 #include "ezr32hg_idac.h"
281 #include "ezr32hg_gpio_p.h"
282 #include "ezr32hg_gpio.h"
283 #include "ezr32hg_vcmp.h"
284 #include "ezr32hg_adc.h"
285 #include "ezr32hg_leuart.h"
286 #include "ezr32hg_pcnt.h"
287 #include "ezr32hg_i2c.h"
288 #include "ezr32hg_rtc.h"
289 #include "ezr32hg_wdog.h"
290 #include "ezr32hg_mtb.h"
291 #include "ezr32hg_dma_descriptor.h"
292 #include "ezr32hg_devinfo.h"
293 #include "ezr32hg_romtable.h"
294 #include "ezr32hg_calibrate.h"
295 
298 /**************************************************************************/
303 #define AES_BASE (0x400E0000UL)
304 #define DMA_BASE (0x400C2000UL)
305 #define USB_BASE (0x400C4000UL)
306 #define MSC_BASE (0x400C0000UL)
307 #define EMU_BASE (0x400C6000UL)
308 #define RMU_BASE (0x400CA000UL)
309 #define CMU_BASE (0x400C8000UL)
310 #define TIMER0_BASE (0x40010000UL)
311 #define TIMER1_BASE (0x40010400UL)
312 #define TIMER2_BASE (0x40010800UL)
313 #define USART0_BASE (0x4000C000UL)
314 #define USARTRF1_BASE (0x4000C400UL)
315 #define PRS_BASE (0x400CC000UL)
316 #define IDAC0_BASE (0x40004000UL)
317 #define GPIO_BASE (0x40006000UL)
318 #define VCMP_BASE (0x40000000UL)
319 #define ADC0_BASE (0x40002000UL)
320 #define LEUART0_BASE (0x40084000UL)
321 #define PCNT0_BASE (0x40086000UL)
322 #define I2C0_BASE (0x4000A000UL)
323 #define RTC_BASE (0x40080000UL)
324 #define WDOG_BASE (0x40088000UL)
325 #define MTB_BASE (0xF0040000UL)
326 #define CALIBRATE_BASE (0x0FE08000UL)
327 #define DEVINFO_BASE (0x0FE081A8UL)
328 #define ROMTABLE_BASE (0xF00FFFD0UL)
329 #define LOCKBITS_BASE (0x0FE04000UL)
330 #define USERDATA_BASE (0x0FE00000UL)
334 /**************************************************************************/
339 #define AES ((AES_TypeDef *) AES_BASE)
340 #define DMA ((DMA_TypeDef *) DMA_BASE)
341 #define USB ((USB_TypeDef *) USB_BASE)
342 #define MSC ((MSC_TypeDef *) MSC_BASE)
343 #define EMU ((EMU_TypeDef *) EMU_BASE)
344 #define RMU ((RMU_TypeDef *) RMU_BASE)
345 #define CMU ((CMU_TypeDef *) CMU_BASE)
346 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
347 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
348 #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE)
349 #define USART0 ((USART_TypeDef *) USART0_BASE)
350 #define USARTRF1 ((USART_TypeDef *) USARTRF1_BASE)
351 #define PRS ((PRS_TypeDef *) PRS_BASE)
352 #define IDAC0 ((IDAC_TypeDef *) IDAC0_BASE)
353 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
354 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
355 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
356 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
357 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
358 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
359 #define RTC ((RTC_TypeDef *) RTC_BASE)
360 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
361 #define MTB ((MTB_TypeDef *) MTB_BASE)
362 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
363 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
364 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
368 /**************************************************************************/
373 #include "ezr32hg_prs_signals.h"
374 #include "ezr32hg_dmareq.h"
375 #include "ezr32hg_dmactrl.h"
376 #include "ezr32hg_usartrf.h"
377 
378 /**************************************************************************/
382 #define MSC_UNLOCK_CODE 0x1B71
383 #define EMU_UNLOCK_CODE 0xADE8
384 #define CMU_UNLOCK_CODE 0x580E
385 #define TIMER_UNLOCK_CODE 0xCE80
386 #define GPIO_UNLOCK_CODE 0xA534
392 /**************************************************************************/
397 #include "ezr32hg_af_ports.h"
398 #include "ezr32hg_af_pins.h"
399 
402 /**************************************************************************/
415 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
416  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
417 
422 #ifdef __cplusplus
423 }
424 #endif
425 #endif /* EZR32HG320F64R69_H */
CMSIS Cortex-M System Layer for EZR32HG devices.
EZR32HG_TIMER_CC register and bit field definitions.
EZR32HG_GPIO_P register and bit field definitions.
EZR32HG_I2C register and bit field definitions.
EZR32HG_RMU register and bit field definitions.
EZR32HG_TIMER register and bit field definitions.
EZR32HG_AF_PINS register and bit field definitions.
EZR32HG_ADC register and bit field definitions.
EZR32HG_DMA_CH register and bit field definitions.
EZR32HG_RTC register and bit field definitions.
EZR32HG_DMACTRL register and bit field definitions.
EZR32HG_AES register and bit field definitions.
EZR32HG_DMAREQ register and bit field definitions.
EZR32HG_PRS register and bit field definitions.
EZR32HG_DEVINFO register and bit field definitions.
EZR32HG_PRS_CH register and bit field definitions.
EZR32HG_USARTRF register and bit field definitions.
EZR32HG_MSC register and bit field definitions.
EZR32HG_IDAC register and bit field definitions.
EZR32HG_DMA register and bit field definitions.
EZR32HG_VCMP register and bit field definitions.
EZR32HG_DMA_DESCRIPTOR register and bit field definitions.
EZR32HG_LEUART register and bit field definitions.
EZR32HG_MTB register and bit field definitions.
enum IRQn IRQn_Type
EZR32HG_USB_DOEP register and bit field definitions.
EZR32HG_USART register and bit field definitions.
EZR32HG_GPIO register and bit field definitions.
EZR32HG_ROMTABLE register and bit field definitions.
EZR32HG_USB_DIEP register and bit field definitions.
EZR32HG_CMU register and bit field definitions.
EZR32HG_WDOG register and bit field definitions.
EZR32HG_EMU register and bit field definitions.
EZR32HG_PCNT register and bit field definitions.
EZR32HG_CALIBRATE register and bit field definitions.
EZR32HG_USB register and bit field definitions.