EZR32 Wonder Gecko Software Documentation  ezr32wg-doc-5.1.2
ezr32wg330f256r69.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EZR32WG330F256R69_H
35 #define EZR32WG330F256R69_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /**************************************************************************/
46 /**************************************************************************/
52 typedef enum IRQn
53 {
54 /****** Cortex-M4 Processor Exceptions Numbers ********************************************/
58  BusFault_IRQn = -11,
60  SVCall_IRQn = -5,
62  PendSV_IRQn = -2,
63  SysTick_IRQn = -1,
65 /****** EZR32WG Peripheral Interrupt Numbers **********************************************/
66  DMA_IRQn = 0,
71  USB_IRQn = 5,
72  ACMP0_IRQn = 6,
73  ADC0_IRQn = 7,
74  DAC0_IRQn = 8,
75  I2C0_IRQn = 9,
76  I2C1_IRQn = 10,
78  TIMER1_IRQn = 12,
79  TIMER2_IRQn = 13,
80  TIMER3_IRQn = 14,
83  LESENSE_IRQn = 17,
90  LEUART0_IRQn = 24,
91  LEUART1_IRQn = 25,
93  PCNT0_IRQn = 27,
94  PCNT1_IRQn = 28,
95  PCNT2_IRQn = 29,
96  RTC_IRQn = 30,
97  BURTC_IRQn = 31,
98  CMU_IRQn = 32,
99  VCMP_IRQn = 33,
100  MSC_IRQn = 35,
101  AES_IRQn = 36,
102  EMU_IRQn = 38,
103  FPUEH_IRQn = 39,
104 } IRQn_Type;
105 
106 /**************************************************************************/
111 #define __MPU_PRESENT 1
112 #define __FPU_PRESENT 1
113 #define __VTOR_PRESENT 1
114 #define __NVIC_PRIO_BITS 3
115 #define __Vendor_SysTickConfig 0
119 /**************************************************************************/
125 #define _EFM32_WONDER_FAMILY 1
126 #define _EFM_DEVICE
127 #define _EZR32_WONDER_FAMILY 1
128 #define _EZR_DEVICE
129 #define _SILICON_LABS_32B_SERIES_0
130 #define _SILICON_LABS_32B_SERIES 0
131 #define _SILICON_LABS_GECKO_INTERNAL_SDID 74
132 #define _SILICON_LABS_GECKO_INTERNAL_SDID_74
133 #define _SILICON_LABS_32B_PLATFORM_1
134 #define _SILICON_LABS_32B_PLATFORM 1
136 /* If part number is not defined as compiler option, define it */
137 #if !defined(EZR32WG330F256R69)
138 #define EZR32WG330F256R69 1
139 #endif
140 
142 #define PART_NUMBER "EZR32WG330F256R69"
145 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
146 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
147 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
148 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
149 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
150 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
151 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
152 #define AES_MEM_BITS ((uint32_t) 0x10UL)
153 #define USBC_MEM_BASE ((uint32_t) 0x40100000UL)
154 #define USBC_MEM_SIZE ((uint32_t) 0x40000UL)
155 #define USBC_MEM_END ((uint32_t) 0x4013FFFFUL)
156 #define USBC_MEM_BITS ((uint32_t) 0x18UL)
157 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
158 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
159 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
160 #define PER_MEM_BITS ((uint32_t) 0x20UL)
161 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
162 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
163 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
164 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
165 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
166 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x20000UL)
167 #define RAM_CODE_MEM_END ((uint32_t) 0x1001FFFFUL)
168 #define RAM_CODE_MEM_BITS ((uint32_t) 0x17UL)
171 #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL)
172 #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL)
175 #define FLASH_BASE (0x00000000UL)
176 #define FLASH_SIZE (0x00040000UL)
177 #define FLASH_PAGE_SIZE 2048
178 #define SRAM_BASE (0x20000000UL)
179 #define SRAM_SIZE (0x00008000UL)
180 #define __CM4_REV 0x001
181 #define PRS_CHAN_COUNT 12
182 #define DMA_CHAN_COUNT 12
183 #define EXT_IRQ_COUNT 39
186 #define AFCHAN_MAX 84
187 #define AFCHANLOC_MAX 7
188 
189 #define AFACHAN_MAX 50
190 
191 /* Part number capabilities */
192 
193 #define USARTRF_PRESENT
194 #define USARTRF_COUNT 1
195 #define USART_PRESENT
196 #define USART_COUNT 2
197 #define UART_PRESENT
198 #define UART_COUNT 2
199 #define TIMER_PRESENT
200 #define TIMER_COUNT 4
201 #define ACMP_PRESENT
202 #define ACMP_COUNT 2
203 #define LEUART_PRESENT
204 #define LEUART_COUNT 2
205 #define LETIMER_PRESENT
206 #define LETIMER_COUNT 1
207 #define PCNT_PRESENT
208 #define PCNT_COUNT 3
209 #define I2C_PRESENT
210 #define I2C_COUNT 2
211 #define ADC_PRESENT
212 #define ADC_COUNT 1
213 #define DAC_PRESENT
214 #define DAC_COUNT 1
215 #define DMA_PRESENT
216 #define DMA_COUNT 1
217 #define AES_PRESENT
218 #define AES_COUNT 1
219 #define USBC_PRESENT
220 #define USBC_COUNT 1
221 #define USB_PRESENT
222 #define USB_COUNT 1
223 #define LE_PRESENT
224 #define LE_COUNT 1
225 #define MSC_PRESENT
226 #define MSC_COUNT 1
227 #define EMU_PRESENT
228 #define EMU_COUNT 1
229 #define RMU_PRESENT
230 #define RMU_COUNT 1
231 #define CMU_PRESENT
232 #define CMU_COUNT 1
233 #define LESENSE_PRESENT
234 #define LESENSE_COUNT 1
235 #define FPUEH_PRESENT
236 #define FPUEH_COUNT 1
237 #define RTC_PRESENT
238 #define RTC_COUNT 1
239 #define GPIO_PRESENT
240 #define GPIO_COUNT 1
241 #define VCMP_PRESENT
242 #define VCMP_COUNT 1
243 #define PRS_PRESENT
244 #define PRS_COUNT 1
245 #define OPAMP_PRESENT
246 #define OPAMP_COUNT 1
247 #define BU_PRESENT
248 #define BU_COUNT 1
249 #define BURTC_PRESENT
250 #define BURTC_COUNT 1
251 #define HFXTAL_PRESENT
252 #define HFXTAL_COUNT 1
253 #define LFXTAL_PRESENT
254 #define LFXTAL_COUNT 1
255 #define WDOG_PRESENT
256 #define WDOG_COUNT 1
257 #define DBG_PRESENT
258 #define DBG_COUNT 1
259 #define ETM_PRESENT
260 #define ETM_COUNT 1
261 #define BOOTLOADER_PRESENT
262 #define BOOTLOADER_COUNT 1
263 #define ANALOG_PRESENT
264 #define ANALOG_COUNT 1
265 #define RF_PRESENT
266 #define RF_COUNT 1
267 
268 /**************************************************************************/
273 #define RF_USARTRF_LOCATION 0
274 #define RF_USARTRF_CS_PORT 4
275 #define RF_USARTRF_CS_PIN 9
276 #define RF_USARTRF_CLK_PORT 4
277 #define RF_USARTRF_CLK_PIN 12
278 #define RF_USARTRF_MISO_PORT 4
279 #define RF_USARTRF_MISO_PIN 11
280 #define RF_USARTRF_MOSI_PORT 4
281 #define RF_USARTRF_MOSI_PIN 10
282 #define RF_INT_PORT 4
283 #define RF_INT_PIN 13
284 #define RF_GPIO0_PORT 0
285 #define RF_GPIO0_PIN 15
286 #define RF_GPIO1_PORT 4
287 #define RF_GPIO1_PIN 14
288 #define RF_SDN_PORT 4
289 #define RF_SDN_PIN 8
293 #include "core_cm4.h" /* Cortex-M4 processor and core peripherals */
294 #include "system_ezr32wg.h" /* System Header */
295 
298 /**************************************************************************/
304 #include "ezr32wg_dma_ch.h"
305 #include "ezr32wg_dma.h"
306 #include "ezr32wg_aes.h"
307 #include "ezr32wg_usb_hc.h"
308 #include "ezr32wg_usb_diep.h"
309 #include "ezr32wg_usb_doep.h"
310 #include "ezr32wg_usb.h"
311 #include "ezr32wg_msc.h"
312 #include "ezr32wg_emu.h"
313 #include "ezr32wg_rmu.h"
314 #include "ezr32wg_cmu.h"
315 #include "ezr32wg_lesense_st.h"
316 #include "ezr32wg_lesense_buf.h"
317 #include "ezr32wg_lesense_ch.h"
318 #include "ezr32wg_lesense.h"
319 #include "ezr32wg_fpueh.h"
320 #include "ezr32wg_usart.h"
321 #include "ezr32wg_timer_cc.h"
322 #include "ezr32wg_timer.h"
323 #include "ezr32wg_acmp.h"
324 #include "ezr32wg_leuart.h"
325 #include "ezr32wg_rtc.h"
326 #include "ezr32wg_letimer.h"
327 #include "ezr32wg_pcnt.h"
328 #include "ezr32wg_i2c.h"
329 #include "ezr32wg_gpio_p.h"
330 #include "ezr32wg_gpio.h"
331 #include "ezr32wg_vcmp.h"
332 #include "ezr32wg_prs_ch.h"
333 #include "ezr32wg_prs.h"
334 #include "ezr32wg_adc.h"
335 #include "ezr32wg_dac.h"
336 #include "ezr32wg_burtc_ret.h"
337 #include "ezr32wg_burtc.h"
338 #include "ezr32wg_wdog.h"
339 #include "ezr32wg_etm.h"
340 #include "ezr32wg_dma_descriptor.h"
341 #include "ezr32wg_devinfo.h"
342 #include "ezr32wg_romtable.h"
343 #include "ezr32wg_calibrate.h"
344 
347 /**************************************************************************/
352 #define DMA_BASE (0x400C2000UL)
353 #define AES_BASE (0x400E0000UL)
354 #define USB_BASE (0x400C4000UL)
355 #define MSC_BASE (0x400C0000UL)
356 #define EMU_BASE (0x400C6000UL)
357 #define RMU_BASE (0x400CA000UL)
358 #define CMU_BASE (0x400C8000UL)
359 #define LESENSE_BASE (0x4008C000UL)
360 #define FPUEH_BASE (0x400C1C00UL)
361 #define USARTRF0_BASE (0x4000C000UL)
362 #define USART1_BASE (0x4000C400UL)
363 #define USART2_BASE (0x4000C800UL)
364 #define UART0_BASE (0x4000E000UL)
365 #define UART1_BASE (0x4000E400UL)
366 #define TIMER0_BASE (0x40010000UL)
367 #define TIMER1_BASE (0x40010400UL)
368 #define TIMER2_BASE (0x40010800UL)
369 #define TIMER3_BASE (0x40010C00UL)
370 #define ACMP0_BASE (0x40001000UL)
371 #define ACMP1_BASE (0x40001400UL)
372 #define LEUART0_BASE (0x40084000UL)
373 #define LEUART1_BASE (0x40084400UL)
374 #define RTC_BASE (0x40080000UL)
375 #define LETIMER0_BASE (0x40082000UL)
376 #define PCNT0_BASE (0x40086000UL)
377 #define PCNT1_BASE (0x40086400UL)
378 #define PCNT2_BASE (0x40086800UL)
379 #define I2C0_BASE (0x4000A000UL)
380 #define I2C1_BASE (0x4000A400UL)
381 #define GPIO_BASE (0x40006000UL)
382 #define VCMP_BASE (0x40000000UL)
383 #define PRS_BASE (0x400CC000UL)
384 #define ADC0_BASE (0x40002000UL)
385 #define DAC0_BASE (0x40004000UL)
386 #define BURTC_BASE (0x40081000UL)
387 #define WDOG_BASE (0x40088000UL)
388 #define ETM_BASE (0xE0041000UL)
389 #define CALIBRATE_BASE (0x0FE08000UL)
390 #define DEVINFO_BASE (0x0FE081A8UL)
391 #define ROMTABLE_BASE (0xE00FFFD0UL)
392 #define LOCKBITS_BASE (0x0FE04000UL)
393 #define USERDATA_BASE (0x0FE00000UL)
397 /**************************************************************************/
402 #define DMA ((DMA_TypeDef *) DMA_BASE)
403 #define AES ((AES_TypeDef *) AES_BASE)
404 #define USB ((USB_TypeDef *) USB_BASE)
405 #define MSC ((MSC_TypeDef *) MSC_BASE)
406 #define EMU ((EMU_TypeDef *) EMU_BASE)
407 #define RMU ((RMU_TypeDef *) RMU_BASE)
408 #define CMU ((CMU_TypeDef *) CMU_BASE)
409 #define LESENSE ((LESENSE_TypeDef *) LESENSE_BASE)
410 #define FPUEH ((FPUEH_TypeDef *) FPUEH_BASE)
411 #define USARTRF0 ((USART_TypeDef *) USARTRF0_BASE)
412 #define USART1 ((USART_TypeDef *) USART1_BASE)
413 #define USART2 ((USART_TypeDef *) USART2_BASE)
414 #define UART0 ((USART_TypeDef *) UART0_BASE)
415 #define UART1 ((USART_TypeDef *) UART1_BASE)
416 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
417 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
418 #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE)
419 #define TIMER3 ((TIMER_TypeDef *) TIMER3_BASE)
420 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
421 #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE)
422 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
423 #define LEUART1 ((LEUART_TypeDef *) LEUART1_BASE)
424 #define RTC ((RTC_TypeDef *) RTC_BASE)
425 #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE)
426 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
427 #define PCNT1 ((PCNT_TypeDef *) PCNT1_BASE)
428 #define PCNT2 ((PCNT_TypeDef *) PCNT2_BASE)
429 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
430 #define I2C1 ((I2C_TypeDef *) I2C1_BASE)
431 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
432 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
433 #define PRS ((PRS_TypeDef *) PRS_BASE)
434 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
435 #define DAC0 ((DAC_TypeDef *) DAC0_BASE)
436 #define BURTC ((BURTC_TypeDef *) BURTC_BASE)
437 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
438 #define ETM ((ETM_TypeDef *) ETM_BASE)
439 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
440 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
441 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
445 /**************************************************************************/
450 #include "ezr32wg_prs_signals.h"
451 #include "ezr32wg_dmareq.h"
452 #include "ezr32wg_dmactrl.h"
453 #include "ezr32wg_usartrf.h"
454 #include "ezr32wg_uart.h"
455 
456 /**************************************************************************/
460 #define MSC_UNLOCK_CODE 0x1B71
461 #define EMU_UNLOCK_CODE 0xADE8
462 #define CMU_UNLOCK_CODE 0x580E
463 #define TIMER_UNLOCK_CODE 0xCE80
464 #define GPIO_UNLOCK_CODE 0xA534
465 #define BURTC_UNLOCK_CODE 0xAEE8
471 /**************************************************************************/
476 #include "ezr32wg_af_ports.h"
477 #include "ezr32wg_af_pins.h"
478 
481 /**************************************************************************/
494 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
495  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
496 
501 #ifdef __cplusplus
502 }
503 #endif
504 #endif /* EZR32WG330F256R69_H */
EZR32WG_BURTC_RET register and bit field definitions.
EZR32WG_AES register and bit field definitions.
EZR32WG_DAC register and bit field definitions.
EZR32WG_AF_PINS register and bit field definitions.
EZR32WG_ETM register and bit field definitions.
EZR32WG_ACMP register and bit field definitions.
EZR32WG_LESENSE register and bit field definitions.
enum IRQn IRQn_Type
EZR32WG_DMA_DESCRIPTOR register and bit field definitions.
EZR32WG_USB_DOEP register and bit field definitions.
EZR32WG_FPUEH register and bit field definitions.
EZR32WG_LESENSE_CH register and bit field definitions.
EZR32WG_GPIO register and bit field definitions.
EZR32WG_ROMTABLE register and bit field definitions.
EZR32WG_LEUART register and bit field definitions.
EZR32WG_CMU register and bit field definitions.
EZR32WG_USB_DIEP register and bit field definitions.
EZR32WG_EMU register and bit field definitions.
EZR32WG_BURTC register and bit field definitions.
EZR32WG_TIMER register and bit field definitions.
EZR32WG_LETIMER register and bit field definitions.
EZR32WG_TIMER_CC register and bit field definitions.
EZR32WG_DMAREQ register and bit field definitions.
EZR32WG_UART register and bit field definitions.
EZR32WG_USB_HC register and bit field definitions.
EZR32WG_PRS_CH register and bit field definitions.
CMSIS Cortex-M4 System Layer for EZR32WG devices.
EZR32WG_VCMP register and bit field definitions.
EZR32WG_RMU register and bit field definitions.
EZR32WG_DMA_CH register and bit field definitions.
EZR32WG_I2C register and bit field definitions.
EZR32WG_USB register and bit field definitions.
EZR32WG_WDOG register and bit field definitions.
EZR32WG_LESENSE_BUF register and bit field definitions.
EZR32WG_GPIO_P register and bit field definitions.
EZR32WG_DEVINFO register and bit field definitions.
EZR32WG_CALIBRATE register and bit field definitions.
EZR32WG_LESENSE_ST register and bit field definitions.
EZR32WG_ADC register and bit field definitions.
EZR32WG_DMACTRL register and bit field definitions.
EZR32WG_PRS register and bit field definitions.
EZR32WG_USARTRF register and bit field definitions.
EZR32WG_PCNT register and bit field definitions.
EZR32WG_DMA register and bit field definitions.
EZR32WG_RTC register and bit field definitions.
EZR32WG_MSC register and bit field definitions.
EZR32WG_USART register and bit field definitions.