The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_EFM32HG_STK3400/TOOLCHAIN_ARM_MICRO/efm32hg309f64.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 171:3a7713b1edbc | 1 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 2 | * @file efm32hg309f64.h |
AnnaBridge | 171:3a7713b1edbc | 3 | * @brief CMSIS Cortex-M Peripheral Access Layer Header File |
AnnaBridge | 171:3a7713b1edbc | 4 | * for EFM32HG309F64 |
AnnaBridge | 171:3a7713b1edbc | 5 | * @version 5.1.2 |
AnnaBridge | 171:3a7713b1edbc | 6 | ****************************************************************************** |
AnnaBridge | 171:3a7713b1edbc | 7 | * @section License |
AnnaBridge | 171:3a7713b1edbc | 8 | * <b>Copyright 2017 Silicon Laboratories, Inc. http://www.silabs.com</b> |
AnnaBridge | 171:3a7713b1edbc | 9 | ****************************************************************************** |
AnnaBridge | 171:3a7713b1edbc | 10 | * |
AnnaBridge | 171:3a7713b1edbc | 11 | * Permission is granted to anyone to use this software for any purpose, |
AnnaBridge | 171:3a7713b1edbc | 12 | * including commercial applications, and to alter it and redistribute it |
AnnaBridge | 171:3a7713b1edbc | 13 | * freely, subject to the following restrictions: |
AnnaBridge | 171:3a7713b1edbc | 14 | * |
AnnaBridge | 171:3a7713b1edbc | 15 | * 1. The origin of this software must not be misrepresented; you must not |
AnnaBridge | 171:3a7713b1edbc | 16 | * claim that you wrote the original software.@n |
AnnaBridge | 171:3a7713b1edbc | 17 | * 2. Altered source versions must be plainly marked as such, and must not be |
AnnaBridge | 171:3a7713b1edbc | 18 | * misrepresented as being the original software.@n |
AnnaBridge | 171:3a7713b1edbc | 19 | * 3. This notice may not be removed or altered from any source distribution. |
AnnaBridge | 171:3a7713b1edbc | 20 | * |
AnnaBridge | 171:3a7713b1edbc | 21 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Laboratories, Inc. |
AnnaBridge | 171:3a7713b1edbc | 22 | * has no obligation to support this Software. Silicon Laboratories, Inc. is |
AnnaBridge | 171:3a7713b1edbc | 23 | * providing the Software "AS IS", with no express or implied warranties of any |
AnnaBridge | 171:3a7713b1edbc | 24 | * kind, including, but not limited to, any implied warranties of |
AnnaBridge | 171:3a7713b1edbc | 25 | * merchantability or fitness for any particular purpose or warranties against |
AnnaBridge | 171:3a7713b1edbc | 26 | * infringement of any proprietary rights of a third party. |
AnnaBridge | 171:3a7713b1edbc | 27 | * |
AnnaBridge | 171:3a7713b1edbc | 28 | * Silicon Laboratories, Inc. will not be liable for any consequential, |
AnnaBridge | 171:3a7713b1edbc | 29 | * incidental, or special damages, or any other relief, or for any claim by |
AnnaBridge | 171:3a7713b1edbc | 30 | * any third party, arising from your use of this Software. |
AnnaBridge | 171:3a7713b1edbc | 31 | * |
AnnaBridge | 171:3a7713b1edbc | 32 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 33 | |
AnnaBridge | 171:3a7713b1edbc | 34 | #ifndef EFM32HG309F64_H |
AnnaBridge | 171:3a7713b1edbc | 35 | #define EFM32HG309F64_H |
AnnaBridge | 171:3a7713b1edbc | 36 | |
AnnaBridge | 171:3a7713b1edbc | 37 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 38 | extern "C" { |
AnnaBridge | 171:3a7713b1edbc | 39 | #endif |
AnnaBridge | 171:3a7713b1edbc | 40 | |
AnnaBridge | 171:3a7713b1edbc | 41 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 42 | * @addtogroup Parts |
AnnaBridge | 171:3a7713b1edbc | 43 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 44 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 45 | |
AnnaBridge | 171:3a7713b1edbc | 46 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 47 | * @defgroup EFM32HG309F64 EFM32HG309F64 |
AnnaBridge | 171:3a7713b1edbc | 48 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 49 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 50 | |
AnnaBridge | 171:3a7713b1edbc | 51 | /** Interrupt Number Definition */ |
AnnaBridge | 171:3a7713b1edbc | 52 | typedef enum IRQn |
AnnaBridge | 171:3a7713b1edbc | 53 | { |
AnnaBridge | 171:3a7713b1edbc | 54 | /****** Cortex-M0+ Processor Exceptions Numbers *****************************************/ |
AnnaBridge | 171:3a7713b1edbc | 55 | NonMaskableInt_IRQn = -14, /*!< -14 Cortex-M0+ Non Maskable Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 56 | HardFault_IRQn = -13, /*!< -13 Cortex-M0+ Hard Fault Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 57 | SVCall_IRQn = -5, /*!< -5 Cortex-M0+ SV Call Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 58 | PendSV_IRQn = -2, /*!< -2 Cortex-M0+ Pend SV Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 59 | SysTick_IRQn = -1, /*!< -1 Cortex-M0+ System Tick Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 60 | |
AnnaBridge | 171:3a7713b1edbc | 61 | /****** EFM32HG Peripheral Interrupt Numbers ********************************************/ |
AnnaBridge | 171:3a7713b1edbc | 62 | DMA_IRQn = 0, /*!< 0 EFM32 DMA Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 63 | GPIO_EVEN_IRQn = 1, /*!< 1 EFM32 GPIO_EVEN Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 64 | TIMER0_IRQn = 2, /*!< 2 EFM32 TIMER0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 65 | ACMP0_IRQn = 3, /*!< 3 EFM32 ACMP0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 66 | ADC0_IRQn = 4, /*!< 4 EFM32 ADC0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 67 | I2C0_IRQn = 5, /*!< 5 EFM32 I2C0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 68 | GPIO_ODD_IRQn = 6, /*!< 6 EFM32 GPIO_ODD Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 69 | TIMER1_IRQn = 7, /*!< 7 EFM32 TIMER1 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 70 | USART1_RX_IRQn = 8, /*!< 8 EFM32 USART1_RX Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 71 | USART1_TX_IRQn = 9, /*!< 9 EFM32 USART1_TX Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 72 | LEUART0_IRQn = 10, /*!< 10 EFM32 LEUART0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 73 | PCNT0_IRQn = 11, /*!< 11 EFM32 PCNT0 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 74 | RTC_IRQn = 12, /*!< 12 EFM32 RTC Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 75 | CMU_IRQn = 13, /*!< 13 EFM32 CMU Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 76 | VCMP_IRQn = 14, /*!< 14 EFM32 VCMP Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 77 | MSC_IRQn = 15, /*!< 15 EFM32 MSC Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 78 | AES_IRQn = 16, /*!< 16 EFM32 AES Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 79 | USART0_RX_IRQn = 17, /*!< 17 EFM32 USART0_RX Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 80 | USART0_TX_IRQn = 18, /*!< 18 EFM32 USART0_TX Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 81 | USB_IRQn = 19, /*!< 19 EFM32 USB Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 82 | TIMER2_IRQn = 20, /*!< 20 EFM32 TIMER2 Interrupt */ |
AnnaBridge | 171:3a7713b1edbc | 83 | } IRQn_Type; |
AnnaBridge | 171:3a7713b1edbc | 84 | |
AnnaBridge | 171:3a7713b1edbc | 85 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 86 | * @defgroup EFM32HG309F64_Core EFM32HG309F64 Core |
AnnaBridge | 171:3a7713b1edbc | 87 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 88 | * @brief Processor and Core Peripheral Section |
AnnaBridge | 171:3a7713b1edbc | 89 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 90 | #define __MPU_PRESENT 0 /**< MPU not present */ |
AnnaBridge | 171:3a7713b1edbc | 91 | #define __VTOR_PRESENT 1 /**< Presence of VTOR register in SCB */ |
AnnaBridge | 171:3a7713b1edbc | 92 | #define __NVIC_PRIO_BITS 2 /**< NVIC interrupt priority bits */ |
AnnaBridge | 171:3a7713b1edbc | 93 | #define __Vendor_SysTickConfig 0 /**< Is 1 if different SysTick counter is used */ |
AnnaBridge | 171:3a7713b1edbc | 94 | |
AnnaBridge | 171:3a7713b1edbc | 95 | /** @} End of group EFM32HG309F64_Core */ |
AnnaBridge | 171:3a7713b1edbc | 96 | |
AnnaBridge | 171:3a7713b1edbc | 97 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 98 | * @defgroup EFM32HG309F64_Part EFM32HG309F64 Part |
AnnaBridge | 171:3a7713b1edbc | 99 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 100 | ******************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 101 | |
AnnaBridge | 171:3a7713b1edbc | 102 | /** Part family */ |
AnnaBridge | 171:3a7713b1edbc | 103 | #define _EFM32_HAPPY_FAMILY 1 /**< Happy Gecko EFM32HG MCU Family */ |
AnnaBridge | 171:3a7713b1edbc | 104 | #define _EFM_DEVICE /**< Silicon Labs EFM-type microcontroller */ |
AnnaBridge | 171:3a7713b1edbc | 105 | #define _SILICON_LABS_32B_SERIES_0 /**< Silicon Labs series number */ |
AnnaBridge | 171:3a7713b1edbc | 106 | #define _SILICON_LABS_32B_SERIES 0 /**< Silicon Labs series number */ |
AnnaBridge | 171:3a7713b1edbc | 107 | #define _SILICON_LABS_GECKO_INTERNAL_SDID 77 /** Silicon Labs internal use only, may change any time */ |
AnnaBridge | 171:3a7713b1edbc | 108 | #define _SILICON_LABS_GECKO_INTERNAL_SDID_77 /** Silicon Labs internal use only, may change any time */ |
AnnaBridge | 171:3a7713b1edbc | 109 | #define _SILICON_LABS_32B_PLATFORM_1 /**< @deprecated Silicon Labs platform name */ |
AnnaBridge | 171:3a7713b1edbc | 110 | #define _SILICON_LABS_32B_PLATFORM 1 /**< @deprecated Silicon Labs platform name */ |
AnnaBridge | 171:3a7713b1edbc | 111 | |
AnnaBridge | 171:3a7713b1edbc | 112 | /* If part number is not defined as compiler option, define it */ |
AnnaBridge | 171:3a7713b1edbc | 113 | #if !defined(EFM32HG309F64) |
AnnaBridge | 171:3a7713b1edbc | 114 | #define EFM32HG309F64 1 /**< Happy Gecko Part */ |
AnnaBridge | 171:3a7713b1edbc | 115 | #endif |
AnnaBridge | 171:3a7713b1edbc | 116 | |
AnnaBridge | 171:3a7713b1edbc | 117 | /** Configure part number */ |
AnnaBridge | 171:3a7713b1edbc | 118 | #define PART_NUMBER "EFM32HG309F64" /**< Part Number */ |
AnnaBridge | 171:3a7713b1edbc | 119 | |
AnnaBridge | 171:3a7713b1edbc | 120 | /** Memory Base addresses and limits */ |
AnnaBridge | 171:3a7713b1edbc | 121 | #define FLASH_MEM_BASE ((uint32_t) 0x0UL) /**< FLASH base address */ |
AnnaBridge | 171:3a7713b1edbc | 122 | #define FLASH_MEM_SIZE ((uint32_t) 0x10000000UL) /**< FLASH available address space */ |
AnnaBridge | 171:3a7713b1edbc | 123 | #define FLASH_MEM_END ((uint32_t) 0xFFFFFFFUL) /**< FLASH end address */ |
AnnaBridge | 171:3a7713b1edbc | 124 | #define FLASH_MEM_BITS ((uint32_t) 0x28UL) /**< FLASH used bits */ |
AnnaBridge | 171:3a7713b1edbc | 125 | #define AES_MEM_BASE ((uint32_t) 0x400E0000UL) /**< AES base address */ |
AnnaBridge | 171:3a7713b1edbc | 126 | #define AES_MEM_SIZE ((uint32_t) 0x400UL) /**< AES available address space */ |
AnnaBridge | 171:3a7713b1edbc | 127 | #define AES_MEM_END ((uint32_t) 0x400E03FFUL) /**< AES end address */ |
AnnaBridge | 171:3a7713b1edbc | 128 | #define AES_MEM_BITS ((uint32_t) 0x10UL) /**< AES used bits */ |
AnnaBridge | 171:3a7713b1edbc | 129 | #define USBC_MEM_BASE ((uint32_t) 0x40100000UL) /**< USBC base address */ |
AnnaBridge | 171:3a7713b1edbc | 130 | #define USBC_MEM_SIZE ((uint32_t) 0x40000UL) /**< USBC available address space */ |
AnnaBridge | 171:3a7713b1edbc | 131 | #define USBC_MEM_END ((uint32_t) 0x4013FFFFUL) /**< USBC end address */ |
AnnaBridge | 171:3a7713b1edbc | 132 | #define USBC_MEM_BITS ((uint32_t) 0x18UL) /**< USBC used bits */ |
AnnaBridge | 171:3a7713b1edbc | 133 | #define PER_MEM_BASE ((uint32_t) 0x40000000UL) /**< PER base address */ |
AnnaBridge | 171:3a7713b1edbc | 134 | #define PER_MEM_SIZE ((uint32_t) 0xE0000UL) /**< PER available address space */ |
AnnaBridge | 171:3a7713b1edbc | 135 | #define PER_MEM_END ((uint32_t) 0x400DFFFFUL) /**< PER end address */ |
AnnaBridge | 171:3a7713b1edbc | 136 | #define PER_MEM_BITS ((uint32_t) 0x20UL) /**< PER used bits */ |
AnnaBridge | 171:3a7713b1edbc | 137 | #define RAM_MEM_BASE ((uint32_t) 0x20000000UL) /**< RAM base address */ |
AnnaBridge | 171:3a7713b1edbc | 138 | #define RAM_MEM_SIZE ((uint32_t) 0x40000UL) /**< RAM available address space */ |
AnnaBridge | 171:3a7713b1edbc | 139 | #define RAM_MEM_END ((uint32_t) 0x2003FFFFUL) /**< RAM end address */ |
AnnaBridge | 171:3a7713b1edbc | 140 | #define RAM_MEM_BITS ((uint32_t) 0x18UL) /**< RAM used bits */ |
AnnaBridge | 171:3a7713b1edbc | 141 | #define DEVICE_MEM_BASE ((uint32_t) 0xF0040000UL) /**< DEVICE base address */ |
AnnaBridge | 171:3a7713b1edbc | 142 | #define DEVICE_MEM_SIZE ((uint32_t) 0x1000UL) /**< DEVICE available address space */ |
AnnaBridge | 171:3a7713b1edbc | 143 | #define DEVICE_MEM_END ((uint32_t) 0xF0040FFFUL) /**< DEVICE end address */ |
AnnaBridge | 171:3a7713b1edbc | 144 | #define DEVICE_MEM_BITS ((uint32_t) 0x12UL) /**< DEVICE used bits */ |
AnnaBridge | 171:3a7713b1edbc | 145 | #define RAM_CODE_MEM_BASE ((uint32_t) 0x10000000UL) /**< RAM_CODE base address */ |
AnnaBridge | 171:3a7713b1edbc | 146 | #define RAM_CODE_MEM_SIZE ((uint32_t) 0x20000UL) /**< RAM_CODE available address space */ |
AnnaBridge | 171:3a7713b1edbc | 147 | #define RAM_CODE_MEM_END ((uint32_t) 0x1001FFFFUL) /**< RAM_CODE end address */ |
AnnaBridge | 171:3a7713b1edbc | 148 | #define RAM_CODE_MEM_BITS ((uint32_t) 0x17UL) /**< RAM_CODE used bits */ |
AnnaBridge | 171:3a7713b1edbc | 149 | |
AnnaBridge | 171:3a7713b1edbc | 150 | /** Flash and SRAM limits for EFM32HG309F64 */ |
AnnaBridge | 171:3a7713b1edbc | 151 | #define FLASH_BASE (0x00000000UL) /**< Flash Base Address */ |
AnnaBridge | 171:3a7713b1edbc | 152 | #define FLASH_SIZE (0x00010000UL) /**< Available Flash Memory */ |
AnnaBridge | 171:3a7713b1edbc | 153 | #define FLASH_PAGE_SIZE 1024 /**< Flash Memory page size */ |
AnnaBridge | 171:3a7713b1edbc | 154 | #define SRAM_BASE (0x20000000UL) /**< SRAM Base Address */ |
AnnaBridge | 171:3a7713b1edbc | 155 | #define SRAM_SIZE (0x00002000UL) /**< Available SRAM Memory */ |
AnnaBridge | 171:3a7713b1edbc | 156 | #define __CM0PLUS_REV 0x001 /**< Cortex-M0+ Core revision r0p1 */ |
AnnaBridge | 171:3a7713b1edbc | 157 | #define PRS_CHAN_COUNT 6 /**< Number of PRS channels */ |
AnnaBridge | 171:3a7713b1edbc | 158 | #define DMA_CHAN_COUNT 6 /**< Number of DMA channels */ |
AnnaBridge | 171:3a7713b1edbc | 159 | #define EXT_IRQ_COUNT 21 /**< Number of External (NVIC) interrupts */ |
AnnaBridge | 171:3a7713b1edbc | 160 | |
AnnaBridge | 171:3a7713b1edbc | 161 | /** AF channels connect the different on-chip peripherals with the af-mux */ |
AnnaBridge | 171:3a7713b1edbc | 162 | #define AFCHAN_MAX 42 |
AnnaBridge | 171:3a7713b1edbc | 163 | #define AFCHANLOC_MAX 7 |
AnnaBridge | 171:3a7713b1edbc | 164 | /** Analog AF channels */ |
AnnaBridge | 171:3a7713b1edbc | 165 | #define AFACHAN_MAX 27 |
AnnaBridge | 171:3a7713b1edbc | 166 | |
AnnaBridge | 171:3a7713b1edbc | 167 | /* Part number capabilities */ |
AnnaBridge | 171:3a7713b1edbc | 168 | |
AnnaBridge | 171:3a7713b1edbc | 169 | #define TIMER_PRESENT /**< TIMER is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 170 | #define TIMER_COUNT 3 /**< 3 TIMERs available */ |
AnnaBridge | 171:3a7713b1edbc | 171 | #define ACMP_PRESENT /**< ACMP is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 172 | #define ACMP_COUNT 1 /**< 1 ACMPs available */ |
AnnaBridge | 171:3a7713b1edbc | 173 | #define USART_PRESENT /**< USART is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 174 | #define USART_COUNT 2 /**< 2 USARTs available */ |
AnnaBridge | 171:3a7713b1edbc | 175 | #define IDAC_PRESENT /**< IDAC is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 176 | #define IDAC_COUNT 1 /**< 1 IDACs available */ |
AnnaBridge | 171:3a7713b1edbc | 177 | #define ADC_PRESENT /**< ADC is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 178 | #define ADC_COUNT 1 /**< 1 ADCs available */ |
AnnaBridge | 171:3a7713b1edbc | 179 | #define LEUART_PRESENT /**< LEUART is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 180 | #define LEUART_COUNT 1 /**< 1 LEUARTs available */ |
AnnaBridge | 171:3a7713b1edbc | 181 | #define PCNT_PRESENT /**< PCNT is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 182 | #define PCNT_COUNT 1 /**< 1 PCNTs available */ |
AnnaBridge | 171:3a7713b1edbc | 183 | #define I2C_PRESENT /**< I2C is available in this part */ |
AnnaBridge | 171:3a7713b1edbc | 184 | #define I2C_COUNT 1 /**< 1 I2Cs available */ |
AnnaBridge | 171:3a7713b1edbc | 185 | #define AES_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 186 | #define AES_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 187 | #define DMA_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 188 | #define DMA_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 189 | #define LE_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 190 | #define LE_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 191 | #define USBC_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 192 | #define USBC_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 193 | #define USBLE_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 194 | #define USBLE_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 195 | #define USB_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 196 | #define USB_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 197 | #define MSC_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 198 | #define MSC_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 199 | #define EMU_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 200 | #define EMU_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 201 | #define RMU_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 202 | #define RMU_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 203 | #define CMU_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 204 | #define CMU_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 205 | #define PRS_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 206 | #define PRS_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 207 | #define GPIO_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 208 | #define GPIO_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 209 | #define VCMP_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 210 | #define VCMP_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 211 | #define RTC_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 212 | #define RTC_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 213 | #define HFXTAL_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 214 | #define HFXTAL_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 215 | #define LFXTAL_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 216 | #define LFXTAL_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 217 | #define USHFRCO_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 218 | #define USHFRCO_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 219 | #define WDOG_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 220 | #define WDOG_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 221 | #define DBG_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 222 | #define DBG_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 223 | #define MTB_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 224 | #define MTB_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 225 | #define BOOTLOADER_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 226 | #define BOOTLOADER_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 227 | #define ANALOG_PRESENT |
AnnaBridge | 171:3a7713b1edbc | 228 | #define ANALOG_COUNT 1 |
AnnaBridge | 171:3a7713b1edbc | 229 | |
AnnaBridge | 171:3a7713b1edbc | 230 | /** @} End of group EFM32HG309F64_Part */ |
AnnaBridge | 171:3a7713b1edbc | 231 | |
AnnaBridge | 171:3a7713b1edbc | 232 | #define ARM_MATH_CM0PLUS |
AnnaBridge | 171:3a7713b1edbc | 233 | #include "arm_math.h" /* To get __CLZ definitions etc. */ |
AnnaBridge | 171:3a7713b1edbc | 234 | #include "core_cm0plus.h" /* Cortex-M0+ processor and core peripherals */ |
AnnaBridge | 171:3a7713b1edbc | 235 | #include "system_efm32hg.h" /* System Header */ |
AnnaBridge | 171:3a7713b1edbc | 236 | |
AnnaBridge | 171:3a7713b1edbc | 237 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 238 | * @defgroup EFM32HG309F64_Peripheral_TypeDefs EFM32HG309F64 Peripheral TypeDefs |
AnnaBridge | 171:3a7713b1edbc | 239 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 240 | * @brief Device Specific Peripheral Register Structures |
AnnaBridge | 171:3a7713b1edbc | 241 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 242 | |
AnnaBridge | 171:3a7713b1edbc | 243 | #include "efm32hg_aes.h" |
AnnaBridge | 171:3a7713b1edbc | 244 | #include "efm32hg_dma_ch.h" |
AnnaBridge | 171:3a7713b1edbc | 245 | #include "efm32hg_dma.h" |
AnnaBridge | 171:3a7713b1edbc | 246 | #include "efm32hg_usb_diep.h" |
AnnaBridge | 171:3a7713b1edbc | 247 | #include "efm32hg_usb_doep.h" |
AnnaBridge | 171:3a7713b1edbc | 248 | #include "efm32hg_usb.h" |
AnnaBridge | 171:3a7713b1edbc | 249 | #include "efm32hg_msc.h" |
AnnaBridge | 171:3a7713b1edbc | 250 | #include "efm32hg_emu.h" |
AnnaBridge | 171:3a7713b1edbc | 251 | #include "efm32hg_rmu.h" |
AnnaBridge | 171:3a7713b1edbc | 252 | #include "efm32hg_cmu.h" |
AnnaBridge | 171:3a7713b1edbc | 253 | #include "efm32hg_timer_cc.h" |
AnnaBridge | 171:3a7713b1edbc | 254 | #include "efm32hg_timer.h" |
AnnaBridge | 171:3a7713b1edbc | 255 | #include "efm32hg_acmp.h" |
AnnaBridge | 171:3a7713b1edbc | 256 | #include "efm32hg_usart.h" |
AnnaBridge | 171:3a7713b1edbc | 257 | #include "efm32hg_prs_ch.h" |
AnnaBridge | 171:3a7713b1edbc | 258 | #include "efm32hg_prs.h" |
AnnaBridge | 171:3a7713b1edbc | 259 | #include "efm32hg_idac.h" |
AnnaBridge | 171:3a7713b1edbc | 260 | #include "efm32hg_gpio_p.h" |
AnnaBridge | 171:3a7713b1edbc | 261 | #include "efm32hg_gpio.h" |
AnnaBridge | 171:3a7713b1edbc | 262 | #include "efm32hg_vcmp.h" |
AnnaBridge | 171:3a7713b1edbc | 263 | #include "efm32hg_adc.h" |
AnnaBridge | 171:3a7713b1edbc | 264 | #include "efm32hg_leuart.h" |
AnnaBridge | 171:3a7713b1edbc | 265 | #include "efm32hg_pcnt.h" |
AnnaBridge | 171:3a7713b1edbc | 266 | #include "efm32hg_i2c.h" |
AnnaBridge | 171:3a7713b1edbc | 267 | #include "efm32hg_rtc.h" |
AnnaBridge | 171:3a7713b1edbc | 268 | #include "efm32hg_wdog.h" |
AnnaBridge | 171:3a7713b1edbc | 269 | #include "efm32hg_mtb.h" |
AnnaBridge | 171:3a7713b1edbc | 270 | #include "efm32hg_dma_descriptor.h" |
AnnaBridge | 171:3a7713b1edbc | 271 | #include "efm32hg_devinfo.h" |
AnnaBridge | 171:3a7713b1edbc | 272 | #include "efm32hg_romtable.h" |
AnnaBridge | 171:3a7713b1edbc | 273 | #include "efm32hg_calibrate.h" |
AnnaBridge | 171:3a7713b1edbc | 274 | |
AnnaBridge | 171:3a7713b1edbc | 275 | /** @} End of group EFM32HG309F64_Peripheral_TypeDefs */ |
AnnaBridge | 171:3a7713b1edbc | 276 | |
AnnaBridge | 171:3a7713b1edbc | 277 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 278 | * @defgroup EFM32HG309F64_Peripheral_Base EFM32HG309F64 Peripheral Memory Map |
AnnaBridge | 171:3a7713b1edbc | 279 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 280 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 281 | |
AnnaBridge | 171:3a7713b1edbc | 282 | #define AES_BASE (0x400E0000UL) /**< AES base address */ |
AnnaBridge | 171:3a7713b1edbc | 283 | #define DMA_BASE (0x400C2000UL) /**< DMA base address */ |
AnnaBridge | 171:3a7713b1edbc | 284 | #define USB_BASE (0x400C4000UL) /**< USB base address */ |
AnnaBridge | 171:3a7713b1edbc | 285 | #define MSC_BASE (0x400C0000UL) /**< MSC base address */ |
AnnaBridge | 171:3a7713b1edbc | 286 | #define EMU_BASE (0x400C6000UL) /**< EMU base address */ |
AnnaBridge | 171:3a7713b1edbc | 287 | #define RMU_BASE (0x400CA000UL) /**< RMU base address */ |
AnnaBridge | 171:3a7713b1edbc | 288 | #define CMU_BASE (0x400C8000UL) /**< CMU base address */ |
AnnaBridge | 171:3a7713b1edbc | 289 | #define TIMER0_BASE (0x40010000UL) /**< TIMER0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 290 | #define TIMER1_BASE (0x40010400UL) /**< TIMER1 base address */ |
AnnaBridge | 171:3a7713b1edbc | 291 | #define TIMER2_BASE (0x40010800UL) /**< TIMER2 base address */ |
AnnaBridge | 171:3a7713b1edbc | 292 | #define ACMP0_BASE (0x40001000UL) /**< ACMP0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 293 | #define USART0_BASE (0x4000C000UL) /**< USART0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 294 | #define USART1_BASE (0x4000C400UL) /**< USART1 base address */ |
AnnaBridge | 171:3a7713b1edbc | 295 | #define PRS_BASE (0x400CC000UL) /**< PRS base address */ |
AnnaBridge | 171:3a7713b1edbc | 296 | #define IDAC0_BASE (0x40004000UL) /**< IDAC0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 297 | #define GPIO_BASE (0x40006000UL) /**< GPIO base address */ |
AnnaBridge | 171:3a7713b1edbc | 298 | #define VCMP_BASE (0x40000000UL) /**< VCMP base address */ |
AnnaBridge | 171:3a7713b1edbc | 299 | #define ADC0_BASE (0x40002000UL) /**< ADC0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 300 | #define LEUART0_BASE (0x40084000UL) /**< LEUART0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 301 | #define PCNT0_BASE (0x40086000UL) /**< PCNT0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 302 | #define I2C0_BASE (0x4000A000UL) /**< I2C0 base address */ |
AnnaBridge | 171:3a7713b1edbc | 303 | #define RTC_BASE (0x40080000UL) /**< RTC base address */ |
AnnaBridge | 171:3a7713b1edbc | 304 | #define WDOG_BASE (0x40088000UL) /**< WDOG base address */ |
AnnaBridge | 171:3a7713b1edbc | 305 | #define MTB_BASE (0xF0040000UL) /**< MTB base address */ |
AnnaBridge | 171:3a7713b1edbc | 306 | #define CALIBRATE_BASE (0x0FE08000UL) /**< CALIBRATE base address */ |
AnnaBridge | 171:3a7713b1edbc | 307 | #define DEVINFO_BASE (0x0FE081B0UL) /**< DEVINFO base address */ |
AnnaBridge | 171:3a7713b1edbc | 308 | #define ROMTABLE_BASE (0xF00FFFD0UL) /**< ROMTABLE base address */ |
AnnaBridge | 171:3a7713b1edbc | 309 | #define LOCKBITS_BASE (0x0FE04000UL) /**< Lock-bits page base address */ |
AnnaBridge | 171:3a7713b1edbc | 310 | #define USERDATA_BASE (0x0FE00000UL) /**< User data page base address */ |
AnnaBridge | 171:3a7713b1edbc | 311 | |
AnnaBridge | 171:3a7713b1edbc | 312 | /** @} End of group EFM32HG309F64_Peripheral_Base */ |
AnnaBridge | 171:3a7713b1edbc | 313 | |
AnnaBridge | 171:3a7713b1edbc | 314 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 315 | * @defgroup EFM32HG309F64_Peripheral_Declaration EFM32HG309F64 Peripheral Declarations |
AnnaBridge | 171:3a7713b1edbc | 316 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 317 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 318 | |
AnnaBridge | 171:3a7713b1edbc | 319 | #define AES ((AES_TypeDef *) AES_BASE) /**< AES base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 320 | #define DMA ((DMA_TypeDef *) DMA_BASE) /**< DMA base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 321 | #define USB ((USB_TypeDef *) USB_BASE) /**< USB base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 322 | #define MSC ((MSC_TypeDef *) MSC_BASE) /**< MSC base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 323 | #define EMU ((EMU_TypeDef *) EMU_BASE) /**< EMU base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 324 | #define RMU ((RMU_TypeDef *) RMU_BASE) /**< RMU base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 325 | #define CMU ((CMU_TypeDef *) CMU_BASE) /**< CMU base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 326 | #define TIMER0 ((TIMER_TypeDef *) TIMER0_BASE) /**< TIMER0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 327 | #define TIMER1 ((TIMER_TypeDef *) TIMER1_BASE) /**< TIMER1 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 328 | #define TIMER2 ((TIMER_TypeDef *) TIMER2_BASE) /**< TIMER2 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 329 | #define ACMP0 ((ACMP_TypeDef *) ACMP0_BASE) /**< ACMP0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 330 | #define USART0 ((USART_TypeDef *) USART0_BASE) /**< USART0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 331 | #define USART1 ((USART_TypeDef *) USART1_BASE) /**< USART1 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 332 | #define PRS ((PRS_TypeDef *) PRS_BASE) /**< PRS base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 333 | #define IDAC0 ((IDAC_TypeDef *) IDAC0_BASE) /**< IDAC0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 334 | #define GPIO ((GPIO_TypeDef *) GPIO_BASE) /**< GPIO base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 335 | #define VCMP ((VCMP_TypeDef *) VCMP_BASE) /**< VCMP base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 336 | #define ADC0 ((ADC_TypeDef *) ADC0_BASE) /**< ADC0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 337 | #define LEUART0 ((LEUART_TypeDef *) LEUART0_BASE) /**< LEUART0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 338 | #define PCNT0 ((PCNT_TypeDef *) PCNT0_BASE) /**< PCNT0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 339 | #define I2C0 ((I2C_TypeDef *) I2C0_BASE) /**< I2C0 base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 340 | #define RTC ((RTC_TypeDef *) RTC_BASE) /**< RTC base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 341 | #define WDOG ((WDOG_TypeDef *) WDOG_BASE) /**< WDOG base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 342 | #define MTB ((MTB_TypeDef *) MTB_BASE) /**< MTB base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 343 | #define CALIBRATE ((CALIBRATE_TypeDef *) CALIBRATE_BASE) /**< CALIBRATE base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 344 | #define DEVINFO ((DEVINFO_TypeDef *) DEVINFO_BASE) /**< DEVINFO base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 345 | #define ROMTABLE ((ROMTABLE_TypeDef *) ROMTABLE_BASE) /**< ROMTABLE base pointer */ |
AnnaBridge | 171:3a7713b1edbc | 346 | |
AnnaBridge | 171:3a7713b1edbc | 347 | /** @} End of group EFM32HG309F64_Peripheral_Declaration */ |
AnnaBridge | 171:3a7713b1edbc | 348 | |
AnnaBridge | 171:3a7713b1edbc | 349 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 350 | * @defgroup EFM32HG309F64_BitFields EFM32HG309F64 Bit Fields |
AnnaBridge | 171:3a7713b1edbc | 351 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 352 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 353 | |
AnnaBridge | 171:3a7713b1edbc | 354 | #include "efm32hg_prs_signals.h" |
AnnaBridge | 171:3a7713b1edbc | 355 | #include "efm32hg_dmareq.h" |
AnnaBridge | 171:3a7713b1edbc | 356 | #include "efm32hg_dmactrl.h" |
AnnaBridge | 171:3a7713b1edbc | 357 | |
AnnaBridge | 171:3a7713b1edbc | 358 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 359 | * @defgroup EFM32HG309F64_UNLOCK EFM32HG309F64 Unlock Codes |
AnnaBridge | 171:3a7713b1edbc | 360 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 361 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 362 | #define MSC_UNLOCK_CODE 0x1B71 /**< MSC unlock code */ |
AnnaBridge | 171:3a7713b1edbc | 363 | #define EMU_UNLOCK_CODE 0xADE8 /**< EMU unlock code */ |
AnnaBridge | 171:3a7713b1edbc | 364 | #define CMU_UNLOCK_CODE 0x580E /**< CMU unlock code */ |
AnnaBridge | 171:3a7713b1edbc | 365 | #define TIMER_UNLOCK_CODE 0xCE80 /**< TIMER unlock code */ |
AnnaBridge | 171:3a7713b1edbc | 366 | #define GPIO_UNLOCK_CODE 0xA534 /**< GPIO unlock code */ |
AnnaBridge | 171:3a7713b1edbc | 367 | |
AnnaBridge | 171:3a7713b1edbc | 368 | /** @} End of group EFM32HG309F64_UNLOCK */ |
AnnaBridge | 171:3a7713b1edbc | 369 | |
AnnaBridge | 171:3a7713b1edbc | 370 | /** @} End of group EFM32HG309F64_BitFields */ |
AnnaBridge | 171:3a7713b1edbc | 371 | |
AnnaBridge | 171:3a7713b1edbc | 372 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 373 | * @defgroup EFM32HG309F64_Alternate_Function EFM32HG309F64 Alternate Function |
AnnaBridge | 171:3a7713b1edbc | 374 | * @{ |
AnnaBridge | 171:3a7713b1edbc | 375 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 376 | |
AnnaBridge | 171:3a7713b1edbc | 377 | #include "efm32hg_af_ports.h" |
AnnaBridge | 171:3a7713b1edbc | 378 | #include "efm32hg_af_pins.h" |
AnnaBridge | 171:3a7713b1edbc | 379 | |
AnnaBridge | 171:3a7713b1edbc | 380 | /** @} End of group EFM32HG309F64_Alternate_Function */ |
AnnaBridge | 171:3a7713b1edbc | 381 | |
AnnaBridge | 171:3a7713b1edbc | 382 | /**************************************************************************//** |
AnnaBridge | 171:3a7713b1edbc | 383 | * @brief Set the value of a bit field within a register. |
AnnaBridge | 171:3a7713b1edbc | 384 | * |
AnnaBridge | 171:3a7713b1edbc | 385 | * @param REG |
AnnaBridge | 171:3a7713b1edbc | 386 | * The register to update |
AnnaBridge | 171:3a7713b1edbc | 387 | * @param MASK |
AnnaBridge | 171:3a7713b1edbc | 388 | * The mask for the bit field to update |
AnnaBridge | 171:3a7713b1edbc | 389 | * @param VALUE |
AnnaBridge | 171:3a7713b1edbc | 390 | * The value to write to the bit field |
AnnaBridge | 171:3a7713b1edbc | 391 | * @param OFFSET |
AnnaBridge | 171:3a7713b1edbc | 392 | * The number of bits that the field is offset within the register. |
AnnaBridge | 171:3a7713b1edbc | 393 | * 0 (zero) means LSB. |
AnnaBridge | 171:3a7713b1edbc | 394 | *****************************************************************************/ |
AnnaBridge | 171:3a7713b1edbc | 395 | #define SET_BIT_FIELD(REG, MASK, VALUE, OFFSET) \ |
AnnaBridge | 171:3a7713b1edbc | 396 | REG = ((REG) &~(MASK)) | (((VALUE) << (OFFSET)) & (MASK)); |
AnnaBridge | 171:3a7713b1edbc | 397 | |
AnnaBridge | 171:3a7713b1edbc | 398 | /** @} End of group EFM32HG309F64 */ |
AnnaBridge | 171:3a7713b1edbc | 399 | |
AnnaBridge | 171:3a7713b1edbc | 400 | /** @} End of group Parts */ |
AnnaBridge | 171:3a7713b1edbc | 401 | |
AnnaBridge | 171:3a7713b1edbc | 402 | #ifdef __cplusplus |
AnnaBridge | 171:3a7713b1edbc | 403 | } |
AnnaBridge | 171:3a7713b1edbc | 404 | #endif |
AnnaBridge | 171:3a7713b1edbc | 405 | #endif /* EFM32HG309F64_H */ |