EZR32 Leopard Gecko Software Documentation  ezr32lg-doc-5.1.2
ezr32lg330f256r69.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef EZR32LG330F256R69_H
35 #define EZR32LG330F256R69_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 /****** EZR32LG Peripheral Interrupt Numbers **********************************************/
66 
67  DMA_IRQn = 0,
72  USB_IRQn = 5,
73  ACMP0_IRQn = 6,
74  ADC0_IRQn = 7,
75  DAC0_IRQn = 8,
76  I2C0_IRQn = 9,
77  I2C1_IRQn = 10,
79  TIMER1_IRQn = 12,
80  TIMER2_IRQn = 13,
81  TIMER3_IRQn = 14,
84  LESENSE_IRQn = 17,
91  LEUART0_IRQn = 24,
92  LEUART1_IRQn = 25,
94  PCNT0_IRQn = 27,
95  PCNT1_IRQn = 28,
96  PCNT2_IRQn = 29,
97  RTC_IRQn = 30,
98  BURTC_IRQn = 31,
99  CMU_IRQn = 32,
100  VCMP_IRQn = 33,
101  MSC_IRQn = 35,
102  AES_IRQn = 36,
103  EMU_IRQn = 38,
104 } IRQn_Type;
105 
106 /**************************************************************************/
111 #define __MPU_PRESENT 1
112 #define __VTOR_PRESENT 1
113 #define __NVIC_PRIO_BITS 3
114 #define __Vendor_SysTickConfig 0
118 /**************************************************************************/
124 #define _EFM32_GIANT_FAMILY 1
125 #define _EFM_DEVICE
126 #define _EZR32_LEOPARD_FAMILY 1
127 #define _EZR_DEVICE
128 #define _SILICON_LABS_32B_SERIES_0
129 #define _SILICON_LABS_32B_SERIES 0
130 #define _SILICON_LABS_GECKO_INTERNAL_SDID 74
131 #define _SILICON_LABS_GECKO_INTERNAL_SDID_74
132 #define _SILICON_LABS_32B_PLATFORM_1
133 #define _SILICON_LABS_32B_PLATFORM 1
135 /* If part number is not defined as compiler option, define it */
136 #if !defined(EZR32LG330F256R69)
137 #define EZR32LG330F256R69 1
138 #endif
139 
141 #define PART_NUMBER "EZR32LG330F256R69"
144 #define FLASH_MEM_BASE ((uint32_t) 0x0UL)
145 #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL)
146 #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL)
147 #define FLASH_MEM_BITS ((uint32_t) 0x28UL)
148 #define AES_MEM_BASE ((uint32_t) 0x400E0000UL)
149 #define AES_MEM_SIZE ((uint32_t) 0x400UL)
150 #define AES_MEM_END ((uint32_t) 0x400E03FFUL)
151 #define AES_MEM_BITS ((uint32_t) 0x10UL)
152 #define USBC_MEM_BASE ((uint32_t) 0x40100000UL)
153 #define USBC_MEM_SIZE ((uint32_t) 0x40000UL)
154 #define USBC_MEM_END ((uint32_t) 0x4013FFFFUL)
155 #define USBC_MEM_BITS ((uint32_t) 0x18UL)
156 #define PER_MEM_BASE ((uint32_t) 0x40000000UL)
157 #define PER_MEM_SIZE ((uint32_t) 0xE0000UL)
158 #define PER_MEM_END ((uint32_t) 0x400DFFFFUL)
159 #define PER_MEM_BITS ((uint32_t) 0x20UL)
160 #define RAM_MEM_BASE ((uint32_t) 0x20000000UL)
161 #define RAM_MEM_SIZE ((uint32_t) 0x40000UL)
162 #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL)
163 #define RAM_MEM_BITS ((uint32_t) 0x18UL)
164 #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL)
165 #define RAM_CODE_MEM_SIZE ((uint32_t) 0x20000UL)
166 #define RAM_CODE_MEM_END ((uint32_t) 0x1001FFFFUL)
167 #define RAM_CODE_MEM_BITS ((uint32_t) 0x17UL)
170 #define BITBAND_PER_BASE ((uint32_t) 0x42000000UL)
171 #define BITBAND_RAM_BASE ((uint32_t) 0x22000000UL)
174 #define FLASH_BASE (0x00000000UL)
175 #define FLASH_SIZE (0x00040000UL)
176 #define FLASH_PAGE_SIZE 2048
177 #define SRAM_BASE (0x20000000UL)
178 #define SRAM_SIZE (0x00008000UL)
179 #define __CM3_REV 0x201
180 #define PRS_CHAN_COUNT 12
181 #define DMA_CHAN_COUNT 12
182 #define EXT_IRQ_COUNT 39
185 #define AFCHAN_MAX 84
186 #define AFCHANLOC_MAX 7
187 
188 #define AFACHAN_MAX 50
189 
190 /* Part number capabilities */
191 
192 #define USARTRF_PRESENT
193 #define USARTRF_COUNT 1
194 #define USART_PRESENT
195 #define USART_COUNT 2
196 #define UART_PRESENT
197 #define UART_COUNT 2
198 #define TIMER_PRESENT
199 #define TIMER_COUNT 4
200 #define ACMP_PRESENT
201 #define ACMP_COUNT 2
202 #define LEUART_PRESENT
203 #define LEUART_COUNT 2
204 #define LETIMER_PRESENT
205 #define LETIMER_COUNT 1
206 #define PCNT_PRESENT
207 #define PCNT_COUNT 3
208 #define I2C_PRESENT
209 #define I2C_COUNT 2
210 #define ADC_PRESENT
211 #define ADC_COUNT 1
212 #define DAC_PRESENT
213 #define DAC_COUNT 1
214 #define DMA_PRESENT
215 #define DMA_COUNT 1
216 #define AES_PRESENT
217 #define AES_COUNT 1
218 #define USBC_PRESENT
219 #define USBC_COUNT 1
220 #define USB_PRESENT
221 #define USB_COUNT 1
222 #define LE_PRESENT
223 #define LE_COUNT 1
224 #define MSC_PRESENT
225 #define MSC_COUNT 1
226 #define EMU_PRESENT
227 #define EMU_COUNT 1
228 #define RMU_PRESENT
229 #define RMU_COUNT 1
230 #define CMU_PRESENT
231 #define CMU_COUNT 1
232 #define LESENSE_PRESENT
233 #define LESENSE_COUNT 1
234 #define RTC_PRESENT
235 #define RTC_COUNT 1
236 #define GPIO_PRESENT
237 #define GPIO_COUNT 1
238 #define VCMP_PRESENT
239 #define VCMP_COUNT 1
240 #define PRS_PRESENT
241 #define PRS_COUNT 1
242 #define OPAMP_PRESENT
243 #define OPAMP_COUNT 1
244 #define BU_PRESENT
245 #define BU_COUNT 1
246 #define BURTC_PRESENT
247 #define BURTC_COUNT 1
248 #define HFXTAL_PRESENT
249 #define HFXTAL_COUNT 1
250 #define LFXTAL_PRESENT
251 #define LFXTAL_COUNT 1
252 #define WDOG_PRESENT
253 #define WDOG_COUNT 1
254 #define DBG_PRESENT
255 #define DBG_COUNT 1
256 #define ETM_PRESENT
257 #define ETM_COUNT 1
258 #define BOOTLOADER_PRESENT
259 #define BOOTLOADER_COUNT 1
260 #define ANALOG_PRESENT
261 #define ANALOG_COUNT 1
262 #define RF_PRESENT
263 #define RF_COUNT 1
264 
265 /**************************************************************************/
270 #define RF_USARTRF_LOCATION 0
271 #define RF_USARTRF_CS_PORT 4
272 #define RF_USARTRF_CS_PIN 9
273 #define RF_USARTRF_CLK_PORT 4
274 #define RF_USARTRF_CLK_PIN 12
275 #define RF_USARTRF_MISO_PORT 4
276 #define RF_USARTRF_MISO_PIN 11
277 #define RF_USARTRF_MOSI_PORT 4
278 #define RF_USARTRF_MOSI_PIN 10
279 #define RF_INT_PORT 4
280 #define RF_INT_PIN 13
281 #define RF_GPIO0_PORT 0
282 #define RF_GPIO0_PIN 15
283 #define RF_GPIO1_PORT 4
284 #define RF_GPIO1_PIN 14
285 #define RF_SDN_PORT 4
286 #define RF_SDN_PIN 8
290 #include "core_cm3.h" /* Cortex-M3 processor and core peripherals */
291 #include "system_ezr32lg.h" /* System Header */
292 
295 /**************************************************************************/
301 #include "ezr32lg_dma_ch.h"
302 #include "ezr32lg_dma.h"
303 #include "ezr32lg_aes.h"
304 #include "ezr32lg_usb_hc.h"
305 #include "ezr32lg_usb_diep.h"
306 #include "ezr32lg_usb_doep.h"
307 #include "ezr32lg_usb.h"
308 #include "ezr32lg_msc.h"
309 #include "ezr32lg_emu.h"
310 #include "ezr32lg_rmu.h"
311 #include "ezr32lg_cmu.h"
312 #include "ezr32lg_lesense_st.h"
313 #include "ezr32lg_lesense_buf.h"
314 #include "ezr32lg_lesense_ch.h"
315 #include "ezr32lg_lesense.h"
316 #include "ezr32lg_usart.h"
317 #include "ezr32lg_timer_cc.h"
318 #include "ezr32lg_timer.h"
319 #include "ezr32lg_acmp.h"
320 #include "ezr32lg_leuart.h"
321 #include "ezr32lg_rtc.h"
322 #include "ezr32lg_letimer.h"
323 #include "ezr32lg_pcnt.h"
324 #include "ezr32lg_i2c.h"
325 #include "ezr32lg_gpio_p.h"
326 #include "ezr32lg_gpio.h"
327 #include "ezr32lg_vcmp.h"
328 #include "ezr32lg_prs_ch.h"
329 #include "ezr32lg_prs.h"
330 #include "ezr32lg_adc.h"
331 #include "ezr32lg_dac.h"
332 #include "ezr32lg_burtc_ret.h"
333 #include "ezr32lg_burtc.h"
334 #include "ezr32lg_wdog.h"
335 #include "ezr32lg_etm.h"
336 #include "ezr32lg_dma_descriptor.h"
337 #include "ezr32lg_devinfo.h"
338 #include "ezr32lg_romtable.h"
339 #include "ezr32lg_calibrate.h"
340 
343 /**************************************************************************/
348 #define DMA_BASE (0x400C2000UL)
349 #define AES_BASE (0x400E0000UL)
350 #define USB_BASE (0x400C4000UL)
351 #define MSC_BASE (0x400C0000UL)
352 #define EMU_BASE (0x400C6000UL)
353 #define RMU_BASE (0x400CA000UL)
354 #define CMU_BASE (0x400C8000UL)
355 #define LESENSE_BASE (0x4008C000UL)
356 #define USARTRF0_BASE (0x4000C000UL)
357 #define USART1_BASE (0x4000C400UL)
358 #define USART2_BASE (0x4000C800UL)
359 #define UART0_BASE (0x4000E000UL)
360 #define UART1_BASE (0x4000E400UL)
361 #define TIMER0_BASE (0x40010000UL)
362 #define TIMER1_BASE (0x40010400UL)
363 #define TIMER2_BASE (0x40010800UL)
364 #define TIMER3_BASE (0x40010C00UL)
365 #define ACMP0_BASE (0x40001000UL)
366 #define ACMP1_BASE (0x40001400UL)
367 #define LEUART0_BASE (0x40084000UL)
368 #define LEUART1_BASE (0x40084400UL)
369 #define RTC_BASE (0x40080000UL)
370 #define LETIMER0_BASE (0x40082000UL)
371 #define PCNT0_BASE (0x40086000UL)
372 #define PCNT1_BASE (0x40086400UL)
373 #define PCNT2_BASE (0x40086800UL)
374 #define I2C0_BASE (0x4000A000UL)
375 #define I2C1_BASE (0x4000A400UL)
376 #define GPIO_BASE (0x40006000UL)
377 #define VCMP_BASE (0x40000000UL)
378 #define PRS_BASE (0x400CC000UL)
379 #define ADC0_BASE (0x40002000UL)
380 #define DAC0_BASE (0x40004000UL)
381 #define BURTC_BASE (0x40081000UL)
382 #define WDOG_BASE (0x40088000UL)
383 #define ETM_BASE (0xE0041000UL)
384 #define CALIBRATE_BASE (0x0FE08000UL)
385 #define DEVINFO_BASE (0x0FE081A8UL)
386 #define ROMTABLE_BASE (0xE00FFFD0UL)
387 #define LOCKBITS_BASE (0x0FE04000UL)
388 #define USERDATA_BASE (0x0FE00000UL)
392 /**************************************************************************/
397 #define DMA ((DMA_TypeDef *) DMA_BASE)
398 #define AES ((AES_TypeDef *) AES_BASE)
399 #define USB ((USB_TypeDef *) USB_BASE)
400 #define MSC ((MSC_TypeDef *) MSC_BASE)
401 #define EMU ((EMU_TypeDef *) EMU_BASE)
402 #define RMU ((RMU_TypeDef *) RMU_BASE)
403 #define CMU ((CMU_TypeDef *) CMU_BASE)
404 #define LESENSE ((LESENSE_TypeDef *) LESENSE_BASE)
405 #define USARTRF0 ((USART_TypeDef *) USARTRF0_BASE)
406 #define USART1 ((USART_TypeDef *) USART1_BASE)
407 #define USART2 ((USART_TypeDef *) USART2_BASE)
408 #define UART0 ((USART_TypeDef *) UART0_BASE)
409 #define UART1 ((USART_TypeDef *) UART1_BASE)
410 #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE)
411 #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE)
412 #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE)
413 #define TIMER3 ((TIMER_TypeDef *) TIMER3_BASE)
414 #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE)
415 #define ACMP1 ((ACMP_TypeDef *) ACMP1_BASE)
416 #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE)
417 #define LEUART1 ((LEUART_TypeDef *) LEUART1_BASE)
418 #define RTC ((RTC_TypeDef *) RTC_BASE)
419 #define LETIMER0 ((LETIMER_TypeDef *) LETIMER0_BASE)
420 #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE)
421 #define PCNT1 ((PCNT_TypeDef *) PCNT1_BASE)
422 #define PCNT2 ((PCNT_TypeDef *) PCNT2_BASE)
423 #define I2C0 ((I2C_TypeDef *) I2C0_BASE)
424 #define I2C1 ((I2C_TypeDef *) I2C1_BASE)
425 #define GPIO ((GPIO_TypeDef *) GPIO_BASE)
426 #define VCMP ((VCMP_TypeDef *) VCMP_BASE)
427 #define PRS ((PRS_TypeDef *) PRS_BASE)
428 #define ADC0 ((ADC_TypeDef *) ADC0_BASE)
429 #define DAC0 ((DAC_TypeDef *) DAC0_BASE)
430 #define BURTC ((BURTC_TypeDef *) BURTC_BASE)
431 #define WDOG ((WDOG_TypeDef *) WDOG_BASE)
432 #define ETM ((ETM_TypeDef *) ETM_BASE)
433 #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE)
434 #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE)
435 #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE)
439 /**************************************************************************/
444 #include "ezr32lg_prs_signals.h"
445 #include "ezr32lg_dmareq.h"
446 #include "ezr32lg_dmactrl.h"
447 #include "ezr32lg_usartrf.h"
448 #include "ezr32lg_uart.h"
449 
450 /**************************************************************************/
454 #define MSC_UNLOCK_CODE 0x1B71
455 #define EMU_UNLOCK_CODE 0xADE8
456 #define CMU_UNLOCK_CODE 0x580E
457 #define TIMER_UNLOCK_CODE 0xCE80
458 #define GPIO_UNLOCK_CODE 0xA534
459 #define BURTC_UNLOCK_CODE 0xAEE8
465 /**************************************************************************/
470 #include "ezr32lg_af_ports.h"
471 #include "ezr32lg_af_pins.h"
472 
475 /**************************************************************************/
488 #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \
489  REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK));
490 
495 #ifdef __cplusplus
496 }
497 #endif
498 #endif /* EZR32LG330F256R69_H */
EZR32LG_BURTC register and bit field definitions.
EZR32LG_WDOG register and bit field definitions.
EZR32LG_DMA register and bit field definitions.
EZR32LG_DMA_DESCRIPTOR register and bit field definitions.
CMSIS Cortex-M3 System Layer for EZR32LG devices.
EZR32LG_AF_PINS register and bit field definitions.
EZR32LG_UART register and bit field definitions.
EZR32LG_TIMER_CC register and bit field definitions.
EZR32LG_DEVINFO register and bit field definitions.
EZR32LG_PCNT register and bit field definitions.
EZR32LG_LESENSE register and bit field definitions.
EZR32LG_ACMP register and bit field definitions.
EZR32LG_CMU register and bit field definitions.
EZR32LG_LESENSE_CH register and bit field definitions.
EZR32LG_ROMTABLE register and bit field definitions.
EZR32LG_BURTC_RET register and bit field definitions.
EZR32LG_LETIMER register and bit field definitions.
EZR32LG_USB_DOEP register and bit field definitions.
EZR32LG_EMU register and bit field definitions.
EZR32LG_DMAREQ register and bit field definitions.
EZR32LG_TIMER register and bit field definitions.
EZR32LG_ETM register and bit field definitions.
EZR32LG_GPIO register and bit field definitions.
EZR32LG_USB_HC register and bit field definitions.
EZR32LG_USB_DIEP register and bit field definitions.
EZR32LG_I2C register and bit field definitions.
EZR32LG_RMU register and bit field definitions.
EZR32LG_USART register and bit field definitions.
EZR32LG_CALIBRATE register and bit field definitions.
EZR32LG_ADC register and bit field definitions.
EZR32LG_PRS register and bit field definitions.
EZR32LG_LEUART register and bit field definitions.
EZR32LG_RTC register and bit field definitions.
EZR32LG_MSC register and bit field definitions.
EZR32LG_PRS_CH register and bit field definitions.
EZR32LG_VCMP register and bit field definitions.
EZR32LG_DMA_CH register and bit field definitions.
EZR32LG_USARTRF register and bit field definitions.
EZR32LG_LESENSE_BUF register and bit field definitions.
EZR32LG_GPIO_P register and bit field definitions.
EZR32LG_AES register and bit field definitions.
EZR32LG_DMACTRL register and bit field definitions.
EZR32LG_USB register and bit field definitions.
EZR32LG_DAC register and bit field definitions.
enum IRQn IRQn_Type
EZR32LG_LESENSE_ST register and bit field definitions.