1 /* 2 ** ################################################################### 3 ** Processor: K32L3A60VPJ1A_cm0plus 4 ** Compilers: GNU C Compiler 5 ** IAR ANSI C/C++ Compiler for ARM 6 ** Keil ARM C/C++ Compiler 7 ** MCUXpresso Compiler 8 ** 9 ** Reference manual: K32L3ARM, Rev. 0 , 05/2019 10 ** Version: rev. 1.0, 2019-04-22 11 ** Build: b190716 12 ** 13 ** Abstract: 14 ** CMSIS Peripheral Access Layer for K32L3A60_cm0plus 15 ** 16 ** Copyright 1997-2016 Freescale Semiconductor, Inc. 17 ** Copyright 2016-2019 NXP 18 ** All rights reserved. 19 ** 20 ** SPDX-License-Identifier: BSD-3-Clause 21 ** 22 ** http: www.nxp.com 23 ** mail: support@nxp.com 24 ** 25 ** Revisions: 26 ** - rev. 1.0 (2019-04-22) 27 ** Initial version. 28 ** 29 ** ################################################################### 30 */ 31 32 /*! 33 * @file K32L3A60_cm0plus.h 34 * @version 1.0 35 * @date 2019-04-22 36 * @brief CMSIS Peripheral Access Layer for K32L3A60_cm0plus 37 * 38 * CMSIS Peripheral Access Layer for K32L3A60_cm0plus 39 */ 40 41 #ifndef _K32L3A60_CM0PLUS_H_ 42 #define _K32L3A60_CM0PLUS_H_ /**< Symbol preventing repeated inclusion */ 43 44 /** Memory map major version (memory maps with equal major version number are 45 * compatible) */ 46 #define MCU_MEM_MAP_VERSION 0x0100U 47 /** Memory map minor version */ 48 #define MCU_MEM_MAP_VERSION_MINOR 0x0000U 49 50 51 /* ---------------------------------------------------------------------------- 52 -- Interrupt vector numbers 53 ---------------------------------------------------------------------------- */ 54 55 /*! 56 * @addtogroup Interrupt_vector_numbers Interrupt vector numbers 57 * @{ 58 */ 59 60 /** Interrupt Number Definitions */ 61 #define NUMBER_OF_INT_VECTORS 80 /**< Number of interrupts in the Vector table */ 62 63 typedef enum IRQn { 64 /* Auxiliary constants */ 65 NotAvail_IRQn = -128, /**< Not available device specific interrupt */ 66 67 /* Core interrupts */ 68 NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */ 69 HardFault_IRQn = -13, /**< Cortex-M0 SV Hard Fault Interrupt */ 70 SVCall_IRQn = -5, /**< Cortex-M0 SV Call Interrupt */ 71 PendSV_IRQn = -2, /**< Cortex-M0 Pend SV Interrupt */ 72 SysTick_IRQn = -1, /**< Cortex-M0 System Tick Interrupt */ 73 74 /* Device specific interrupts */ 75 CTI1_IRQn = 0, /**< Cross Trigger Interface 1 */ 76 DMA1_04_IRQn = 1, /**< DMA1 channel 0/4 transfer complete */ 77 DMA1_15_IRQn = 2, /**< DMA1 channel 1/5 transfer complete */ 78 DMA1_26_IRQn = 3, /**< DMA1 channel 2/6 transfer complete */ 79 DMA1_37_IRQn = 4, /**< DMA1 channel 3/7 transfer complete */ 80 DMA1_Error_IRQn = 5, /**< DMA1 channel 0-7 error interrupt */ 81 MSMC_IRQn = 6, /**< MSMC (SMC1) interrupt */ 82 LLWU1_IRQn = 7, /**< Low leakage wakeup 1 */ 83 MUB_IRQn = 8, /**< MU Side B interrupt */ 84 WDOG1_IRQn = 9, /**< WDOG1 interrupt */ 85 CAU3_Task_Complete_IRQn = 10, /**< Cryptographic Acceleration Unit version 3 Task Complete */ 86 CAU3_Security_Violation_IRQn = 11, /**< Cryptographic Acceleration Unit version 3 Security Violation */ 87 TRNG_IRQn = 12, /**< TRNG interrupt */ 88 LPIT1_IRQn = 13, /**< LPIT1 interrupt */ 89 LPTMR2_IRQn = 14, /**< LPTMR2 interrupt */ 90 TPM3_IRQn = 15, /**< TPM3 single interrupt vector for all sources */ 91 LPI2C3_IRQn = 16, /**< LPI2C3 interrupt */ 92 Reserved33_IRQn = 17, /**< Reserved interrupt */ 93 Reserved34_IRQn = 18, /**< Reserved interrupt */ 94 LPSPI3_IRQn = 19, /**< LPSPI3 single interrupt vector for all sources */ 95 LPUART3_IRQn = 20, /**< LPUART3 status and error */ 96 PORTE_IRQn = 21, /**< PORTE Pin detect */ 97 LPCMP1_IRQn = 22, /**< LPCMP1 interrupt */ 98 RTC_IRQn = 23, /**< RTC */ 99 INTMUX1_0_IRQn = 24, /**< INTMUX1 channel0 interrupt */ 100 INTMUX1_1_IRQn = 25, /**< INTMUX1 channel1 interrupt */ 101 INTMUX1_2_IRQn = 26, /**< INTMUX1 channel2 interrupt */ 102 INTMUX1_3_IRQn = 27, /**< INTMUX1 channel3 interrupt */ 103 INTMUX1_4_IRQn = 28, /**< INTMUX1 channel4 interrupt */ 104 INTMUX1_5_IRQn = 29, /**< INTMUX1 channel5 interrupt */ 105 INTMUX1_6_IRQn = 30, /**< INTMUX1 channel6 interrupt */ 106 INTMUX1_7_IRQn = 31, /**< INTMUX1 channel7 interrupt */ 107 EWM_IRQn = 32, /**< EWM interrupt (INTMUX1 source IRQ0) */ 108 FTFE_Command_Complete_IRQn = 33, /**< FTFE interrupt (INTMUX1 source IRQ1) */ 109 FTFE_Read_Collision_IRQn = 34, /**< FTFE interrupt (INTMUX1 source IRQ2) */ 110 SPM_IRQn = 35, /**< SPM (INTMUX1 source IRQ3) */ 111 SCG_IRQn = 36, /**< SCG interrupt (INTMUX1 source IRQ4) */ 112 LPIT0_IRQn = 37, /**< LPIT0 interrupt (INTMUX1 source IRQ5) */ 113 LPTMR0_IRQn = 38, /**< LPTMR0 interrupt (INTMUX1 source IRQ6) */ 114 LPTMR1_IRQn = 39, /**< LPTMR1 interrupt (INTMUX1 source IRQ7) */ 115 TPM0_IRQn = 40, /**< TPM0 single interrupt vector for all sources (INTMUX1 source IRQ8) */ 116 TPM1_IRQn = 41, /**< TPM1 single interrupt vector for all sources (INTMUX1 source IRQ9) */ 117 TPM2_IRQn = 42, /**< TPM2 single interrupt vector for all sources (INTMUX1 source IRQ10) */ 118 EMVSIM0_IRQn = 43, /**< EMVSIM0 interrupt (INTMUX1 source IRQ11) */ 119 FLEXIO0_IRQn = 44, /**< FLEXIO0 (INTMUX1 source IRQ12) */ 120 LPI2C0_IRQn = 45, /**< LPI2C0 interrupt (INTMUX1 source IRQ13) */ 121 LPI2C1_IRQn = 46, /**< LPI2C1 interrupt (INTMUX1 source IRQ14) */ 122 LPI2C2_IRQn = 47, /**< LPI2C2 interrupt (INTMUX1 source IRQ15) */ 123 I2S0_IRQn = 48, /**< I2S0 interrupt (INTMUX1 source IRQ16) */ 124 USDHC0_IRQn = 49, /**< SDHC0 interrupt (INTMUX1 source IRQ17) */ 125 LPSPI0_IRQn = 50, /**< LPSPI0 single interrupt vector for all sources (INTMUX1 source IRQ18) */ 126 LPSPI1_IRQn = 51, /**< LPSPI1 single interrupt vector for all sources (INTMUX1 source IRQ19) */ 127 LPSPI2_IRQn = 52, /**< LPSPI2 single interrupt vector for all sources (INTMUX1 source IRQ20) */ 128 LPUART0_IRQn = 53, /**< LPUART0 status and error (INTMUX1 source IRQ21) */ 129 LPUART1_IRQn = 54, /**< LPUART1 status and error (INTMUX1 source IRQ22) */ 130 LPUART2_IRQn = 55, /**< LPUART2 status and error (INTMUX1 source IRQ23) */ 131 USB0_IRQn = 56, /**< USB0 interrupt (INTMUX1 source IRQ24) */ 132 PORTA_IRQn = 57, /**< PORTA Pin detect (INTMUX1 source IRQ25) */ 133 PORTB_IRQn = 58, /**< PORTB Pin detect (INTMUX1 source IRQ26) */ 134 PORTC_IRQn = 59, /**< PORTC Pin detect (INTMUX1 source IRQ27) */ 135 PORTD_IRQn = 60, /**< PORTD Pin detect (INTMUX1 source IRQ28) */ 136 LPADC0_IRQn = 61, /**< LPADC0 interrupt (INTMUX1 source IRQ29) */ 137 LPCMP0_IRQn = 62, /**< LPCMP0 interrupt (INTMUX1 source IRQ30) */ 138 LPDAC0_IRQn = 63 /**< LPDAC0 interrupt (INTMUX1 source IRQ31) */ 139 } IRQn_Type; 140 141 /*! 142 * @} 143 */ /* end of group Interrupt_vector_numbers */ 144 145 146 /* ---------------------------------------------------------------------------- 147 -- Cortex M0 Core Configuration 148 ---------------------------------------------------------------------------- */ 149 150 /*! 151 * @addtogroup Cortex_Core_Configuration Cortex M0 Core Configuration 152 * @{ 153 */ 154 155 #define __CM0PLUS_REV 0x0000 /**< Core revision r0p0 */ 156 #define __MPU_PRESENT 1 /**< Defines if an MPU is present or not */ 157 #define __VTOR_PRESENT 1 /**< Defines if VTOR is present or not */ 158 #define __NVIC_PRIO_BITS 2 /**< Number of priority bits implemented in the NVIC */ 159 #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */ 160 161 #include "core_cm0plus.h" /* Core Peripheral Access Layer */ 162 #include "system_K32L3A60_cm0plus.h" /* Device specific configuration file */ 163 164 /*! 165 * @} 166 */ /* end of group Cortex_Core_Configuration */ 167 168 169 /* ---------------------------------------------------------------------------- 170 -- Mapping Information 171 ---------------------------------------------------------------------------- */ 172 173 /*! 174 * @addtogroup Mapping_Information Mapping Information 175 * @{ 176 */ 177 178 /** Mapping Information */ 179 /*! 180 * @addtogroup edma_request 181 * @{ */ 182 183 /******************************************************************************* 184 * Definitions 185 *******************************************************************************/ 186 187 /*! 188 * @brief Enumeration for the DMA hardware request 189 * 190 * Defines the enumeration for the DMA hardware request collections. 191 */ 192 typedef enum _dma_request_source 193 { 194 kDmaRequestMux1LLWU1 = 0|0x200U, /**< LLWU1 Wakeup */ 195 kDmaRequestMux1CAU3 = 1|0x200U, /**< CAU3 Data Request */ 196 kDmaRequestMux1LPTMR2 = 2|0x200U, /**< LPTMR2 Trigger */ 197 kDmaRequestMux1TPM3Channel0 = 3|0x200U, /**< TPM3 Channel 0 */ 198 kDmaRequestMux1TPM3Channel1 = 4|0x200U, /**< TPM3 Channel 1 */ 199 kDmaRequestMux1TPM3Overflow = 5|0x200U, /**< TPM3 Overflow */ 200 kDmaRequestMux1LPI2C3Rx = 6|0x200U, /**< LPI2C3 Receive */ 201 kDmaRequestMux1LPI2C3Tx = 7|0x200U, /**< LPI2C3 Transmit */ 202 kDmaRequestMux1RF0Rx = 8|0x200U, /**< 2.4GHz Radio 0 Receive */ 203 kDmaRequestMux1LPSPI3Rx = 9|0x200U, /**< LPSPI3 Receive */ 204 kDmaRequestMux1LPSPI3Tx = 10|0x200U, /**< LPSPI3 Transmit */ 205 kDmaRequestMux1LPUART3Rx = 11|0x200U, /**< LPUART3 Receive */ 206 kDmaRequestMux1LPUART3Tx = 12|0x200U, /**< LPUART3 Transmit */ 207 kDmaRequestMux1PORTE = 13|0x200U, /**< PORTE Pin Request */ 208 kDmaRequestMux1LPCMP1 = 14|0x200U, /**< LPCMP1 Comparator Trigger */ 209 kDmaRequestMux1LPTMR1 = 15|0x200U, /**< LPTMR1 Trigger */ 210 kDmaRequestMux1FLEXIO0Channel0 = 16|0x200U, /**< FLEXIO0 Channel 0 */ 211 kDmaRequestMux1FLEXIO0Channel1 = 17|0x200U, /**< FLEXIO0 Channel 1 */ 212 kDmaRequestMux1FLEXIO0Channel2 = 18|0x200U, /**< FLEXIO0 Channel 2 */ 213 kDmaRequestMux1FLEXIO0Channel3 = 19|0x200U, /**< FLEXIO0 Channel 3 */ 214 kDmaRequestMux1FLEXIO0Channel4 = 20|0x200U, /**< FLEXIO0 Channel 4 */ 215 kDmaRequestMux1FLEXIO0Channel5 = 21|0x200U, /**< FLEXIO0 Channel 5 */ 216 kDmaRequestMux1FLEXIO0Channel6 = 22|0x200U, /**< FLEXIO0 Channel 6 */ 217 kDmaRequestMux1FLEXIO0Channel7 = 23|0x200U, /**< FLEXIO0 Channel 7 */ 218 kDmaRequestMux1I2S0Rx = 24|0x200U, /**< I2S0 Receive */ 219 kDmaRequestMux1I2S0Tx = 25|0x200U, /**< I2S0 Transmit */ 220 kDmaRequestMux1PORTA = 26|0x200U, /**< PORTA Pin Request */ 221 kDmaRequestMux1PORTB = 27|0x200U, /**< PORTB Pin Request */ 222 kDmaRequestMux1PORTC = 28|0x200U, /**< PORTC Pin Request */ 223 kDmaRequestMux1PORTD = 29|0x200U, /**< PORTD Pin Request */ 224 kDmaRequestMux1LPADC0 = 30|0x200U, /**< LPADC0 Conversion Complete */ 225 kDmaRequestMux1DAC0 = 31|0x200U, /**< DAC0 Conversion Complete */ 226 } dma_request_source_t; 227 228 /* @} */ 229 230 /*! 231 * @addtogroup trgmux_source 232 * @{ */ 233 234 /******************************************************************************* 235 * Definitions 236 *******************************************************************************/ 237 238 /*! 239 * @brief Enumeration for the TRGMUX source 240 * 241 * Defines the enumeration for the TRGMUX source collections. 242 */ 243 typedef enum _trgmux_source 244 { 245 kTRGMUX_Source0Disabled = 0U, /**< Trigger function is disabled */ 246 kTRGMUX_Source1Disabled = 0U, /**< Trigger function is disabled */ 247 kTRGMUX_Source0Llwu0 = 1U, /**< LLWU0 trigger is selected */ 248 kTRGMUX_Source1Llwu1 = 1U, /**< LLWU1 trigger is selected */ 249 kTRGMUX_Source0Lpit0Channel0 = 2U, /**< LPIT0 Channel 0 is selected */ 250 kTRGMUX_Source1Lpit1Channel0 = 2U, /**< LPIT1 Channel 0 is selected */ 251 kTRGMUX_Source0Lpit0Channel1 = 3U, /**< LPIT0 Channel 1 is selected */ 252 kTRGMUX_Source1Lpit1Channel1 = 3U, /**< LPIT1 Channel 1 is selected */ 253 kTRGMUX_Source0Lpit0Channel2 = 4U, /**< LPIT0 Channel 2 is selected */ 254 kTRGMUX_Source1Lpit1Channel2 = 4U, /**< LPIT1 Channel 2 is selected */ 255 kTRGMUX_Source0Lpit0Channel3 = 5U, /**< LPIT0 Channel 3 is selected */ 256 kTRGMUX_Source1Lpit1Channel3 = 5U, /**< LPIT1 Channel 3 is selected */ 257 kTRGMUX_Source0RtcAlarm = 6U, /**< RTC Alarm is selected */ 258 kTRGMUX_Source1Lptmr2Trigger = 6U, /**< LPTMR2 Trigger is selected */ 259 kTRGMUX_Source0RtcSeconds = 7U, /**< RTC Seconds is selected */ 260 kTRGMUX_Source1Tpm3ChannelEven = 7U, /**< TPM3 Channel Even is selected */ 261 kTRGMUX_Source0Lptmr0Trigger = 8U, /**< LPTMR0 Trigger is selected */ 262 kTRGMUX_Source1Tpm3ChannelOdd = 8U, /**< TPM3 Channel Odd is selected */ 263 kTRGMUX_Source0Lptmr1Trigger = 9U, /**< LPTMR1 Trigger is selected */ 264 kTRGMUX_Source1Tpm3Overflow = 9U, /**< TPM3 Overflow is selected */ 265 kTRGMUX_Source0Tpm0ChannelEven = 10U, /**< TPM0 Channel Even is selected */ 266 kTRGMUX_Source1Lpi2c3MasterStop = 10U, /**< LPI2C3 Master Stop is selected */ 267 kTRGMUX_Source0Tpm0ChannelOdd = 11U, /**< TPM0 Channel Odd is selected */ 268 kTRGMUX_Source1Lpi2c3SlaveStop = 11U, /**< LPI2C3 Slave Stop is selected */ 269 kTRGMUX_Source0Tpm0Overflow = 12U, /**< TPM0 Overflow is selected */ 270 kTRGMUX_Source1Lpspi3Frame = 12U, /**< LPSPI3 Frame is selected */ 271 kTRGMUX_Source0Tpm1ChannelEven = 13U, /**< TPM1 Channel Even is selected */ 272 kTRGMUX_Source1Lpspi3RX = 13U, /**< LPSPI3 Rx is selected */ 273 kTRGMUX_Source0Tpm1ChannelOdd = 14U, /**< TPM1 Channel Odd is selected */ 274 kTRGMUX_Source1Lpuart3RxData = 14U, /**< LPUART3 Rx Data is selected */ 275 kTRGMUX_Source0Tpm1Overflow = 15U, /**< TPM1 Overflow is selected */ 276 kTRGMUX_Source1Lpuart3RxIdle = 15U, /**< LPUART3 Rx Idle is selected */ 277 kTRGMUX_Source0Tpm2ChannelEven = 16U, /**< TPM2 Channel Even is selected */ 278 kTRGMUX_Source1Lpuart3TxData = 16U, /**< LPUART3 Tx Data is selected */ 279 kTRGMUX_Source0Tpm2ChannelOdd = 17U, /**< TPM2 Channel Odd is selected */ 280 kTRGMUX_Source1PortEPinTrigger = 17U, /**< PORTE Pin Trigger is selected */ 281 kTRGMUX_Source0Tpm2Overflow = 18U, /**< TPM2 Overflow is selected */ 282 kTRGMUX_Source1Lpcmp1Output = 18U, /**< LPCMP1 Output is selected */ 283 kTRGMUX_Source0FlexIO0Timer0 = 19U, /**< FlexIO0 Timer 0 is selected */ 284 kTRGMUX_Source1RtcAlarm = 19U, /**< RTC Alarm is selected */ 285 kTRGMUX_Source0FlexIO0Timer1 = 20U, /**< FlexIO0 Timer 1 is selected */ 286 kTRGMUX_Source1RtcSeconds = 20U, /**< RTC Seconds is selected */ 287 kTRGMUX_Source0FlexIO0Timer2 = 21U, /**< FlexIO0 Timer 2 is selected */ 288 kTRGMUX_Source1Lptmr0Trigger = 21U, /**< LPTMR0 Trigger is selected */ 289 kTRGMUX_Source0FlexIO0Timer3 = 22U, /**< FlexIO0 Timer 3 is selected */ 290 kTRGMUX_Source1Lptmr1Trigger = 22U, /**< LPTMR1 Trigger is selected */ 291 kTRGMUX_Source0FlexIO0Timer4 = 23U, /**< FLexIO0 Timer 4 is selected */ 292 kTRGMUX_Source1Tpm1ChannelEven = 23U, /**< TPM1 Channel Even is selected */ 293 kTRGMUX_Source0FlexIO0Timer5 = 24U, /**< FlexIO0 Timer 5 is selected */ 294 kTRGMUX_Source1Tpm1ChannelOdd = 24U, /**< TPM1 Channel Odd is selected */ 295 kTRGMUX_Source0FlexIO0Timer6 = 25U, /**< FlexIO0 Timer 6 is selected */ 296 kTRGMUX_Source1Tpm1Overflow = 25U, /**< TPM1 Overflow is selected */ 297 kTRGMUX_Source0FlexIO0Timer7 = 26U, /**< FlexIO0 Timer 7 is selected */ 298 kTRGMUX_Source1Tpm2ChannelEven = 26U, /**< TPM2 Channel Even is selected */ 299 kTRGMUX_Source0Lpi2c0MasterStop = 27U, /**< LPI2C0 Master Stop is selected */ 300 kTRGMUX_Source1Tpm2ChannelOdd = 27U, /**< TPM2 Channel Odd is selected */ 301 kTRGMUX_Source0Lpi2c0SlaveStop = 28U, /**< LPI2C0 Slave Stop is selected */ 302 kTRGMUX_Source1Tpm2Overflow = 28U, /**< TPM2 Overflow is selected */ 303 kTRGMUX_Source0Lpi2c1MasterStop = 29U, /**< LPI2C1 Master Stop is selected */ 304 kTRGMUX_Source1FlexIO0Timer0 = 29U, /**< FlexIO0 Timer 0 is selected */ 305 kTRGMUX_Source0Lpi2c1SlaveStop = 30U, /**< LPI2C1 Slave Stop is selected */ 306 kTRGMUX_Source1FlexIO0Timer1 = 30U, /**< FlexIO0 Timer 1 is selected */ 307 kTRGMUX_Source0Lpi2c2MasterStop = 31U, /**< LPI2C2 Master Stop is selected */ 308 kTRGMUX_Source1FlexIO0Timer2 = 31U, /**< FlexIO0 Timer 2 is selected */ 309 kTRGMUX_Source0Lpi2c2SlaveStop = 32U, /**< LPI2C2 Slave Stop is selected */ 310 kTRGMUX_Source1FlexIO0Timer3 = 32U, /**< FlexIO0 Timer 3 is selected */ 311 kTRGMUX_Source0Sai0Rx = 33U, /**< SAI0 Rx Frame Sync is selected */ 312 kTRGMUX_Source1FlexIO0Timer4 = 33U, /**< FLexIO0 Timer 4 is selected */ 313 kTRGMUX_Source0Sai0Tx = 34U, /**< SAI0 Tx Frame Sync is selected */ 314 kTRGMUX_Source1FlexIO0Timer5 = 34U, /**< FlexIO0 Timer 5 is selected */ 315 kTRGMUX_Source0Lpspi0Frame = 35U, /**< LPSPI0 Frame is selected */ 316 kTRGMUX_Source1FlexIO0Timer6 = 35U, /**< FlexIO0 Timer 6 is selected */ 317 kTRGMUX_Source0Lpspi0Rx = 36U, /**< LPSPI0 Rx is selected */ 318 kTRGMUX_Source1FlexIO0Timer7 = 36U, /**< FlexIO0 Timer 7 is selected */ 319 kTRGMUX_Source0Lpspi1Frame = 37U, /**< LPSPI1 Frame is selected */ 320 kTRGMUX_Source1Lpi2c0MasterStop = 37U, /**< LPI2C0 Master Stop is selected */ 321 kTRGMUX_Source0Lpspi1Rx = 38U, /**< LPSPI1 Rx is selected */ 322 kTRGMUX_Source1Lpi2c0SlaveStop = 38U, /**< LPI2C0 Slave Stop is selected */ 323 kTRGMUX_Source0Lpspi2Frame = 39U, /**< LPSPI2 Frame is selected */ 324 kTRGMUX_Source1Lpi2c1MasterStop = 39U, /**< LPI2C1 Master Stop is selected */ 325 kTRGMUX_Source0Lpspi2RX = 40U, /**< LPSPI2 Rx is selected */ 326 kTRGMUX_Source1Lpi2c1SlaveStop = 40U, /**< LPI2C1 Slave Stop is selected */ 327 kTRGMUX_Source0Lpuart0RxData = 41U, /**< LPUART0 Rx Data is selected */ 328 kTRGMUX_Source1Lpi2c2MasterStop = 41U, /**< LPI2C2 Master Stop is selected */ 329 kTRGMUX_Source0Lpuart0RxIdle = 42U, /**< LPUART0 Rx Idle is selected */ 330 kTRGMUX_Source1Lpi2c2SlaveStop = 42U, /**< LPI2C2 Slave Stop is selected */ 331 kTRGMUX_Source0Lpuart0TxData = 43U, /**< LPUART0 Tx Data is selected */ 332 kTRGMUX_Source1Sai0Rx = 43U, /**< SAI0 Rx Frame Sync is selected */ 333 kTRGMUX_Source0Lpuart1RxData = 44U, /**< LPUART1 Rx Data is selected */ 334 kTRGMUX_Source1Sai0Tx = 44U, /**< SAI0 Tx Frame Sync is selected */ 335 kTRGMUX_Source0Lpuart1RxIdle = 45U, /**< LPUART1 Rx Idle is selected */ 336 kTRGMUX_Source1Lpspi0Frame = 45U, /**< LPSPI0 Frame is selected */ 337 kTRGMUX_Source0Lpuart1TxData = 46U, /**< LPUART1 TX Data is selected */ 338 kTRGMUX_Source1Lpspi0Rx = 46U, /**< LPSPI0 Rx is selected */ 339 kTRGMUX_Source0Lpuart2RxData = 47U, /**< LPUART2 RX Data is selected */ 340 kTRGMUX_Source1Lpspi1Frame = 47U, /**< LPSPI1 Frame is selected */ 341 kTRGMUX_Source0Lpuart2RxIdle = 48U, /**< LPUART2 RX Idle is selected */ 342 kTRGMUX_Source1Lpspi1Rx = 48U, /**< LPSPI1 Rx is selected */ 343 kTRGMUX_Source0Lpuart2TxData = 49U, /**< LPUART2 TX Data is selected */ 344 kTRGMUX_Source1Lpspi2Frame = 49U, /**< LPSPI2 Frame is selected */ 345 kTRGMUX_Source0Usb0Frame = 50U, /**< USB0 Start of Frame is selected */ 346 kTRGMUX_Source1Lpspi2RX = 50U, /**< LPSPI2 Rx is selected */ 347 kTRGMUX_Source0PortAPinTrigger = 51U, /**< PORTA Pin Trigger is selected */ 348 kTRGMUX_Source1Lpuart0RxData = 51U, /**< LPUART0 Rx Data is selected */ 349 kTRGMUX_Source0PortBPinTrigger = 52U, /**< PORTB Pin Trigger is selected */ 350 kTRGMUX_Source1Lpuart0RxIdle = 52U, /**< LPUART0 Rx Idle is selected */ 351 kTRGMUX_Source0PortCPinTrigger = 53U, /**< PORTC Pin Trigger is selected */ 352 kTRGMUX_Source1Lpuart0TxData = 53U, /**< LPUART0 Tx Data is selected */ 353 kTRGMUX_Source0PortDPinTrigger = 54U, /**< PORTD Pin Trigger is selected */ 354 kTRGMUX_Source1Lpuart1RxData = 54U, /**< LPUART1 Rx Data is selected */ 355 kTRGMUX_Source0Lpcmp0Output = 55U, /**< LPCMP0 Output is selected */ 356 kTRGMUX_Source1Lpuart1RxIdle = 55U, /**< LPUART1 Rx Idle is selected */ 357 kTRGMUX_Source0Lpi2c3MasterStop = 56U, /**< LPI2C3 Master Stop is selected */ 358 kTRGMUX_Source1Lpuart1TxData = 56U, /**< LPUART1 TX Data is selected */ 359 kTRGMUX_Source0Lpi2c3SlaveStop = 57U, /**< LPI2C3 Slave Stop is selected */ 360 kTRGMUX_Source1Lpuart2RxData = 57U, /**< LPUART2 RX Data is selected */ 361 kTRGMUX_Source0Lpspi3Frame = 58U, /**< LPSPI3 Frame is selected */ 362 kTRGMUX_Source1Lpuart2RxIdle = 58U, /**< LPUART2 RX Idle is selected */ 363 kTRGMUX_Source0Lpspi3Rx = 59U, /**< LPSPI3 Rx Data is selected */ 364 kTRGMUX_Source1Lpuart2TxData = 59U, /**< LPUART2 TX Data is selected */ 365 kTRGMUX_Source0Lpuart3RxData = 60U, /**< LPUART3 Rx Data is selected */ 366 kTRGMUX_Source1PortAPinTrigger = 60U, /**< PORTA Pin Trigger is selected */ 367 kTRGMUX_Source0Lpuart3RxIdle = 61U, /**< LPUART3 Rx Idle is selected */ 368 kTRGMUX_Source1PortBPinTrigger = 61U, /**< PORTB Pin Trigger is selected */ 369 kTRGMUX_Source0Lpuart3TxData = 62U, /**< LPUART3 Tx Data is selected */ 370 kTRGMUX_Source1PortCPinTrigger = 62U, /**< PORTC Pin Trigger is selected */ 371 kTRGMUX_Source0PortEPinTrigger = 63U, /**< PORTE Pin Trigger is selected */ 372 kTRGMUX_Source1PortDPinTrigger = 63U, /**< PORTD Pin Trigger is selected */ 373 } trgmux_source_t; 374 375 /* @} */ 376 377 /*! 378 * @brief Enumeration for the TRGMUX device 379 * 380 * Defines the enumeration for the TRGMUX device collections. 381 */ 382 typedef enum _trgmux_device 383 { 384 kTRGMUX_Trgmux0Dmamux0 = 0U, /**< DMAMUX0 device trigger input */ 385 kTRGMUX_Trgmux1Dmamux1 = 0U, /**< DMAMUX1 device trigger input */ 386 kTRGMUX_Trgmux0Lpit0 = 1U, /**< LPIT0 device trigger input */ 387 kTRGMUX_Trgmux1Lpit1 = 1U, /**< LPIT1 device trigger input */ 388 kTRGMUX_Trgmux0Tpm0 = 2U, /**< TPM0 device trigger input */ 389 kTRGMUX_Trgmux1Tpm3 = 2U, /**< TPM3 device trigger input */ 390 kTRGMUX_Trgmux0Tpm1 = 3U, /**< TPM1 device trigger input */ 391 kTRGMUX_Trgmux1Lpi2c3 = 3U, /**< LPI2C3 device trigger input */ 392 kTRGMUX_Trgmux0Tpm2 = 4U, /**< TPM2 device trigger input */ 393 kTRGMUX_Trgmux1Lpspi3 = 4U, /**< LPSPI3 device trigger input */ 394 kTRGMUX_Trgmux0Flexio0 = 5U, /**< FLEXIO0 device trigger input */ 395 kTRGMUX_Trgmux1Lpuart3 = 5U, /**< LPUART3 device trigger input */ 396 kTRGMUX_Trgmux0Lpi2c0 = 6U, /**< LPI2C0 device trigger input */ 397 kTRGMUX_Trgmux1Lpcmp1 = 6U, /**< LPCMP1 device trigger input */ 398 kTRGMUX_Trgmux0Lpi2c1 = 7U, /**< LPI2C1 device trigger input */ 399 kTRGMUX_Trgmux1Dmamux0 = 7U, /**< DMAMUX0 device trigger input */ 400 kTRGMUX_Trgmux0Lpi2c2 = 8U, /**< LPI2C2 device trigger input */ 401 kTRGMUX_Trgmux1Lpit0 = 8U, /**< LPIT0 device trigger input */ 402 kTRGMUX_Trgmux0Lpspi0 = 9U, /**< LPSPI0 device trigger input */ 403 kTRGMUX_Trgmux1Tpm0 = 9U, /**< TPM0 device trigger input */ 404 kTRGMUX_Trgmux0Lpspi1 = 10U, /**< LPSPI1 device trigger input */ 405 kTRGMUX_Trgmux1Tpm1 = 10U, /**< TPM1 device trigger input */ 406 kTRGMUX_Trgmux0Lpspi2 = 11U, /**< LPSPI2 device trigger input */ 407 kTRGMUX_Trgmux1Tpm2 = 11U, /**< TPM2 device trigger input */ 408 kTRGMUX_Trgmux0Lpuart0 = 12U, /**< LPUART0 device trigger input */ 409 kTRGMUX_Trgmux1Flexio0 = 12U, /**< FLEXIO0 device trigger input */ 410 kTRGMUX_Trgmux0Lpuart1 = 13U, /**< LPUART1 device trigger input */ 411 kTRGMUX_Trgmux1Lpi2c0 = 13U, /**< LPI2C0 device trigger input */ 412 kTRGMUX_Trgmux0Lpuart2 = 14U, /**< LPUART2 device trigger input */ 413 kTRGMUX_Trgmux1Lpi2c1 = 14U, /**< LPI2C1 device trigger input */ 414 kTRGMUX_Trgmux0Lpadc0 = 15U, /**< LPADC0 device trigger input */ 415 kTRGMUX_Trgmux1Lpi2c2 = 15U, /**< LPI2C2 device trigger input */ 416 kTRGMUX_Trgmux0Lpcmp0 = 16U, /**< LPCMP0 device trigger input */ 417 kTRGMUX_Trgmux1Lpspi0 = 16U, /**< LPSPI0 device trigger input */ 418 kTRGMUX_Trgmux0Lpdac0 = 17U, /**< LPDAC0 device trigger input */ 419 kTRGMUX_Trgmux1Lpspi1 = 17U, /**< LPSPI1 device trigger input */ 420 kTRGMUX_Trgmux0Dmamux1 = 18U, /**< DMAMUX1 device trigger input */ 421 kTRGMUX_Trgmux1Lpspi2 = 18U, /**< LPSPI2 device trigger input */ 422 kTRGMUX_Trgmux0Lpit1 = 19U, /**< LPIT1 device trigger input */ 423 kTRGMUX_Trgmux1Lpuart0 = 19U, /**< LPUART0 device trigger input */ 424 kTRGMUX_Trgmux0Tpm3 = 20U, /**< TPM3 device trigger input */ 425 kTRGMUX_Trgmux1Lpuart1 = 20U, /**< LPUART1 device trigger input */ 426 kTRGMUX_Trgmux0Lpi2c3 = 21U, /**< LPI2C3 device trigger input */ 427 kTRGMUX_Trgmux1Lpuart2 = 21U, /**< LPUART2 device trigger input */ 428 kTRGMUX_Trgmux0Lpspi3 = 22U, /**< LPSPI3 device trigger input */ 429 kTRGMUX_Trgmux1Lpadc0 = 22U, /**< LPADC0 device trigger input */ 430 kTRGMUX_Trgmux0Lpuart3 = 23U, /**< LPUART3 device trigger input */ 431 kTRGMUX_Trgmux1Lpcmp0 = 23U, /**< LPCMP0 device trigger input */ 432 kTRGMUX_Trgmux0Lpcmp1 = 24U, /**< LPCMP1 device trigger input */ 433 kTRGMUX_Trgmux1Lpdac0 = 24U, /**< LPDAC0 device trigger input */ 434 } trgmux_device_t; 435 436 /* @} */ 437 438 /*! 439 * @addtogroup xrdc_mapping 440 * @{ 441 */ 442 443 /******************************************************************************* 444 * Definitions 445 ******************************************************************************/ 446 447 /*! 448 * @brief Structure for the XRDC mapping 449 * 450 * Defines the structure for the XRDC resource collections. 451 */ 452 453 typedef enum _xrdc_master 454 { 455 kXRDC_MasterCM4CodeBus = 0U, /**< CM4 C-BUS */ 456 kXRDC_MasterCM4SystemBus = 1U, /**< CM4 S-BUS */ 457 kXRDC_MasterEdma0 = 2U, /**< EDMA0 */ 458 kXRDC_MasterUsdhc = 3U, /**< USDHC */ 459 kXRDC_MasterUsb = 4U, /**< USB */ 460 kXRDC_MasterCM0P = 32U, /**< CM0P */ 461 kXRDC_MasterEdma1 = 33U, /**< EDMA1 */ 462 kXRDC_MasterCau3 = 34U, /**< CAU3 */ 463 } xrdc_master_t; 464 465 /* @} */ 466 467 typedef enum _xrdc_mem 468 { 469 kXRDC_MemMrc0_0 = 0U, /**< MRC0 Memory 0 */ 470 kXRDC_MemMrc0_1 = 1U, /**< MRC0 Memory 1 */ 471 kXRDC_MemMrc0_2 = 2U, /**< MRC0 Memory 2 */ 472 kXRDC_MemMrc0_3 = 3U, /**< MRC0 Memory 3 */ 473 kXRDC_MemMrc0_4 = 4U, /**< MRC0 Memory 4 */ 474 kXRDC_MemMrc0_5 = 5U, /**< MRC0 Memory 5 */ 475 kXRDC_MemMrc0_6 = 6U, /**< MRC0 Memory 6 */ 476 kXRDC_MemMrc0_7 = 7U, /**< MRC0 Memory 7 */ 477 kXRDC_MemMrc1_0 = 16U, /**< MRC1 Memory 0 */ 478 kXRDC_MemMrc1_1 = 17U, /**< MRC1 Memory 1 */ 479 kXRDC_MemMrc1_2 = 18U, /**< MRC1 Memory 2 */ 480 kXRDC_MemMrc1_3 = 19U, /**< MRC1 Memory 3 */ 481 kXRDC_MemMrc1_4 = 20U, /**< MRC1 Memory 4 */ 482 kXRDC_MemMrc1_5 = 21U, /**< MRC1 Memory 5 */ 483 kXRDC_MemMrc1_6 = 22U, /**< MRC1 Memory 6 */ 484 kXRDC_MemMrc1_7 = 23U, /**< MRC1 Memory 7 */ 485 } xrdc_mem_t; 486 487 typedef enum _xrdc_periph 488 { 489 kXRDC_PeriphMscm = 1U, /**< Miscellaneous System Control Module (MSCM) */ 490 kXRDC_PeriphMaxcore = 4U, /**< MAX CORE */ 491 kXRDC_PeriphDma0 = 8U, /**< Direct Memory Access 0 (DMA0) controller */ 492 kXRDC_PeriphDma0Tcd = 9U, /**< Direct Memory Access 0 (DMA0) controller transfer control descriptors */ 493 kXRDC_PeriphFlexBus = 12U, /**< External Bus Interface(FlexBus) */ 494 kXRDC_PeriphXrdcMgr = 20U, /**< Extended Resource Domain Controller (XRDC) MGR */ 495 kXRDC_PeriphXrdcMdac = 21U, /**< Extended Resource Domain Controller (XRDC) MDAC */ 496 kXRDC_PeriphXrdcPac = 22U, /**< Extended Resource Domain Controller (XRDC) PAC */ 497 kXRDC_PeriphXrdcMrc = 23U, /**< Extended Resource Domain Controller (XRDC) MRC */ 498 kXRDC_PeriphSema420 = 27U, /**< Semaphore Unit 0 (SEMA420) */ 499 kXRDC_PeriphSmc0 = 32U, /**< System Mode Controller 0 (SMC0) */ 500 kXRDC_PeriphDmamux0 = 33U, /**< Direct Memory Access Multiplexer 0 (DMAMUX0) */ 501 kXRDC_PeriphEwm = 34U, /**< External Watchdog Monitor (EWM) */ 502 kXRDC_PeriphFtfe = 35U, /**< Flash Memory Module (FTFE) */ 503 kXRDC_PeriphLlwu0 = 36U, /**< Low Leakage Wake-up Unit 0 (LLWU0) */ 504 kXRDC_PeriphMua = 37U, /**< Message Unit Side A (MU-A) */ 505 kXRDC_PeriphSim = 38U, /**< System Integration Module (SIM) */ 506 kXRDC_PeriphUsbVreg = 39U, /**< USB Voltage Regulator (USBVREG) */ 507 kXRDC_PeriphSpm = 40U, /**< System Power Management (SPM) */ 508 kXRDC_PeriphTrgmux0 = 41U, /**< Tirgger Multiplexer 0 (TRGMUX0) */ 509 kXRDC_PeriphWdog0 = 42U, /**< Watchdog 0 (WDOG0) */ 510 kXRDC_PeriphPcc0 = 43U, /**< Peripheral Clock Controller 0 (PCC0) */ 511 kXRDC_PeriphScg = 44U, /**< System Clock Generator (SCG) */ 512 kXRDC_PeriphSrf = 45U, /**< System Register File */ 513 kXRDC_PeriphVbat = 46U, /**< VBAT Register File */ 514 kXRDC_PeriphCrc0 = 47U, /**< Cyclic Redundancy Check 0 (CRC0) */ 515 kXRDC_PeriphLpit0 = 48U, /**< Low-Power Periodic Interrupt Timer 0 (LPIT0) */ 516 kXRDC_PeriphRtc = 49U, /**< Real Time Clock (RTC) */ 517 kXRDC_PeriphLptmr0 = 50U, /**< Low-Power Timer 0 (LPTMR0) */ 518 kXRDC_PeriphLptmr1 = 51U, /**< Low-Power Timer 1 (LPTMR1) */ 519 kXRDC_PeriphTstmra = 52U, /**< Time Stamp Timer A (TSTMRA) */ 520 kXRDC_PeriphTpm0 = 53U, /**< Timer / Pulse Width Modulator Module 0 (TPM0) - 6 channel */ 521 kXRDC_PeriphTpm1 = 54U, /**< Timer / Pulse Width Modulator Module 1 (TPM1) - 2 channel */ 522 kXRDC_PeriphTpm2 = 55U, /**< Timer / Pulse Width Modulator Module 2 (TPM2) - 6 channel */ 523 kXRDC_PeriphEmvsim0 = 56U, /**< Euro Mastercard Visa Secure Identity Module 0 (EMVSIM0) */ 524 kXRDC_PeriphFlexio0 = 57U, /**< Flexible Input / Output 0 (FlexIO0) */ 525 kXRDC_PeriphLpi2c0 = 58U, /**< Low-Power Inter-Integrated Circuit 0 (LPI2C0) */ 526 kXRDC_PeriphLpi2c1 = 59U, /**< Low-Power Inter-Integrated Circuit 1 (LPI2C1) */ 527 kXRDC_PeriphLpi2c2 = 60U, /**< Low-Power Inter-Integrated Circuit 2 (LPI2C2) */ 528 kXRDC_PeriphI2s0 = 61U, /**< Serial Audio Interface 0 (I2S0) */ 529 kXRDC_PeriphSdhc0 = 62U, /**< Secure Digital Host Controller 0 (SDHC0) */ 530 kXRDC_PeriphLpspi0 = 63U, /**< Low-Power Serial Peripheral Interface 0 (LPSPI0) */ 531 kXRDC_PeriphLpspi1 = 64U, /**< Low-Power Serial Peripheral Interface 1 (LPSPI1) */ 532 kXRDC_PeriphLpspi2 = 65U, /**< Low-Power Serial Peripheral Interface 2 (LPSPI2) */ 533 kXRDC_PeriphLpuart0 = 66U, /**< Low-Power Universal Asynchronous Receive / Transmit 0 (LPUART0) */ 534 kXRDC_PeriphLpuart1 = 67U, /**< Low-Power Universal Asynchronous Receive / Transmit 1 (LPUART1) */ 535 kXRDC_PeriphLpuart2 = 68U, /**< Low-Power Universal Asynchronous Receive / Transmit 2 (LPUART2) */ 536 kXRDC_PeriphUsb0 = 69U, /**< Universal Serial Bus 0 (USB0) - Full Speed, Device Only */ 537 kXRDC_PeriphPortA = 70U, /**< PORTA Multiplex Control */ 538 kXRDC_PeriphPortB = 71U, /**< PORTB Multiplex Control */ 539 kXRDC_PeriphPortC = 72U, /**< PORTC Multiplex Control */ 540 kXRDC_PeriphPortD = 73U, /**< PORTD Multiplex Control */ 541 kXRDC_PeriphLpadc0 = 74U, /**< Low-Power Analog-to-Digital Converter 0 (LPADC0) */ 542 kXRDC_PeriphLpcmp0 = 75U, /**< Low-Power Comparator 0 (LPCMP0) */ 543 kXRDC_PeriphLpdac0 = 76U, /**< Low-Power Digital-to-Analog Converter 0 (LPDAC0) */ 544 kXRDC_PeriphVref = 77U, /**< Voltage Reference (VREF) */ 545 kXRDC_PeriphDma1 = 136U, /**< Direct Memory Access 1 (DMA1) controller */ 546 kXRDC_PeriphDma1Tcd = 137U, /**< Direct Memory Access 1 (DMA1) controller trasfer control descriptors */ 547 kXRDC_PeriphFgpio1 = 143U, /**< IO Port Alias */ 548 kXRDC_PeriphSema421 = 155U, /**< Semaphore Unit 1 (SEMA421) */ 549 kXRDC_PeriphSmc1 = 160U, /**< System Mode Controller 1(SMC1) */ 550 kXRDC_PeriphDmamux1 = 161U, /**< Direct Memory Access Mutiplexer 1 (DMAMUX1) */ 551 kXRDC_PeriphIntmux0 = 162U, /**< Interrupt Multiplexer 0 (INTMUX0) */ 552 kXRDC_Periphllwu1 = 163U, /**< Low Leakage Wake-up Unit 1 (LLWU1) */ 553 kXRDC_PeriphMub = 164U, /**< Messaging Unit - Side B (MU-B) */ 554 kXRDC_PeriphTrgmux1 = 165U, /**< Trigger Multiplexer 1 (TRGMUX1) */ 555 kXRDC_PeriphWdog1 = 166U, /**< Watchdog 1 (WDOG1) */ 556 kXRDC_PeriphPcc1 = 167U, /**< Peripheral Clock Controller 1 (PCC1) */ 557 kXRDC_PeriphCau3 = 168U, /**< Cryptographic Acceleration Unit (CAU3) */ 558 kXRDC_PeriphTrng = 169U, /**< True Random Number Generator (TRNG) */ 559 kXRDC_PeriphLpit1 = 170U, /**< Low-Power Periodic Interrupt Timer 1 (LPIT1) */ 560 kXRDC_PeriphLptmr2 = 171U, /**< Low-Power Timer 2 (LPTMR2) */ 561 kXRDC_PeriphTstmrb = 172U, /**< Time Stamp Timer B (TSTMRB) */ 562 kXRDC_PeriphTpm3 = 173U, /**< Timer / Pulse Width Modulation Module 3 (TPM3) - 2 channel */ 563 kXRDC_PeriphLpi2c3 = 174U, /**< Low-Power Inter-Integrated Circuit 3 (LPI2C3) */ 564 kXRDC_PeriphLpspi3 = 181U, /**< Low-Power Serial Peripheral Interface 3 (LPSPI3) */ 565 kXRDC_PeriphLpuart3 = 182U, /**< Low-Power Universal Asynchronous Receive / Transmit 3 (LPUART3) */ 566 kXRDC_PeriphPortE = 183U, /**< PORTE Multiplex Control */ 567 kXRDC_PeriphLpcmp1 = 184U, /**< Low-Power Comparator 1 (LPCMP1) */ 568 kXRDC_PeriphUsbRam = 272U, /**< USB SRAM */ 569 kXRDC_PeriphRgpio = 288U, /**< Rapid GPIO */ 570 } xrdc_periph_t; 571 572 573 /*! 574 * @} 575 */ /* end of group Mapping_Information */ 576 577 578 /* ---------------------------------------------------------------------------- 579 -- Device Peripheral Access Layer 580 ---------------------------------------------------------------------------- */ 581 582 /*! 583 * @addtogroup Peripheral_access_layer Device Peripheral Access Layer 584 * @{ 585 */ 586 587 588 /* 589 ** Start of section using anonymous unions 590 */ 591 592 #if defined(__ARMCC_VERSION) 593 #if (__ARMCC_VERSION >= 6010050) 594 #pragma clang diagnostic push 595 #else 596 #pragma push 597 #pragma anon_unions 598 #endif 599 #elif defined(__GNUC__) 600 /* anonymous unions are enabled by default */ 601 #elif defined(__IAR_SYSTEMS_ICC__) 602 #pragma language=extended 603 #else 604 #error Not supported compiler type 605 #endif 606 607 /* ---------------------------------------------------------------------------- 608 -- ADC Peripheral Access Layer 609 ---------------------------------------------------------------------------- */ 610 611 /*! 612 * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer 613 * @{ 614 */ 615 616 /** ADC - Register Layout Typedef */ 617 typedef struct { 618 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 619 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 620 uint8_t RESERVED_0[8]; 621 __IO uint32_t CTRL; /**< LPADC Control Register, offset: 0x10 */ 622 __IO uint32_t STAT; /**< LPADC Status Register, offset: 0x14 */ 623 __IO uint32_t IE; /**< Interrupt Enable Register, offset: 0x18 */ 624 __IO uint32_t DE; /**< DMA Enable Register, offset: 0x1C */ 625 __IO uint32_t CFG; /**< LPADC Configuration Register, offset: 0x20 */ 626 __IO uint32_t PAUSE; /**< LPADC Pause Register, offset: 0x24 */ 627 uint8_t RESERVED_1[8]; 628 __IO uint32_t FCTRL; /**< LPADC FIFO Control Register, offset: 0x30 */ 629 __O uint32_t SWTRIG; /**< Software Trigger Register, offset: 0x34 */ 630 uint8_t RESERVED_2[8]; 631 __IO uint32_t OFSTRIM; /**< LPADC Offset Trim Register, offset: 0x40 */ 632 uint8_t RESERVED_3[124]; 633 __IO uint32_t TCTRL[4]; /**< Trigger Control Register, array offset: 0xC0, array step: 0x4 */ 634 uint8_t RESERVED_4[48]; 635 struct { /* offset: 0x100, array step: 0x8 */ 636 __IO uint32_t CMDL; /**< LPADC Command Low Buffer Register, array offset: 0x100, array step: 0x8 */ 637 __IO uint32_t CMDH; /**< LPADC Command High Buffer Register, array offset: 0x104, array step: 0x8 */ 638 } CMD[15]; 639 uint8_t RESERVED_5[136]; 640 __IO uint32_t CV[4]; /**< Compare Value Register, array offset: 0x200, array step: 0x4 */ 641 uint8_t RESERVED_6[240]; 642 __I uint32_t RESFIFO; /**< LPADC Data Result FIFO Register, offset: 0x300 */ 643 } ADC_Type; 644 645 /* ---------------------------------------------------------------------------- 646 -- ADC Register Masks 647 ---------------------------------------------------------------------------- */ 648 649 /*! 650 * @addtogroup ADC_Register_Masks ADC Register Masks 651 * @{ 652 */ 653 654 /*! @name VERID - Version ID Register */ 655 /*! @{ */ 656 #define ADC_VERID_RES_MASK (0x1U) 657 #define ADC_VERID_RES_SHIFT (0U) 658 /*! RES - Resolution 659 * 0b0..Up to 13-bit differential/12-bit single ended resolution supported. 660 * 0b1..Up to 16-bit differential/15-bit single ended resolution supported. 661 */ 662 #define ADC_VERID_RES(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_RES_SHIFT)) & ADC_VERID_RES_MASK) 663 #define ADC_VERID_DIFFEN_MASK (0x2U) 664 #define ADC_VERID_DIFFEN_SHIFT (1U) 665 /*! DIFFEN - Differential Supported 666 * 0b0..Differential operation not supported. 667 * 0b1..Differential operation supported. CMDLa[DIFF] and CMDLa[ABSEL] control fields implemented. 668 */ 669 #define ADC_VERID_DIFFEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_DIFFEN_SHIFT)) & ADC_VERID_DIFFEN_MASK) 670 #define ADC_VERID_MVI_MASK (0x8U) 671 #define ADC_VERID_MVI_SHIFT (3U) 672 /*! MVI - Multi Vref Implemented 673 * 0b0..Single voltage reference high (VREFH) input supported. 674 * 0b1..Multiple voltage reference high (VREFH) inputs supported. 675 */ 676 #define ADC_VERID_MVI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MVI_SHIFT)) & ADC_VERID_MVI_MASK) 677 #define ADC_VERID_CSW_MASK (0x70U) 678 #define ADC_VERID_CSW_SHIFT (4U) 679 /*! CSW - Channel Scale Width 680 * 0b000..Channel scaling not supported. 681 * 0b001..Channel scaling supported. 1-bit CSCALE control field. 682 * 0b110..Channel scaling supported. 6-bit CSCALE control field. 683 */ 684 #define ADC_VERID_CSW(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CSW_SHIFT)) & ADC_VERID_CSW_MASK) 685 #define ADC_VERID_VR1RNGI_MASK (0x100U) 686 #define ADC_VERID_VR1RNGI_SHIFT (8U) 687 /*! VR1RNGI - Voltage Reference 1 Range Control Bit Implemented 688 * 0b0..Range control not required. CFG[VREF1RNG] is not implemented. 689 * 0b1..Range control required. CFG[VREF1RNG] is implemented. 690 */ 691 #define ADC_VERID_VR1RNGI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_VR1RNGI_SHIFT)) & ADC_VERID_VR1RNGI_MASK) 692 #define ADC_VERID_IADCKI_MASK (0x200U) 693 #define ADC_VERID_IADCKI_SHIFT (9U) 694 /*! IADCKI - Internal LPADC Clock implemented 695 * 0b0..Internal clock source not implemented. 696 * 0b1..Internal clock source (and CFG[ADCKEN]) implemented. 697 */ 698 #define ADC_VERID_IADCKI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_IADCKI_SHIFT)) & ADC_VERID_IADCKI_MASK) 699 #define ADC_VERID_CALOFSI_MASK (0x400U) 700 #define ADC_VERID_CALOFSI_SHIFT (10U) 701 /*! CALOFSI - Calibration Offset Function Implemented 702 * 0b0..Offset calibration and offset trimming not implemented. 703 * 0b1..Offset calibration and offset trimming implemented. 704 */ 705 #define ADC_VERID_CALOFSI(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_CALOFSI_SHIFT)) & ADC_VERID_CALOFSI_MASK) 706 #define ADC_VERID_MINOR_MASK (0xFF0000U) 707 #define ADC_VERID_MINOR_SHIFT (16U) 708 #define ADC_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MINOR_SHIFT)) & ADC_VERID_MINOR_MASK) 709 #define ADC_VERID_MAJOR_MASK (0xFF000000U) 710 #define ADC_VERID_MAJOR_SHIFT (24U) 711 #define ADC_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << ADC_VERID_MAJOR_SHIFT)) & ADC_VERID_MAJOR_MASK) 712 /*! @} */ 713 714 /*! @name PARAM - Parameter Register */ 715 /*! @{ */ 716 #define ADC_PARAM_TRIG_NUM_MASK (0xFFU) 717 #define ADC_PARAM_TRIG_NUM_SHIFT (0U) 718 #define ADC_PARAM_TRIG_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_TRIG_NUM_SHIFT)) & ADC_PARAM_TRIG_NUM_MASK) 719 #define ADC_PARAM_FIFOSIZE_MASK (0xFF00U) 720 #define ADC_PARAM_FIFOSIZE_SHIFT (8U) 721 /*! FIFOSIZE - Result FIFO Depth 722 * 0b00000001..Result FIFO depth = 1 dataword. 723 * 0b00000100..Result FIFO depth = 4 datawords. 724 * 0b00001000..Result FIFO depth = 8 datawords. 725 * 0b00010000..Result FIFO depth = 16 datawords. 726 * 0b00100000..Result FIFO depth = 32 datawords. 727 * 0b01000000..Result FIFO depth = 64 datawords. 728 */ 729 #define ADC_PARAM_FIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_FIFOSIZE_SHIFT)) & ADC_PARAM_FIFOSIZE_MASK) 730 #define ADC_PARAM_CV_NUM_MASK (0xFF0000U) 731 #define ADC_PARAM_CV_NUM_SHIFT (16U) 732 #define ADC_PARAM_CV_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CV_NUM_SHIFT)) & ADC_PARAM_CV_NUM_MASK) 733 #define ADC_PARAM_CMD_NUM_MASK (0xFF000000U) 734 #define ADC_PARAM_CMD_NUM_SHIFT (24U) 735 #define ADC_PARAM_CMD_NUM(x) (((uint32_t)(((uint32_t)(x)) << ADC_PARAM_CMD_NUM_SHIFT)) & ADC_PARAM_CMD_NUM_MASK) 736 /*! @} */ 737 738 /*! @name CTRL - LPADC Control Register */ 739 /*! @{ */ 740 #define ADC_CTRL_ADCEN_MASK (0x1U) 741 #define ADC_CTRL_ADCEN_SHIFT (0U) 742 /*! ADCEN - LPADC Enable 743 * 0b0..LPADC is disabled. 744 * 0b1..LPADC is enabled. 745 */ 746 #define ADC_CTRL_ADCEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_ADCEN_SHIFT)) & ADC_CTRL_ADCEN_MASK) 747 #define ADC_CTRL_RST_MASK (0x2U) 748 #define ADC_CTRL_RST_SHIFT (1U) 749 /*! RST - Software Reset 750 * 0b0..LPADC logic is not reset. 751 * 0b1..LPADC logic is reset. 752 */ 753 #define ADC_CTRL_RST(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RST_SHIFT)) & ADC_CTRL_RST_MASK) 754 #define ADC_CTRL_DOZEN_MASK (0x4U) 755 #define ADC_CTRL_DOZEN_SHIFT (2U) 756 /*! DOZEN - Doze Enable 757 * 0b0..LPADC is enabled in Doze mode. 758 * 0b1..LPADC is disabled in Doze mode. 759 */ 760 #define ADC_CTRL_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_DOZEN_SHIFT)) & ADC_CTRL_DOZEN_MASK) 761 #define ADC_CTRL_RSTFIFO_MASK (0x100U) 762 #define ADC_CTRL_RSTFIFO_SHIFT (8U) 763 /*! RSTFIFO - Reset FIFO 764 * 0b0..No effect. 765 * 0b1..FIFO is reset. 766 */ 767 #define ADC_CTRL_RSTFIFO(x) (((uint32_t)(((uint32_t)(x)) << ADC_CTRL_RSTFIFO_SHIFT)) & ADC_CTRL_RSTFIFO_MASK) 768 /*! @} */ 769 770 /*! @name STAT - LPADC Status Register */ 771 /*! @{ */ 772 #define ADC_STAT_RDY_MASK (0x1U) 773 #define ADC_STAT_RDY_SHIFT (0U) 774 /*! RDY - Result FIFO Ready Flag 775 * 0b0..Result FIFO data level not above watermark level. 776 * 0b1..Result FIFO holding data above watermark level. 777 */ 778 #define ADC_STAT_RDY(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_RDY_SHIFT)) & ADC_STAT_RDY_MASK) 779 #define ADC_STAT_FOF_MASK (0x2U) 780 #define ADC_STAT_FOF_SHIFT (1U) 781 /*! FOF - Result FIFO Overflow Flag 782 * 0b0..No result FIFO overflow has occurred since the last time the flag was cleared. 783 * 0b1..At least one result FIFO overflow has occurred since the last time the flag was cleared. 784 */ 785 #define ADC_STAT_FOF(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_FOF_SHIFT)) & ADC_STAT_FOF_MASK) 786 #define ADC_STAT_TRGACT_MASK (0x30000U) 787 #define ADC_STAT_TRGACT_SHIFT (16U) 788 /*! TRGACT - Trigger Active 789 * 0b00..Command (sequence) associated with Trigger 0 currently being executed. 790 * 0b01..Command (sequence) associated with Trigger 1 currently being executed. 791 * 0b10..Command (sequence) associated with Trigger 2 currently being executed. 792 * 0b11..Command (sequence) associated with Trigger 3 currently being executed. 793 */ 794 #define ADC_STAT_TRGACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_TRGACT_SHIFT)) & ADC_STAT_TRGACT_MASK) 795 #define ADC_STAT_CMDACT_MASK (0xF000000U) 796 #define ADC_STAT_CMDACT_SHIFT (24U) 797 /*! CMDACT - Command Active 798 * 0b0000..No command is currently in progress. 799 * 0b0001..Command 1 currently being executed. 800 * 0b0010..Command 2 currently being executed. 801 * 0b0011-0b1111..Associated command number is currently being executed. 802 */ 803 #define ADC_STAT_CMDACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_STAT_CMDACT_SHIFT)) & ADC_STAT_CMDACT_MASK) 804 /*! @} */ 805 806 /*! @name IE - Interrupt Enable Register */ 807 /*! @{ */ 808 #define ADC_IE_FWMIE_MASK (0x1U) 809 #define ADC_IE_FWMIE_SHIFT (0U) 810 /*! FWMIE - FIFO Watermark Interrupt Enable 811 * 0b0..FIFO watermark interrupts are not enabled. 812 * 0b1..FIFO watermark interrupts are enabled. 813 */ 814 #define ADC_IE_FWMIE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FWMIE_SHIFT)) & ADC_IE_FWMIE_MASK) 815 #define ADC_IE_FOFIE_MASK (0x2U) 816 #define ADC_IE_FOFIE_SHIFT (1U) 817 /*! FOFIE - Result FIFO Overflow Interrupt Enable 818 * 0b0..FIFO overflow interrupts are not enabled. 819 * 0b1..FIFO overflow interrupts are enabled. 820 */ 821 #define ADC_IE_FOFIE(x) (((uint32_t)(((uint32_t)(x)) << ADC_IE_FOFIE_SHIFT)) & ADC_IE_FOFIE_MASK) 822 /*! @} */ 823 824 /*! @name DE - DMA Enable Register */ 825 /*! @{ */ 826 #define ADC_DE_FWMDE_MASK (0x1U) 827 #define ADC_DE_FWMDE_SHIFT (0U) 828 /*! FWMDE - FIFO Watermark DMA Enable 829 * 0b0..DMA request disabled. 830 * 0b1..DMA request enabled. 831 */ 832 #define ADC_DE_FWMDE(x) (((uint32_t)(((uint32_t)(x)) << ADC_DE_FWMDE_SHIFT)) & ADC_DE_FWMDE_MASK) 833 /*! @} */ 834 835 /*! @name CFG - LPADC Configuration Register */ 836 /*! @{ */ 837 #define ADC_CFG_TPRICTRL_MASK (0x1U) 838 #define ADC_CFG_TPRICTRL_SHIFT (0U) 839 /*! TPRICTRL - LPADC trigger priority control 840 * 0b0..If a higher priority trigger is detected during command processing, the current conversion is aborted and 841 * the new command specified by the trigger is started. 842 * 0b1..If a higher priority trigger is received during command processing, the current conversion is completed 843 * (including averaging iterations if enabled) and stored to the RESFIFO before the higher priority 844 * trigger/command is initiated. Note that compare until true commands can be interrupted prior to resulting in a true 845 * conversion. 846 */ 847 #define ADC_CFG_TPRICTRL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_TPRICTRL_SHIFT)) & ADC_CFG_TPRICTRL_MASK) 848 #define ADC_CFG_PWRSEL_MASK (0x30U) 849 #define ADC_CFG_PWRSEL_SHIFT (4U) 850 /*! PWRSEL - Power Configuration Select 851 * 0b00..Level 1 (Lowest power setting) 852 * 0b01..Level 2 853 * 0b10..Level 3 854 * 0b11..Level 4 (Highest power setting) 855 */ 856 #define ADC_CFG_PWRSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWRSEL_SHIFT)) & ADC_CFG_PWRSEL_MASK) 857 #define ADC_CFG_REFSEL_MASK (0xC0U) 858 #define ADC_CFG_REFSEL_SHIFT (6U) 859 /*! REFSEL - Voltage Reference Selection 860 * 0b00..(Default) Option 1 setting. 861 * 0b01..Option 2 setting. 862 * 0b10..Option 3 setting. 863 * 0b11..Reserved 864 */ 865 #define ADC_CFG_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_REFSEL_SHIFT)) & ADC_CFG_REFSEL_MASK) 866 #define ADC_CFG_CALOFS_MASK (0x8000U) 867 #define ADC_CFG_CALOFS_SHIFT (15U) 868 /*! CALOFS - Configure for offset calibration function 869 * 0b0..Calibration function disabled 870 * 0b1..Configure for offset calibration function 871 */ 872 #define ADC_CFG_CALOFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_CALOFS_SHIFT)) & ADC_CFG_CALOFS_MASK) 873 #define ADC_CFG_PUDLY_MASK (0xFF0000U) 874 #define ADC_CFG_PUDLY_SHIFT (16U) 875 #define ADC_CFG_PUDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PUDLY_SHIFT)) & ADC_CFG_PUDLY_MASK) 876 #define ADC_CFG_PWREN_MASK (0x10000000U) 877 #define ADC_CFG_PWREN_SHIFT (28U) 878 /*! PWREN - LPADC Analog Pre-Enable 879 * 0b0..LPADC analog circuits are only enabled while conversions are active. Performance is affected due to analog startup delays. 880 * 0b1..LPADC analog circuits are pre-enabled and ready to execute conversions without startup delays (at the 881 * cost of higher DC current consumption). When PWREN is set, the power up delay is enforced such that any 882 * detected trigger does not begin ADC operation until the power up delay time has passed. 883 */ 884 #define ADC_CFG_PWREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_PWREN_SHIFT)) & ADC_CFG_PWREN_MASK) 885 #define ADC_CFG_VREF1RNG_MASK (0x20000000U) 886 #define ADC_CFG_VREF1RNG_SHIFT (29U) 887 /*! VREF1RNG - Enable support for low voltage reference on Option 1 Reference 888 * 0b0..Configuration required when Voltage Reference Option 1 input is in high voltage range 889 * 0b1..Configuration required when Voltage Reference Option 1 input is in low voltage range 890 */ 891 #define ADC_CFG_VREF1RNG(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_VREF1RNG_SHIFT)) & ADC_CFG_VREF1RNG_MASK) 892 #define ADC_CFG_ADCKEN_MASK (0x80000000U) 893 #define ADC_CFG_ADCKEN_SHIFT (31U) 894 /*! ADCKEN - LPADC asynchronous clock enable 895 * 0b0..LPADC internal clock is disabled 896 * 0b1..LPADC internal clock is enabled 897 */ 898 #define ADC_CFG_ADCKEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG_ADCKEN_SHIFT)) & ADC_CFG_ADCKEN_MASK) 899 /*! @} */ 900 901 /*! @name PAUSE - LPADC Pause Register */ 902 /*! @{ */ 903 #define ADC_PAUSE_PAUSEDLY_MASK (0x1FFU) 904 #define ADC_PAUSE_PAUSEDLY_SHIFT (0U) 905 #define ADC_PAUSE_PAUSEDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEDLY_SHIFT)) & ADC_PAUSE_PAUSEDLY_MASK) 906 #define ADC_PAUSE_PAUSEEN_MASK (0x80000000U) 907 #define ADC_PAUSE_PAUSEEN_SHIFT (31U) 908 /*! PAUSEEN - PAUSE Option Enable 909 * 0b0..Pause operation disabled 910 * 0b1..Pause operation enabled 911 */ 912 #define ADC_PAUSE_PAUSEEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_PAUSE_PAUSEEN_SHIFT)) & ADC_PAUSE_PAUSEEN_MASK) 913 /*! @} */ 914 915 /*! @name FCTRL - LPADC FIFO Control Register */ 916 /*! @{ */ 917 #define ADC_FCTRL_FCOUNT_MASK (0x1FU) 918 #define ADC_FCTRL_FCOUNT_SHIFT (0U) 919 #define ADC_FCTRL_FCOUNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FCOUNT_SHIFT)) & ADC_FCTRL_FCOUNT_MASK) 920 #define ADC_FCTRL_FWMARK_MASK (0xF0000U) 921 #define ADC_FCTRL_FWMARK_SHIFT (16U) 922 #define ADC_FCTRL_FWMARK(x) (((uint32_t)(((uint32_t)(x)) << ADC_FCTRL_FWMARK_SHIFT)) & ADC_FCTRL_FWMARK_MASK) 923 /*! @} */ 924 925 /*! @name SWTRIG - Software Trigger Register */ 926 /*! @{ */ 927 #define ADC_SWTRIG_SWT0_MASK (0x1U) 928 #define ADC_SWTRIG_SWT0_SHIFT (0U) 929 /*! SWT0 - Software trigger 0 event 930 * 0b0..No trigger 0 event generated. 931 * 0b1..Trigger 0 event generated. 932 */ 933 #define ADC_SWTRIG_SWT0(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT0_SHIFT)) & ADC_SWTRIG_SWT0_MASK) 934 #define ADC_SWTRIG_SWT1_MASK (0x2U) 935 #define ADC_SWTRIG_SWT1_SHIFT (1U) 936 /*! SWT1 - Software trigger 1 event 937 * 0b0..No trigger 1 event generated. 938 * 0b1..Trigger 1 event generated. 939 */ 940 #define ADC_SWTRIG_SWT1(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT1_SHIFT)) & ADC_SWTRIG_SWT1_MASK) 941 #define ADC_SWTRIG_SWT2_MASK (0x4U) 942 #define ADC_SWTRIG_SWT2_SHIFT (2U) 943 /*! SWT2 - Software trigger 2 event 944 * 0b0..No trigger 2 event generated. 945 * 0b1..Trigger 2 event generated. 946 */ 947 #define ADC_SWTRIG_SWT2(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT2_SHIFT)) & ADC_SWTRIG_SWT2_MASK) 948 #define ADC_SWTRIG_SWT3_MASK (0x8U) 949 #define ADC_SWTRIG_SWT3_SHIFT (3U) 950 /*! SWT3 - Software trigger 3 event 951 * 0b0..No trigger 3 event generated. 952 * 0b1..Trigger 3 event generated. 953 */ 954 #define ADC_SWTRIG_SWT3(x) (((uint32_t)(((uint32_t)(x)) << ADC_SWTRIG_SWT3_SHIFT)) & ADC_SWTRIG_SWT3_MASK) 955 /*! @} */ 956 957 /*! @name OFSTRIM - LPADC Offset Trim Register */ 958 /*! @{ */ 959 #define ADC_OFSTRIM_OFSTRIM_MASK (0x3FU) 960 #define ADC_OFSTRIM_OFSTRIM_SHIFT (0U) 961 #define ADC_OFSTRIM_OFSTRIM(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFSTRIM_OFSTRIM_SHIFT)) & ADC_OFSTRIM_OFSTRIM_MASK) 962 /*! @} */ 963 964 /*! @name TCTRL - Trigger Control Register */ 965 /*! @{ */ 966 #define ADC_TCTRL_HTEN_MASK (0x1U) 967 #define ADC_TCTRL_HTEN_SHIFT (0U) 968 /*! HTEN - Trigger enable 969 * 0b0..Hardware trigger source disabled 970 * 0b1..Hardware trigger source enabled 971 */ 972 #define ADC_TCTRL_HTEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_HTEN_SHIFT)) & ADC_TCTRL_HTEN_MASK) 973 #define ADC_TCTRL_TPRI_MASK (0x300U) 974 #define ADC_TCTRL_TPRI_SHIFT (8U) 975 /*! TPRI - Trigger priority setting 976 * 0b00..Set to highest priority, Level 1 977 * 0b01-0b10..Set to corresponding priority level 978 * 0b11..Set to lowest priority, Level 4 979 */ 980 #define ADC_TCTRL_TPRI(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TPRI_SHIFT)) & ADC_TCTRL_TPRI_MASK) 981 #define ADC_TCTRL_TDLY_MASK (0xF0000U) 982 #define ADC_TCTRL_TDLY_SHIFT (16U) 983 #define ADC_TCTRL_TDLY(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TDLY_SHIFT)) & ADC_TCTRL_TDLY_MASK) 984 #define ADC_TCTRL_TCMD_MASK (0xF000000U) 985 #define ADC_TCTRL_TCMD_SHIFT (24U) 986 /*! TCMD - Trigger command select 987 * 0b0000..Not a valid selection from the command buffer. Trigger event is ignored. 988 * 0b0001..CMD1 is executed 989 * 0b0010-0b1110..Corresponding CMD is executed 990 * 0b1111..CMD15 is executed 991 */ 992 #define ADC_TCTRL_TCMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_TCTRL_TCMD_SHIFT)) & ADC_TCTRL_TCMD_MASK) 993 /*! @} */ 994 995 /* The count of ADC_TCTRL */ 996 #define ADC_TCTRL_COUNT (4U) 997 998 /*! @name CMDL - LPADC Command Low Buffer Register */ 999 /*! @{ */ 1000 #define ADC_CMDL_ADCH_MASK (0x1FU) 1001 #define ADC_CMDL_ADCH_SHIFT (0U) 1002 /*! ADCH - Input channel select 1003 * 0b00000..Select CH0A or CH0B 1004 * 0b00001..Select CH1A or CH1B 1005 * 0b00010..Select CH2A or CH2B 1006 * 0b00011..Select CH3A or CH3B 1007 * 0b00100-0b11101..Select corresponding channel CHnA or CHnB 1008 * 0b11110..Select CH30A or CH30B 1009 * 0b11111..Select CH31A or CH31B 1010 */ 1011 #define ADC_CMDL_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ADCH_SHIFT)) & ADC_CMDL_ADCH_MASK) 1012 #define ADC_CMDL_ABSEL_MASK (0x20U) 1013 #define ADC_CMDL_ABSEL_SHIFT (5U) 1014 /*! ABSEL - A-side vs. B-side Select 1015 * 0b0..The associated A-side channel is converted. 1016 * 0b1..The associated B-side channel is converted. 1017 */ 1018 #define ADC_CMDL_ABSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDL_ABSEL_SHIFT)) & ADC_CMDL_ABSEL_MASK) 1019 /*! @} */ 1020 1021 /* The count of ADC_CMDL */ 1022 #define ADC_CMDL_COUNT (15U) 1023 1024 /*! @name CMDH - LPADC Command High Buffer Register */ 1025 /*! @{ */ 1026 #define ADC_CMDH_CMPEN_MASK (0x3U) 1027 #define ADC_CMDH_CMPEN_SHIFT (0U) 1028 /*! CMPEN - Compare Function Enable 1029 * 0b00..Compare disabled. 1030 * 0b01..Reserved 1031 * 0b10..Compare enabled. Store on true. 1032 * 0b11..Compare enabled. Repeat channel acquisition (sample/convert/compare) until true. 1033 */ 1034 #define ADC_CMDH_CMPEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_CMPEN_SHIFT)) & ADC_CMDH_CMPEN_MASK) 1035 #define ADC_CMDH_LWI_MASK (0x80U) 1036 #define ADC_CMDH_LWI_SHIFT (7U) 1037 /*! LWI - Loop with Increment 1038 * 0b0..Auto channel increment disabled 1039 * 0b1..Auto channel increment enabled 1040 */ 1041 #define ADC_CMDH_LWI(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LWI_SHIFT)) & ADC_CMDH_LWI_MASK) 1042 #define ADC_CMDH_STS_MASK (0x700U) 1043 #define ADC_CMDH_STS_SHIFT (8U) 1044 /*! STS - Sample Time Select 1045 * 0b000..Minimum sample time of 3 ADCK cycles. 1046 * 0b001..3 + 21 ADCK cycles; 5 ADCK cycles total sample time. 1047 * 0b010..3 + 22 ADCK cycles; 7 ADCK cycles total sample time. 1048 * 0b011..3 + 23 ADCK cycles; 11 ADCK cycles total sample time. 1049 * 0b100..3 + 24 ADCK cycles; 19 ADCK cycles total sample time. 1050 * 0b101..3 + 25 ADCK cycles; 35 ADCK cycles total sample time. 1051 * 0b110..3 + 26 ADCK cycles; 67 ADCK cycles total sample time. 1052 * 0b111..3 + 27 ADCK cycles; 131 ADCK cycles total sample time. 1053 */ 1054 #define ADC_CMDH_STS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_STS_SHIFT)) & ADC_CMDH_STS_MASK) 1055 #define ADC_CMDH_AVGS_MASK (0x7000U) 1056 #define ADC_CMDH_AVGS_SHIFT (12U) 1057 /*! AVGS - Hardware Average Select 1058 * 0b000..Single conversion. 1059 * 0b001..2 conversions averaged. 1060 * 0b010..4 conversions averaged. 1061 * 0b011..8 conversions averaged. 1062 * 0b100..16 conversions averaged. 1063 * 0b101..32 conversions averaged. 1064 * 0b110..64 conversions averaged. 1065 * 0b111..128 conversions averaged. 1066 */ 1067 #define ADC_CMDH_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_AVGS_SHIFT)) & ADC_CMDH_AVGS_MASK) 1068 #define ADC_CMDH_LOOP_MASK (0xF0000U) 1069 #define ADC_CMDH_LOOP_SHIFT (16U) 1070 /*! LOOP - Loop Count Select 1071 * 0b0000..Looping not enabled. Command executes 1 time. 1072 * 0b0001..Loop 1 time. Command executes 2 times. 1073 * 0b0010..Loop 2 times. Command executes 3 times. 1074 * 0b0011-0b1110..Loop corresponding number of times. Command executes LOOP+1 times. 1075 * 0b1111..Loop 15 times. Command executes 16 times. 1076 */ 1077 #define ADC_CMDH_LOOP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_LOOP_SHIFT)) & ADC_CMDH_LOOP_MASK) 1078 #define ADC_CMDH_NEXT_MASK (0xF000000U) 1079 #define ADC_CMDH_NEXT_SHIFT (24U) 1080 /*! NEXT - Next Command Select 1081 * 0b0000..No next command defined. Terminate conversions at completion of current command. If lower priority 1082 * trigger pending, begin command associated with lower priority trigger. 1083 * 0b0001..Select CMD1 command buffer register as next command. 1084 * 0b0010-0b1110..Select corresponding CMD command buffer register as next command 1085 * 0b1111..Select CMD15 command buffer register as next command. 1086 */ 1087 #define ADC_CMDH_NEXT(x) (((uint32_t)(((uint32_t)(x)) << ADC_CMDH_NEXT_SHIFT)) & ADC_CMDH_NEXT_MASK) 1088 /*! @} */ 1089 1090 /* The count of ADC_CMDH */ 1091 #define ADC_CMDH_COUNT (15U) 1092 1093 /*! @name CV - Compare Value Register */ 1094 /*! @{ */ 1095 #define ADC_CV_CVL_MASK (0xFFFFU) 1096 #define ADC_CV_CVL_SHIFT (0U) 1097 #define ADC_CV_CVL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVL_SHIFT)) & ADC_CV_CVL_MASK) 1098 #define ADC_CV_CVH_MASK (0xFFFF0000U) 1099 #define ADC_CV_CVH_SHIFT (16U) 1100 #define ADC_CV_CVH(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV_CVH_SHIFT)) & ADC_CV_CVH_MASK) 1101 /*! @} */ 1102 1103 /* The count of ADC_CV */ 1104 #define ADC_CV_COUNT (4U) 1105 1106 /*! @name RESFIFO - LPADC Data Result FIFO Register */ 1107 /*! @{ */ 1108 #define ADC_RESFIFO_D_MASK (0xFFFFU) 1109 #define ADC_RESFIFO_D_SHIFT (0U) 1110 #define ADC_RESFIFO_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_D_SHIFT)) & ADC_RESFIFO_D_MASK) 1111 #define ADC_RESFIFO_TSRC_MASK (0x30000U) 1112 #define ADC_RESFIFO_TSRC_SHIFT (16U) 1113 /*! TSRC - Trigger Source 1114 * 0b00..Trigger source 0 initiated this conversion. 1115 * 0b01..Trigger source 1 initiated this conversion. 1116 * 0b10..Trigger source 2 initiated this conversion. 1117 * 0b11..Trigger source 3 initiated this conversion. 1118 */ 1119 #define ADC_RESFIFO_TSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_TSRC_SHIFT)) & ADC_RESFIFO_TSRC_MASK) 1120 #define ADC_RESFIFO_LOOPCNT_MASK (0xF00000U) 1121 #define ADC_RESFIFO_LOOPCNT_SHIFT (20U) 1122 /*! LOOPCNT - Loop count value 1123 * 0b0000..Result is from initial conversion in command. 1124 * 0b0001..Result is from second conversion in command. 1125 * 0b0010-0b1110..Result is from LOOPCNT+1 conversion in command. 1126 * 0b1111..Result is from 16th conversion in command. 1127 */ 1128 #define ADC_RESFIFO_LOOPCNT(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_LOOPCNT_SHIFT)) & ADC_RESFIFO_LOOPCNT_MASK) 1129 #define ADC_RESFIFO_CMDSRC_MASK (0xF000000U) 1130 #define ADC_RESFIFO_CMDSRC_SHIFT (24U) 1131 /*! CMDSRC - Command Buffer Source 1132 * 0b0000..Not a valid value CMDSRC value for a dataword in RESFIFO. 0x0 is only found in initial FIFO state 1133 * prior to an ADC conversion result dataword being stored to a RESFIFO buffer. 1134 * 0b0001..CMD1 buffer used as control settings for this conversion. 1135 * 0b0010-0b1110..Corresponding command buffer used as control settings for this conversion. 1136 * 0b1111..CMD15 buffer used as control settings for this conversion. 1137 */ 1138 #define ADC_RESFIFO_CMDSRC(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_CMDSRC_SHIFT)) & ADC_RESFIFO_CMDSRC_MASK) 1139 #define ADC_RESFIFO_VALID_MASK (0x80000000U) 1140 #define ADC_RESFIFO_VALID_SHIFT (31U) 1141 /*! VALID - FIFO entry is valid 1142 * 0b0..FIFO is empty. Discard any read from RESFIFO. 1143 * 0b1..FIFO record read from RESFIFO is valid. 1144 */ 1145 #define ADC_RESFIFO_VALID(x) (((uint32_t)(((uint32_t)(x)) << ADC_RESFIFO_VALID_SHIFT)) & ADC_RESFIFO_VALID_MASK) 1146 /*! @} */ 1147 1148 1149 /*! 1150 * @} 1151 */ /* end of group ADC_Register_Masks */ 1152 1153 1154 /* ADC - Peripheral instance base addresses */ 1155 /** Peripheral LPADC0 base address */ 1156 #define LPADC0_BASE (0x4004A000u) 1157 /** Peripheral LPADC0 base pointer */ 1158 #define LPADC0 ((ADC_Type *)LPADC0_BASE) 1159 /** Array initializer of ADC peripheral base addresses */ 1160 #define ADC_BASE_ADDRS { LPADC0_BASE } 1161 /** Array initializer of ADC peripheral base pointers */ 1162 #define ADC_BASE_PTRS { LPADC0 } 1163 /** Interrupt vectors for the ADC peripheral type */ 1164 #define ADC_IRQS { LPADC0_IRQn } 1165 1166 /*! 1167 * @} 1168 */ /* end of group ADC_Peripheral_Access_Layer */ 1169 1170 1171 /* ---------------------------------------------------------------------------- 1172 -- CAU3 Peripheral Access Layer 1173 ---------------------------------------------------------------------------- */ 1174 1175 /*! 1176 * @addtogroup CAU3_Peripheral_Access_Layer CAU3 Peripheral Access Layer 1177 * @{ 1178 */ 1179 1180 /** CAU3 - Register Layout Typedef */ 1181 typedef struct { 1182 __I uint32_t PCT; /**< Processor Core Type, offset: 0x0 */ 1183 __I uint32_t MCFG; /**< Memory Configuration, offset: 0x4 */ 1184 uint8_t RESERVED_0[8]; 1185 __IO uint32_t CR; /**< Control Register, offset: 0x10 */ 1186 __IO uint32_t SR; /**< Status Register, offset: 0x14 */ 1187 uint8_t RESERVED_1[8]; 1188 __IO uint32_t DBGCSR; /**< Debug Control/Status Register, offset: 0x20 */ 1189 __IO uint32_t DBGPBR; /**< Debug PC Breakpoint Register, offset: 0x24 */ 1190 uint8_t RESERVED_2[8]; 1191 __IO uint32_t DBGMCMD; /**< Debug Memory Command Register, offset: 0x30 */ 1192 __IO uint32_t DBGMADR; /**< Debug Memory Address Register, offset: 0x34 */ 1193 __IO uint32_t DBGMDR; /**< Debug Memory Data Register, offset: 0x38 */ 1194 uint8_t RESERVED_3[180]; 1195 __IO uint32_t SEMA4; /**< Semaphore Register, offset: 0xF0 */ 1196 __I uint32_t SMOWNR; /**< Semaphore Ownership Register, offset: 0xF4 */ 1197 uint8_t RESERVED_4[4]; 1198 __IO uint32_t ARR; /**< Address Remap Register, offset: 0xFC */ 1199 uint8_t RESERVED_5[128]; 1200 __IO uint32_t CC_R[30]; /**< CryptoCore General Purpose Registers, array offset: 0x180, array step: 0x4 */ 1201 __IO uint32_t CC_R30; /**< General Purpose R30, offset: 0x1F8 */ 1202 __IO uint32_t CC_R31; /**< General Purpose R31, offset: 0x1FC */ 1203 __IO uint32_t CC_PC; /**< Program Counter, offset: 0x200 */ 1204 __O uint32_t CC_CMD; /**< Start Command Register, offset: 0x204 */ 1205 __I uint32_t CC_CF; /**< Condition Flag, offset: 0x208 */ 1206 uint8_t RESERVED_6[500]; 1207 __IO uint32_t MDPK; /**< Mode Register (PublicKey), offset: 0x400 */ 1208 uint8_t RESERVED_7[44]; 1209 __O uint32_t COM; /**< Command Register, offset: 0x430 */ 1210 __IO uint32_t CTL; /**< Control Register, offset: 0x434 */ 1211 uint8_t RESERVED_8[8]; 1212 __O uint32_t CW; /**< Clear Written Register, offset: 0x440 */ 1213 uint8_t RESERVED_9[4]; 1214 __IO uint32_t STA; /**< Status Register, offset: 0x448 */ 1215 __I uint32_t ESTA; /**< Error Status Register, offset: 0x44C */ 1216 uint8_t RESERVED_10[48]; 1217 __IO uint32_t PKASZ; /**< PKHA A Size Register, offset: 0x480 */ 1218 uint8_t RESERVED_11[4]; 1219 __IO uint32_t PKBSZ; /**< PKHA B Size Register, offset: 0x488 */ 1220 uint8_t RESERVED_12[4]; 1221 __IO uint32_t PKNSZ; /**< PKHA N Size Register, offset: 0x490 */ 1222 uint8_t RESERVED_13[4]; 1223 __IO uint32_t PKESZ; /**< PKHA E Size Register, offset: 0x498 */ 1224 uint8_t RESERVED_14[84]; 1225 __I uint32_t PKHA_VID1; /**< PKHA Revision ID 1, offset: 0x4F0 */ 1226 __I uint32_t PKHA_VID2; /**< PKHA Revision ID 2, offset: 0x4F4 */ 1227 __I uint32_t CHA_VID; /**< CHA Revision ID, offset: 0x4F8 */ 1228 uint8_t RESERVED_15[260]; 1229 __IO uint32_t PKHA_CCR; /**< PKHA Clock Control Register, offset: 0x600 */ 1230 __I uint32_t GSR; /**< Global Status Register, offset: 0x604 */ 1231 __IO uint32_t CKLFSR; /**< Clock Linear Feedback Shift Register, offset: 0x608 */ 1232 uint8_t RESERVED_16[500]; 1233 __IO uint32_t PKA0[32]; /**< PKHA A0 Register, array offset: 0x800, array step: 0x4 */ 1234 __IO uint32_t PKA1[32]; /**< PKHA A1 Register, array offset: 0x880, array step: 0x4 */ 1235 __IO uint32_t PKA2[32]; /**< PKHA A2 Register, array offset: 0x900, array step: 0x4 */ 1236 __IO uint32_t PKA3[32]; /**< PKHA A3 Register, array offset: 0x980, array step: 0x4 */ 1237 __IO uint32_t PKB0[32]; /**< PKHA B0 Register, array offset: 0xA00, array step: 0x4 */ 1238 __IO uint32_t PKB1[32]; /**< PKHA B1 Register, array offset: 0xA80, array step: 0x4 */ 1239 __IO uint32_t PKB2[32]; /**< PKHA B2 Register, array offset: 0xB00, array step: 0x4 */ 1240 __IO uint32_t PKB3[32]; /**< PKHA B3 Register, array offset: 0xB80, array step: 0x4 */ 1241 __IO uint32_t PKN0[32]; /**< PKHA N0 Register, array offset: 0xC00, array step: 0x4 */ 1242 __IO uint32_t PKN1[32]; /**< PKHA N1 Register, array offset: 0xC80, array step: 0x4 */ 1243 __IO uint32_t PKN2[32]; /**< PKHA N2 Register, array offset: 0xD00, array step: 0x4 */ 1244 __IO uint32_t PKN3[32]; /**< PKHA N3 Register, array offset: 0xD80, array step: 0x4 */ 1245 __O uint32_t PKE[128]; /**< PKHA E Register, array offset: 0xE00, array step: 0x4 */ 1246 } CAU3_Type; 1247 1248 /* ---------------------------------------------------------------------------- 1249 -- CAU3 Register Masks 1250 ---------------------------------------------------------------------------- */ 1251 1252 /*! 1253 * @addtogroup CAU3_Register_Masks CAU3 Register Masks 1254 * @{ 1255 */ 1256 1257 /*! @name PCT - Processor Core Type */ 1258 /*! @{ */ 1259 #define CAU3_PCT_Y_MASK (0xFU) 1260 #define CAU3_PCT_Y_SHIFT (0U) 1261 /*! Y - Minor version number 1262 * 0b0000..Minor version number 1263 */ 1264 #define CAU3_PCT_Y(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_Y_SHIFT)) & CAU3_PCT_Y_MASK) 1265 #define CAU3_PCT_X_MASK (0xF0U) 1266 #define CAU3_PCT_X_SHIFT (4U) 1267 /*! X - Major version number 1268 * 0b0000..Major version number 1269 */ 1270 #define CAU3_PCT_X(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_X_SHIFT)) & CAU3_PCT_X_MASK) 1271 #define CAU3_PCT_ID_MASK (0xFFFFFF00U) 1272 #define CAU3_PCT_ID_SHIFT (8U) 1273 /*! ID - Module ID number 1274 * 0b010010110100000101100000..ID number for basic configuration 1275 * 0b010010110100000101100001..ID number for PKHA configuration 1276 */ 1277 #define CAU3_PCT_ID(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PCT_ID_SHIFT)) & CAU3_PCT_ID_MASK) 1278 /*! @} */ 1279 1280 /*! @name MCFG - Memory Configuration */ 1281 /*! @{ */ 1282 #define CAU3_MCFG_DRAM_SZ_MASK (0xF00U) 1283 #define CAU3_MCFG_DRAM_SZ_SHIFT (8U) 1284 /*! DRAM_SZ - Data RAM Size 1285 * 0b0000..No memory module 1286 * 0b0100..2K bytes 1287 * 0b0101..3K bytes 1288 * 0b0110..4K bytes 1289 * 0b0111..6K bytes 1290 * 0b1000..8K bytes 1291 * 0b1001..12K bytes 1292 * 0b1010..16K bytes 1293 * 0b1011..24K bytes 1294 * 0b1100..32K bytes 1295 * 0b1101..48K bytes 1296 * 0b1110..64K bytes 1297 * 0b1111..96K bytes 1298 */ 1299 #define CAU3_MCFG_DRAM_SZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_DRAM_SZ_SHIFT)) & CAU3_MCFG_DRAM_SZ_MASK) 1300 #define CAU3_MCFG_IROM_SZ_MASK (0xF0000U) 1301 #define CAU3_MCFG_IROM_SZ_SHIFT (16U) 1302 /*! IROM_SZ - Instruction ROM Size 1303 * 0b0000..No memory module 1304 * 0b0100..2K bytes 1305 * 0b0101..3K bytes 1306 * 0b0110..4K bytes 1307 * 0b0111..6K bytes 1308 * 0b1000..8K bytes 1309 * 0b1001..12K bytes 1310 * 0b1010..16K bytes 1311 * 0b1011..24K bytes 1312 * 0b1100..32K bytes 1313 * 0b1101..48K bytes 1314 * 0b1110..64K bytes 1315 * 0b1111..96K bytes 1316 */ 1317 #define CAU3_MCFG_IROM_SZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_IROM_SZ_SHIFT)) & CAU3_MCFG_IROM_SZ_MASK) 1318 #define CAU3_MCFG_IRAM_SZ_MASK (0xF000000U) 1319 #define CAU3_MCFG_IRAM_SZ_SHIFT (24U) 1320 /*! IRAM_SZ - Instruction RAM Size 1321 * 0b0000..No memory module 1322 * 0b0100..2K bytes 1323 * 0b0101..3K bytes 1324 * 0b0110..4K bytes 1325 * 0b0111..6K bytes 1326 * 0b1000..8K bytes 1327 * 0b1001..12K bytes 1328 * 0b1010..16K bytes 1329 * 0b1011..24K bytes 1330 * 0b1100..32K bytes 1331 * 0b1101..48K bytes 1332 * 0b1110..64K bytes 1333 * 0b1111..96K bytes 1334 */ 1335 #define CAU3_MCFG_IRAM_SZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MCFG_IRAM_SZ_SHIFT)) & CAU3_MCFG_IRAM_SZ_MASK) 1336 /*! @} */ 1337 1338 /*! @name CR - Control Register */ 1339 /*! @{ */ 1340 #define CAU3_CR_TCSEIE_MASK (0x1U) 1341 #define CAU3_CR_TCSEIE_SHIFT (0U) 1342 /*! TCSEIE - Task completion with software error interrupt enable 1343 * 0b0..Disables task completion with software error to generate an interrupt request 1344 * 0b1..Enables task completion with software error to generate an interrupt request 1345 */ 1346 #define CAU3_CR_TCSEIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_TCSEIE_SHIFT)) & CAU3_CR_TCSEIE_MASK) 1347 #define CAU3_CR_ILLIE_MASK (0x2U) 1348 #define CAU3_CR_ILLIE_SHIFT (1U) 1349 /*! ILLIE - Illegal Instruction Interrupt Enable 1350 * 0b0..Illegal instruction interrupt requests are disabled 1351 * 0b1..illegal Instruction interrupt requests are enabled 1352 */ 1353 #define CAU3_CR_ILLIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_ILLIE_SHIFT)) & CAU3_CR_ILLIE_MASK) 1354 #define CAU3_CR_ASREIE_MASK (0x8U) 1355 #define CAU3_CR_ASREIE_SHIFT (3U) 1356 /*! ASREIE - AHB Slave Response Error Interrupt Enable 1357 * 0b0..AHB slave response error interruption is not enabled 1358 * 0b1..AHB slave response error interruption is enabled 1359 */ 1360 #define CAU3_CR_ASREIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_ASREIE_SHIFT)) & CAU3_CR_ASREIE_MASK) 1361 #define CAU3_CR_IIADIE_MASK (0x10U) 1362 #define CAU3_CR_IIADIE_SHIFT (4U) 1363 /*! IIADIE - IMEM Illegal Address Interrupt Enable 1364 * 0b0..IMEM illegal address interruption is not enabled 1365 * 0b1..IMEM illegal address interruption is enabled 1366 */ 1367 #define CAU3_CR_IIADIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_IIADIE_SHIFT)) & CAU3_CR_IIADIE_MASK) 1368 #define CAU3_CR_DIADIE_MASK (0x20U) 1369 #define CAU3_CR_DIADIE_SHIFT (5U) 1370 /*! DIADIE - DMEM Illegal Address Interrupt Enable 1371 * 0b0..DMEM illegal address interruption is not enabled 1372 * 0b1..DMEM illegal address interruption is enabled 1373 */ 1374 #define CAU3_CR_DIADIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DIADIE_SHIFT)) & CAU3_CR_DIADIE_MASK) 1375 #define CAU3_CR_SVIE_MASK (0x40U) 1376 #define CAU3_CR_SVIE_SHIFT (6U) 1377 /*! SVIE - Security Violation Interrupt Enable 1378 * 0b0..Security violation interruption is not enabled 1379 * 0b1..Security violation interruption is enabled 1380 */ 1381 #define CAU3_CR_SVIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_SVIE_SHIFT)) & CAU3_CR_SVIE_MASK) 1382 #define CAU3_CR_TCIE_MASK (0x80U) 1383 #define CAU3_CR_TCIE_SHIFT (7U) 1384 /*! TCIE - Task completion with no error interrupt enable 1385 * 0b0..Disables task completion with no error to generate an interrupt request 1386 * 0b1..Enables task completion with no error to generate an interrupt request 1387 */ 1388 #define CAU3_CR_TCIE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_TCIE_SHIFT)) & CAU3_CR_TCIE_MASK) 1389 #define CAU3_CR_RSTSM4_MASK (0x3000U) 1390 #define CAU3_CR_RSTSM4_SHIFT (12U) 1391 /*! RSTSM4 - Reset Semaphore 1392 * 0b00..Idle state 1393 * 0b01..Wait for second write 1394 * 0b10..Clears semaphore if previous state was "01" 1395 * 0b11..Reserved 1396 */ 1397 #define CAU3_CR_RSTSM4(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_RSTSM4_SHIFT)) & CAU3_CR_RSTSM4_MASK) 1398 #define CAU3_CR_MRST_MASK (0x8000U) 1399 #define CAU3_CR_MRST_SHIFT (15U) 1400 /*! MRST - Module Reset 1401 * 0b0..no action 1402 * 0b1..reset 1403 */ 1404 #define CAU3_CR_MRST(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_MRST_SHIFT)) & CAU3_CR_MRST_MASK) 1405 #define CAU3_CR_FSV_MASK (0x10000U) 1406 #define CAU3_CR_FSV_SHIFT (16U) 1407 /*! FSV - Force Security Violation Test 1408 * 0b0..no violation is forced 1409 * 0b1..force security violation 1410 */ 1411 #define CAU3_CR_FSV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_FSV_SHIFT)) & CAU3_CR_FSV_MASK) 1412 #define CAU3_CR_DTCCFG_MASK (0x7000000U) 1413 #define CAU3_CR_DTCCFG_SHIFT (24U) 1414 /*! DTCCFG - Default Task Completion Configuration 1415 * 0b100..Issue a DMA request 1416 * 0b010..Assert Event Completion Signal 1417 * 0b001..Issue an Interrupt Request 1418 * 0b000..no explicit action 1419 */ 1420 #define CAU3_CR_DTCCFG(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DTCCFG_SHIFT)) & CAU3_CR_DTCCFG_MASK) 1421 #define CAU3_CR_DSHFI_MASK (0x10000000U) 1422 #define CAU3_CR_DSHFI_SHIFT (28U) 1423 /*! DSHFI - Disable Secure Hash Function Instructions 1424 * 0b0..Secure Hash Functions are enabled 1425 * 0b1..Secure Hash Functions are disabled 1426 */ 1427 #define CAU3_CR_DSHFI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DSHFI_SHIFT)) & CAU3_CR_DSHFI_MASK) 1428 #define CAU3_CR_DDESI_MASK (0x20000000U) 1429 #define CAU3_CR_DDESI_SHIFT (29U) 1430 /*! DDESI - Disable DES Instructions 1431 * 0b0..DES instructions are enabled 1432 * 0b1..DES instructions are disabled 1433 */ 1434 #define CAU3_CR_DDESI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DDESI_SHIFT)) & CAU3_CR_DDESI_MASK) 1435 #define CAU3_CR_DAESI_MASK (0x40000000U) 1436 #define CAU3_CR_DAESI_SHIFT (30U) 1437 /*! DAESI - Disable AES Instructions 1438 * 0b0..AES instructions are enabled 1439 * 0b1..AES instructions are disabled 1440 */ 1441 #define CAU3_CR_DAESI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_DAESI_SHIFT)) & CAU3_CR_DAESI_MASK) 1442 #define CAU3_CR_MDIS_MASK (0x80000000U) 1443 #define CAU3_CR_MDIS_SHIFT (31U) 1444 /*! MDIS - Module Disable 1445 * 0b0..CAU3 exits from low power mode 1446 * 0b1..CAU3 enters low power mode 1447 */ 1448 #define CAU3_CR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CR_MDIS_SHIFT)) & CAU3_CR_MDIS_MASK) 1449 /*! @} */ 1450 1451 /*! @name SR - Status Register */ 1452 /*! @{ */ 1453 #define CAU3_SR_TCSEIRQ_MASK (0x1U) 1454 #define CAU3_SR_TCSEIRQ_SHIFT (0U) 1455 /*! TCSEIRQ - Task completion with software error interrupt request 1456 * 0b0..Task not finished or finished with no software error 1457 * 0b1..Task execution finished with software error 1458 */ 1459 #define CAU3_SR_TCSEIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCSEIRQ_SHIFT)) & CAU3_SR_TCSEIRQ_MASK) 1460 #define CAU3_SR_ILLIRQ_MASK (0x2U) 1461 #define CAU3_SR_ILLIRQ_SHIFT (1U) 1462 /*! ILLIRQ - Illegal instruction interrupt request 1463 * 0b0..no error 1464 * 0b1..illegal instruction detected 1465 */ 1466 #define CAU3_SR_ILLIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_ILLIRQ_SHIFT)) & CAU3_SR_ILLIRQ_MASK) 1467 #define CAU3_SR_ASREIRQ_MASK (0x8U) 1468 #define CAU3_SR_ASREIRQ_SHIFT (3U) 1469 /*! ASREIRQ - AHB slave response error interrupt Request 1470 * 0b0..no error 1471 * 0b1..AHB slave response error detected 1472 */ 1473 #define CAU3_SR_ASREIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_ASREIRQ_SHIFT)) & CAU3_SR_ASREIRQ_MASK) 1474 #define CAU3_SR_IIADIRQ_MASK (0x10U) 1475 #define CAU3_SR_IIADIRQ_SHIFT (4U) 1476 /*! IIADIRQ - IMEM Illegal address interrupt request 1477 * 0b0..no error 1478 * 0b1..illegal IMEM address detected 1479 */ 1480 #define CAU3_SR_IIADIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_IIADIRQ_SHIFT)) & CAU3_SR_IIADIRQ_MASK) 1481 #define CAU3_SR_DIADIRQ_MASK (0x20U) 1482 #define CAU3_SR_DIADIRQ_SHIFT (5U) 1483 /*! DIADIRQ - DMEM illegal access interrupt request 1484 * 0b0..no illegal address 1485 * 0b1..illegal address 1486 */ 1487 #define CAU3_SR_DIADIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_DIADIRQ_SHIFT)) & CAU3_SR_DIADIRQ_MASK) 1488 #define CAU3_SR_SVIRQ_MASK (0x40U) 1489 #define CAU3_SR_SVIRQ_SHIFT (6U) 1490 /*! SVIRQ - Security violation interrupt request 1491 * 0b0..No security violation 1492 * 0b1..Security violation 1493 */ 1494 #define CAU3_SR_SVIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_SVIRQ_SHIFT)) & CAU3_SR_SVIRQ_MASK) 1495 #define CAU3_SR_TCIRQ_MASK (0x80U) 1496 #define CAU3_SR_TCIRQ_SHIFT (7U) 1497 /*! TCIRQ - Task completion with no error interrupt request 1498 * 0b0..Task not finished or finished with error 1499 * 0b1..Task execution finished with no error 1500 */ 1501 #define CAU3_SR_TCIRQ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCIRQ_SHIFT)) & CAU3_SR_TCIRQ_MASK) 1502 #define CAU3_SR_TKCS_MASK (0xF00U) 1503 #define CAU3_SR_TKCS_SHIFT (8U) 1504 /*! TKCS - Task completion status 1505 * 0b0000..Initialization RUN 1506 * 0b0001..Running 1507 * 0b0010..Debug Halted 1508 * 0b1001..Stop - Error Free 1509 * 0b1010..Stop - Error 1510 * 0b1110..Stop - Security Violation, assert security violation output signal and set SVIRQ 1511 * 0b1111..Stop - Security Violation and set SVIRQ 1512 */ 1513 #define CAU3_SR_TKCS(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TKCS_SHIFT)) & CAU3_SR_TKCS_MASK) 1514 #define CAU3_SR_SVF_MASK (0x10000U) 1515 #define CAU3_SR_SVF_SHIFT (16U) 1516 /*! SVF - Security violation flag 1517 * 0b0..SoC security violation is not asserted 1518 * 0b1..SoC security violation was asserted 1519 */ 1520 #define CAU3_SR_SVF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_SVF_SHIFT)) & CAU3_SR_SVF_MASK) 1521 #define CAU3_SR_DBG_MASK (0x20000U) 1522 #define CAU3_SR_DBG_SHIFT (17U) 1523 /*! DBG - Debug mode 1524 * 0b0..CAU3 is not in debug mode 1525 * 0b1..CAU3 is in debug mode 1526 */ 1527 #define CAU3_SR_DBG(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_DBG_SHIFT)) & CAU3_SR_DBG_MASK) 1528 #define CAU3_SR_TCCFG_MASK (0x7000000U) 1529 #define CAU3_SR_TCCFG_SHIFT (24U) 1530 /*! TCCFG - Task completion configuration 1531 * 0b100..Issue a DMA request 1532 * 0b010..Assert the Event Completion Signal 1533 * 0b001..Assert an interrupt request 1534 * 0b000..No action 1535 */ 1536 #define CAU3_SR_TCCFG(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_TCCFG_SHIFT)) & CAU3_SR_TCCFG_MASK) 1537 #define CAU3_SR_MDISF_MASK (0x80000000U) 1538 #define CAU3_SR_MDISF_SHIFT (31U) 1539 /*! MDISF - Module disable flag 1540 * 0b0..CCore is not in low power mode 1541 * 0b1..CCore is in low power mode 1542 */ 1543 #define CAU3_SR_MDISF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SR_MDISF_SHIFT)) & CAU3_SR_MDISF_MASK) 1544 /*! @} */ 1545 1546 /*! @name DBGCSR - Debug Control/Status Register */ 1547 /*! @{ */ 1548 #define CAU3_DBGCSR_DDBG_MASK (0x1U) 1549 #define CAU3_DBGCSR_DDBG_SHIFT (0U) 1550 /*! DDBG - Debug Disable 1551 * 0b0..debug is enabled 1552 * 0b1..debug is disabled 1553 */ 1554 #define CAU3_DBGCSR_DDBG(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DDBG_SHIFT)) & CAU3_DBGCSR_DDBG_MASK) 1555 #define CAU3_DBGCSR_DDBGMC_MASK (0x2U) 1556 #define CAU3_DBGCSR_DDBGMC_SHIFT (1U) 1557 /*! DDBGMC - Disable Debug Memory Commands 1558 * 0b0..IPS access to IMEM and DMEM are enabled 1559 * 0b1..IPS access to IMEM and DMEM are disabled 1560 */ 1561 #define CAU3_DBGCSR_DDBGMC(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DDBGMC_SHIFT)) & CAU3_DBGCSR_DDBGMC_MASK) 1562 #define CAU3_DBGCSR_PBREN_MASK (0x10U) 1563 #define CAU3_DBGCSR_PBREN_SHIFT (4U) 1564 /*! PBREN - PC Breakpoint Register Enable 1565 * 0b0..PC breakpoint register (DBGPBR) is disabled 1566 * 0b1..PC breakpoint register (DBGPBR) is enabled 1567 */ 1568 #define CAU3_DBGCSR_PBREN(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_PBREN_SHIFT)) & CAU3_DBGCSR_PBREN_MASK) 1569 #define CAU3_DBGCSR_SIM_MASK (0x20U) 1570 #define CAU3_DBGCSR_SIM_SHIFT (5U) 1571 /*! SIM - Single Instruction Mode 1572 * 0b0..Single instruction mode is disabled 1573 * 0b1..Single instruction mode is enabled 1574 */ 1575 #define CAU3_DBGCSR_SIM(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_SIM_SHIFT)) & CAU3_DBGCSR_SIM_MASK) 1576 #define CAU3_DBGCSR_FRCH_MASK (0x100U) 1577 #define CAU3_DBGCSR_FRCH_SHIFT (8U) 1578 /*! FRCH - Force Debug Halt 1579 * 0b0..Halt state not forced 1580 * 0b1..Force halt state 1581 */ 1582 #define CAU3_DBGCSR_FRCH(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_FRCH_SHIFT)) & CAU3_DBGCSR_FRCH_MASK) 1583 #define CAU3_DBGCSR_DBGGO_MASK (0x1000U) 1584 #define CAU3_DBGCSR_DBGGO_SHIFT (12U) 1585 /*! DBGGO - Debug Go 1586 * 0b0..No action 1587 * 0b1..Resume program execution 1588 */ 1589 #define CAU3_DBGCSR_DBGGO(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_DBGGO_SHIFT)) & CAU3_DBGCSR_DBGGO_MASK) 1590 #define CAU3_DBGCSR_PCBHF_MASK (0x10000U) 1591 #define CAU3_DBGCSR_PCBHF_SHIFT (16U) 1592 /*! PCBHF - CryptoCore is Halted due to Hardware Breakpoint 1593 * 0b0..CryptoCore is not halted due to a hardware breakpoint 1594 * 0b1..CryptoCore is halted due to a hardware breakpoint 1595 */ 1596 #define CAU3_DBGCSR_PCBHF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_PCBHF_SHIFT)) & CAU3_DBGCSR_PCBHF_MASK) 1597 #define CAU3_DBGCSR_SIMHF_MASK (0x20000U) 1598 #define CAU3_DBGCSR_SIMHF_SHIFT (17U) 1599 /*! SIMHF - CryptoCore is Halted due to Single Instruction Step 1600 * 0b0..CryptoCore is not in a single step halt 1601 * 0b1..CryptoCore is in a single step halt 1602 */ 1603 #define CAU3_DBGCSR_SIMHF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_SIMHF_SHIFT)) & CAU3_DBGCSR_SIMHF_MASK) 1604 #define CAU3_DBGCSR_HLTIF_MASK (0x40000U) 1605 #define CAU3_DBGCSR_HLTIF_SHIFT (18U) 1606 /*! HLTIF - CryptoCore is Halted due to HALT Instruction 1607 * 0b0..CryptoCore is not in software breakpoint 1608 * 0b1..CryptoCore is in software breakpoint 1609 */ 1610 #define CAU3_DBGCSR_HLTIF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_HLTIF_SHIFT)) & CAU3_DBGCSR_HLTIF_MASK) 1611 #define CAU3_DBGCSR_CSTPF_MASK (0x40000000U) 1612 #define CAU3_DBGCSR_CSTPF_SHIFT (30U) 1613 /*! CSTPF - CryptoCore is Stopped Status Flag 1614 * 0b0..CryptoCore is not stopped 1615 * 0b1..CryptoCore is stopped 1616 */ 1617 #define CAU3_DBGCSR_CSTPF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_CSTPF_SHIFT)) & CAU3_DBGCSR_CSTPF_MASK) 1618 #define CAU3_DBGCSR_CHLTF_MASK (0x80000000U) 1619 #define CAU3_DBGCSR_CHLTF_SHIFT (31U) 1620 /*! CHLTF - CryptoCore is Halted Status Flag 1621 * 0b0..CryptoCore is not halted 1622 * 0b1..CryptoCore is halted 1623 */ 1624 #define CAU3_DBGCSR_CHLTF(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGCSR_CHLTF_SHIFT)) & CAU3_DBGCSR_CHLTF_MASK) 1625 /*! @} */ 1626 1627 /*! @name DBGPBR - Debug PC Breakpoint Register */ 1628 /*! @{ */ 1629 #define CAU3_DBGPBR_PCBKPT_MASK (0xFFFFCU) 1630 #define CAU3_DBGPBR_PCBKPT_SHIFT (2U) 1631 #define CAU3_DBGPBR_PCBKPT(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGPBR_PCBKPT_SHIFT)) & CAU3_DBGPBR_PCBKPT_MASK) 1632 /*! @} */ 1633 1634 /*! @name DBGMCMD - Debug Memory Command Register */ 1635 /*! @{ */ 1636 #define CAU3_DBGMCMD_DM_MASK (0x1000000U) 1637 #define CAU3_DBGMCMD_DM_SHIFT (24U) 1638 /*! DM - Instruction/Data Memory Selection 1639 * 0b0..IMEM is selected 1640 * 0b1..DMEM is selected 1641 */ 1642 #define CAU3_DBGMCMD_DM(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_DM_SHIFT)) & CAU3_DBGMCMD_DM_MASK) 1643 #define CAU3_DBGMCMD_IA_MASK (0x4000000U) 1644 #define CAU3_DBGMCMD_IA_SHIFT (26U) 1645 /*! IA - Increment Address 1646 * 0b0..Address is not incremented 1647 * 0b1..Address is incremented after the access 1648 */ 1649 #define CAU3_DBGMCMD_IA(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_IA_SHIFT)) & CAU3_DBGMCMD_IA_MASK) 1650 #define CAU3_DBGMCMD_Rb_1_MASK (0x8000000U) 1651 #define CAU3_DBGMCMD_Rb_1_SHIFT (27U) 1652 #define CAU3_DBGMCMD_Rb_1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_Rb_1_SHIFT)) & CAU3_DBGMCMD_Rb_1_MASK) 1653 #define CAU3_DBGMCMD_BV_MASK (0x10000000U) 1654 #define CAU3_DBGMCMD_BV_SHIFT (28U) 1655 /*! BV - Byte Reversal Control 1656 * 0b0..DMEM bytes are not reversed 1657 * 0b1..DMEM bytes are reversed 1658 */ 1659 #define CAU3_DBGMCMD_BV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_BV_SHIFT)) & CAU3_DBGMCMD_BV_MASK) 1660 #define CAU3_DBGMCMD_R_0_MASK (0x40000000U) 1661 #define CAU3_DBGMCMD_R_0_SHIFT (30U) 1662 #define CAU3_DBGMCMD_R_0(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_R_0_SHIFT)) & CAU3_DBGMCMD_R_0_MASK) 1663 #define CAU3_DBGMCMD_R_1_MASK (0x80000000U) 1664 #define CAU3_DBGMCMD_R_1_SHIFT (31U) 1665 #define CAU3_DBGMCMD_R_1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMCMD_R_1_SHIFT)) & CAU3_DBGMCMD_R_1_MASK) 1666 /*! @} */ 1667 1668 /*! @name DBGMADR - Debug Memory Address Register */ 1669 /*! @{ */ 1670 #define CAU3_DBGMADR_DMADDR_MASK (0xFFFFFFFCU) 1671 #define CAU3_DBGMADR_DMADDR_SHIFT (2U) 1672 #define CAU3_DBGMADR_DMADDR(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMADR_DMADDR_SHIFT)) & CAU3_DBGMADR_DMADDR_MASK) 1673 /*! @} */ 1674 1675 /*! @name DBGMDR - Debug Memory Data Register */ 1676 /*! @{ */ 1677 #define CAU3_DBGMDR_DMDATA_MASK (0xFFFFFFFFU) 1678 #define CAU3_DBGMDR_DMDATA_SHIFT (0U) 1679 #define CAU3_DBGMDR_DMDATA(x) (((uint32_t)(((uint32_t)(x)) << CAU3_DBGMDR_DMDATA_SHIFT)) & CAU3_DBGMDR_DMDATA_MASK) 1680 /*! @} */ 1681 1682 /*! @name SEMA4 - Semaphore Register */ 1683 /*! @{ */ 1684 #define CAU3_SEMA4_DID_MASK (0xFU) 1685 #define CAU3_SEMA4_DID_SHIFT (0U) 1686 #define CAU3_SEMA4_DID(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_DID_SHIFT)) & CAU3_SEMA4_DID_MASK) 1687 #define CAU3_SEMA4_PR_MASK (0x40U) 1688 #define CAU3_SEMA4_PR_SHIFT (6U) 1689 /*! PR - Privilege Attribute of Locked Semaphore Owner 1690 * 0b0..If semaphore is locked, then owner is operating in user mode 1691 * 0b1..If semaphore is locked, then owner is operating in privileged mode 1692 */ 1693 #define CAU3_SEMA4_PR(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_PR_SHIFT)) & CAU3_SEMA4_PR_MASK) 1694 #define CAU3_SEMA4_NS_MASK (0x80U) 1695 #define CAU3_SEMA4_NS_SHIFT (7U) 1696 /*! NS - Non Secure Attribute of the Locked Semaphore Owner 1697 * 0b0..If semaphore is locked, owner is operating in secure mode 1698 * 0b1..If semaphore is locked, owner is operating in nonsecure mode 1699 */ 1700 #define CAU3_SEMA4_NS(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_NS_SHIFT)) & CAU3_SEMA4_NS_MASK) 1701 #define CAU3_SEMA4_MSTRN_MASK (0x3F00U) 1702 #define CAU3_SEMA4_MSTRN_SHIFT (8U) 1703 #define CAU3_SEMA4_MSTRN(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_MSTRN_SHIFT)) & CAU3_SEMA4_MSTRN_MASK) 1704 #define CAU3_SEMA4_LK_MASK (0x80000000U) 1705 #define CAU3_SEMA4_LK_SHIFT (31U) 1706 /*! LK - Semaphore Lock and Release Control 1707 * 0b0..Semaphore release 1708 * 0b1..Semaphore lock 1709 */ 1710 #define CAU3_SEMA4_LK(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SEMA4_LK_SHIFT)) & CAU3_SEMA4_LK_MASK) 1711 /*! @} */ 1712 1713 /*! @name SMOWNR - Semaphore Ownership Register */ 1714 /*! @{ */ 1715 #define CAU3_SMOWNR_LOCK_MASK (0x1U) 1716 #define CAU3_SMOWNR_LOCK_SHIFT (0U) 1717 /*! LOCK - Semaphore Locked 1718 * 0b0..Semaphore not locked 1719 * 0b1..Semaphore locked 1720 */ 1721 #define CAU3_SMOWNR_LOCK(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SMOWNR_LOCK_SHIFT)) & CAU3_SMOWNR_LOCK_MASK) 1722 #define CAU3_SMOWNR_NOWNER_MASK (0x80000000U) 1723 #define CAU3_SMOWNR_NOWNER_SHIFT (31U) 1724 /*! NOWNER - Semaphore Ownership 1725 * 0b0..The host making the current read access is the semaphore owner 1726 * 0b1..The host making the current read access is NOT the semaphore owner 1727 */ 1728 #define CAU3_SMOWNR_NOWNER(x) (((uint32_t)(((uint32_t)(x)) << CAU3_SMOWNR_NOWNER_SHIFT)) & CAU3_SMOWNR_NOWNER_MASK) 1729 /*! @} */ 1730 1731 /*! @name ARR - Address Remap Register */ 1732 /*! @{ */ 1733 #define CAU3_ARR_ARRL_MASK (0xFFFFFFFFU) 1734 #define CAU3_ARR_ARRL_SHIFT (0U) 1735 #define CAU3_ARR_ARRL(x) (((uint32_t)(((uint32_t)(x)) << CAU3_ARR_ARRL_SHIFT)) & CAU3_ARR_ARRL_MASK) 1736 /*! @} */ 1737 1738 /*! @name CC_R - CryptoCore General Purpose Registers */ 1739 /*! @{ */ 1740 #define CAU3_CC_R_R_MASK (0xFFFFFFFFU) 1741 #define CAU3_CC_R_R_SHIFT (0U) 1742 #define CAU3_CC_R_R(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R_R_SHIFT)) & CAU3_CC_R_R_MASK) 1743 /*! @} */ 1744 1745 /* The count of CAU3_CC_R */ 1746 #define CAU3_CC_R_COUNT (30U) 1747 1748 /*! @name CC_R30 - General Purpose R30 */ 1749 /*! @{ */ 1750 #define CAU3_CC_R30_SP_MASK (0xFFFFFFFFU) 1751 #define CAU3_CC_R30_SP_SHIFT (0U) 1752 #define CAU3_CC_R30_SP(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R30_SP_SHIFT)) & CAU3_CC_R30_SP_MASK) 1753 /*! @} */ 1754 1755 /*! @name CC_R31 - General Purpose R31 */ 1756 /*! @{ */ 1757 #define CAU3_CC_R31_LR_MASK (0xFFFFFFFFU) 1758 #define CAU3_CC_R31_LR_SHIFT (0U) 1759 #define CAU3_CC_R31_LR(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_R31_LR_SHIFT)) & CAU3_CC_R31_LR_MASK) 1760 /*! @} */ 1761 1762 /*! @name CC_PC - Program Counter */ 1763 /*! @{ */ 1764 #define CAU3_CC_PC_PC_MASK (0xFFFFFU) 1765 #define CAU3_CC_PC_PC_SHIFT (0U) 1766 #define CAU3_CC_PC_PC(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_PC_PC_SHIFT)) & CAU3_CC_PC_PC_MASK) 1767 /*! @} */ 1768 1769 /*! @name CC_CMD - Start Command Register */ 1770 /*! @{ */ 1771 #define CAU3_CC_CMD_CMD_MASK (0x70000U) 1772 #define CAU3_CC_CMD_CMD_SHIFT (16U) 1773 /*! CMD - Command 1774 * 0b000..Use CR[DTCCFG] for task completion configuration 1775 * 0b100..Issue a DMA request 1776 * 0b010..Assert Event Completion Signal 1777 * 0b001..Issue an interrupt request 1778 */ 1779 #define CAU3_CC_CMD_CMD(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CMD_CMD_SHIFT)) & CAU3_CC_CMD_CMD_MASK) 1780 /*! @} */ 1781 1782 /*! @name CC_CF - Condition Flag */ 1783 /*! @{ */ 1784 #define CAU3_CC_CF_C_MASK (0x1U) 1785 #define CAU3_CC_CF_C_SHIFT (0U) 1786 #define CAU3_CC_CF_C(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_C_SHIFT)) & CAU3_CC_CF_C_MASK) 1787 #define CAU3_CC_CF_V_MASK (0x2U) 1788 #define CAU3_CC_CF_V_SHIFT (1U) 1789 #define CAU3_CC_CF_V(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_V_SHIFT)) & CAU3_CC_CF_V_MASK) 1790 #define CAU3_CC_CF_Z_MASK (0x4U) 1791 #define CAU3_CC_CF_Z_SHIFT (2U) 1792 #define CAU3_CC_CF_Z(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_Z_SHIFT)) & CAU3_CC_CF_Z_MASK) 1793 #define CAU3_CC_CF_N_MASK (0x8U) 1794 #define CAU3_CC_CF_N_SHIFT (3U) 1795 #define CAU3_CC_CF_N(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CC_CF_N_SHIFT)) & CAU3_CC_CF_N_MASK) 1796 /*! @} */ 1797 1798 /*! @name MDPK - Mode Register (PublicKey) */ 1799 /*! @{ */ 1800 #define CAU3_MDPK_PKHA_MODE_LS_MASK (0xFFFU) 1801 #define CAU3_MDPK_PKHA_MODE_LS_SHIFT (0U) 1802 #define CAU3_MDPK_PKHA_MODE_LS(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_PKHA_MODE_LS_SHIFT)) & CAU3_MDPK_PKHA_MODE_LS_MASK) 1803 #define CAU3_MDPK_PKHA_MODE_MS_MASK (0xF0000U) 1804 #define CAU3_MDPK_PKHA_MODE_MS_SHIFT (16U) 1805 #define CAU3_MDPK_PKHA_MODE_MS(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_PKHA_MODE_MS_SHIFT)) & CAU3_MDPK_PKHA_MODE_MS_MASK) 1806 #define CAU3_MDPK_ALG_MASK (0xF00000U) 1807 #define CAU3_MDPK_ALG_SHIFT (20U) 1808 /*! ALG - Algorithm 1809 * 0b1000..PKHA 1810 */ 1811 #define CAU3_MDPK_ALG(x) (((uint32_t)(((uint32_t)(x)) << CAU3_MDPK_ALG_SHIFT)) & CAU3_MDPK_ALG_MASK) 1812 /*! @} */ 1813 1814 /*! @name COM - Command Register */ 1815 /*! @{ */ 1816 #define CAU3_COM_ALL_MASK (0x1U) 1817 #define CAU3_COM_ALL_SHIFT (0U) 1818 /*! ALL - Reset All Internal Logic 1819 * 0b0..Do Not Reset 1820 * 0b1..Reset PKHA engine and registers 1821 */ 1822 #define CAU3_COM_ALL(x) (((uint32_t)(((uint32_t)(x)) << CAU3_COM_ALL_SHIFT)) & CAU3_COM_ALL_MASK) 1823 #define CAU3_COM_PK_MASK (0x40U) 1824 #define CAU3_COM_PK_SHIFT (6U) 1825 /*! PK - Reset PKHA 1826 * 0b0..Do Not Reset 1827 * 0b1..Reset Public Key Hardware Accelerator 1828 */ 1829 #define CAU3_COM_PK(x) (((uint32_t)(((uint32_t)(x)) << CAU3_COM_PK_SHIFT)) & CAU3_COM_PK_MASK) 1830 /*! @} */ 1831 1832 /*! @name CTL - Control Register */ 1833 /*! @{ */ 1834 #define CAU3_CTL_IM_MASK (0x1U) 1835 #define CAU3_CTL_IM_SHIFT (0U) 1836 /*! IM - Interrupt Mask 1837 * 0b0..Interrupt not masked. 1838 * 0b1..Interrupt masked 1839 */ 1840 #define CAU3_CTL_IM(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CTL_IM_SHIFT)) & CAU3_CTL_IM_MASK) 1841 #define CAU3_CTL_PDE_MASK (0x10U) 1842 #define CAU3_CTL_PDE_SHIFT (4U) 1843 /*! PDE - PKHA Register DMA Enable 1844 * 0b0..DMA Request and Done signals disabled for the PKHA Registers. 1845 * 0b1..DMA Request and Done signals enabled for the PKHA Registers. 1846 */ 1847 #define CAU3_CTL_PDE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CTL_PDE_SHIFT)) & CAU3_CTL_PDE_MASK) 1848 /*! @} */ 1849 1850 /*! @name CW - Clear Written Register */ 1851 /*! @{ */ 1852 #define CAU3_CW_CM_MASK (0x1U) 1853 #define CAU3_CW_CM_SHIFT (0U) 1854 #define CAU3_CW_CM(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CM_SHIFT)) & CAU3_CW_CM_MASK) 1855 #define CAU3_CW_CPKA_MASK (0x1000U) 1856 #define CAU3_CW_CPKA_SHIFT (12U) 1857 #define CAU3_CW_CPKA(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKA_SHIFT)) & CAU3_CW_CPKA_MASK) 1858 #define CAU3_CW_CPKB_MASK (0x2000U) 1859 #define CAU3_CW_CPKB_SHIFT (13U) 1860 #define CAU3_CW_CPKB(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKB_SHIFT)) & CAU3_CW_CPKB_MASK) 1861 #define CAU3_CW_CPKN_MASK (0x4000U) 1862 #define CAU3_CW_CPKN_SHIFT (14U) 1863 #define CAU3_CW_CPKN(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKN_SHIFT)) & CAU3_CW_CPKN_MASK) 1864 #define CAU3_CW_CPKE_MASK (0x8000U) 1865 #define CAU3_CW_CPKE_SHIFT (15U) 1866 #define CAU3_CW_CPKE(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CW_CPKE_SHIFT)) & CAU3_CW_CPKE_MASK) 1867 /*! @} */ 1868 1869 /*! @name STA - Status Register */ 1870 /*! @{ */ 1871 #define CAU3_STA_PB_MASK (0x40U) 1872 #define CAU3_STA_PB_SHIFT (6U) 1873 /*! PB - PKHA Busy 1874 * 0b0..PKHA Idle 1875 * 0b1..PKHA Busy. 1876 */ 1877 #define CAU3_STA_PB(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PB_SHIFT)) & CAU3_STA_PB_MASK) 1878 #define CAU3_STA_DI_MASK (0x10000U) 1879 #define CAU3_STA_DI_SHIFT (16U) 1880 #define CAU3_STA_DI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_DI_SHIFT)) & CAU3_STA_DI_MASK) 1881 #define CAU3_STA_EI_MASK (0x100000U) 1882 #define CAU3_STA_EI_SHIFT (20U) 1883 /*! EI - Error Interrupt 1884 * 0b0..Not Error. 1885 * 0b1..Error Interrupt. 1886 */ 1887 #define CAU3_STA_EI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_EI_SHIFT)) & CAU3_STA_EI_MASK) 1888 #define CAU3_STA_PKP_MASK (0x10000000U) 1889 #define CAU3_STA_PKP_SHIFT (28U) 1890 #define CAU3_STA_PKP(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKP_SHIFT)) & CAU3_STA_PKP_MASK) 1891 #define CAU3_STA_PKO_MASK (0x20000000U) 1892 #define CAU3_STA_PKO_SHIFT (29U) 1893 #define CAU3_STA_PKO(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKO_SHIFT)) & CAU3_STA_PKO_MASK) 1894 #define CAU3_STA_PKZ_MASK (0x40000000U) 1895 #define CAU3_STA_PKZ_SHIFT (30U) 1896 #define CAU3_STA_PKZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_STA_PKZ_SHIFT)) & CAU3_STA_PKZ_MASK) 1897 /*! @} */ 1898 1899 /*! @name ESTA - Error Status Register */ 1900 /*! @{ */ 1901 #define CAU3_ESTA_ERRID1_MASK (0xFU) 1902 #define CAU3_ESTA_ERRID1_SHIFT (0U) 1903 /*! ERRID1 - Error ID 1 1904 * 0b0001..Mode Error 1905 * 0b0010..PKHA N Register Size Error 1906 * 0b0011..PKHA E Register Size Error 1907 * 0b0100..PKHA A Register Size Error 1908 * 0b0101..PKHA B Register Size Error 1909 * 0b0110..PKHA C input (as contained in the PKHA B0 quadrant) is Zero 1910 * 0b0111..PKHA Divide by Zero Error 1911 * 0b1000..PKHA Modulus Even Error 1912 * 0b1111..Invalid Crypto Engine Selected 1913 */ 1914 #define CAU3_ESTA_ERRID1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_ESTA_ERRID1_SHIFT)) & CAU3_ESTA_ERRID1_MASK) 1915 #define CAU3_ESTA_CL1_MASK (0xF00U) 1916 #define CAU3_ESTA_CL1_SHIFT (8U) 1917 /*! CL1 - algorithms 1918 * 0b0000..General Error 1919 * 0b1000..Public Key 1920 */ 1921 #define CAU3_ESTA_CL1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_ESTA_CL1_SHIFT)) & CAU3_ESTA_CL1_MASK) 1922 /*! @} */ 1923 1924 /*! @name PKASZ - PKHA A Size Register */ 1925 /*! @{ */ 1926 #define CAU3_PKASZ_PKASZ_MASK (0x1FFU) 1927 #define CAU3_PKASZ_PKASZ_SHIFT (0U) 1928 #define CAU3_PKASZ_PKASZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKASZ_PKASZ_SHIFT)) & CAU3_PKASZ_PKASZ_MASK) 1929 /*! @} */ 1930 1931 /*! @name PKBSZ - PKHA B Size Register */ 1932 /*! @{ */ 1933 #define CAU3_PKBSZ_PKBSZ_MASK (0x1FFU) 1934 #define CAU3_PKBSZ_PKBSZ_SHIFT (0U) 1935 #define CAU3_PKBSZ_PKBSZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKBSZ_PKBSZ_SHIFT)) & CAU3_PKBSZ_PKBSZ_MASK) 1936 /*! @} */ 1937 1938 /*! @name PKNSZ - PKHA N Size Register */ 1939 /*! @{ */ 1940 #define CAU3_PKNSZ_PKNSZ_MASK (0x1FFU) 1941 #define CAU3_PKNSZ_PKNSZ_SHIFT (0U) 1942 #define CAU3_PKNSZ_PKNSZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKNSZ_PKNSZ_SHIFT)) & CAU3_PKNSZ_PKNSZ_MASK) 1943 /*! @} */ 1944 1945 /*! @name PKESZ - PKHA E Size Register */ 1946 /*! @{ */ 1947 #define CAU3_PKESZ_PKESZ_MASK (0x1FFU) 1948 #define CAU3_PKESZ_PKESZ_SHIFT (0U) 1949 #define CAU3_PKESZ_PKESZ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKESZ_PKESZ_SHIFT)) & CAU3_PKESZ_PKESZ_MASK) 1950 /*! @} */ 1951 1952 /*! @name PKHA_VID1 - PKHA Revision ID 1 */ 1953 /*! @{ */ 1954 #define CAU3_PKHA_VID1_MIN_REV_MASK (0xFFU) 1955 #define CAU3_PKHA_VID1_MIN_REV_SHIFT (0U) 1956 #define CAU3_PKHA_VID1_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_MIN_REV_SHIFT)) & CAU3_PKHA_VID1_MIN_REV_MASK) 1957 #define CAU3_PKHA_VID1_MAJ_REV_MASK (0xFF00U) 1958 #define CAU3_PKHA_VID1_MAJ_REV_SHIFT (8U) 1959 #define CAU3_PKHA_VID1_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_MAJ_REV_SHIFT)) & CAU3_PKHA_VID1_MAJ_REV_MASK) 1960 #define CAU3_PKHA_VID1_IP_ID_MASK (0xFFFF0000U) 1961 #define CAU3_PKHA_VID1_IP_ID_SHIFT (16U) 1962 #define CAU3_PKHA_VID1_IP_ID(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID1_IP_ID_SHIFT)) & CAU3_PKHA_VID1_IP_ID_MASK) 1963 /*! @} */ 1964 1965 /*! @name PKHA_VID2 - PKHA Revision ID 2 */ 1966 /*! @{ */ 1967 #define CAU3_PKHA_VID2_ECO_REV_MASK (0xFFU) 1968 #define CAU3_PKHA_VID2_ECO_REV_SHIFT (0U) 1969 #define CAU3_PKHA_VID2_ECO_REV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID2_ECO_REV_SHIFT)) & CAU3_PKHA_VID2_ECO_REV_MASK) 1970 #define CAU3_PKHA_VID2_ARCH_ERA_MASK (0xFF00U) 1971 #define CAU3_PKHA_VID2_ARCH_ERA_SHIFT (8U) 1972 #define CAU3_PKHA_VID2_ARCH_ERA(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_VID2_ARCH_ERA_SHIFT)) & CAU3_PKHA_VID2_ARCH_ERA_MASK) 1973 /*! @} */ 1974 1975 /*! @name CHA_VID - CHA Revision ID */ 1976 /*! @{ */ 1977 #define CAU3_CHA_VID_PKHAREV_MASK (0xF0000U) 1978 #define CAU3_CHA_VID_PKHAREV_SHIFT (16U) 1979 #define CAU3_CHA_VID_PKHAREV(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CHA_VID_PKHAREV_SHIFT)) & CAU3_CHA_VID_PKHAREV_MASK) 1980 #define CAU3_CHA_VID_PKHAVID_MASK (0xF00000U) 1981 #define CAU3_CHA_VID_PKHAVID_SHIFT (20U) 1982 #define CAU3_CHA_VID_PKHAVID(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CHA_VID_PKHAVID_SHIFT)) & CAU3_CHA_VID_PKHAVID_MASK) 1983 /*! @} */ 1984 1985 /*! @name PKHA_CCR - PKHA Clock Control Register */ 1986 /*! @{ */ 1987 #define CAU3_PKHA_CCR_CKTHRT_MASK (0x7U) 1988 #define CAU3_PKHA_CCR_CKTHRT_SHIFT (0U) 1989 /*! CKTHRT - Clock Throttle selection 1990 * 0b000..PKHA clock division rate is 8/8 - full speed 1991 * 0b001..PKHA clock division rate is 1/8 1992 * 0b010..PKHA clock division rate is 2/8 1993 * 0b011..PKHA clock division rate is 3/8 1994 * 0b100..PKHA clock division rate is 4/8 1995 * 0b101..PKHA clock division rate is 5/8 1996 * 0b110..PKHA clock division rate is 6/8 1997 * 0b111..PKHA clock division rate is 7/8 1998 */ 1999 #define CAU3_PKHA_CCR_CKTHRT(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_CKTHRT_SHIFT)) & CAU3_PKHA_CCR_CKTHRT_MASK) 2000 #define CAU3_PKHA_CCR_LK_MASK (0x1000000U) 2001 #define CAU3_PKHA_CCR_LK_SHIFT (24U) 2002 /*! LK - Register Lock 2003 * 0b0..Register is unlocked 2004 * 0b1..Register is locked 2005 */ 2006 #define CAU3_PKHA_CCR_LK(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_LK_SHIFT)) & CAU3_PKHA_CCR_LK_MASK) 2007 #define CAU3_PKHA_CCR_ELFR_MASK (0x20000000U) 2008 #define CAU3_PKHA_CCR_ELFR_SHIFT (29U) 2009 /*! ELFR - Enable Linear Feedback Shift Register 2010 * 0b0..LFSR is only enabled if ECT = 1 and ECJ = 1 2011 * 0b1..LFSR is enabled independently of ECT and ECJ 2012 */ 2013 #define CAU3_PKHA_CCR_ELFR(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ELFR_SHIFT)) & CAU3_PKHA_CCR_ELFR_MASK) 2014 #define CAU3_PKHA_CCR_ECJ_MASK (0x40000000U) 2015 #define CAU3_PKHA_CCR_ECJ_SHIFT (30U) 2016 /*! ECJ - Enable Clock Jitter 2017 * 0b0..Clock Jitter is disabled 2018 * 0b1..Clock jitter is enabled 2019 */ 2020 #define CAU3_PKHA_CCR_ECJ(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ECJ_SHIFT)) & CAU3_PKHA_CCR_ECJ_MASK) 2021 #define CAU3_PKHA_CCR_ECT_MASK (0x80000000U) 2022 #define CAU3_PKHA_CCR_ECT_SHIFT (31U) 2023 /*! ECT - Enable Clock Throttle 2024 * 0b0..PKHA clock throttle disabled meaning that PKHA is operatiing at full speed 2025 * 0b1..PKHA clock throttle enabled 2026 */ 2027 #define CAU3_PKHA_CCR_ECT(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKHA_CCR_ECT_SHIFT)) & CAU3_PKHA_CCR_ECT_MASK) 2028 /*! @} */ 2029 2030 /*! @name GSR - Global Status Register */ 2031 /*! @{ */ 2032 #define CAU3_GSR_CDI_MASK (0x400U) 2033 #define CAU3_GSR_CDI_SHIFT (10U) 2034 /*! CDI - CAU3 Done Interrupt occurred 2035 * 0b0..CAU3 Done Interrupt did not occur 2036 * 0b1..CAU3 Done Interrupt occurred 2037 */ 2038 #define CAU3_GSR_CDI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_CDI_SHIFT)) & CAU3_GSR_CDI_MASK) 2039 #define CAU3_GSR_CEI_MASK (0x4000U) 2040 #define CAU3_GSR_CEI_SHIFT (14U) 2041 /*! CEI - CAU3 Error Interrupt 2042 * 0b0..CAU3 Error Interrupt did not occur 2043 * 0b1..CAU3 Error Interrupt occurred 2044 */ 2045 #define CAU3_GSR_CEI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_CEI_SHIFT)) & CAU3_GSR_CEI_MASK) 2046 #define CAU3_GSR_PEI_MASK (0x8000U) 2047 #define CAU3_GSR_PEI_SHIFT (15U) 2048 /*! PEI - PKHA Done or Error Interrupt 2049 * 0b0..PKHA interrupt did not occur 2050 * 0b1..PKHA interrupt had occurred 2051 */ 2052 #define CAU3_GSR_PEI(x) (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_PEI_SHIFT)) & CAU3_GSR_PEI_MASK) 2053 #define CAU3_GSR_PBSY_MASK (0x80000000U) 2054 #define CAU3_GSR_PBSY_SHIFT (31U) 2055 /*! PBSY - PKHA Busy 2056 * 0b0..PKHA not busy 2057 * 0b1..PKHA busy 2058 */ 2059 #define CAU3_GSR_PBSY(x) (((uint32_t)(((uint32_t)(x)) << CAU3_GSR_PBSY_SHIFT)) & CAU3_GSR_PBSY_MASK) 2060 /*! @} */ 2061 2062 /*! @name CKLFSR - Clock Linear Feedback Shift Register */ 2063 /*! @{ */ 2064 #define CAU3_CKLFSR_LFSR_MASK (0xFFFFFFFFU) 2065 #define CAU3_CKLFSR_LFSR_SHIFT (0U) 2066 #define CAU3_CKLFSR_LFSR(x) (((uint32_t)(((uint32_t)(x)) << CAU3_CKLFSR_LFSR_SHIFT)) & CAU3_CKLFSR_LFSR_MASK) 2067 /*! @} */ 2068 2069 /*! @name PKA0 - PKHA A0 Register */ 2070 /*! @{ */ 2071 #define CAU3_PKA0_PKHA_A0_MASK (0xFFFFFFFFU) 2072 #define CAU3_PKA0_PKHA_A0_SHIFT (0U) 2073 #define CAU3_PKA0_PKHA_A0(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKA0_PKHA_A0_SHIFT)) & CAU3_PKA0_PKHA_A0_MASK) 2074 /*! @} */ 2075 2076 /* The count of CAU3_PKA0 */ 2077 #define CAU3_PKA0_COUNT (32U) 2078 2079 /*! @name PKA1 - PKHA A1 Register */ 2080 /*! @{ */ 2081 #define CAU3_PKA1_PKHA_A1_MASK (0xFFFFFFFFU) 2082 #define CAU3_PKA1_PKHA_A1_SHIFT (0U) 2083 #define CAU3_PKA1_PKHA_A1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKA1_PKHA_A1_SHIFT)) & CAU3_PKA1_PKHA_A1_MASK) 2084 /*! @} */ 2085 2086 /* The count of CAU3_PKA1 */ 2087 #define CAU3_PKA1_COUNT (32U) 2088 2089 /*! @name PKA2 - PKHA A2 Register */ 2090 /*! @{ */ 2091 #define CAU3_PKA2_PKHA_A2_MASK (0xFFFFFFFFU) 2092 #define CAU3_PKA2_PKHA_A2_SHIFT (0U) 2093 #define CAU3_PKA2_PKHA_A2(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKA2_PKHA_A2_SHIFT)) & CAU3_PKA2_PKHA_A2_MASK) 2094 /*! @} */ 2095 2096 /* The count of CAU3_PKA2 */ 2097 #define CAU3_PKA2_COUNT (32U) 2098 2099 /*! @name PKA3 - PKHA A3 Register */ 2100 /*! @{ */ 2101 #define CAU3_PKA3_PKHA_A3_MASK (0xFFFFFFFFU) 2102 #define CAU3_PKA3_PKHA_A3_SHIFT (0U) 2103 #define CAU3_PKA3_PKHA_A3(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKA3_PKHA_A3_SHIFT)) & CAU3_PKA3_PKHA_A3_MASK) 2104 /*! @} */ 2105 2106 /* The count of CAU3_PKA3 */ 2107 #define CAU3_PKA3_COUNT (32U) 2108 2109 /*! @name PKB0 - PKHA B0 Register */ 2110 /*! @{ */ 2111 #define CAU3_PKB0_PKHA_B0_MASK (0xFFFFFFFFU) 2112 #define CAU3_PKB0_PKHA_B0_SHIFT (0U) 2113 #define CAU3_PKB0_PKHA_B0(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKB0_PKHA_B0_SHIFT)) & CAU3_PKB0_PKHA_B0_MASK) 2114 /*! @} */ 2115 2116 /* The count of CAU3_PKB0 */ 2117 #define CAU3_PKB0_COUNT (32U) 2118 2119 /*! @name PKB1 - PKHA B1 Register */ 2120 /*! @{ */ 2121 #define CAU3_PKB1_PKHA_B1_MASK (0xFFFFFFFFU) 2122 #define CAU3_PKB1_PKHA_B1_SHIFT (0U) 2123 #define CAU3_PKB1_PKHA_B1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKB1_PKHA_B1_SHIFT)) & CAU3_PKB1_PKHA_B1_MASK) 2124 /*! @} */ 2125 2126 /* The count of CAU3_PKB1 */ 2127 #define CAU3_PKB1_COUNT (32U) 2128 2129 /*! @name PKB2 - PKHA B2 Register */ 2130 /*! @{ */ 2131 #define CAU3_PKB2_PKHA_B2_MASK (0xFFFFFFFFU) 2132 #define CAU3_PKB2_PKHA_B2_SHIFT (0U) 2133 #define CAU3_PKB2_PKHA_B2(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKB2_PKHA_B2_SHIFT)) & CAU3_PKB2_PKHA_B2_MASK) 2134 /*! @} */ 2135 2136 /* The count of CAU3_PKB2 */ 2137 #define CAU3_PKB2_COUNT (32U) 2138 2139 /*! @name PKB3 - PKHA B3 Register */ 2140 /*! @{ */ 2141 #define CAU3_PKB3_PKHA_B3_MASK (0xFFFFFFFFU) 2142 #define CAU3_PKB3_PKHA_B3_SHIFT (0U) 2143 #define CAU3_PKB3_PKHA_B3(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKB3_PKHA_B3_SHIFT)) & CAU3_PKB3_PKHA_B3_MASK) 2144 /*! @} */ 2145 2146 /* The count of CAU3_PKB3 */ 2147 #define CAU3_PKB3_COUNT (32U) 2148 2149 /*! @name PKN0 - PKHA N0 Register */ 2150 /*! @{ */ 2151 #define CAU3_PKN0_PKHA_N0_MASK (0xFFFFFFFFU) 2152 #define CAU3_PKN0_PKHA_N0_SHIFT (0U) 2153 #define CAU3_PKN0_PKHA_N0(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKN0_PKHA_N0_SHIFT)) & CAU3_PKN0_PKHA_N0_MASK) 2154 /*! @} */ 2155 2156 /* The count of CAU3_PKN0 */ 2157 #define CAU3_PKN0_COUNT (32U) 2158 2159 /*! @name PKN1 - PKHA N1 Register */ 2160 /*! @{ */ 2161 #define CAU3_PKN1_PKHA_N1_MASK (0xFFFFFFFFU) 2162 #define CAU3_PKN1_PKHA_N1_SHIFT (0U) 2163 #define CAU3_PKN1_PKHA_N1(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKN1_PKHA_N1_SHIFT)) & CAU3_PKN1_PKHA_N1_MASK) 2164 /*! @} */ 2165 2166 /* The count of CAU3_PKN1 */ 2167 #define CAU3_PKN1_COUNT (32U) 2168 2169 /*! @name PKN2 - PKHA N2 Register */ 2170 /*! @{ */ 2171 #define CAU3_PKN2_PKHA_N2_MASK (0xFFFFFFFFU) 2172 #define CAU3_PKN2_PKHA_N2_SHIFT (0U) 2173 #define CAU3_PKN2_PKHA_N2(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKN2_PKHA_N2_SHIFT)) & CAU3_PKN2_PKHA_N2_MASK) 2174 /*! @} */ 2175 2176 /* The count of CAU3_PKN2 */ 2177 #define CAU3_PKN2_COUNT (32U) 2178 2179 /*! @name PKN3 - PKHA N3 Register */ 2180 /*! @{ */ 2181 #define CAU3_PKN3_PKHA_N3_MASK (0xFFFFFFFFU) 2182 #define CAU3_PKN3_PKHA_N3_SHIFT (0U) 2183 #define CAU3_PKN3_PKHA_N3(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKN3_PKHA_N3_SHIFT)) & CAU3_PKN3_PKHA_N3_MASK) 2184 /*! @} */ 2185 2186 /* The count of CAU3_PKN3 */ 2187 #define CAU3_PKN3_COUNT (32U) 2188 2189 /*! @name PKE - PKHA E Register */ 2190 /*! @{ */ 2191 #define CAU3_PKE_PKHA_E_MASK (0xFFFFFFFFU) 2192 #define CAU3_PKE_PKHA_E_SHIFT (0U) 2193 #define CAU3_PKE_PKHA_E(x) (((uint32_t)(((uint32_t)(x)) << CAU3_PKE_PKHA_E_SHIFT)) & CAU3_PKE_PKHA_E_MASK) 2194 /*! @} */ 2195 2196 /* The count of CAU3_PKE */ 2197 #define CAU3_PKE_COUNT (128U) 2198 2199 2200 /*! 2201 * @} 2202 */ /* end of group CAU3_Register_Masks */ 2203 2204 2205 /* CAU3 - Peripheral instance base addresses */ 2206 /** Peripheral CAU3 base address */ 2207 #define CAU3_BASE (0x41028000u) 2208 /** Peripheral CAU3 base pointer */ 2209 #define CAU3 ((CAU3_Type *)CAU3_BASE) 2210 /** Array initializer of CAU3 peripheral base addresses */ 2211 #define CAU3_BASE_ADDRS { CAU3_BASE } 2212 /** Array initializer of CAU3 peripheral base pointers */ 2213 #define CAU3_BASE_PTRS { CAU3 } 2214 /** Interrupt vectors for the CAU3 peripheral type */ 2215 #define CAU3_TASK_COMPLETE_IRQS { CAU3_Task_Complete_IRQn } 2216 #define CAU3_SECURITY_VIOLATION_IRQS { CAU3_Security_Violation_IRQn } 2217 2218 /*! 2219 * @} 2220 */ /* end of group CAU3_Peripheral_Access_Layer */ 2221 2222 2223 /* ---------------------------------------------------------------------------- 2224 -- CRC Peripheral Access Layer 2225 ---------------------------------------------------------------------------- */ 2226 2227 /*! 2228 * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer 2229 * @{ 2230 */ 2231 2232 /** CRC - Register Layout Typedef */ 2233 typedef struct { 2234 union { /* offset: 0x0 */ 2235 struct { /* offset: 0x0 */ 2236 __IO uint8_t DATALL; /**< CRC_DATALL register, offset: 0x0 */ 2237 __IO uint8_t DATALU; /**< CRC_DATALU register, offset: 0x1 */ 2238 __IO uint8_t DATAHL; /**< CRC_DATAHL register, offset: 0x2 */ 2239 __IO uint8_t DATAHU; /**< CRC_DATAHU register, offset: 0x3 */ 2240 } ACCESS8BIT; 2241 struct { /* offset: 0x0 */ 2242 __IO uint16_t DATAL; /**< CRC_DATAL register, offset: 0x0 */ 2243 __IO uint16_t DATAH; /**< CRC_DATAH register, offset: 0x2 */ 2244 } ACCESS16BIT; 2245 __IO uint32_t DATA; /**< CRC Data register, offset: 0x0 */ 2246 }; 2247 union { /* offset: 0x4 */ 2248 struct { /* offset: 0x4 */ 2249 __IO uint8_t GPOLYLL; /**< CRC_GPOLYLL register, offset: 0x4 */ 2250 __IO uint8_t GPOLYLU; /**< CRC_GPOLYLU register, offset: 0x5 */ 2251 __IO uint8_t GPOLYHL; /**< CRC_GPOLYHL register, offset: 0x6 */ 2252 __IO uint8_t GPOLYHU; /**< CRC_GPOLYHU register, offset: 0x7 */ 2253 } GPOLY_ACCESS8BIT; 2254 struct { /* offset: 0x4 */ 2255 __IO uint16_t GPOLYL; /**< CRC_GPOLYL register, offset: 0x4 */ 2256 __IO uint16_t GPOLYH; /**< CRC_GPOLYH register, offset: 0x6 */ 2257 } GPOLY_ACCESS16BIT; 2258 __IO uint32_t GPOLY; /**< CRC Polynomial register, offset: 0x4 */ 2259 }; 2260 union { /* offset: 0x8 */ 2261 struct { /* offset: 0x8 */ 2262 uint8_t RESERVED_0[3]; 2263 __IO uint8_t CTRLHU; /**< CRC_CTRLHU register, offset: 0xB */ 2264 } CTRL_ACCESS8BIT; 2265 __IO uint32_t CTRL; /**< CRC Control register, offset: 0x8 */ 2266 }; 2267 } CRC_Type; 2268 2269 /* ---------------------------------------------------------------------------- 2270 -- CRC Register Masks 2271 ---------------------------------------------------------------------------- */ 2272 2273 /*! 2274 * @addtogroup CRC_Register_Masks CRC Register Masks 2275 * @{ 2276 */ 2277 2278 /*! @name DATALL - CRC_DATALL register */ 2279 /*! @{ */ 2280 #define CRC_DATALL_DATALL_MASK (0xFFU) 2281 #define CRC_DATALL_DATALL_SHIFT (0U) 2282 #define CRC_DATALL_DATALL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALL_DATALL_SHIFT)) & CRC_DATALL_DATALL_MASK) 2283 /*! @} */ 2284 2285 /*! @name DATALU - CRC_DATALU register */ 2286 /*! @{ */ 2287 #define CRC_DATALU_DATALU_MASK (0xFFU) 2288 #define CRC_DATALU_DATALU_SHIFT (0U) 2289 #define CRC_DATALU_DATALU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALU_DATALU_SHIFT)) & CRC_DATALU_DATALU_MASK) 2290 /*! @} */ 2291 2292 /*! @name DATAHL - CRC_DATAHL register */ 2293 /*! @{ */ 2294 #define CRC_DATAHL_DATAHL_MASK (0xFFU) 2295 #define CRC_DATAHL_DATAHL_SHIFT (0U) 2296 #define CRC_DATAHL_DATAHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHL_DATAHL_SHIFT)) & CRC_DATAHL_DATAHL_MASK) 2297 /*! @} */ 2298 2299 /*! @name DATAHU - CRC_DATAHU register */ 2300 /*! @{ */ 2301 #define CRC_DATAHU_DATAHU_MASK (0xFFU) 2302 #define CRC_DATAHU_DATAHU_SHIFT (0U) 2303 #define CRC_DATAHU_DATAHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHU_DATAHU_SHIFT)) & CRC_DATAHU_DATAHU_MASK) 2304 /*! @} */ 2305 2306 /*! @name DATAL - CRC_DATAL register */ 2307 /*! @{ */ 2308 #define CRC_DATAL_DATAL_MASK (0xFFFFU) 2309 #define CRC_DATAL_DATAL_SHIFT (0U) 2310 #define CRC_DATAL_DATAL(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAL_DATAL_SHIFT)) & CRC_DATAL_DATAL_MASK) 2311 /*! @} */ 2312 2313 /*! @name DATAH - CRC_DATAH register */ 2314 /*! @{ */ 2315 #define CRC_DATAH_DATAH_MASK (0xFFFFU) 2316 #define CRC_DATAH_DATAH_SHIFT (0U) 2317 #define CRC_DATAH_DATAH(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAH_DATAH_SHIFT)) & CRC_DATAH_DATAH_MASK) 2318 /*! @} */ 2319 2320 /*! @name DATA - CRC Data register */ 2321 /*! @{ */ 2322 #define CRC_DATA_LL_MASK (0xFFU) 2323 #define CRC_DATA_LL_SHIFT (0U) 2324 #define CRC_DATA_LL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LL_SHIFT)) & CRC_DATA_LL_MASK) 2325 #define CRC_DATA_LU_MASK (0xFF00U) 2326 #define CRC_DATA_LU_SHIFT (8U) 2327 #define CRC_DATA_LU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LU_SHIFT)) & CRC_DATA_LU_MASK) 2328 #define CRC_DATA_HL_MASK (0xFF0000U) 2329 #define CRC_DATA_HL_SHIFT (16U) 2330 #define CRC_DATA_HL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HL_SHIFT)) & CRC_DATA_HL_MASK) 2331 #define CRC_DATA_HU_MASK (0xFF000000U) 2332 #define CRC_DATA_HU_SHIFT (24U) 2333 #define CRC_DATA_HU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HU_SHIFT)) & CRC_DATA_HU_MASK) 2334 /*! @} */ 2335 2336 /*! @name GPOLYLL - CRC_GPOLYLL register */ 2337 /*! @{ */ 2338 #define CRC_GPOLYLL_GPOLYLL_MASK (0xFFU) 2339 #define CRC_GPOLYLL_GPOLYLL_SHIFT (0U) 2340 #define CRC_GPOLYLL_GPOLYLL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLL_GPOLYLL_SHIFT)) & CRC_GPOLYLL_GPOLYLL_MASK) 2341 /*! @} */ 2342 2343 /*! @name GPOLYLU - CRC_GPOLYLU register */ 2344 /*! @{ */ 2345 #define CRC_GPOLYLU_GPOLYLU_MASK (0xFFU) 2346 #define CRC_GPOLYLU_GPOLYLU_SHIFT (0U) 2347 #define CRC_GPOLYLU_GPOLYLU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLU_GPOLYLU_SHIFT)) & CRC_GPOLYLU_GPOLYLU_MASK) 2348 /*! @} */ 2349 2350 /*! @name GPOLYHL - CRC_GPOLYHL register */ 2351 /*! @{ */ 2352 #define CRC_GPOLYHL_GPOLYHL_MASK (0xFFU) 2353 #define CRC_GPOLYHL_GPOLYHL_SHIFT (0U) 2354 #define CRC_GPOLYHL_GPOLYHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHL_GPOLYHL_SHIFT)) & CRC_GPOLYHL_GPOLYHL_MASK) 2355 /*! @} */ 2356 2357 /*! @name GPOLYHU - CRC_GPOLYHU register */ 2358 /*! @{ */ 2359 #define CRC_GPOLYHU_GPOLYHU_MASK (0xFFU) 2360 #define CRC_GPOLYHU_GPOLYHU_SHIFT (0U) 2361 #define CRC_GPOLYHU_GPOLYHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHU_GPOLYHU_SHIFT)) & CRC_GPOLYHU_GPOLYHU_MASK) 2362 /*! @} */ 2363 2364 /*! @name GPOLYL - CRC_GPOLYL register */ 2365 /*! @{ */ 2366 #define CRC_GPOLYL_GPOLYL_MASK (0xFFFFU) 2367 #define CRC_GPOLYL_GPOLYL_SHIFT (0U) 2368 #define CRC_GPOLYL_GPOLYL(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYL_GPOLYL_SHIFT)) & CRC_GPOLYL_GPOLYL_MASK) 2369 /*! @} */ 2370 2371 /*! @name GPOLYH - CRC_GPOLYH register */ 2372 /*! @{ */ 2373 #define CRC_GPOLYH_GPOLYH_MASK (0xFFFFU) 2374 #define CRC_GPOLYH_GPOLYH_SHIFT (0U) 2375 #define CRC_GPOLYH_GPOLYH(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYH_GPOLYH_SHIFT)) & CRC_GPOLYH_GPOLYH_MASK) 2376 /*! @} */ 2377 2378 /*! @name GPOLY - CRC Polynomial register */ 2379 /*! @{ */ 2380 #define CRC_GPOLY_LOW_MASK (0xFFFFU) 2381 #define CRC_GPOLY_LOW_SHIFT (0U) 2382 #define CRC_GPOLY_LOW(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_LOW_SHIFT)) & CRC_GPOLY_LOW_MASK) 2383 #define CRC_GPOLY_HIGH_MASK (0xFFFF0000U) 2384 #define CRC_GPOLY_HIGH_SHIFT (16U) 2385 #define CRC_GPOLY_HIGH(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_HIGH_SHIFT)) & CRC_GPOLY_HIGH_MASK) 2386 /*! @} */ 2387 2388 /*! @name CTRLHU - CRC_CTRLHU register */ 2389 /*! @{ */ 2390 #define CRC_CTRLHU_TCRC_MASK (0x1U) 2391 #define CRC_CTRLHU_TCRC_SHIFT (0U) 2392 /*! TCRC 2393 * 0b0..16-bit CRC protocol. 2394 * 0b1..32-bit CRC protocol. 2395 */ 2396 #define CRC_CTRLHU_TCRC(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TCRC_SHIFT)) & CRC_CTRLHU_TCRC_MASK) 2397 #define CRC_CTRLHU_WAS_MASK (0x2U) 2398 #define CRC_CTRLHU_WAS_SHIFT (1U) 2399 /*! WAS 2400 * 0b0..Writes to the CRC data register are data values. 2401 * 0b1..Writes to the CRC data register are seed values. 2402 */ 2403 #define CRC_CTRLHU_WAS(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_WAS_SHIFT)) & CRC_CTRLHU_WAS_MASK) 2404 #define CRC_CTRLHU_FXOR_MASK (0x4U) 2405 #define CRC_CTRLHU_FXOR_SHIFT (2U) 2406 /*! FXOR 2407 * 0b0..No XOR on reading. 2408 * 0b1..Invert or complement the read value of the CRC Data register. 2409 */ 2410 #define CRC_CTRLHU_FXOR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_FXOR_SHIFT)) & CRC_CTRLHU_FXOR_MASK) 2411 #define CRC_CTRLHU_TOTR_MASK (0x30U) 2412 #define CRC_CTRLHU_TOTR_SHIFT (4U) 2413 /*! TOTR 2414 * 0b00..No transposition. 2415 * 0b01..Bits in bytes are transposed; bytes are not transposed. 2416 * 0b10..Both bits in bytes and bytes are transposed. 2417 * 0b11..Only bytes are transposed; no bits in a byte are transposed. 2418 */ 2419 #define CRC_CTRLHU_TOTR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOTR_SHIFT)) & CRC_CTRLHU_TOTR_MASK) 2420 #define CRC_CTRLHU_TOT_MASK (0xC0U) 2421 #define CRC_CTRLHU_TOT_SHIFT (6U) 2422 /*! TOT 2423 * 0b00..No transposition. 2424 * 0b01..Bits in bytes are transposed; bytes are not transposed. 2425 * 0b10..Both bits in bytes and bytes are transposed. 2426 * 0b11..Only bytes are transposed; no bits in a byte are transposed. 2427 */ 2428 #define CRC_CTRLHU_TOT(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOT_SHIFT)) & CRC_CTRLHU_TOT_MASK) 2429 /*! @} */ 2430 2431 /*! @name CTRL - CRC Control register */ 2432 /*! @{ */ 2433 #define CRC_CTRL_TCRC_MASK (0x1000000U) 2434 #define CRC_CTRL_TCRC_SHIFT (24U) 2435 /*! TCRC - TCRC 2436 * 0b0..16-bit CRC protocol. 2437 * 0b1..32-bit CRC protocol. 2438 */ 2439 #define CRC_CTRL_TCRC(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TCRC_SHIFT)) & CRC_CTRL_TCRC_MASK) 2440 #define CRC_CTRL_WAS_MASK (0x2000000U) 2441 #define CRC_CTRL_WAS_SHIFT (25U) 2442 /*! WAS - Write CRC Data Register As Seed 2443 * 0b0..Writes to the CRC data register are data values. 2444 * 0b1..Writes to the CRC data register are seed values. 2445 */ 2446 #define CRC_CTRL_WAS(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_WAS_SHIFT)) & CRC_CTRL_WAS_MASK) 2447 #define CRC_CTRL_FXOR_MASK (0x4000000U) 2448 #define CRC_CTRL_FXOR_SHIFT (26U) 2449 /*! FXOR - Complement Read Of CRC Data Register 2450 * 0b0..No XOR on reading. 2451 * 0b1..Invert or complement the read value of the CRC Data register. 2452 */ 2453 #define CRC_CTRL_FXOR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_FXOR_SHIFT)) & CRC_CTRL_FXOR_MASK) 2454 #define CRC_CTRL_TOTR_MASK (0x30000000U) 2455 #define CRC_CTRL_TOTR_SHIFT (28U) 2456 /*! TOTR - Type Of Transpose For Read 2457 * 0b00..No transposition. 2458 * 0b01..Bits in bytes are transposed; bytes are not transposed. 2459 * 0b10..Both bits in bytes and bytes are transposed. 2460 * 0b11..Only bytes are transposed; no bits in a byte are transposed. 2461 */ 2462 #define CRC_CTRL_TOTR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOTR_SHIFT)) & CRC_CTRL_TOTR_MASK) 2463 #define CRC_CTRL_TOT_MASK (0xC0000000U) 2464 #define CRC_CTRL_TOT_SHIFT (30U) 2465 /*! TOT - Type Of Transpose For Writes 2466 * 0b00..No transposition. 2467 * 0b01..Bits in bytes are transposed; bytes are not transposed. 2468 * 0b10..Both bits in bytes and bytes are transposed. 2469 * 0b11..Only bytes are transposed; no bits in a byte are transposed. 2470 */ 2471 #define CRC_CTRL_TOT(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOT_SHIFT)) & CRC_CTRL_TOT_MASK) 2472 /*! @} */ 2473 2474 2475 /*! 2476 * @} 2477 */ /* end of group CRC_Register_Masks */ 2478 2479 2480 /* CRC - Peripheral instance base addresses */ 2481 /** Peripheral CRC base address */ 2482 #define CRC_BASE (0x4002F000u) 2483 /** Peripheral CRC base pointer */ 2484 #define CRC0 ((CRC_Type *)CRC_BASE) 2485 /** Array initializer of CRC peripheral base addresses */ 2486 #define CRC_BASE_ADDRS { CRC_BASE } 2487 /** Array initializer of CRC peripheral base pointers */ 2488 #define CRC_BASE_PTRS { CRC0 } 2489 2490 /*! 2491 * @} 2492 */ /* end of group CRC_Peripheral_Access_Layer */ 2493 2494 2495 /* ---------------------------------------------------------------------------- 2496 -- DMA Peripheral Access Layer 2497 ---------------------------------------------------------------------------- */ 2498 2499 /*! 2500 * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer 2501 * @{ 2502 */ 2503 2504 /** DMA - Register Layout Typedef */ 2505 typedef struct { 2506 __IO uint32_t CR; /**< Control Register, offset: 0x0 */ 2507 __I uint32_t ES; /**< Error Status Register, offset: 0x4 */ 2508 uint8_t RESERVED_0[4]; 2509 __IO uint32_t ERQ; /**< Enable Request Register, offset: 0xC */ 2510 uint8_t RESERVED_1[4]; 2511 __IO uint32_t EEI; /**< Enable Error Interrupt Register, offset: 0x14 */ 2512 __O uint8_t CEEI; /**< Clear Enable Error Interrupt Register, offset: 0x18 */ 2513 __O uint8_t SEEI; /**< Set Enable Error Interrupt Register, offset: 0x19 */ 2514 __O uint8_t CERQ; /**< Clear Enable Request Register, offset: 0x1A */ 2515 __O uint8_t SERQ; /**< Set Enable Request Register, offset: 0x1B */ 2516 __O uint8_t CDNE; /**< Clear DONE Status Bit Register, offset: 0x1C */ 2517 __O uint8_t SSRT; /**< Set START Bit Register, offset: 0x1D */ 2518 __O uint8_t CERR; /**< Clear Error Register, offset: 0x1E */ 2519 __O uint8_t CINT; /**< Clear Interrupt Request Register, offset: 0x1F */ 2520 uint8_t RESERVED_2[4]; 2521 __IO uint32_t INT; /**< Interrupt Request Register, offset: 0x24 */ 2522 uint8_t RESERVED_3[4]; 2523 __IO uint32_t ERR; /**< Error Register, offset: 0x2C */ 2524 uint8_t RESERVED_4[4]; 2525 __I uint32_t HRS; /**< Hardware Request Status Register, offset: 0x34 */ 2526 uint8_t RESERVED_5[12]; 2527 __IO uint32_t EARS; /**< Enable Asynchronous Request in Stop Register, offset: 0x44 */ 2528 uint8_t RESERVED_6[184]; 2529 __IO uint8_t DCHPRI3; /**< Channel Priority Register, offset: 0x100 */ 2530 __IO uint8_t DCHPRI2; /**< Channel Priority Register, offset: 0x101 */ 2531 __IO uint8_t DCHPRI1; /**< Channel Priority Register, offset: 0x102 */ 2532 __IO uint8_t DCHPRI0; /**< Channel Priority Register, offset: 0x103 */ 2533 __IO uint8_t DCHPRI7; /**< Channel Priority Register, offset: 0x104 */ 2534 __IO uint8_t DCHPRI6; /**< Channel Priority Register, offset: 0x105 */ 2535 __IO uint8_t DCHPRI5; /**< Channel Priority Register, offset: 0x106 */ 2536 __IO uint8_t DCHPRI4; /**< Channel Priority Register, offset: 0x107 */ 2537 uint8_t RESERVED_7[3832]; 2538 struct { /* offset: 0x1000, array step: 0x20 */ 2539 __IO uint32_t SADDR; /**< TCD Source Address, array offset: 0x1000, array step: 0x20 */ 2540 __IO uint16_t SOFF; /**< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20 */ 2541 __IO uint16_t ATTR; /**< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20 */ 2542 union { /* offset: 0x1008, array step: 0x20 */ 2543 __IO uint32_t NBYTES_MLNO; /**< TCD Minor Byte Count (Minor Loop Mapping Disabled), array offset: 0x1008, array step: 0x20 */ 2544 __IO uint32_t NBYTES_MLOFFNO; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled), array offset: 0x1008, array step: 0x20 */ 2545 __IO uint32_t NBYTES_MLOFFYES; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled), array offset: 0x1008, array step: 0x20 */ 2546 }; 2547 __IO int32_t SLAST; /**< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20 */ 2548 __IO uint32_t DADDR; /**< TCD Destination Address, array offset: 0x1010, array step: 0x20 */ 2549 __IO uint16_t DOFF; /**< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20 */ 2550 union { /* offset: 0x1016, array step: 0x20 */ 2551 __IO uint16_t CITER_ELINKNO; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20 */ 2552 __IO uint16_t CITER_ELINKYES; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x1016, array step: 0x20 */ 2553 }; 2554 __IO int32_t DLAST_SGA; /**< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20 */ 2555 __IO uint16_t CSR; /**< TCD Control and Status, array offset: 0x101C, array step: 0x20 */ 2556 union { /* offset: 0x101E, array step: 0x20 */ 2557 __IO uint16_t BITER_ELINKNO; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20 */ 2558 __IO uint16_t BITER_ELINKYES; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x101E, array step: 0x20 */ 2559 }; 2560 } TCD[8]; 2561 } DMA_Type; 2562 2563 /* ---------------------------------------------------------------------------- 2564 -- DMA Register Masks 2565 ---------------------------------------------------------------------------- */ 2566 2567 /*! 2568 * @addtogroup DMA_Register_Masks DMA Register Masks 2569 * @{ 2570 */ 2571 2572 /*! @name CR - Control Register */ 2573 /*! @{ */ 2574 #define DMA_CR_EDBG_MASK (0x2U) 2575 #define DMA_CR_EDBG_SHIFT (1U) 2576 /*! EDBG - Enable Debug 2577 * 0b0..When in debug mode, the DMA continues to operate. 2578 * 0b1..When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to 2579 * complete. Channel execution resumes when the system exits debug mode or the EDBG bit is cleared. 2580 */ 2581 #define DMA_CR_EDBG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EDBG_SHIFT)) & DMA_CR_EDBG_MASK) 2582 #define DMA_CR_ERCA_MASK (0x4U) 2583 #define DMA_CR_ERCA_SHIFT (2U) 2584 /*! ERCA - Enable Round Robin Channel Arbitration 2585 * 0b0..Fixed priority arbitration is used for channel selection . 2586 * 0b1..Round robin arbitration is used for channel selection . 2587 */ 2588 #define DMA_CR_ERCA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERCA_SHIFT)) & DMA_CR_ERCA_MASK) 2589 #define DMA_CR_HOE_MASK (0x10U) 2590 #define DMA_CR_HOE_SHIFT (4U) 2591 /*! HOE - Halt On Error 2592 * 0b0..Normal operation 2593 * 0b1..Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared. 2594 */ 2595 #define DMA_CR_HOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HOE_SHIFT)) & DMA_CR_HOE_MASK) 2596 #define DMA_CR_HALT_MASK (0x20U) 2597 #define DMA_CR_HALT_SHIFT (5U) 2598 /*! HALT - Halt DMA Operations 2599 * 0b0..Normal operation 2600 * 0b1..Stall the start of any new channels. Executing channels are allowed to complete. Channel execution resumes when this bit is cleared. 2601 */ 2602 #define DMA_CR_HALT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HALT_SHIFT)) & DMA_CR_HALT_MASK) 2603 #define DMA_CR_CLM_MASK (0x40U) 2604 #define DMA_CR_CLM_SHIFT (6U) 2605 /*! CLM - Continuous Link Mode 2606 * 0b0..A minor loop channel link made to itself goes through channel arbitration before being activated again. 2607 * 0b1..A minor loop channel link made to itself does not go through channel arbitration before being activated 2608 * again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel 2609 * link enabled and the link channel is itself. This effectively applies the minor loop offsets and restarts the 2610 * next minor loop. 2611 */ 2612 #define DMA_CR_CLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CLM_SHIFT)) & DMA_CR_CLM_MASK) 2613 #define DMA_CR_EMLM_MASK (0x80U) 2614 #define DMA_CR_EMLM_SHIFT (7U) 2615 /*! EMLM - Enable Minor Loop Mapping 2616 * 0b0..Disabled. TCDn.word2 is defined as a 32-bit NBYTES field. 2617 * 0b1..Enabled. TCDn.word2 is redefined to include individual enable fields, an offset field, and the NBYTES 2618 * field. The individual enable fields allow the minor loop offset to be applied to the source address, the 2619 * destination address, or both. The NBYTES field is reduced when either offset is enabled. 2620 */ 2621 #define DMA_CR_EMLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EMLM_SHIFT)) & DMA_CR_EMLM_MASK) 2622 #define DMA_CR_ECX_MASK (0x10000U) 2623 #define DMA_CR_ECX_SHIFT (16U) 2624 /*! ECX - Error Cancel Transfer 2625 * 0b0..Normal operation 2626 * 0b1..Cancel the remaining data transfer in the same fashion as the CX bit. Stop the executing channel and 2627 * force the minor loop to finish. The cancel takes effect after the last write of the current read/write 2628 * sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX 2629 * treats the cancel as an error condition, thus updating the Error Status register (DMAx_ES) and generating an 2630 * optional error interrupt. 2631 */ 2632 #define DMA_CR_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ECX_SHIFT)) & DMA_CR_ECX_MASK) 2633 #define DMA_CR_CX_MASK (0x20000U) 2634 #define DMA_CR_CX_SHIFT (17U) 2635 /*! CX - Cancel Transfer 2636 * 0b0..Normal operation 2637 * 0b1..Cancel the remaining data transfer. Stop the executing channel and force the minor loop to finish. The 2638 * cancel takes effect after the last write of the current read/write sequence. The CX bit clears itself after 2639 * the cancel has been honored. This cancel retires the channel normally as if the minor loop was completed. 2640 */ 2641 #define DMA_CR_CX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CX_SHIFT)) & DMA_CR_CX_MASK) 2642 #define DMA_CR_ACTIVE_MASK (0x80000000U) 2643 #define DMA_CR_ACTIVE_SHIFT (31U) 2644 /*! ACTIVE - DMA Active Status 2645 * 0b0..eDMA is idle. 2646 * 0b1..eDMA is executing a channel. 2647 */ 2648 #define DMA_CR_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ACTIVE_SHIFT)) & DMA_CR_ACTIVE_MASK) 2649 /*! @} */ 2650 2651 /*! @name ES - Error Status Register */ 2652 /*! @{ */ 2653 #define DMA_ES_DBE_MASK (0x1U) 2654 #define DMA_ES_DBE_SHIFT (0U) 2655 /*! DBE - Destination Bus Error 2656 * 0b0..No destination bus error 2657 * 0b1..The last recorded error was a bus error on a destination write 2658 */ 2659 #define DMA_ES_DBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DBE_SHIFT)) & DMA_ES_DBE_MASK) 2660 #define DMA_ES_SBE_MASK (0x2U) 2661 #define DMA_ES_SBE_SHIFT (1U) 2662 /*! SBE - Source Bus Error 2663 * 0b0..No source bus error 2664 * 0b1..The last recorded error was a bus error on a source read 2665 */ 2666 #define DMA_ES_SBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SBE_SHIFT)) & DMA_ES_SBE_MASK) 2667 #define DMA_ES_SGE_MASK (0x4U) 2668 #define DMA_ES_SGE_SHIFT (2U) 2669 /*! SGE - Scatter/Gather Configuration Error 2670 * 0b0..No scatter/gather configuration error 2671 * 0b1..The last recorded error was a configuration error detected in the TCDn_DLASTSGA field. This field is 2672 * checked at the beginning of a scatter/gather operation after major loop completion if TCDn_CSR[ESG] is 2673 * enabled. TCDn_DLASTSGA is not on a 32 byte boundary. 2674 */ 2675 #define DMA_ES_SGE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SGE_SHIFT)) & DMA_ES_SGE_MASK) 2676 #define DMA_ES_NCE_MASK (0x8U) 2677 #define DMA_ES_NCE_SHIFT (3U) 2678 /*! NCE - NBYTES/CITER Configuration Error 2679 * 0b0..No NBYTES/CITER configuration error 2680 * 0b1..The last recorded error was a configuration error detected in the TCDn_NBYTES or TCDn_CITER fields. 2681 * TCDn_NBYTES is not a multiple of TCDn_ATTR[SSIZE] and TCDn_ATTR[DSIZE], or TCDn_CITER[CITER] is equal to zero, 2682 * or TCDn_CITER[ELINK] is not equal to TCDn_BITER[ELINK] 2683 */ 2684 #define DMA_ES_NCE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_NCE_SHIFT)) & DMA_ES_NCE_MASK) 2685 #define DMA_ES_DOE_MASK (0x10U) 2686 #define DMA_ES_DOE_SHIFT (4U) 2687 /*! DOE - Destination Offset Error 2688 * 0b0..No destination offset configuration error 2689 * 0b1..The last recorded error was a configuration error detected in the TCDn_DOFF field. TCDn_DOFF is inconsistent with TCDn_ATTR[DSIZE]. 2690 */ 2691 #define DMA_ES_DOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DOE_SHIFT)) & DMA_ES_DOE_MASK) 2692 #define DMA_ES_DAE_MASK (0x20U) 2693 #define DMA_ES_DAE_SHIFT (5U) 2694 /*! DAE - Destination Address Error 2695 * 0b0..No destination address configuration error 2696 * 0b1..The last recorded error was a configuration error detected in the TCDn_DADDR field. TCDn_DADDR is inconsistent with TCDn_ATTR[DSIZE]. 2697 */ 2698 #define DMA_ES_DAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DAE_SHIFT)) & DMA_ES_DAE_MASK) 2699 #define DMA_ES_SOE_MASK (0x40U) 2700 #define DMA_ES_SOE_SHIFT (6U) 2701 /*! SOE - Source Offset Error 2702 * 0b0..No source offset configuration error 2703 * 0b1..The last recorded error was a configuration error detected in the TCDn_SOFF field. TCDn_SOFF is inconsistent with TCDn_ATTR[SSIZE]. 2704 */ 2705 #define DMA_ES_SOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SOE_SHIFT)) & DMA_ES_SOE_MASK) 2706 #define DMA_ES_SAE_MASK (0x80U) 2707 #define DMA_ES_SAE_SHIFT (7U) 2708 /*! SAE - Source Address Error 2709 * 0b0..No source address configuration error. 2710 * 0b1..The last recorded error was a configuration error detected in the TCDn_SADDR field. TCDn_SADDR is inconsistent with TCDn_ATTR[SSIZE]. 2711 */ 2712 #define DMA_ES_SAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SAE_SHIFT)) & DMA_ES_SAE_MASK) 2713 #define DMA_ES_ERRCHN_MASK (0x700U) 2714 #define DMA_ES_ERRCHN_SHIFT (8U) 2715 #define DMA_ES_ERRCHN(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ERRCHN_SHIFT)) & DMA_ES_ERRCHN_MASK) 2716 #define DMA_ES_CPE_MASK (0x4000U) 2717 #define DMA_ES_CPE_SHIFT (14U) 2718 /*! CPE - Channel Priority Error 2719 * 0b0..No channel priority error 2720 * 0b1..The last recorded error was a configuration error in the channel priorities . Channel priorities are not unique. 2721 */ 2722 #define DMA_ES_CPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_CPE_SHIFT)) & DMA_ES_CPE_MASK) 2723 #define DMA_ES_ECX_MASK (0x10000U) 2724 #define DMA_ES_ECX_SHIFT (16U) 2725 /*! ECX - Transfer Canceled 2726 * 0b0..No canceled transfers 2727 * 0b1..The last recorded entry was a canceled transfer by the error cancel transfer input 2728 */ 2729 #define DMA_ES_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ECX_SHIFT)) & DMA_ES_ECX_MASK) 2730 #define DMA_ES_VLD_MASK (0x80000000U) 2731 #define DMA_ES_VLD_SHIFT (31U) 2732 /*! VLD - VLD 2733 * 0b0..No ERR bits are set. 2734 * 0b1..At least one ERR bit is set indicating a valid error exists that has not been cleared. 2735 */ 2736 #define DMA_ES_VLD(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_VLD_SHIFT)) & DMA_ES_VLD_MASK) 2737 /*! @} */ 2738 2739 /*! @name ERQ - Enable Request Register */ 2740 /*! @{ */ 2741 #define DMA_ERQ_ERQ0_MASK (0x1U) 2742 #define DMA_ERQ_ERQ0_SHIFT (0U) 2743 /*! ERQ0 - Enable DMA Request 0 2744 * 0b0..The DMA request signal for the corresponding channel is disabled 2745 * 0b1..The DMA request signal for the corresponding channel is enabled 2746 */ 2747 #define DMA_ERQ_ERQ0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ0_SHIFT)) & DMA_ERQ_ERQ0_MASK) 2748 #define DMA_ERQ_ERQ1_MASK (0x2U) 2749 #define DMA_ERQ_ERQ1_SHIFT (1U) 2750 /*! ERQ1 - Enable DMA Request 1 2751 * 0b0..The DMA request signal for the corresponding channel is disabled 2752 * 0b1..The DMA request signal for the corresponding channel is enabled 2753 */ 2754 #define DMA_ERQ_ERQ1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ1_SHIFT)) & DMA_ERQ_ERQ1_MASK) 2755 #define DMA_ERQ_ERQ2_MASK (0x4U) 2756 #define DMA_ERQ_ERQ2_SHIFT (2U) 2757 /*! ERQ2 - Enable DMA Request 2 2758 * 0b0..The DMA request signal for the corresponding channel is disabled 2759 * 0b1..The DMA request signal for the corresponding channel is enabled 2760 */ 2761 #define DMA_ERQ_ERQ2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ2_SHIFT)) & DMA_ERQ_ERQ2_MASK) 2762 #define DMA_ERQ_ERQ3_MASK (0x8U) 2763 #define DMA_ERQ_ERQ3_SHIFT (3U) 2764 /*! ERQ3 - Enable DMA Request 3 2765 * 0b0..The DMA request signal for the corresponding channel is disabled 2766 * 0b1..The DMA request signal for the corresponding channel is enabled 2767 */ 2768 #define DMA_ERQ_ERQ3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ3_SHIFT)) & DMA_ERQ_ERQ3_MASK) 2769 #define DMA_ERQ_ERQ4_MASK (0x10U) 2770 #define DMA_ERQ_ERQ4_SHIFT (4U) 2771 /*! ERQ4 - Enable DMA Request 4 2772 * 0b0..The DMA request signal for the corresponding channel is disabled 2773 * 0b1..The DMA request signal for the corresponding channel is enabled 2774 */ 2775 #define DMA_ERQ_ERQ4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ4_SHIFT)) & DMA_ERQ_ERQ4_MASK) 2776 #define DMA_ERQ_ERQ5_MASK (0x20U) 2777 #define DMA_ERQ_ERQ5_SHIFT (5U) 2778 /*! ERQ5 - Enable DMA Request 5 2779 * 0b0..The DMA request signal for the corresponding channel is disabled 2780 * 0b1..The DMA request signal for the corresponding channel is enabled 2781 */ 2782 #define DMA_ERQ_ERQ5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ5_SHIFT)) & DMA_ERQ_ERQ5_MASK) 2783 #define DMA_ERQ_ERQ6_MASK (0x40U) 2784 #define DMA_ERQ_ERQ6_SHIFT (6U) 2785 /*! ERQ6 - Enable DMA Request 6 2786 * 0b0..The DMA request signal for the corresponding channel is disabled 2787 * 0b1..The DMA request signal for the corresponding channel is enabled 2788 */ 2789 #define DMA_ERQ_ERQ6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ6_SHIFT)) & DMA_ERQ_ERQ6_MASK) 2790 #define DMA_ERQ_ERQ7_MASK (0x80U) 2791 #define DMA_ERQ_ERQ7_SHIFT (7U) 2792 /*! ERQ7 - Enable DMA Request 7 2793 * 0b0..The DMA request signal for the corresponding channel is disabled 2794 * 0b1..The DMA request signal for the corresponding channel is enabled 2795 */ 2796 #define DMA_ERQ_ERQ7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ7_SHIFT)) & DMA_ERQ_ERQ7_MASK) 2797 /*! @} */ 2798 2799 /*! @name EEI - Enable Error Interrupt Register */ 2800 /*! @{ */ 2801 #define DMA_EEI_EEI0_MASK (0x1U) 2802 #define DMA_EEI_EEI0_SHIFT (0U) 2803 /*! EEI0 - Enable Error Interrupt 0 2804 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2805 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2806 */ 2807 #define DMA_EEI_EEI0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI0_SHIFT)) & DMA_EEI_EEI0_MASK) 2808 #define DMA_EEI_EEI1_MASK (0x2U) 2809 #define DMA_EEI_EEI1_SHIFT (1U) 2810 /*! EEI1 - Enable Error Interrupt 1 2811 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2812 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2813 */ 2814 #define DMA_EEI_EEI1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI1_SHIFT)) & DMA_EEI_EEI1_MASK) 2815 #define DMA_EEI_EEI2_MASK (0x4U) 2816 #define DMA_EEI_EEI2_SHIFT (2U) 2817 /*! EEI2 - Enable Error Interrupt 2 2818 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2819 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2820 */ 2821 #define DMA_EEI_EEI2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI2_SHIFT)) & DMA_EEI_EEI2_MASK) 2822 #define DMA_EEI_EEI3_MASK (0x8U) 2823 #define DMA_EEI_EEI3_SHIFT (3U) 2824 /*! EEI3 - Enable Error Interrupt 3 2825 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2826 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2827 */ 2828 #define DMA_EEI_EEI3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI3_SHIFT)) & DMA_EEI_EEI3_MASK) 2829 #define DMA_EEI_EEI4_MASK (0x10U) 2830 #define DMA_EEI_EEI4_SHIFT (4U) 2831 /*! EEI4 - Enable Error Interrupt 4 2832 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2833 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2834 */ 2835 #define DMA_EEI_EEI4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI4_SHIFT)) & DMA_EEI_EEI4_MASK) 2836 #define DMA_EEI_EEI5_MASK (0x20U) 2837 #define DMA_EEI_EEI5_SHIFT (5U) 2838 /*! EEI5 - Enable Error Interrupt 5 2839 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2840 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2841 */ 2842 #define DMA_EEI_EEI5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI5_SHIFT)) & DMA_EEI_EEI5_MASK) 2843 #define DMA_EEI_EEI6_MASK (0x40U) 2844 #define DMA_EEI_EEI6_SHIFT (6U) 2845 /*! EEI6 - Enable Error Interrupt 6 2846 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2847 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2848 */ 2849 #define DMA_EEI_EEI6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI6_SHIFT)) & DMA_EEI_EEI6_MASK) 2850 #define DMA_EEI_EEI7_MASK (0x80U) 2851 #define DMA_EEI_EEI7_SHIFT (7U) 2852 /*! EEI7 - Enable Error Interrupt 7 2853 * 0b0..The error signal for corresponding channel does not generate an error interrupt 2854 * 0b1..The assertion of the error signal for corresponding channel generates an error interrupt request 2855 */ 2856 #define DMA_EEI_EEI7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI7_SHIFT)) & DMA_EEI_EEI7_MASK) 2857 /*! @} */ 2858 2859 /*! @name CEEI - Clear Enable Error Interrupt Register */ 2860 /*! @{ */ 2861 #define DMA_CEEI_CEEI_MASK (0x7U) 2862 #define DMA_CEEI_CEEI_SHIFT (0U) 2863 #define DMA_CEEI_CEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CEEI_SHIFT)) & DMA_CEEI_CEEI_MASK) 2864 #define DMA_CEEI_CAEE_MASK (0x40U) 2865 #define DMA_CEEI_CAEE_SHIFT (6U) 2866 /*! CAEE - Clear All Enable Error Interrupts 2867 * 0b0..Clear only the EEI bit specified in the CEEI field 2868 * 0b1..Clear all bits in EEI 2869 */ 2870 #define DMA_CEEI_CAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CAEE_SHIFT)) & DMA_CEEI_CAEE_MASK) 2871 #define DMA_CEEI_NOP_MASK (0x80U) 2872 #define DMA_CEEI_NOP_SHIFT (7U) 2873 /*! NOP - No Op enable 2874 * 0b0..Normal operation 2875 * 0b1..No operation, ignore the other bits in this register 2876 */ 2877 #define DMA_CEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_NOP_SHIFT)) & DMA_CEEI_NOP_MASK) 2878 /*! @} */ 2879 2880 /*! @name SEEI - Set Enable Error Interrupt Register */ 2881 /*! @{ */ 2882 #define DMA_SEEI_SEEI_MASK (0x7U) 2883 #define DMA_SEEI_SEEI_SHIFT (0U) 2884 #define DMA_SEEI_SEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SEEI_SHIFT)) & DMA_SEEI_SEEI_MASK) 2885 #define DMA_SEEI_SAEE_MASK (0x40U) 2886 #define DMA_SEEI_SAEE_SHIFT (6U) 2887 /*! SAEE - Sets All Enable Error Interrupts 2888 * 0b0..Set only the EEI bit specified in the SEEI field. 2889 * 0b1..Sets all bits in EEI 2890 */ 2891 #define DMA_SEEI_SAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SAEE_SHIFT)) & DMA_SEEI_SAEE_MASK) 2892 #define DMA_SEEI_NOP_MASK (0x80U) 2893 #define DMA_SEEI_NOP_SHIFT (7U) 2894 /*! NOP - No Op enable 2895 * 0b0..Normal operation 2896 * 0b1..No operation, ignore the other bits in this register 2897 */ 2898 #define DMA_SEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_NOP_SHIFT)) & DMA_SEEI_NOP_MASK) 2899 /*! @} */ 2900 2901 /*! @name CERQ - Clear Enable Request Register */ 2902 /*! @{ */ 2903 #define DMA_CERQ_CERQ_MASK (0x7U) 2904 #define DMA_CERQ_CERQ_SHIFT (0U) 2905 #define DMA_CERQ_CERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CERQ_SHIFT)) & DMA_CERQ_CERQ_MASK) 2906 #define DMA_CERQ_CAER_MASK (0x40U) 2907 #define DMA_CERQ_CAER_SHIFT (6U) 2908 /*! CAER - Clear All Enable Requests 2909 * 0b0..Clear only the ERQ bit specified in the CERQ field 2910 * 0b1..Clear all bits in ERQ 2911 */ 2912 #define DMA_CERQ_CAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CAER_SHIFT)) & DMA_CERQ_CAER_MASK) 2913 #define DMA_CERQ_NOP_MASK (0x80U) 2914 #define DMA_CERQ_NOP_SHIFT (7U) 2915 /*! NOP - No Op enable 2916 * 0b0..Normal operation 2917 * 0b1..No operation, ignore the other bits in this register 2918 */ 2919 #define DMA_CERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_NOP_SHIFT)) & DMA_CERQ_NOP_MASK) 2920 /*! @} */ 2921 2922 /*! @name SERQ - Set Enable Request Register */ 2923 /*! @{ */ 2924 #define DMA_SERQ_SERQ_MASK (0x7U) 2925 #define DMA_SERQ_SERQ_SHIFT (0U) 2926 #define DMA_SERQ_SERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SERQ_SHIFT)) & DMA_SERQ_SERQ_MASK) 2927 #define DMA_SERQ_SAER_MASK (0x40U) 2928 #define DMA_SERQ_SAER_SHIFT (6U) 2929 /*! SAER - Set All Enable Requests 2930 * 0b0..Set only the ERQ bit specified in the SERQ field 2931 * 0b1..Set all bits in ERQ 2932 */ 2933 #define DMA_SERQ_SAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SAER_SHIFT)) & DMA_SERQ_SAER_MASK) 2934 #define DMA_SERQ_NOP_MASK (0x80U) 2935 #define DMA_SERQ_NOP_SHIFT (7U) 2936 /*! NOP - No Op enable 2937 * 0b0..Normal operation 2938 * 0b1..No operation, ignore the other bits in this register 2939 */ 2940 #define DMA_SERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_NOP_SHIFT)) & DMA_SERQ_NOP_MASK) 2941 /*! @} */ 2942 2943 /*! @name CDNE - Clear DONE Status Bit Register */ 2944 /*! @{ */ 2945 #define DMA_CDNE_CDNE_MASK (0x7U) 2946 #define DMA_CDNE_CDNE_SHIFT (0U) 2947 #define DMA_CDNE_CDNE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CDNE_SHIFT)) & DMA_CDNE_CDNE_MASK) 2948 #define DMA_CDNE_CADN_MASK (0x40U) 2949 #define DMA_CDNE_CADN_SHIFT (6U) 2950 /*! CADN - Clears All DONE Bits 2951 * 0b0..Clears only the TCDn_CSR[DONE] bit specified in the CDNE field 2952 * 0b1..Clears all bits in TCDn_CSR[DONE] 2953 */ 2954 #define DMA_CDNE_CADN(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CADN_SHIFT)) & DMA_CDNE_CADN_MASK) 2955 #define DMA_CDNE_NOP_MASK (0x80U) 2956 #define DMA_CDNE_NOP_SHIFT (7U) 2957 /*! NOP - No Op enable 2958 * 0b0..Normal operation 2959 * 0b1..No operation, ignore the other bits in this register 2960 */ 2961 #define DMA_CDNE_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_NOP_SHIFT)) & DMA_CDNE_NOP_MASK) 2962 /*! @} */ 2963 2964 /*! @name SSRT - Set START Bit Register */ 2965 /*! @{ */ 2966 #define DMA_SSRT_SSRT_MASK (0x7U) 2967 #define DMA_SSRT_SSRT_SHIFT (0U) 2968 #define DMA_SSRT_SSRT(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SSRT_SHIFT)) & DMA_SSRT_SSRT_MASK) 2969 #define DMA_SSRT_SAST_MASK (0x40U) 2970 #define DMA_SSRT_SAST_SHIFT (6U) 2971 /*! SAST - Set All START Bits (activates all channels) 2972 * 0b0..Set only the TCDn_CSR[START] bit specified in the SSRT field 2973 * 0b1..Set all bits in TCDn_CSR[START] 2974 */ 2975 #define DMA_SSRT_SAST(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SAST_SHIFT)) & DMA_SSRT_SAST_MASK) 2976 #define DMA_SSRT_NOP_MASK (0x80U) 2977 #define DMA_SSRT_NOP_SHIFT (7U) 2978 /*! NOP - No Op enable 2979 * 0b0..Normal operation 2980 * 0b1..No operation, ignore the other bits in this register 2981 */ 2982 #define DMA_SSRT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_NOP_SHIFT)) & DMA_SSRT_NOP_MASK) 2983 /*! @} */ 2984 2985 /*! @name CERR - Clear Error Register */ 2986 /*! @{ */ 2987 #define DMA_CERR_CERR_MASK (0x7U) 2988 #define DMA_CERR_CERR_SHIFT (0U) 2989 #define DMA_CERR_CERR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CERR_SHIFT)) & DMA_CERR_CERR_MASK) 2990 #define DMA_CERR_CAEI_MASK (0x40U) 2991 #define DMA_CERR_CAEI_SHIFT (6U) 2992 /*! CAEI - Clear All Error Indicators 2993 * 0b0..Clear only the ERR bit specified in the CERR field 2994 * 0b1..Clear all bits in ERR 2995 */ 2996 #define DMA_CERR_CAEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CAEI_SHIFT)) & DMA_CERR_CAEI_MASK) 2997 #define DMA_CERR_NOP_MASK (0x80U) 2998 #define DMA_CERR_NOP_SHIFT (7U) 2999 /*! NOP - No Op enable 3000 * 0b0..Normal operation 3001 * 0b1..No operation, ignore the other bits in this register 3002 */ 3003 #define DMA_CERR_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_NOP_SHIFT)) & DMA_CERR_NOP_MASK) 3004 /*! @} */ 3005 3006 /*! @name CINT - Clear Interrupt Request Register */ 3007 /*! @{ */ 3008 #define DMA_CINT_CINT_MASK (0x7U) 3009 #define DMA_CINT_CINT_SHIFT (0U) 3010 #define DMA_CINT_CINT(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CINT_SHIFT)) & DMA_CINT_CINT_MASK) 3011 #define DMA_CINT_CAIR_MASK (0x40U) 3012 #define DMA_CINT_CAIR_SHIFT (6U) 3013 /*! CAIR - Clear All Interrupt Requests 3014 * 0b0..Clear only the INT bit specified in the CINT field 3015 * 0b1..Clear all bits in INT 3016 */ 3017 #define DMA_CINT_CAIR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CAIR_SHIFT)) & DMA_CINT_CAIR_MASK) 3018 #define DMA_CINT_NOP_MASK (0x80U) 3019 #define DMA_CINT_NOP_SHIFT (7U) 3020 /*! NOP - No Op enable 3021 * 0b0..Normal operation 3022 * 0b1..No operation, ignore the other bits in this register 3023 */ 3024 #define DMA_CINT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_NOP_SHIFT)) & DMA_CINT_NOP_MASK) 3025 /*! @} */ 3026 3027 /*! @name INT - Interrupt Request Register */ 3028 /*! @{ */ 3029 #define DMA_INT_INT0_MASK (0x1U) 3030 #define DMA_INT_INT0_SHIFT (0U) 3031 /*! INT0 - Interrupt Request 0 3032 * 0b0..The interrupt request for corresponding channel is cleared 3033 * 0b1..The interrupt request for corresponding channel is active 3034 */ 3035 #define DMA_INT_INT0(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT0_SHIFT)) & DMA_INT_INT0_MASK) 3036 #define DMA_INT_INT1_MASK (0x2U) 3037 #define DMA_INT_INT1_SHIFT (1U) 3038 /*! INT1 - Interrupt Request 1 3039 * 0b0..The interrupt request for corresponding channel is cleared 3040 * 0b1..The interrupt request for corresponding channel is active 3041 */ 3042 #define DMA_INT_INT1(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT1_SHIFT)) & DMA_INT_INT1_MASK) 3043 #define DMA_INT_INT2_MASK (0x4U) 3044 #define DMA_INT_INT2_SHIFT (2U) 3045 /*! INT2 - Interrupt Request 2 3046 * 0b0..The interrupt request for corresponding channel is cleared 3047 * 0b1..The interrupt request for corresponding channel is active 3048 */ 3049 #define DMA_INT_INT2(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT2_SHIFT)) & DMA_INT_INT2_MASK) 3050 #define DMA_INT_INT3_MASK (0x8U) 3051 #define DMA_INT_INT3_SHIFT (3U) 3052 /*! INT3 - Interrupt Request 3 3053 * 0b0..The interrupt request for corresponding channel is cleared 3054 * 0b1..The interrupt request for corresponding channel is active 3055 */ 3056 #define DMA_INT_INT3(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT3_SHIFT)) & DMA_INT_INT3_MASK) 3057 #define DMA_INT_INT4_MASK (0x10U) 3058 #define DMA_INT_INT4_SHIFT (4U) 3059 /*! INT4 - Interrupt Request 4 3060 * 0b0..The interrupt request for corresponding channel is cleared 3061 * 0b1..The interrupt request for corresponding channel is active 3062 */ 3063 #define DMA_INT_INT4(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT4_SHIFT)) & DMA_INT_INT4_MASK) 3064 #define DMA_INT_INT5_MASK (0x20U) 3065 #define DMA_INT_INT5_SHIFT (5U) 3066 /*! INT5 - Interrupt Request 5 3067 * 0b0..The interrupt request for corresponding channel is cleared 3068 * 0b1..The interrupt request for corresponding channel is active 3069 */ 3070 #define DMA_INT_INT5(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT5_SHIFT)) & DMA_INT_INT5_MASK) 3071 #define DMA_INT_INT6_MASK (0x40U) 3072 #define DMA_INT_INT6_SHIFT (6U) 3073 /*! INT6 - Interrupt Request 6 3074 * 0b0..The interrupt request for corresponding channel is cleared 3075 * 0b1..The interrupt request for corresponding channel is active 3076 */ 3077 #define DMA_INT_INT6(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT6_SHIFT)) & DMA_INT_INT6_MASK) 3078 #define DMA_INT_INT7_MASK (0x80U) 3079 #define DMA_INT_INT7_SHIFT (7U) 3080 /*! INT7 - Interrupt Request 7 3081 * 0b0..The interrupt request for corresponding channel is cleared 3082 * 0b1..The interrupt request for corresponding channel is active 3083 */ 3084 #define DMA_INT_INT7(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT7_SHIFT)) & DMA_INT_INT7_MASK) 3085 /*! @} */ 3086 3087 /*! @name ERR - Error Register */ 3088 /*! @{ */ 3089 #define DMA_ERR_ERR0_MASK (0x1U) 3090 #define DMA_ERR_ERR0_SHIFT (0U) 3091 /*! ERR0 - Error In Channel 0 3092 * 0b0..An error in this channel has not occurred 3093 * 0b1..An error in this channel has occurred 3094 */ 3095 #define DMA_ERR_ERR0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR0_SHIFT)) & DMA_ERR_ERR0_MASK) 3096 #define DMA_ERR_ERR1_MASK (0x2U) 3097 #define DMA_ERR_ERR1_SHIFT (1U) 3098 /*! ERR1 - Error In Channel 1 3099 * 0b0..An error in this channel has not occurred 3100 * 0b1..An error in this channel has occurred 3101 */ 3102 #define DMA_ERR_ERR1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR1_SHIFT)) & DMA_ERR_ERR1_MASK) 3103 #define DMA_ERR_ERR2_MASK (0x4U) 3104 #define DMA_ERR_ERR2_SHIFT (2U) 3105 /*! ERR2 - Error In Channel 2 3106 * 0b0..An error in this channel has not occurred 3107 * 0b1..An error in this channel has occurred 3108 */ 3109 #define DMA_ERR_ERR2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR2_SHIFT)) & DMA_ERR_ERR2_MASK) 3110 #define DMA_ERR_ERR3_MASK (0x8U) 3111 #define DMA_ERR_ERR3_SHIFT (3U) 3112 /*! ERR3 - Error In Channel 3 3113 * 0b0..An error in this channel has not occurred 3114 * 0b1..An error in this channel has occurred 3115 */ 3116 #define DMA_ERR_ERR3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR3_SHIFT)) & DMA_ERR_ERR3_MASK) 3117 #define DMA_ERR_ERR4_MASK (0x10U) 3118 #define DMA_ERR_ERR4_SHIFT (4U) 3119 /*! ERR4 - Error In Channel 4 3120 * 0b0..An error in this channel has not occurred 3121 * 0b1..An error in this channel has occurred 3122 */ 3123 #define DMA_ERR_ERR4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR4_SHIFT)) & DMA_ERR_ERR4_MASK) 3124 #define DMA_ERR_ERR5_MASK (0x20U) 3125 #define DMA_ERR_ERR5_SHIFT (5U) 3126 /*! ERR5 - Error In Channel 5 3127 * 0b0..An error in this channel has not occurred 3128 * 0b1..An error in this channel has occurred 3129 */ 3130 #define DMA_ERR_ERR5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR5_SHIFT)) & DMA_ERR_ERR5_MASK) 3131 #define DMA_ERR_ERR6_MASK (0x40U) 3132 #define DMA_ERR_ERR6_SHIFT (6U) 3133 /*! ERR6 - Error In Channel 6 3134 * 0b0..An error in this channel has not occurred 3135 * 0b1..An error in this channel has occurred 3136 */ 3137 #define DMA_ERR_ERR6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR6_SHIFT)) & DMA_ERR_ERR6_MASK) 3138 #define DMA_ERR_ERR7_MASK (0x80U) 3139 #define DMA_ERR_ERR7_SHIFT (7U) 3140 /*! ERR7 - Error In Channel 7 3141 * 0b0..An error in this channel has not occurred 3142 * 0b1..An error in this channel has occurred 3143 */ 3144 #define DMA_ERR_ERR7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR7_SHIFT)) & DMA_ERR_ERR7_MASK) 3145 /*! @} */ 3146 3147 /*! @name HRS - Hardware Request Status Register */ 3148 /*! @{ */ 3149 #define DMA_HRS_HRS0_MASK (0x1U) 3150 #define DMA_HRS_HRS0_SHIFT (0U) 3151 /*! HRS0 - Hardware Request Status Channel 0 3152 * 0b0..A hardware service request for channel 0 is not present 3153 * 0b1..A hardware service request for channel 0 is present 3154 */ 3155 #define DMA_HRS_HRS0(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS0_SHIFT)) & DMA_HRS_HRS0_MASK) 3156 #define DMA_HRS_HRS1_MASK (0x2U) 3157 #define DMA_HRS_HRS1_SHIFT (1U) 3158 /*! HRS1 - Hardware Request Status Channel 1 3159 * 0b0..A hardware service request for channel 1 is not present 3160 * 0b1..A hardware service request for channel 1 is present 3161 */ 3162 #define DMA_HRS_HRS1(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS1_SHIFT)) & DMA_HRS_HRS1_MASK) 3163 #define DMA_HRS_HRS2_MASK (0x4U) 3164 #define DMA_HRS_HRS2_SHIFT (2U) 3165 /*! HRS2 - Hardware Request Status Channel 2 3166 * 0b0..A hardware service request for channel 2 is not present 3167 * 0b1..A hardware service request for channel 2 is present 3168 */ 3169 #define DMA_HRS_HRS2(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS2_SHIFT)) & DMA_HRS_HRS2_MASK) 3170 #define DMA_HRS_HRS3_MASK (0x8U) 3171 #define DMA_HRS_HRS3_SHIFT (3U) 3172 /*! HRS3 - Hardware Request Status Channel 3 3173 * 0b0..A hardware service request for channel 3 is not present 3174 * 0b1..A hardware service request for channel 3 is present 3175 */ 3176 #define DMA_HRS_HRS3(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS3_SHIFT)) & DMA_HRS_HRS3_MASK) 3177 #define DMA_HRS_HRS4_MASK (0x10U) 3178 #define DMA_HRS_HRS4_SHIFT (4U) 3179 /*! HRS4 - Hardware Request Status Channel 4 3180 * 0b0..A hardware service request for channel 4 is not present 3181 * 0b1..A hardware service request for channel 4 is present 3182 */ 3183 #define DMA_HRS_HRS4(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS4_SHIFT)) & DMA_HRS_HRS4_MASK) 3184 #define DMA_HRS_HRS5_MASK (0x20U) 3185 #define DMA_HRS_HRS5_SHIFT (5U) 3186 /*! HRS5 - Hardware Request Status Channel 5 3187 * 0b0..A hardware service request for channel 5 is not present 3188 * 0b1..A hardware service request for channel 5 is present 3189 */ 3190 #define DMA_HRS_HRS5(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS5_SHIFT)) & DMA_HRS_HRS5_MASK) 3191 #define DMA_HRS_HRS6_MASK (0x40U) 3192 #define DMA_HRS_HRS6_SHIFT (6U) 3193 /*! HRS6 - Hardware Request Status Channel 6 3194 * 0b0..A hardware service request for channel 6 is not present 3195 * 0b1..A hardware service request for channel 6 is present 3196 */ 3197 #define DMA_HRS_HRS6(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS6_SHIFT)) & DMA_HRS_HRS6_MASK) 3198 #define DMA_HRS_HRS7_MASK (0x80U) 3199 #define DMA_HRS_HRS7_SHIFT (7U) 3200 /*! HRS7 - Hardware Request Status Channel 7 3201 * 0b0..A hardware service request for channel 7 is not present 3202 * 0b1..A hardware service request for channel 7 is present 3203 */ 3204 #define DMA_HRS_HRS7(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS7_SHIFT)) & DMA_HRS_HRS7_MASK) 3205 /*! @} */ 3206 3207 /*! @name EARS - Enable Asynchronous Request in Stop Register */ 3208 /*! @{ */ 3209 #define DMA_EARS_EDREQ_0_MASK (0x1U) 3210 #define DMA_EARS_EDREQ_0_SHIFT (0U) 3211 /*! EDREQ_0 - Enable asynchronous DMA request in stop mode for channel 0. 3212 * 0b0..Disable asynchronous DMA request for channel 0. 3213 * 0b1..Enable asynchronous DMA request for channel 0. 3214 */ 3215 #define DMA_EARS_EDREQ_0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_0_SHIFT)) & DMA_EARS_EDREQ_0_MASK) 3216 #define DMA_EARS_EDREQ_1_MASK (0x2U) 3217 #define DMA_EARS_EDREQ_1_SHIFT (1U) 3218 /*! EDREQ_1 - Enable asynchronous DMA request in stop mode for channel 1. 3219 * 0b0..Disable asynchronous DMA request for channel 1 3220 * 0b1..Enable asynchronous DMA request for channel 1. 3221 */ 3222 #define DMA_EARS_EDREQ_1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_1_SHIFT)) & DMA_EARS_EDREQ_1_MASK) 3223 #define DMA_EARS_EDREQ_2_MASK (0x4U) 3224 #define DMA_EARS_EDREQ_2_SHIFT (2U) 3225 /*! EDREQ_2 - Enable asynchronous DMA request in stop mode for channel 2. 3226 * 0b0..Disable asynchronous DMA request for channel 2. 3227 * 0b1..Enable asynchronous DMA request for channel 2. 3228 */ 3229 #define DMA_EARS_EDREQ_2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_2_SHIFT)) & DMA_EARS_EDREQ_2_MASK) 3230 #define DMA_EARS_EDREQ_3_MASK (0x8U) 3231 #define DMA_EARS_EDREQ_3_SHIFT (3U) 3232 /*! EDREQ_3 - Enable asynchronous DMA request in stop mode for channel 3. 3233 * 0b0..Disable asynchronous DMA request for channel 3. 3234 * 0b1..Enable asynchronous DMA request for channel 3. 3235 */ 3236 #define DMA_EARS_EDREQ_3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_3_SHIFT)) & DMA_EARS_EDREQ_3_MASK) 3237 #define DMA_EARS_EDREQ_4_MASK (0x10U) 3238 #define DMA_EARS_EDREQ_4_SHIFT (4U) 3239 /*! EDREQ_4 - Enable asynchronous DMA request in stop mode for channel 4 3240 * 0b0..Disable asynchronous DMA request for channel 4. 3241 * 0b1..Enable asynchronous DMA request for channel 4. 3242 */ 3243 #define DMA_EARS_EDREQ_4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_4_SHIFT)) & DMA_EARS_EDREQ_4_MASK) 3244 #define DMA_EARS_EDREQ_5_MASK (0x20U) 3245 #define DMA_EARS_EDREQ_5_SHIFT (5U) 3246 /*! EDREQ_5 - Enable asynchronous DMA request in stop mode for channel 5 3247 * 0b0..Disable asynchronous DMA request for channel 5. 3248 * 0b1..Enable asynchronous DMA request for channel 5. 3249 */ 3250 #define DMA_EARS_EDREQ_5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_5_SHIFT)) & DMA_EARS_EDREQ_5_MASK) 3251 #define DMA_EARS_EDREQ_6_MASK (0x40U) 3252 #define DMA_EARS_EDREQ_6_SHIFT (6U) 3253 /*! EDREQ_6 - Enable asynchronous DMA request in stop mode for channel 6 3254 * 0b0..Disable asynchronous DMA request for channel 6. 3255 * 0b1..Enable asynchronous DMA request for channel 6. 3256 */ 3257 #define DMA_EARS_EDREQ_6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_6_SHIFT)) & DMA_EARS_EDREQ_6_MASK) 3258 #define DMA_EARS_EDREQ_7_MASK (0x80U) 3259 #define DMA_EARS_EDREQ_7_SHIFT (7U) 3260 /*! EDREQ_7 - Enable asynchronous DMA request in stop mode for channel 7 3261 * 0b0..Disable asynchronous DMA request for channel 7. 3262 * 0b1..Enable asynchronous DMA request for channel 7. 3263 */ 3264 #define DMA_EARS_EDREQ_7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_7_SHIFT)) & DMA_EARS_EDREQ_7_MASK) 3265 /*! @} */ 3266 3267 /*! @name DCHPRI3 - Channel Priority Register */ 3268 /*! @{ */ 3269 #define DMA_DCHPRI3_CHPRI_MASK (0x7U) 3270 #define DMA_DCHPRI3_CHPRI_SHIFT (0U) 3271 #define DMA_DCHPRI3_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_CHPRI_SHIFT)) & DMA_DCHPRI3_CHPRI_MASK) 3272 #define DMA_DCHPRI3_DPA_MASK (0x40U) 3273 #define DMA_DCHPRI3_DPA_SHIFT (6U) 3274 /*! DPA - Disable Preempt Ability. This field resets to 0. 3275 * 0b0..Channel n can suspend a lower priority channel. 3276 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3277 */ 3278 #define DMA_DCHPRI3_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_DPA_SHIFT)) & DMA_DCHPRI3_DPA_MASK) 3279 #define DMA_DCHPRI3_ECP_MASK (0x80U) 3280 #define DMA_DCHPRI3_ECP_SHIFT (7U) 3281 /*! ECP - Enable Channel Preemption. This field resets to 0. 3282 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3283 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3284 */ 3285 #define DMA_DCHPRI3_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_ECP_SHIFT)) & DMA_DCHPRI3_ECP_MASK) 3286 /*! @} */ 3287 3288 /*! @name DCHPRI2 - Channel Priority Register */ 3289 /*! @{ */ 3290 #define DMA_DCHPRI2_CHPRI_MASK (0x7U) 3291 #define DMA_DCHPRI2_CHPRI_SHIFT (0U) 3292 #define DMA_DCHPRI2_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_CHPRI_SHIFT)) & DMA_DCHPRI2_CHPRI_MASK) 3293 #define DMA_DCHPRI2_DPA_MASK (0x40U) 3294 #define DMA_DCHPRI2_DPA_SHIFT (6U) 3295 /*! DPA - Disable Preempt Ability. This field resets to 0. 3296 * 0b0..Channel n can suspend a lower priority channel. 3297 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3298 */ 3299 #define DMA_DCHPRI2_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_DPA_SHIFT)) & DMA_DCHPRI2_DPA_MASK) 3300 #define DMA_DCHPRI2_ECP_MASK (0x80U) 3301 #define DMA_DCHPRI2_ECP_SHIFT (7U) 3302 /*! ECP - Enable Channel Preemption. This field resets to 0. 3303 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3304 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3305 */ 3306 #define DMA_DCHPRI2_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_ECP_SHIFT)) & DMA_DCHPRI2_ECP_MASK) 3307 /*! @} */ 3308 3309 /*! @name DCHPRI1 - Channel Priority Register */ 3310 /*! @{ */ 3311 #define DMA_DCHPRI1_CHPRI_MASK (0x7U) 3312 #define DMA_DCHPRI1_CHPRI_SHIFT (0U) 3313 #define DMA_DCHPRI1_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_CHPRI_SHIFT)) & DMA_DCHPRI1_CHPRI_MASK) 3314 #define DMA_DCHPRI1_DPA_MASK (0x40U) 3315 #define DMA_DCHPRI1_DPA_SHIFT (6U) 3316 /*! DPA - Disable Preempt Ability. This field resets to 0. 3317 * 0b0..Channel n can suspend a lower priority channel. 3318 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3319 */ 3320 #define DMA_DCHPRI1_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_DPA_SHIFT)) & DMA_DCHPRI1_DPA_MASK) 3321 #define DMA_DCHPRI1_ECP_MASK (0x80U) 3322 #define DMA_DCHPRI1_ECP_SHIFT (7U) 3323 /*! ECP - Enable Channel Preemption. This field resets to 0. 3324 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3325 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3326 */ 3327 #define DMA_DCHPRI1_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_ECP_SHIFT)) & DMA_DCHPRI1_ECP_MASK) 3328 /*! @} */ 3329 3330 /*! @name DCHPRI0 - Channel Priority Register */ 3331 /*! @{ */ 3332 #define DMA_DCHPRI0_CHPRI_MASK (0x7U) 3333 #define DMA_DCHPRI0_CHPRI_SHIFT (0U) 3334 #define DMA_DCHPRI0_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_CHPRI_SHIFT)) & DMA_DCHPRI0_CHPRI_MASK) 3335 #define DMA_DCHPRI0_DPA_MASK (0x40U) 3336 #define DMA_DCHPRI0_DPA_SHIFT (6U) 3337 /*! DPA - Disable Preempt Ability. This field resets to 0. 3338 * 0b0..Channel n can suspend a lower priority channel. 3339 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3340 */ 3341 #define DMA_DCHPRI0_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_DPA_SHIFT)) & DMA_DCHPRI0_DPA_MASK) 3342 #define DMA_DCHPRI0_ECP_MASK (0x80U) 3343 #define DMA_DCHPRI0_ECP_SHIFT (7U) 3344 /*! ECP - Enable Channel Preemption. This field resets to 0. 3345 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3346 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3347 */ 3348 #define DMA_DCHPRI0_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_ECP_SHIFT)) & DMA_DCHPRI0_ECP_MASK) 3349 /*! @} */ 3350 3351 /*! @name DCHPRI7 - Channel Priority Register */ 3352 /*! @{ */ 3353 #define DMA_DCHPRI7_CHPRI_MASK (0x7U) 3354 #define DMA_DCHPRI7_CHPRI_SHIFT (0U) 3355 #define DMA_DCHPRI7_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_CHPRI_SHIFT)) & DMA_DCHPRI7_CHPRI_MASK) 3356 #define DMA_DCHPRI7_DPA_MASK (0x40U) 3357 #define DMA_DCHPRI7_DPA_SHIFT (6U) 3358 /*! DPA - Disable Preempt Ability. This field resets to 0. 3359 * 0b0..Channel n can suspend a lower priority channel. 3360 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3361 */ 3362 #define DMA_DCHPRI7_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_DPA_SHIFT)) & DMA_DCHPRI7_DPA_MASK) 3363 #define DMA_DCHPRI7_ECP_MASK (0x80U) 3364 #define DMA_DCHPRI7_ECP_SHIFT (7U) 3365 /*! ECP - Enable Channel Preemption. This field resets to 0. 3366 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3367 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3368 */ 3369 #define DMA_DCHPRI7_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_ECP_SHIFT)) & DMA_DCHPRI7_ECP_MASK) 3370 /*! @} */ 3371 3372 /*! @name DCHPRI6 - Channel Priority Register */ 3373 /*! @{ */ 3374 #define DMA_DCHPRI6_CHPRI_MASK (0x7U) 3375 #define DMA_DCHPRI6_CHPRI_SHIFT (0U) 3376 #define DMA_DCHPRI6_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_CHPRI_SHIFT)) & DMA_DCHPRI6_CHPRI_MASK) 3377 #define DMA_DCHPRI6_DPA_MASK (0x40U) 3378 #define DMA_DCHPRI6_DPA_SHIFT (6U) 3379 /*! DPA - Disable Preempt Ability. This field resets to 0. 3380 * 0b0..Channel n can suspend a lower priority channel. 3381 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3382 */ 3383 #define DMA_DCHPRI6_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_DPA_SHIFT)) & DMA_DCHPRI6_DPA_MASK) 3384 #define DMA_DCHPRI6_ECP_MASK (0x80U) 3385 #define DMA_DCHPRI6_ECP_SHIFT (7U) 3386 /*! ECP - Enable Channel Preemption. This field resets to 0. 3387 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3388 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3389 */ 3390 #define DMA_DCHPRI6_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_ECP_SHIFT)) & DMA_DCHPRI6_ECP_MASK) 3391 /*! @} */ 3392 3393 /*! @name DCHPRI5 - Channel Priority Register */ 3394 /*! @{ */ 3395 #define DMA_DCHPRI5_CHPRI_MASK (0x7U) 3396 #define DMA_DCHPRI5_CHPRI_SHIFT (0U) 3397 #define DMA_DCHPRI5_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_CHPRI_SHIFT)) & DMA_DCHPRI5_CHPRI_MASK) 3398 #define DMA_DCHPRI5_DPA_MASK (0x40U) 3399 #define DMA_DCHPRI5_DPA_SHIFT (6U) 3400 /*! DPA - Disable Preempt Ability. This field resets to 0. 3401 * 0b0..Channel n can suspend a lower priority channel. 3402 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3403 */ 3404 #define DMA_DCHPRI5_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_DPA_SHIFT)) & DMA_DCHPRI5_DPA_MASK) 3405 #define DMA_DCHPRI5_ECP_MASK (0x80U) 3406 #define DMA_DCHPRI5_ECP_SHIFT (7U) 3407 /*! ECP - Enable Channel Preemption. This field resets to 0. 3408 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3409 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3410 */ 3411 #define DMA_DCHPRI5_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_ECP_SHIFT)) & DMA_DCHPRI5_ECP_MASK) 3412 /*! @} */ 3413 3414 /*! @name DCHPRI4 - Channel Priority Register */ 3415 /*! @{ */ 3416 #define DMA_DCHPRI4_CHPRI_MASK (0x7U) 3417 #define DMA_DCHPRI4_CHPRI_SHIFT (0U) 3418 #define DMA_DCHPRI4_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_CHPRI_SHIFT)) & DMA_DCHPRI4_CHPRI_MASK) 3419 #define DMA_DCHPRI4_DPA_MASK (0x40U) 3420 #define DMA_DCHPRI4_DPA_SHIFT (6U) 3421 /*! DPA - Disable Preempt Ability. This field resets to 0. 3422 * 0b0..Channel n can suspend a lower priority channel. 3423 * 0b1..Channel n cannot suspend any channel, regardless of channel priority. 3424 */ 3425 #define DMA_DCHPRI4_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_DPA_SHIFT)) & DMA_DCHPRI4_DPA_MASK) 3426 #define DMA_DCHPRI4_ECP_MASK (0x80U) 3427 #define DMA_DCHPRI4_ECP_SHIFT (7U) 3428 /*! ECP - Enable Channel Preemption. This field resets to 0. 3429 * 0b0..Channel n cannot be suspended by a higher priority channel's service request. 3430 * 0b1..Channel n can be temporarily suspended by the service request of a higher priority channel. 3431 */ 3432 #define DMA_DCHPRI4_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_ECP_SHIFT)) & DMA_DCHPRI4_ECP_MASK) 3433 /*! @} */ 3434 3435 /*! @name SADDR - TCD Source Address */ 3436 /*! @{ */ 3437 #define DMA_SADDR_SADDR_MASK (0xFFFFFFFFU) 3438 #define DMA_SADDR_SADDR_SHIFT (0U) 3439 #define DMA_SADDR_SADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_SADDR_SADDR_SHIFT)) & DMA_SADDR_SADDR_MASK) 3440 /*! @} */ 3441 3442 /* The count of DMA_SADDR */ 3443 #define DMA_SADDR_COUNT (8U) 3444 3445 /*! @name SOFF - TCD Signed Source Address Offset */ 3446 /*! @{ */ 3447 #define DMA_SOFF_SOFF_MASK (0xFFFFU) 3448 #define DMA_SOFF_SOFF_SHIFT (0U) 3449 #define DMA_SOFF_SOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_SOFF_SOFF_SHIFT)) & DMA_SOFF_SOFF_MASK) 3450 /*! @} */ 3451 3452 /* The count of DMA_SOFF */ 3453 #define DMA_SOFF_COUNT (8U) 3454 3455 /*! @name ATTR - TCD Transfer Attributes */ 3456 /*! @{ */ 3457 #define DMA_ATTR_DSIZE_MASK (0x7U) 3458 #define DMA_ATTR_DSIZE_SHIFT (0U) 3459 #define DMA_ATTR_DSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DSIZE_SHIFT)) & DMA_ATTR_DSIZE_MASK) 3460 #define DMA_ATTR_DMOD_MASK (0xF8U) 3461 #define DMA_ATTR_DMOD_SHIFT (3U) 3462 #define DMA_ATTR_DMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DMOD_SHIFT)) & DMA_ATTR_DMOD_MASK) 3463 #define DMA_ATTR_SSIZE_MASK (0x700U) 3464 #define DMA_ATTR_SSIZE_SHIFT (8U) 3465 /*! SSIZE - Source data transfer size 3466 * 0b000..8-bit 3467 * 0b001..16-bit 3468 * 0b010..32-bit 3469 * 0b011..Reserved 3470 * 0b100..16-byte 3471 * 0b101..32-byte 3472 * 0b110..Reserved 3473 * 0b111..Reserved 3474 */ 3475 #define DMA_ATTR_SSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SSIZE_SHIFT)) & DMA_ATTR_SSIZE_MASK) 3476 #define DMA_ATTR_SMOD_MASK (0xF800U) 3477 #define DMA_ATTR_SMOD_SHIFT (11U) 3478 /*! SMOD - Source Address Modulo 3479 * 0b00000..Source address modulo feature is disabled 3480 * 0b00001-0b11111..This value defines a specific address range specified to be the value after SADDR + SOFF 3481 * calculation is performed on the original register value. Setting this field provides the ability 3482 * to implement a circular data queue easily. For data queues requiring power-of-2 size bytes, the 3483 * queue should start at a 0-modulo-size address and the SMOD field should be set to the 3484 * appropriate value for the queue, freezing the desired number of upper address bits. The value 3485 * programmed into this field specifies the number of lower address bits allowed to change. For a 3486 * circular queue application, the SOFF is typically set to the transfer size to implement 3487 * post-increment addressing with the SMOD function constraining the addresses to a 0-modulo-size range. 3488 */ 3489 #define DMA_ATTR_SMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SMOD_SHIFT)) & DMA_ATTR_SMOD_MASK) 3490 /*! @} */ 3491 3492 /* The count of DMA_ATTR */ 3493 #define DMA_ATTR_COUNT (8U) 3494 3495 /*! @name NBYTES_MLNO - TCD Minor Byte Count (Minor Loop Mapping Disabled) */ 3496 /*! @{ */ 3497 #define DMA_NBYTES_MLNO_NBYTES_MASK (0xFFFFFFFFU) 3498 #define DMA_NBYTES_MLNO_NBYTES_SHIFT (0U) 3499 #define DMA_NBYTES_MLNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLNO_NBYTES_SHIFT)) & DMA_NBYTES_MLNO_NBYTES_MASK) 3500 /*! @} */ 3501 3502 /* The count of DMA_NBYTES_MLNO */ 3503 #define DMA_NBYTES_MLNO_COUNT (8U) 3504 3505 /*! @name NBYTES_MLOFFNO - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled) */ 3506 /*! @{ */ 3507 #define DMA_NBYTES_MLOFFNO_NBYTES_MASK (0x3FFFFFFFU) 3508 #define DMA_NBYTES_MLOFFNO_NBYTES_SHIFT (0U) 3509 #define DMA_NBYTES_MLOFFNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFNO_NBYTES_MASK) 3510 #define DMA_NBYTES_MLOFFNO_DMLOE_MASK (0x40000000U) 3511 #define DMA_NBYTES_MLOFFNO_DMLOE_SHIFT (30U) 3512 /*! DMLOE - Destination Minor Loop Offset enable 3513 * 0b0..The minor loop offset is not applied to the DADDR 3514 * 0b1..The minor loop offset is applied to the DADDR 3515 */ 3516 #define DMA_NBYTES_MLOFFNO_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_DMLOE_MASK) 3517 #define DMA_NBYTES_MLOFFNO_SMLOE_MASK (0x80000000U) 3518 #define DMA_NBYTES_MLOFFNO_SMLOE_SHIFT (31U) 3519 /*! SMLOE - Source Minor Loop Offset Enable 3520 * 0b0..The minor loop offset is not applied to the SADDR 3521 * 0b1..The minor loop offset is applied to the SADDR 3522 */ 3523 #define DMA_NBYTES_MLOFFNO_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_SMLOE_MASK) 3524 /*! @} */ 3525 3526 /* The count of DMA_NBYTES_MLOFFNO */ 3527 #define DMA_NBYTES_MLOFFNO_COUNT (8U) 3528 3529 /*! @name NBYTES_MLOFFYES - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled) */ 3530 /*! @{ */ 3531 #define DMA_NBYTES_MLOFFYES_NBYTES_MASK (0x3FFU) 3532 #define DMA_NBYTES_MLOFFYES_NBYTES_SHIFT (0U) 3533 #define DMA_NBYTES_MLOFFYES_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFYES_NBYTES_MASK) 3534 #define DMA_NBYTES_MLOFFYES_MLOFF_MASK (0x3FFFFC00U) 3535 #define DMA_NBYTES_MLOFFYES_MLOFF_SHIFT (10U) 3536 #define DMA_NBYTES_MLOFFYES_MLOFF(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_MLOFF_SHIFT)) & DMA_NBYTES_MLOFFYES_MLOFF_MASK) 3537 #define DMA_NBYTES_MLOFFYES_DMLOE_MASK (0x40000000U) 3538 #define DMA_NBYTES_MLOFFYES_DMLOE_SHIFT (30U) 3539 /*! DMLOE - Destination Minor Loop Offset enable 3540 * 0b0..The minor loop offset is not applied to the DADDR 3541 * 0b1..The minor loop offset is applied to the DADDR 3542 */ 3543 #define DMA_NBYTES_MLOFFYES_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_DMLOE_MASK) 3544 #define DMA_NBYTES_MLOFFYES_SMLOE_MASK (0x80000000U) 3545 #define DMA_NBYTES_MLOFFYES_SMLOE_SHIFT (31U) 3546 /*! SMLOE - Source Minor Loop Offset Enable 3547 * 0b0..The minor loop offset is not applied to the SADDR 3548 * 0b1..The minor loop offset is applied to the SADDR 3549 */ 3550 #define DMA_NBYTES_MLOFFYES_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_SMLOE_MASK) 3551 /*! @} */ 3552 3553 /* The count of DMA_NBYTES_MLOFFYES */ 3554 #define DMA_NBYTES_MLOFFYES_COUNT (8U) 3555 3556 /*! @name SLAST - TCD Last Source Address Adjustment */ 3557 /*! @{ */ 3558 #define DMA_SLAST_SLAST_MASK (0xFFFFFFFFU) 3559 #define DMA_SLAST_SLAST_SHIFT (0U) 3560 #define DMA_SLAST_SLAST(x) (((uint32_t)(((uint32_t)(x)) << DMA_SLAST_SLAST_SHIFT)) & DMA_SLAST_SLAST_MASK) 3561 /*! @} */ 3562 3563 /* The count of DMA_SLAST */ 3564 #define DMA_SLAST_COUNT (8U) 3565 3566 /*! @name DADDR - TCD Destination Address */ 3567 /*! @{ */ 3568 #define DMA_DADDR_DADDR_MASK (0xFFFFFFFFU) 3569 #define DMA_DADDR_DADDR_SHIFT (0U) 3570 #define DMA_DADDR_DADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_DADDR_DADDR_SHIFT)) & DMA_DADDR_DADDR_MASK) 3571 /*! @} */ 3572 3573 /* The count of DMA_DADDR */ 3574 #define DMA_DADDR_COUNT (8U) 3575 3576 /*! @name DOFF - TCD Signed Destination Address Offset */ 3577 /*! @{ */ 3578 #define DMA_DOFF_DOFF_MASK (0xFFFFU) 3579 #define DMA_DOFF_DOFF_SHIFT (0U) 3580 #define DMA_DOFF_DOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_DOFF_DOFF_SHIFT)) & DMA_DOFF_DOFF_MASK) 3581 /*! @} */ 3582 3583 /* The count of DMA_DOFF */ 3584 #define DMA_DOFF_COUNT (8U) 3585 3586 /*! @name CITER_ELINKNO - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) */ 3587 /*! @{ */ 3588 #define DMA_CITER_ELINKNO_CITER_MASK (0x7FFFU) 3589 #define DMA_CITER_ELINKNO_CITER_SHIFT (0U) 3590 #define DMA_CITER_ELINKNO_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_CITER_SHIFT)) & DMA_CITER_ELINKNO_CITER_MASK) 3591 #define DMA_CITER_ELINKNO_ELINK_MASK (0x8000U) 3592 #define DMA_CITER_ELINKNO_ELINK_SHIFT (15U) 3593 /*! ELINK - Enable channel-to-channel linking on minor-loop complete 3594 * 0b0..The channel-to-channel linking is disabled 3595 * 0b1..The channel-to-channel linking is enabled 3596 */ 3597 #define DMA_CITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_ELINK_SHIFT)) & DMA_CITER_ELINKNO_ELINK_MASK) 3598 /*! @} */ 3599 3600 /* The count of DMA_CITER_ELINKNO */ 3601 #define DMA_CITER_ELINKNO_COUNT (8U) 3602 3603 /*! @name CITER_ELINKYES - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) */ 3604 /*! @{ */ 3605 #define DMA_CITER_ELINKYES_CITER_MASK (0x1FFU) 3606 #define DMA_CITER_ELINKYES_CITER_SHIFT (0U) 3607 #define DMA_CITER_ELINKYES_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_CITER_SHIFT)) & DMA_CITER_ELINKYES_CITER_MASK) 3608 #define DMA_CITER_ELINKYES_LINKCH_MASK (0xE00U) 3609 #define DMA_CITER_ELINKYES_LINKCH_SHIFT (9U) 3610 #define DMA_CITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_LINKCH_SHIFT)) & DMA_CITER_ELINKYES_LINKCH_MASK) 3611 #define DMA_CITER_ELINKYES_ELINK_MASK (0x8000U) 3612 #define DMA_CITER_ELINKYES_ELINK_SHIFT (15U) 3613 /*! ELINK - Enable channel-to-channel linking on minor-loop complete 3614 * 0b0..The channel-to-channel linking is disabled 3615 * 0b1..The channel-to-channel linking is enabled 3616 */ 3617 #define DMA_CITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_ELINK_SHIFT)) & DMA_CITER_ELINKYES_ELINK_MASK) 3618 /*! @} */ 3619 3620 /* The count of DMA_CITER_ELINKYES */ 3621 #define DMA_CITER_ELINKYES_COUNT (8U) 3622 3623 /*! @name DLAST_SGA - TCD Last Destination Address Adjustment/Scatter Gather Address */ 3624 /*! @{ */ 3625 #define DMA_DLAST_SGA_DLASTSGA_MASK (0xFFFFFFFFU) 3626 #define DMA_DLAST_SGA_DLASTSGA_SHIFT (0U) 3627 #define DMA_DLAST_SGA_DLASTSGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_DLAST_SGA_DLASTSGA_SHIFT)) & DMA_DLAST_SGA_DLASTSGA_MASK) 3628 /*! @} */ 3629 3630 /* The count of DMA_DLAST_SGA */ 3631 #define DMA_DLAST_SGA_COUNT (8U) 3632 3633 /*! @name CSR - TCD Control and Status */ 3634 /*! @{ */ 3635 #define DMA_CSR_START_MASK (0x1U) 3636 #define DMA_CSR_START_SHIFT (0U) 3637 /*! START - Channel Start 3638 * 0b0..The channel is not explicitly started. 3639 * 0b1..The channel is explicitly started via a software initiated service request. 3640 */ 3641 #define DMA_CSR_START(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_START_SHIFT)) & DMA_CSR_START_MASK) 3642 #define DMA_CSR_INTMAJOR_MASK (0x2U) 3643 #define DMA_CSR_INTMAJOR_SHIFT (1U) 3644 /*! INTMAJOR - Enable an interrupt when major iteration count completes. 3645 * 0b0..The end-of-major loop interrupt is disabled. 3646 * 0b1..The end-of-major loop interrupt is enabled. 3647 */ 3648 #define DMA_CSR_INTMAJOR(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTMAJOR_SHIFT)) & DMA_CSR_INTMAJOR_MASK) 3649 #define DMA_CSR_INTHALF_MASK (0x4U) 3650 #define DMA_CSR_INTHALF_SHIFT (2U) 3651 /*! INTHALF - Enable an interrupt when major counter is half complete. 3652 * 0b0..The half-point interrupt is disabled. 3653 * 0b1..The half-point interrupt is enabled. 3654 */ 3655 #define DMA_CSR_INTHALF(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTHALF_SHIFT)) & DMA_CSR_INTHALF_MASK) 3656 #define DMA_CSR_DREQ_MASK (0x8U) 3657 #define DMA_CSR_DREQ_SHIFT (3U) 3658 /*! DREQ - Disable Request 3659 * 0b0..The channel's ERQ bit is not affected. 3660 * 0b1..The channel's ERQ bit is cleared when the major loop is complete. 3661 */ 3662 #define DMA_CSR_DREQ(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DREQ_SHIFT)) & DMA_CSR_DREQ_MASK) 3663 #define DMA_CSR_ESG_MASK (0x10U) 3664 #define DMA_CSR_ESG_SHIFT (4U) 3665 /*! ESG - Enable Scatter/Gather Processing 3666 * 0b0..The current channel's TCD is normal format. 3667 * 0b1..The current channel's TCD specifies a scatter gather format. The DLASTSGA field provides a memory pointer 3668 * to the next TCD to be loaded into this channel after the major loop completes its execution. 3669 */ 3670 #define DMA_CSR_ESG(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ESG_SHIFT)) & DMA_CSR_ESG_MASK) 3671 #define DMA_CSR_MAJORELINK_MASK (0x20U) 3672 #define DMA_CSR_MAJORELINK_SHIFT (5U) 3673 /*! MAJORELINK - Enable channel-to-channel linking on major loop complete 3674 * 0b0..The channel-to-channel linking is disabled. 3675 * 0b1..The channel-to-channel linking is enabled. 3676 */ 3677 #define DMA_CSR_MAJORELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORELINK_SHIFT)) & DMA_CSR_MAJORELINK_MASK) 3678 #define DMA_CSR_ACTIVE_MASK (0x40U) 3679 #define DMA_CSR_ACTIVE_SHIFT (6U) 3680 #define DMA_CSR_ACTIVE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ACTIVE_SHIFT)) & DMA_CSR_ACTIVE_MASK) 3681 #define DMA_CSR_DONE_MASK (0x80U) 3682 #define DMA_CSR_DONE_SHIFT (7U) 3683 #define DMA_CSR_DONE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DONE_SHIFT)) & DMA_CSR_DONE_MASK) 3684 #define DMA_CSR_MAJORLINKCH_MASK (0x700U) 3685 #define DMA_CSR_MAJORLINKCH_SHIFT (8U) 3686 #define DMA_CSR_MAJORLINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORLINKCH_SHIFT)) & DMA_CSR_MAJORLINKCH_MASK) 3687 #define DMA_CSR_BWC_MASK (0xC000U) 3688 #define DMA_CSR_BWC_SHIFT (14U) 3689 /*! BWC - Bandwidth Control 3690 * 0b00..No eDMA engine stalls. 3691 * 0b01..Reserved 3692 * 0b10..eDMA engine stalls for 4 cycles after each R/W. 3693 * 0b11..eDMA engine stalls for 8 cycles after each R/W. 3694 */ 3695 #define DMA_CSR_BWC(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_BWC_SHIFT)) & DMA_CSR_BWC_MASK) 3696 /*! @} */ 3697 3698 /* The count of DMA_CSR */ 3699 #define DMA_CSR_COUNT (8U) 3700 3701 /*! @name BITER_ELINKNO - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) */ 3702 /*! @{ */ 3703 #define DMA_BITER_ELINKNO_BITER_MASK (0x7FFFU) 3704 #define DMA_BITER_ELINKNO_BITER_SHIFT (0U) 3705 #define DMA_BITER_ELINKNO_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_BITER_SHIFT)) & DMA_BITER_ELINKNO_BITER_MASK) 3706 #define DMA_BITER_ELINKNO_ELINK_MASK (0x8000U) 3707 #define DMA_BITER_ELINKNO_ELINK_SHIFT (15U) 3708 /*! ELINK - Enables channel-to-channel linking on minor loop complete 3709 * 0b0..The channel-to-channel linking is disabled 3710 * 0b1..The channel-to-channel linking is enabled 3711 */ 3712 #define DMA_BITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_ELINK_SHIFT)) & DMA_BITER_ELINKNO_ELINK_MASK) 3713 /*! @} */ 3714 3715 /* The count of DMA_BITER_ELINKNO */ 3716 #define DMA_BITER_ELINKNO_COUNT (8U) 3717 3718 /*! @name BITER_ELINKYES - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) */ 3719 /*! @{ */ 3720 #define DMA_BITER_ELINKYES_BITER_MASK (0x1FFU) 3721 #define DMA_BITER_ELINKYES_BITER_SHIFT (0U) 3722 #define DMA_BITER_ELINKYES_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_BITER_SHIFT)) & DMA_BITER_ELINKYES_BITER_MASK) 3723 #define DMA_BITER_ELINKYES_LINKCH_MASK (0xE00U) 3724 #define DMA_BITER_ELINKYES_LINKCH_SHIFT (9U) 3725 #define DMA_BITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_LINKCH_SHIFT)) & DMA_BITER_ELINKYES_LINKCH_MASK) 3726 #define DMA_BITER_ELINKYES_ELINK_MASK (0x8000U) 3727 #define DMA_BITER_ELINKYES_ELINK_SHIFT (15U) 3728 /*! ELINK - Enables channel-to-channel linking on minor loop complete 3729 * 0b0..The channel-to-channel linking is disabled 3730 * 0b1..The channel-to-channel linking is enabled 3731 */ 3732 #define DMA_BITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_ELINK_SHIFT)) & DMA_BITER_ELINKYES_ELINK_MASK) 3733 /*! @} */ 3734 3735 /* The count of DMA_BITER_ELINKYES */ 3736 #define DMA_BITER_ELINKYES_COUNT (8U) 3737 3738 3739 /*! 3740 * @} 3741 */ /* end of group DMA_Register_Masks */ 3742 3743 3744 /* DMA - Peripheral instance base addresses */ 3745 /** Peripheral DMA1 base address */ 3746 #define DMA1_BASE (0x41008000u) 3747 /** Peripheral DMA1 base pointer */ 3748 #define DMA1 ((DMA_Type *)DMA1_BASE) 3749 /** Array initializer of DMA peripheral base addresses */ 3750 #define DMA_BASE_ADDRS { 0u, DMA1_BASE } 3751 /** Array initializer of DMA peripheral base pointers */ 3752 #define DMA_BASE_PTRS { (DMA_Type *)0u, DMA1 } 3753 /** Interrupt vectors for the DMA peripheral type */ 3754 #define DMA_CHN_IRQS { { NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn }, { DMA1_04_IRQn, DMA1_15_IRQn, DMA1_26_IRQn, DMA1_37_IRQn, DMA1_04_IRQn, DMA1_15_IRQn, DMA1_26_IRQn, DMA1_37_IRQn } } 3755 #define DMA_ERROR_IRQS { NotAvail_IRQn, DMA1_Error_IRQn } 3756 3757 /*! 3758 * @} 3759 */ /* end of group DMA_Peripheral_Access_Layer */ 3760 3761 3762 /* ---------------------------------------------------------------------------- 3763 -- DMAMUX Peripheral Access Layer 3764 ---------------------------------------------------------------------------- */ 3765 3766 /*! 3767 * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer 3768 * @{ 3769 */ 3770 3771 /** DMAMUX - Register Layout Typedef */ 3772 typedef struct { 3773 __IO uint32_t CHCFG[8]; /**< Channel 0 Configuration Register..Channel 7 Configuration Register, array offset: 0x0, array step: 0x4 */ 3774 } DMAMUX_Type; 3775 3776 /* ---------------------------------------------------------------------------- 3777 -- DMAMUX Register Masks 3778 ---------------------------------------------------------------------------- */ 3779 3780 /*! 3781 * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks 3782 * @{ 3783 */ 3784 3785 /*! @name CHCFG - Channel 0 Configuration Register..Channel 7 Configuration Register */ 3786 /*! @{ */ 3787 #define DMAMUX_CHCFG_SOURCE_MASK (0x1FU) 3788 #define DMAMUX_CHCFG_SOURCE_SHIFT (0U) 3789 #define DMAMUX_CHCFG_SOURCE(x) (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK) 3790 #define DMAMUX_CHCFG_A_ON_MASK (0x20000000U) 3791 #define DMAMUX_CHCFG_A_ON_SHIFT (29U) 3792 /*! A_ON - DMA Channel Always Enable 3793 * 0b0..DMA Channel Always ON function is disabled 3794 * 0b1..DMA Channel Always ON function is enabled 3795 */ 3796 #define DMAMUX_CHCFG_A_ON(x) (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_A_ON_SHIFT)) & DMAMUX_CHCFG_A_ON_MASK) 3797 #define DMAMUX_CHCFG_TRIG_MASK (0x40000000U) 3798 #define DMAMUX_CHCFG_TRIG_SHIFT (30U) 3799 /*! TRIG - DMA Channel Trigger Enable 3800 * 0b0..Triggering is disabled. If triggering is disabled and ENBL is set, the DMA Channel will simply route the 3801 * specified source to the DMA channel. (Normal mode) 3802 * 0b1..Triggering is enabled. If triggering is enabled and ENBL is set, the DMA_CH_MUX is in Periodic Trigger mode. 3803 */ 3804 #define DMAMUX_CHCFG_TRIG(x) (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK) 3805 #define DMAMUX_CHCFG_ENBL_MASK (0x80000000U) 3806 #define DMAMUX_CHCFG_ENBL_SHIFT (31U) 3807 /*! ENBL - DMA Mux Channel Enable 3808 * 0b0..DMA Mux channel is disabled 3809 * 0b1..DMA Mux channel is enabled 3810 */ 3811 #define DMAMUX_CHCFG_ENBL(x) (((uint32_t)(((uint32_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK) 3812 /*! @} */ 3813 3814 /* The count of DMAMUX_CHCFG */ 3815 #define DMAMUX_CHCFG_COUNT (8U) 3816 3817 3818 /*! 3819 * @} 3820 */ /* end of group DMAMUX_Register_Masks */ 3821 3822 3823 /* DMAMUX - Peripheral instance base addresses */ 3824 /** Peripheral DMAMUX1 base address */ 3825 #define DMAMUX1_BASE (0x41021000u) 3826 /** Peripheral DMAMUX1 base pointer */ 3827 #define DMAMUX1 ((DMAMUX_Type *)DMAMUX1_BASE) 3828 /** Array initializer of DMAMUX peripheral base addresses */ 3829 #define DMAMUX_BASE_ADDRS { 0u, DMAMUX1_BASE } 3830 /** Array initializer of DMAMUX peripheral base pointers */ 3831 #define DMAMUX_BASE_PTRS { (DMAMUX_Type *)0u, DMAMUX1 } 3832 3833 /*! 3834 * @} 3835 */ /* end of group DMAMUX_Peripheral_Access_Layer */ 3836 3837 3838 /* ---------------------------------------------------------------------------- 3839 -- EMVSIM Peripheral Access Layer 3840 ---------------------------------------------------------------------------- */ 3841 3842 /*! 3843 * @addtogroup EMVSIM_Peripheral_Access_Layer EMVSIM Peripheral Access Layer 3844 * @{ 3845 */ 3846 3847 /** EMVSIM - Register Layout Typedef */ 3848 typedef struct { 3849 __I uint32_t VER_ID; /**< Version ID Register, offset: 0x0 */ 3850 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 3851 __IO uint32_t CLKCFG; /**< Clock Configuration Register, offset: 0x8 */ 3852 __IO uint32_t DIVISOR; /**< Baud Rate Divisor Register, offset: 0xC */ 3853 __IO uint32_t CTRL; /**< Control Register, offset: 0x10 */ 3854 __IO uint32_t INT_MASK; /**< Interrupt Mask Register, offset: 0x14 */ 3855 __IO uint32_t RX_THD; /**< Receiver Threshold Register, offset: 0x18 */ 3856 __IO uint32_t TX_THD; /**< Transmitter Threshold Register, offset: 0x1C */ 3857 __IO uint32_t RX_STATUS; /**< Receive Status Register, offset: 0x20 */ 3858 __IO uint32_t TX_STATUS; /**< Transmitter Status Register, offset: 0x24 */ 3859 __IO uint32_t PCSR; /**< Port Control and Status Register, offset: 0x28 */ 3860 __I uint32_t RX_BUF; /**< Receive Data Read Buffer, offset: 0x2C */ 3861 __O uint32_t TX_BUF; /**< Transmit Data Buffer, offset: 0x30 */ 3862 __IO uint32_t TX_GETU; /**< Transmitter Guard ETU Value Register, offset: 0x34 */ 3863 __IO uint32_t CWT_VAL; /**< Character Wait Time Value Register, offset: 0x38 */ 3864 __IO uint32_t BWT_VAL; /**< Block Wait Time Value Register, offset: 0x3C */ 3865 __IO uint32_t BGT_VAL; /**< Block Guard Time Value Register, offset: 0x40 */ 3866 __IO uint32_t GPCNT0_VAL; /**< General Purpose Counter 0 Timeout Value Register, offset: 0x44 */ 3867 __IO uint32_t GPCNT1_VAL; /**< General Purpose Counter 1 Timeout Value, offset: 0x48 */ 3868 } EMVSIM_Type; 3869 3870 /* ---------------------------------------------------------------------------- 3871 -- EMVSIM Register Masks 3872 ---------------------------------------------------------------------------- */ 3873 3874 /*! 3875 * @addtogroup EMVSIM_Register_Masks EMVSIM Register Masks 3876 * @{ 3877 */ 3878 3879 /*! @name VER_ID - Version ID Register */ 3880 /*! @{ */ 3881 #define EMVSIM_VER_ID_VER_MASK (0xFFFFFFFFU) 3882 #define EMVSIM_VER_ID_VER_SHIFT (0U) 3883 #define EMVSIM_VER_ID_VER(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_VER_ID_VER_SHIFT)) & EMVSIM_VER_ID_VER_MASK) 3884 /*! @} */ 3885 3886 /*! @name PARAM - Parameter Register */ 3887 /*! @{ */ 3888 #define EMVSIM_PARAM_RX_FIFO_DEPTH_MASK (0xFFU) 3889 #define EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT (0U) 3890 #define EMVSIM_PARAM_RX_FIFO_DEPTH(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_RX_FIFO_DEPTH_MASK) 3891 #define EMVSIM_PARAM_TX_FIFO_DEPTH_MASK (0xFF00U) 3892 #define EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT (8U) 3893 #define EMVSIM_PARAM_TX_FIFO_DEPTH(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_TX_FIFO_DEPTH_MASK) 3894 /*! @} */ 3895 3896 /*! @name CLKCFG - Clock Configuration Register */ 3897 /*! @{ */ 3898 #define EMVSIM_CLKCFG_CLK_PRSC_MASK (0xFFU) 3899 #define EMVSIM_CLKCFG_CLK_PRSC_SHIFT (0U) 3900 /*! CLK_PRSC - Clock Prescaler Value 3901 * 0b00000010..Divide by 2 3902 */ 3903 #define EMVSIM_CLKCFG_CLK_PRSC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_CLK_PRSC_SHIFT)) & EMVSIM_CLKCFG_CLK_PRSC_MASK) 3904 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK (0x300U) 3905 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT (8U) 3906 /*! GPCNT1_CLK_SEL - General Purpose Counter 1 Clock Select 3907 * 0b00..Disabled / Reset (default) 3908 * 0b01..Card Clock 3909 * 0b10..Receive Clock 3910 * 0b11..ETU Clock (transmit clock) 3911 */ 3912 #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK) 3913 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK (0xC00U) 3914 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT (10U) 3915 /*! GPCNT0_CLK_SEL - General Purpose Counter 0 Clock Select 3916 * 0b00..Disabled / Reset (default) 3917 * 0b01..Card Clock 3918 * 0b10..Receive Clock 3919 * 0b11..ETU Clock (transmit clock) 3920 */ 3921 #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK) 3922 /*! @} */ 3923 3924 /*! @name DIVISOR - Baud Rate Divisor Register */ 3925 /*! @{ */ 3926 #define EMVSIM_DIVISOR_DIVISOR_VALUE_MASK (0x1FFU) 3927 #define EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT (0U) 3928 /*! DIVISOR_VALUE - Divisor (F/D) Value 3929 * 0b000000000-0b000000100..Invalid. As per ISO 7816 specification, minimum value of F/D is 5 3930 * 0b101110100..Divisor value for F = 372 and D = 1 (default) 3931 */ 3932 #define EMVSIM_DIVISOR_DIVISOR_VALUE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT)) & EMVSIM_DIVISOR_DIVISOR_VALUE_MASK) 3933 /*! @} */ 3934 3935 /*! @name CTRL - Control Register */ 3936 /*! @{ */ 3937 #define EMVSIM_CTRL_IC_MASK (0x1U) 3938 #define EMVSIM_CTRL_IC_SHIFT (0U) 3939 /*! IC - Inverse Convention 3940 * 0b0..Direction convention transfers enabled (default) 3941 * 0b1..Inverse convention transfers enabled 3942 */ 3943 #define EMVSIM_CTRL_IC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_IC_SHIFT)) & EMVSIM_CTRL_IC_MASK) 3944 #define EMVSIM_CTRL_ICM_MASK (0x2U) 3945 #define EMVSIM_CTRL_ICM_SHIFT (1U) 3946 /*! ICM - Initial Character Mode 3947 * 0b0..Initial Character Mode disabled 3948 * 0b1..Initial Character Mode enabled (default) 3949 */ 3950 #define EMVSIM_CTRL_ICM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ICM_SHIFT)) & EMVSIM_CTRL_ICM_MASK) 3951 #define EMVSIM_CTRL_ANACK_MASK (0x4U) 3952 #define EMVSIM_CTRL_ANACK_SHIFT (2U) 3953 /*! ANACK - Auto NACK Enable 3954 * 0b0..NACK generation on errors disabled 3955 * 0b1..NACK generation on errors enabled (default) 3956 */ 3957 #define EMVSIM_CTRL_ANACK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ANACK_SHIFT)) & EMVSIM_CTRL_ANACK_MASK) 3958 #define EMVSIM_CTRL_ONACK_MASK (0x8U) 3959 #define EMVSIM_CTRL_ONACK_SHIFT (3U) 3960 /*! ONACK - Overrun NACK Enable 3961 * 0b0..NACK generation on overrun is disabled (default) 3962 * 0b1..NACK generation on overrun is enabled 3963 */ 3964 #define EMVSIM_CTRL_ONACK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ONACK_SHIFT)) & EMVSIM_CTRL_ONACK_MASK) 3965 #define EMVSIM_CTRL_FLSH_RX_MASK (0x100U) 3966 #define EMVSIM_CTRL_FLSH_RX_SHIFT (8U) 3967 /*! FLSH_RX - Flush Receiver Bit 3968 * 0b0..EMV SIM Receiver normal operation (default) 3969 * 0b1..EMV SIM Receiver held in Reset 3970 */ 3971 #define EMVSIM_CTRL_FLSH_RX(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_RX_SHIFT)) & EMVSIM_CTRL_FLSH_RX_MASK) 3972 #define EMVSIM_CTRL_FLSH_TX_MASK (0x200U) 3973 #define EMVSIM_CTRL_FLSH_TX_SHIFT (9U) 3974 /*! FLSH_TX - Flush Transmitter Bit 3975 * 0b0..EMV SIM Transmitter normal operation (default) 3976 * 0b1..EMV SIM Transmitter held in Reset 3977 */ 3978 #define EMVSIM_CTRL_FLSH_TX(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_TX_SHIFT)) & EMVSIM_CTRL_FLSH_TX_MASK) 3979 #define EMVSIM_CTRL_SW_RST_MASK (0x400U) 3980 #define EMVSIM_CTRL_SW_RST_SHIFT (10U) 3981 /*! SW_RST - Software Reset Bit 3982 * 0b0..EMV SIM Normal operation (default) 3983 * 0b1..EMV SIM held in Reset 3984 */ 3985 #define EMVSIM_CTRL_SW_RST(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_SW_RST_SHIFT)) & EMVSIM_CTRL_SW_RST_MASK) 3986 #define EMVSIM_CTRL_KILL_CLOCKS_MASK (0x800U) 3987 #define EMVSIM_CTRL_KILL_CLOCKS_SHIFT (11U) 3988 /*! KILL_CLOCKS - Kill all internal clocks 3989 * 0b0..EMV SIM input clock enabled (default) 3990 * 0b1..EMV SIM input clock is disabled 3991 */ 3992 #define EMVSIM_CTRL_KILL_CLOCKS(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_KILL_CLOCKS_SHIFT)) & EMVSIM_CTRL_KILL_CLOCKS_MASK) 3993 #define EMVSIM_CTRL_DOZE_EN_MASK (0x1000U) 3994 #define EMVSIM_CTRL_DOZE_EN_SHIFT (12U) 3995 /*! DOZE_EN - Doze Enable 3996 * 0b0..DOZE instruction will gate all internal EMV SIM clocks as well as the Smart Card clock when the transmit FIFO is empty (default) 3997 * 0b1..DOZE instruction has no effect on EMV SIM module 3998 */ 3999 #define EMVSIM_CTRL_DOZE_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_DOZE_EN_SHIFT)) & EMVSIM_CTRL_DOZE_EN_MASK) 4000 #define EMVSIM_CTRL_STOP_EN_MASK (0x2000U) 4001 #define EMVSIM_CTRL_STOP_EN_SHIFT (13U) 4002 /*! STOP_EN - STOP Enable 4003 * 0b0..STOP instruction shuts down all EMV SIM clocks (default) 4004 * 0b1..STOP instruction shuts down all clocks except for the Smart Card Clock (SCK) (clock provided to Smart Card) 4005 */ 4006 #define EMVSIM_CTRL_STOP_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_STOP_EN_SHIFT)) & EMVSIM_CTRL_STOP_EN_MASK) 4007 #define EMVSIM_CTRL_RCV_EN_MASK (0x10000U) 4008 #define EMVSIM_CTRL_RCV_EN_SHIFT (16U) 4009 /*! RCV_EN - Receiver Enable 4010 * 0b0..EMV SIM Receiver disabled (default) 4011 * 0b1..EMV SIM Receiver enabled 4012 */ 4013 #define EMVSIM_CTRL_RCV_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCV_EN_SHIFT)) & EMVSIM_CTRL_RCV_EN_MASK) 4014 #define EMVSIM_CTRL_XMT_EN_MASK (0x20000U) 4015 #define EMVSIM_CTRL_XMT_EN_SHIFT (17U) 4016 /*! XMT_EN - Transmitter Enable 4017 * 0b0..EMV SIM Transmitter disabled (default) 4018 * 0b1..EMV SIM Transmitter enabled 4019 */ 4020 #define EMVSIM_CTRL_XMT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_EN_SHIFT)) & EMVSIM_CTRL_XMT_EN_MASK) 4021 #define EMVSIM_CTRL_RCVR_11_MASK (0x40000U) 4022 #define EMVSIM_CTRL_RCVR_11_SHIFT (18U) 4023 /*! RCVR_11 - Receiver 11 ETU Mode Enable 4024 * 0b0..Receiver configured for 12 ETU operation mode (default) 4025 * 0b1..Receiver configured for 11 ETU operation mode 4026 */ 4027 #define EMVSIM_CTRL_RCVR_11(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCVR_11_SHIFT)) & EMVSIM_CTRL_RCVR_11_MASK) 4028 #define EMVSIM_CTRL_RX_DMA_EN_MASK (0x80000U) 4029 #define EMVSIM_CTRL_RX_DMA_EN_SHIFT (19U) 4030 /*! RX_DMA_EN - Receive DMA Enable 4031 * 0b0..No DMA Read Request asserted for Receiver (default) 4032 * 0b1..DMA Read Request asserted for Receiver 4033 */ 4034 #define EMVSIM_CTRL_RX_DMA_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RX_DMA_EN_SHIFT)) & EMVSIM_CTRL_RX_DMA_EN_MASK) 4035 #define EMVSIM_CTRL_TX_DMA_EN_MASK (0x100000U) 4036 #define EMVSIM_CTRL_TX_DMA_EN_SHIFT (20U) 4037 /*! TX_DMA_EN - Transmit DMA Enable 4038 * 0b0..No DMA Write Request asserted for Transmitter (default) 4039 * 0b1..DMA Write Request asserted for Transmitter 4040 */ 4041 #define EMVSIM_CTRL_TX_DMA_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_TX_DMA_EN_SHIFT)) & EMVSIM_CTRL_TX_DMA_EN_MASK) 4042 #define EMVSIM_CTRL_INV_CRC_VAL_MASK (0x1000000U) 4043 #define EMVSIM_CTRL_INV_CRC_VAL_SHIFT (24U) 4044 /*! INV_CRC_VAL - Invert bits in the CRC Output Value 4045 * 0b0..Bits in CRC Output value will not be inverted. 4046 * 0b1..Bits in CRC Output value will be inverted. (default) 4047 */ 4048 #define EMVSIM_CTRL_INV_CRC_VAL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_INV_CRC_VAL_SHIFT)) & EMVSIM_CTRL_INV_CRC_VAL_MASK) 4049 #define EMVSIM_CTRL_CRC_OUT_FLIP_MASK (0x2000000U) 4050 #define EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT (25U) 4051 /*! CRC_OUT_FLIP - CRC Output Value Bit Reversal or Flip 4052 * 0b0..Bits within the CRC output bytes will not be reversed i.e. 15:0 will remain 15:0 (default) 4053 * 0b1..Bits within the CRC output bytes will be reversed i.e. 15:0 will become {8:15,0:7} 4054 */ 4055 #define EMVSIM_CTRL_CRC_OUT_FLIP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_OUT_FLIP_MASK) 4056 #define EMVSIM_CTRL_CRC_IN_FLIP_MASK (0x4000000U) 4057 #define EMVSIM_CTRL_CRC_IN_FLIP_SHIFT (26U) 4058 /*! CRC_IN_FLIP - CRC Input Byte's Bit Reversal or Flip Control 4059 * 0b0..Bits in the input byte will not be reversed (i.e. 7:0 will remain 7:0) before the CRC calculation (default) 4060 * 0b1..Bits in the input byte will be reversed (i.e. 7:0 will become 0:7) before CRC calculation 4061 */ 4062 #define EMVSIM_CTRL_CRC_IN_FLIP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_IN_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_IN_FLIP_MASK) 4063 #define EMVSIM_CTRL_CWT_EN_MASK (0x8000000U) 4064 #define EMVSIM_CTRL_CWT_EN_SHIFT (27U) 4065 /*! CWT_EN - Character Wait Time Counter Enable 4066 * 0b0..Character Wait time Counter is disabled (default) 4067 * 0b1..Character Wait time counter is enabled 4068 */ 4069 #define EMVSIM_CTRL_CWT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CWT_EN_SHIFT)) & EMVSIM_CTRL_CWT_EN_MASK) 4070 #define EMVSIM_CTRL_LRC_EN_MASK (0x10000000U) 4071 #define EMVSIM_CTRL_LRC_EN_SHIFT (28U) 4072 /*! LRC_EN - LRC Enable 4073 * 0b0..8-bit Linear Redundancy Checking disabled (default) 4074 * 0b1..8-bit Linear Redundancy Checking enabled 4075 */ 4076 #define EMVSIM_CTRL_LRC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_LRC_EN_SHIFT)) & EMVSIM_CTRL_LRC_EN_MASK) 4077 #define EMVSIM_CTRL_CRC_EN_MASK (0x20000000U) 4078 #define EMVSIM_CTRL_CRC_EN_SHIFT (29U) 4079 /*! CRC_EN - CRC Enable 4080 * 0b0..16-bit Cyclic Redundancy Checking disabled (default) 4081 * 0b1..16-bit Cyclic Redundancy Checking enabled 4082 */ 4083 #define EMVSIM_CTRL_CRC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_EN_SHIFT)) & EMVSIM_CTRL_CRC_EN_MASK) 4084 #define EMVSIM_CTRL_XMT_CRC_LRC_MASK (0x40000000U) 4085 #define EMVSIM_CTRL_XMT_CRC_LRC_SHIFT (30U) 4086 /*! XMT_CRC_LRC - Transmit CRC or LRC Enable 4087 * 0b0..No CRC or LRC value is transmitted (default) 4088 * 0b1..Transmit LRC or CRC info when FIFO empties (whichever is enabled) 4089 */ 4090 #define EMVSIM_CTRL_XMT_CRC_LRC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_CRC_LRC_SHIFT)) & EMVSIM_CTRL_XMT_CRC_LRC_MASK) 4091 #define EMVSIM_CTRL_BWT_EN_MASK (0x80000000U) 4092 #define EMVSIM_CTRL_BWT_EN_SHIFT (31U) 4093 /*! BWT_EN - Block Wait Time Counter Enable 4094 * 0b0..Disable BWT, BGT Counters (default) 4095 * 0b1..Enable BWT, BGT Counters 4096 */ 4097 #define EMVSIM_CTRL_BWT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_BWT_EN_SHIFT)) & EMVSIM_CTRL_BWT_EN_MASK) 4098 /*! @} */ 4099 4100 /*! @name INT_MASK - Interrupt Mask Register */ 4101 /*! @{ */ 4102 #define EMVSIM_INT_MASK_RDT_IM_MASK (0x1U) 4103 #define EMVSIM_INT_MASK_RDT_IM_SHIFT (0U) 4104 /*! RDT_IM - Receive Data Threshold Interrupt Mask 4105 * 0b0..RDTF interrupt enabled 4106 * 0b1..RDTF interrupt masked (default) 4107 */ 4108 #define EMVSIM_INT_MASK_RDT_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RDT_IM_SHIFT)) & EMVSIM_INT_MASK_RDT_IM_MASK) 4109 #define EMVSIM_INT_MASK_TC_IM_MASK (0x2U) 4110 #define EMVSIM_INT_MASK_TC_IM_SHIFT (1U) 4111 /*! TC_IM - Transmit Complete Interrupt Mask 4112 * 0b0..TCF interrupt enabled 4113 * 0b1..TCF interrupt masked (default) 4114 */ 4115 #define EMVSIM_INT_MASK_TC_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TC_IM_SHIFT)) & EMVSIM_INT_MASK_TC_IM_MASK) 4116 #define EMVSIM_INT_MASK_RFO_IM_MASK (0x4U) 4117 #define EMVSIM_INT_MASK_RFO_IM_SHIFT (2U) 4118 /*! RFO_IM - Receive FIFO Overflow Interrupt Mask 4119 * 0b0..RFO interrupt enabled 4120 * 0b1..RFO interrupt masked (default) 4121 */ 4122 #define EMVSIM_INT_MASK_RFO_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RFO_IM_SHIFT)) & EMVSIM_INT_MASK_RFO_IM_MASK) 4123 #define EMVSIM_INT_MASK_ETC_IM_MASK (0x8U) 4124 #define EMVSIM_INT_MASK_ETC_IM_SHIFT (3U) 4125 /*! ETC_IM - Early Transmit Complete Interrupt Mask 4126 * 0b0..ETC interrupt enabled 4127 * 0b1..ETC interrupt masked (default) 4128 */ 4129 #define EMVSIM_INT_MASK_ETC_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_ETC_IM_SHIFT)) & EMVSIM_INT_MASK_ETC_IM_MASK) 4130 #define EMVSIM_INT_MASK_TFE_IM_MASK (0x10U) 4131 #define EMVSIM_INT_MASK_TFE_IM_SHIFT (4U) 4132 /*! TFE_IM - Transmit FIFO Empty Interrupt Mask 4133 * 0b0..TFE interrupt enabled 4134 * 0b1..TFE interrupt masked (default) 4135 */ 4136 #define EMVSIM_INT_MASK_TFE_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFE_IM_SHIFT)) & EMVSIM_INT_MASK_TFE_IM_MASK) 4137 #define EMVSIM_INT_MASK_TNACK_IM_MASK (0x20U) 4138 #define EMVSIM_INT_MASK_TNACK_IM_SHIFT (5U) 4139 /*! TNACK_IM - Transmit NACK Threshold Interrupt Mask 4140 * 0b0..TNTE interrupt enabled 4141 * 0b1..TNTE interrupt masked (default) 4142 */ 4143 #define EMVSIM_INT_MASK_TNACK_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TNACK_IM_SHIFT)) & EMVSIM_INT_MASK_TNACK_IM_MASK) 4144 #define EMVSIM_INT_MASK_TFF_IM_MASK (0x40U) 4145 #define EMVSIM_INT_MASK_TFF_IM_SHIFT (6U) 4146 /*! TFF_IM - Transmit FIFO Full Interrupt Mask 4147 * 0b0..TFF interrupt enabled 4148 * 0b1..TFF interrupt masked (default) 4149 */ 4150 #define EMVSIM_INT_MASK_TFF_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFF_IM_SHIFT)) & EMVSIM_INT_MASK_TFF_IM_MASK) 4151 #define EMVSIM_INT_MASK_TDT_IM_MASK (0x80U) 4152 #define EMVSIM_INT_MASK_TDT_IM_SHIFT (7U) 4153 /*! TDT_IM - Transmit Data Threshold Interrupt Mask 4154 * 0b0..TDTF interrupt enabled 4155 * 0b1..TDTF interrupt masked (default) 4156 */ 4157 #define EMVSIM_INT_MASK_TDT_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TDT_IM_SHIFT)) & EMVSIM_INT_MASK_TDT_IM_MASK) 4158 #define EMVSIM_INT_MASK_GPCNT0_IM_MASK (0x100U) 4159 #define EMVSIM_INT_MASK_GPCNT0_IM_SHIFT (8U) 4160 /*! GPCNT0_IM - General Purpose Timer 0 Timeout Interrupt Mask 4161 * 0b0..GPCNT0_TO interrupt enabled 4162 * 0b1..GPCNT0_TO interrupt masked (default) 4163 */ 4164 #define EMVSIM_INT_MASK_GPCNT0_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT0_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT0_IM_MASK) 4165 #define EMVSIM_INT_MASK_CWT_ERR_IM_MASK (0x200U) 4166 #define EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT (9U) 4167 /*! CWT_ERR_IM - Character Wait Time Error Interrupt Mask 4168 * 0b0..CWT_ERR interrupt enabled 4169 * 0b1..CWT_ERR interrupt masked (default) 4170 */ 4171 #define EMVSIM_INT_MASK_CWT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_CWT_ERR_IM_MASK) 4172 #define EMVSIM_INT_MASK_RNACK_IM_MASK (0x400U) 4173 #define EMVSIM_INT_MASK_RNACK_IM_SHIFT (10U) 4174 /*! RNACK_IM - Receiver NACK Threshold Interrupt Mask 4175 * 0b0..RTE interrupt enabled 4176 * 0b1..RTE interrupt masked (default) 4177 */ 4178 #define EMVSIM_INT_MASK_RNACK_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RNACK_IM_SHIFT)) & EMVSIM_INT_MASK_RNACK_IM_MASK) 4179 #define EMVSIM_INT_MASK_BWT_ERR_IM_MASK (0x800U) 4180 #define EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT (11U) 4181 /*! BWT_ERR_IM - Block Wait Time Error Interrupt Mask 4182 * 0b0..BWT_ERR interrupt enabled 4183 * 0b1..BWT_ERR interrupt masked (default) 4184 */ 4185 #define EMVSIM_INT_MASK_BWT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BWT_ERR_IM_MASK) 4186 #define EMVSIM_INT_MASK_BGT_ERR_IM_MASK (0x1000U) 4187 #define EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT (12U) 4188 /*! BGT_ERR_IM - Block Guard Time Error Interrupt 4189 * 0b0..BGT_ERR interrupt enabled 4190 * 0b1..BGT_ERR interrupt masked (default) 4191 */ 4192 #define EMVSIM_INT_MASK_BGT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BGT_ERR_IM_MASK) 4193 #define EMVSIM_INT_MASK_GPCNT1_IM_MASK (0x2000U) 4194 #define EMVSIM_INT_MASK_GPCNT1_IM_SHIFT (13U) 4195 /*! GPCNT1_IM - General Purpose Counter 1 Timeout Interrupt Mask 4196 * 0b0..GPCNT1_TO interrupt enabled 4197 * 0b1..GPCNT1_TO interrupt masked (default) 4198 */ 4199 #define EMVSIM_INT_MASK_GPCNT1_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT1_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT1_IM_MASK) 4200 #define EMVSIM_INT_MASK_RX_DATA_IM_MASK (0x4000U) 4201 #define EMVSIM_INT_MASK_RX_DATA_IM_SHIFT (14U) 4202 /*! RX_DATA_IM - Receive Data Interrupt Mask 4203 * 0b0..RX_DATA interrupt enabled 4204 * 0b1..RX_DATA interrupt masked (default) 4205 */ 4206 #define EMVSIM_INT_MASK_RX_DATA_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RX_DATA_IM_SHIFT)) & EMVSIM_INT_MASK_RX_DATA_IM_MASK) 4207 #define EMVSIM_INT_MASK_PEF_IM_MASK (0x8000U) 4208 #define EMVSIM_INT_MASK_PEF_IM_SHIFT (15U) 4209 /*! PEF_IM - Parity Error Interrupt Mask 4210 * 0b0..PEF interrupt enabled 4211 * 0b1..PEF interrupt masked (default) 4212 */ 4213 #define EMVSIM_INT_MASK_PEF_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_PEF_IM_SHIFT)) & EMVSIM_INT_MASK_PEF_IM_MASK) 4214 /*! @} */ 4215 4216 /*! @name RX_THD - Receiver Threshold Register */ 4217 /*! @{ */ 4218 #define EMVSIM_RX_THD_RDT_MASK (0xFU) 4219 #define EMVSIM_RX_THD_RDT_SHIFT (0U) 4220 #define EMVSIM_RX_THD_RDT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RDT_SHIFT)) & EMVSIM_RX_THD_RDT_MASK) 4221 #define EMVSIM_RX_THD_RNCK_THD_MASK (0xF00U) 4222 #define EMVSIM_RX_THD_RNCK_THD_SHIFT (8U) 4223 /*! RNCK_THD - Receiver NACK Threshold Value 4224 * 0b0000..Zero Threshold. RTE will not be set 4225 */ 4226 #define EMVSIM_RX_THD_RNCK_THD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RNCK_THD_SHIFT)) & EMVSIM_RX_THD_RNCK_THD_MASK) 4227 /*! @} */ 4228 4229 /*! @name TX_THD - Transmitter Threshold Register */ 4230 /*! @{ */ 4231 #define EMVSIM_TX_THD_TDT_MASK (0xFU) 4232 #define EMVSIM_TX_THD_TDT_SHIFT (0U) 4233 #define EMVSIM_TX_THD_TDT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TDT_SHIFT)) & EMVSIM_TX_THD_TDT_MASK) 4234 #define EMVSIM_TX_THD_TNCK_THD_MASK (0xF00U) 4235 #define EMVSIM_TX_THD_TNCK_THD_SHIFT (8U) 4236 /*! TNCK_THD - Transmitter NACK Threshold Value 4237 * 0b0000..TNTE will never be set; retransmission after NACK reception is disabled. 4238 * 0b0001..TNTE will be set after 1 nack is received; 0 retransmissions occurs. 4239 * 0b0010..TNTE will be set after 2 nacks are received; at most 1 retransmission occurs. 4240 * 0b0011..TNTE will be set after 3 nacks are received; at most 2 retransmissions occurs. 4241 * 0b1111..TNTE will be set after 15 nacks are received; at most 14 retransmissions occurs. 4242 */ 4243 #define EMVSIM_TX_THD_TNCK_THD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TNCK_THD_SHIFT)) & EMVSIM_TX_THD_TNCK_THD_MASK) 4244 /*! @} */ 4245 4246 /*! @name RX_STATUS - Receive Status Register */ 4247 /*! @{ */ 4248 #define EMVSIM_RX_STATUS_RFO_MASK (0x1U) 4249 #define EMVSIM_RX_STATUS_RFO_SHIFT (0U) 4250 /*! RFO - Receive FIFO Overflow Flag 4251 * 0b0..No overrun error has occurred (default) 4252 * 0b1..A byte was received when the received FIFO was already full 4253 */ 4254 #define EMVSIM_RX_STATUS_RFO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RFO_SHIFT)) & EMVSIM_RX_STATUS_RFO_MASK) 4255 #define EMVSIM_RX_STATUS_RX_DATA_MASK (0x10U) 4256 #define EMVSIM_RX_STATUS_RX_DATA_SHIFT (4U) 4257 /*! RX_DATA - Receive Data Interrupt Flag 4258 * 0b0..No new byte is received 4259 * 0b1..New byte is received ans stored in Receive FIFO 4260 */ 4261 #define EMVSIM_RX_STATUS_RX_DATA(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_DATA_SHIFT)) & EMVSIM_RX_STATUS_RX_DATA_MASK) 4262 #define EMVSIM_RX_STATUS_RDTF_MASK (0x20U) 4263 #define EMVSIM_RX_STATUS_RDTF_SHIFT (5U) 4264 /*! RDTF - Receive Data Threshold Interrupt Flag 4265 * 0b0..Number of unread bytes in receive FIFO less than the value set by RDT[3:0] (default). 4266 * 0b1..Number of unread bytes in receive FIFO greater or than equal to value set by RDT[3:0]. 4267 */ 4268 #define EMVSIM_RX_STATUS_RDTF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RDTF_SHIFT)) & EMVSIM_RX_STATUS_RDTF_MASK) 4269 #define EMVSIM_RX_STATUS_LRC_OK_MASK (0x40U) 4270 #define EMVSIM_RX_STATUS_LRC_OK_SHIFT (6U) 4271 /*! LRC_OK - LRC Check OK Flag 4272 * 0b0..Current LRC value does not match remainder. 4273 * 0b1..Current calculated LRC value matches the expected result (i.e. zero). 4274 */ 4275 #define EMVSIM_RX_STATUS_LRC_OK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_LRC_OK_SHIFT)) & EMVSIM_RX_STATUS_LRC_OK_MASK) 4276 #define EMVSIM_RX_STATUS_CRC_OK_MASK (0x80U) 4277 #define EMVSIM_RX_STATUS_CRC_OK_SHIFT (7U) 4278 /*! CRC_OK - CRC Check OK Flag 4279 * 0b0..Current CRC value does not match remainder. 4280 * 0b1..Current calculated CRC value matches the expected result. 4281 */ 4282 #define EMVSIM_RX_STATUS_CRC_OK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CRC_OK_SHIFT)) & EMVSIM_RX_STATUS_CRC_OK_MASK) 4283 #define EMVSIM_RX_STATUS_CWT_ERR_MASK (0x100U) 4284 #define EMVSIM_RX_STATUS_CWT_ERR_SHIFT (8U) 4285 /*! CWT_ERR - Character Wait Time Error Flag 4286 * 0b0..No CWT violation has occurred (default). 4287 * 0b1..Time between two consecutive characters has exceeded the value in CHAR_WAIT. 4288 */ 4289 #define EMVSIM_RX_STATUS_CWT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_CWT_ERR_MASK) 4290 #define EMVSIM_RX_STATUS_RTE_MASK (0x200U) 4291 #define EMVSIM_RX_STATUS_RTE_SHIFT (9U) 4292 /*! RTE - Received NACK Threshold Error Flag 4293 * 0b0..Number of NACKs generated by the receiver is less than the value programmed in RTH[3:0] 4294 * 0b1..Number of NACKs generated by the receiver is equal to the value programmed in RTH[3:0] 4295 */ 4296 #define EMVSIM_RX_STATUS_RTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RTE_SHIFT)) & EMVSIM_RX_STATUS_RTE_MASK) 4297 #define EMVSIM_RX_STATUS_BWT_ERR_MASK (0x400U) 4298 #define EMVSIM_RX_STATUS_BWT_ERR_SHIFT (10U) 4299 /*! BWT_ERR - Block Wait Time Error Flag 4300 * 0b0..Block wait time not exceeded 4301 * 0b1..Block wait time was exceeded 4302 */ 4303 #define EMVSIM_RX_STATUS_BWT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BWT_ERR_MASK) 4304 #define EMVSIM_RX_STATUS_BGT_ERR_MASK (0x800U) 4305 #define EMVSIM_RX_STATUS_BGT_ERR_SHIFT (11U) 4306 /*! BGT_ERR - Block Guard Time Error Flag 4307 * 0b0..Block guard time was sufficient 4308 * 0b1..Block guard time was too small 4309 */ 4310 #define EMVSIM_RX_STATUS_BGT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BGT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BGT_ERR_MASK) 4311 #define EMVSIM_RX_STATUS_PEF_MASK (0x1000U) 4312 #define EMVSIM_RX_STATUS_PEF_SHIFT (12U) 4313 /*! PEF - Parity Error Flag 4314 * 0b0..No parity error detected 4315 * 0b1..Parity error detected 4316 */ 4317 #define EMVSIM_RX_STATUS_PEF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_PEF_SHIFT)) & EMVSIM_RX_STATUS_PEF_MASK) 4318 #define EMVSIM_RX_STATUS_FEF_MASK (0x2000U) 4319 #define EMVSIM_RX_STATUS_FEF_SHIFT (13U) 4320 /*! FEF - Frame Error Flag 4321 * 0b0..No frame error detected 4322 * 0b1..Frame error detected 4323 */ 4324 #define EMVSIM_RX_STATUS_FEF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_FEF_SHIFT)) & EMVSIM_RX_STATUS_FEF_MASK) 4325 #define EMVSIM_RX_STATUS_RX_WPTR_MASK (0xF0000U) 4326 #define EMVSIM_RX_STATUS_RX_WPTR_SHIFT (16U) 4327 #define EMVSIM_RX_STATUS_RX_WPTR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_WPTR_SHIFT)) & EMVSIM_RX_STATUS_RX_WPTR_MASK) 4328 #define EMVSIM_RX_STATUS_RX_CNT_MASK (0xF000000U) 4329 #define EMVSIM_RX_STATUS_RX_CNT_SHIFT (24U) 4330 /*! RX_CNT - Receive FIFO Byte Count 4331 * 0b0000..FIFO is emtpy 4332 */ 4333 #define EMVSIM_RX_STATUS_RX_CNT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_CNT_SHIFT)) & EMVSIM_RX_STATUS_RX_CNT_MASK) 4334 /*! @} */ 4335 4336 /*! @name TX_STATUS - Transmitter Status Register */ 4337 /*! @{ */ 4338 #define EMVSIM_TX_STATUS_TNTE_MASK (0x1U) 4339 #define EMVSIM_TX_STATUS_TNTE_SHIFT (0U) 4340 /*! TNTE - Transmit NACK Threshold Error Flag 4341 * 0b0..Transmit NACK threshold has not been reached (default) 4342 * 0b1..Transmit NACK threshold reached; transmitter frozen 4343 */ 4344 #define EMVSIM_TX_STATUS_TNTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TNTE_SHIFT)) & EMVSIM_TX_STATUS_TNTE_MASK) 4345 #define EMVSIM_TX_STATUS_TFE_MASK (0x8U) 4346 #define EMVSIM_TX_STATUS_TFE_SHIFT (3U) 4347 /*! TFE - Transmit FIFO Empty Flag 4348 * 0b0..Transmit FIFO is not empty 4349 * 0b1..Transmit FIFO is empty (default) 4350 */ 4351 #define EMVSIM_TX_STATUS_TFE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFE_SHIFT)) & EMVSIM_TX_STATUS_TFE_MASK) 4352 #define EMVSIM_TX_STATUS_ETCF_MASK (0x10U) 4353 #define EMVSIM_TX_STATUS_ETCF_SHIFT (4U) 4354 /*! ETCF - Early Transmit Complete Flag 4355 * 0b0..Transmit pending or in progress 4356 * 0b1..Transmit complete (default) 4357 */ 4358 #define EMVSIM_TX_STATUS_ETCF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_ETCF_SHIFT)) & EMVSIM_TX_STATUS_ETCF_MASK) 4359 #define EMVSIM_TX_STATUS_TCF_MASK (0x20U) 4360 #define EMVSIM_TX_STATUS_TCF_SHIFT (5U) 4361 /*! TCF - Transmit Complete Flag 4362 * 0b0..Transmit pending or in progress 4363 * 0b1..Transmit complete (default) 4364 */ 4365 #define EMVSIM_TX_STATUS_TCF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TCF_SHIFT)) & EMVSIM_TX_STATUS_TCF_MASK) 4366 #define EMVSIM_TX_STATUS_TFF_MASK (0x40U) 4367 #define EMVSIM_TX_STATUS_TFF_SHIFT (6U) 4368 /*! TFF - Transmit FIFO Full Flag 4369 * 0b0..Transmit FIFO Full condition has not occurred (default) 4370 * 0b1..A Transmit FIFO Full condition has occurred 4371 */ 4372 #define EMVSIM_TX_STATUS_TFF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFF_SHIFT)) & EMVSIM_TX_STATUS_TFF_MASK) 4373 #define EMVSIM_TX_STATUS_TDTF_MASK (0x80U) 4374 #define EMVSIM_TX_STATUS_TDTF_SHIFT (7U) 4375 /*! TDTF - Transmit Data Threshold Flag 4376 * 0b0..Number of bytes in FIFO is greater than TDT[3:0], or bit has been cleared 4377 * 0b1..Number of bytes in FIFO is less than or equal to TDT[3:0] (default) 4378 */ 4379 #define EMVSIM_TX_STATUS_TDTF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TDTF_SHIFT)) & EMVSIM_TX_STATUS_TDTF_MASK) 4380 #define EMVSIM_TX_STATUS_GPCNT0_TO_MASK (0x100U) 4381 #define EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT (8U) 4382 /*! GPCNT0_TO - General Purpose Counter 0 Timeout Flag 4383 * 0b0..GPCNT0_VAL time not reached, or bit has been cleared. (default) 4384 * 0b1..General Purpose counter has reached the GPCNT0_VAL value 4385 */ 4386 #define EMVSIM_TX_STATUS_GPCNT0_TO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT0_TO_MASK) 4387 #define EMVSIM_TX_STATUS_GPCNT1_TO_MASK (0x200U) 4388 #define EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT (9U) 4389 /*! GPCNT1_TO - General Purpose Counter 1 Timeout Flag 4390 * 0b0..GPCNT1_VAL time not reached, or bit has been cleared. (default) 4391 * 0b1..General Purpose counter has reached the GPCNT1_VAL value 4392 */ 4393 #define EMVSIM_TX_STATUS_GPCNT1_TO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT1_TO_MASK) 4394 #define EMVSIM_TX_STATUS_TX_RPTR_MASK (0xF0000U) 4395 #define EMVSIM_TX_STATUS_TX_RPTR_SHIFT (16U) 4396 #define EMVSIM_TX_STATUS_TX_RPTR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_RPTR_SHIFT)) & EMVSIM_TX_STATUS_TX_RPTR_MASK) 4397 #define EMVSIM_TX_STATUS_TX_CNT_MASK (0xF000000U) 4398 #define EMVSIM_TX_STATUS_TX_CNT_SHIFT (24U) 4399 /*! TX_CNT - Transmit FIFO Byte Count 4400 * 0b0000..FIFO is emtpy 4401 */ 4402 #define EMVSIM_TX_STATUS_TX_CNT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_CNT_SHIFT)) & EMVSIM_TX_STATUS_TX_CNT_MASK) 4403 /*! @} */ 4404 4405 /*! @name PCSR - Port Control and Status Register */ 4406 /*! @{ */ 4407 #define EMVSIM_PCSR_SAPD_MASK (0x1U) 4408 #define EMVSIM_PCSR_SAPD_SHIFT (0U) 4409 /*! SAPD - Auto Power Down Enable 4410 * 0b0..Auto power down disabled (default) 4411 * 0b1..Auto power down enabled 4412 */ 4413 #define EMVSIM_PCSR_SAPD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SAPD_SHIFT)) & EMVSIM_PCSR_SAPD_MASK) 4414 #define EMVSIM_PCSR_SVCC_EN_MASK (0x2U) 4415 #define EMVSIM_PCSR_SVCC_EN_SHIFT (1U) 4416 /*! SVCC_EN - Vcc Enable for Smart Card 4417 * 0b0..Smart Card Voltage disabled (default) 4418 * 0b1..Smart Card Voltage enabled 4419 */ 4420 #define EMVSIM_PCSR_SVCC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SVCC_EN_SHIFT)) & EMVSIM_PCSR_SVCC_EN_MASK) 4421 #define EMVSIM_PCSR_VCCENP_MASK (0x4U) 4422 #define EMVSIM_PCSR_VCCENP_SHIFT (2U) 4423 /*! VCCENP - VCC Enable Polarity Control 4424 * 0b0..VCC_EN is active high. Polarity of SVCC_EN is unchanged. 4425 * 0b1..VCC_EN is active low. Polarity of SVCC_EN is inverted. 4426 */ 4427 #define EMVSIM_PCSR_VCCENP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_VCCENP_SHIFT)) & EMVSIM_PCSR_VCCENP_MASK) 4428 #define EMVSIM_PCSR_SRST_MASK (0x8U) 4429 #define EMVSIM_PCSR_SRST_SHIFT (3U) 4430 /*! SRST - Reset to Smart Card 4431 * 0b0..Smart Card Reset is asserted (default) 4432 * 0b1..Smart Card Reset is de-asserted 4433 */ 4434 #define EMVSIM_PCSR_SRST(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SRST_SHIFT)) & EMVSIM_PCSR_SRST_MASK) 4435 #define EMVSIM_PCSR_SCEN_MASK (0x10U) 4436 #define EMVSIM_PCSR_SCEN_SHIFT (4U) 4437 /*! SCEN - Clock Enable for Smart Card 4438 * 0b0..Smart Card Clock Disabled 4439 * 0b1..Smart Card Clock Enabled 4440 */ 4441 #define EMVSIM_PCSR_SCEN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCEN_SHIFT)) & EMVSIM_PCSR_SCEN_MASK) 4442 #define EMVSIM_PCSR_SCSP_MASK (0x20U) 4443 #define EMVSIM_PCSR_SCSP_SHIFT (5U) 4444 /*! SCSP - Smart Card Clock Stop Polarity 4445 * 0b0..Clock is logic 0 when stopped by SCEN 4446 * 0b1..Clock is logic 1 when stopped by SCEN 4447 */ 4448 #define EMVSIM_PCSR_SCSP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCSP_SHIFT)) & EMVSIM_PCSR_SCSP_MASK) 4449 #define EMVSIM_PCSR_SPD_MASK (0x80U) 4450 #define EMVSIM_PCSR_SPD_SHIFT (7U) 4451 /*! SPD - Auto Power Down Control 4452 * 0b0..No effect (default) 4453 * 0b1..Start Auto Powerdown or Power Down is in progress 4454 */ 4455 #define EMVSIM_PCSR_SPD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPD_SHIFT)) & EMVSIM_PCSR_SPD_MASK) 4456 #define EMVSIM_PCSR_SPDIM_MASK (0x1000000U) 4457 #define EMVSIM_PCSR_SPDIM_SHIFT (24U) 4458 /*! SPDIM - Smart Card Presence Detect Interrupt Mask 4459 * 0b0..SIM presence detect interrupt is enabled 4460 * 0b1..SIM presence detect interrupt is masked (default) 4461 */ 4462 #define EMVSIM_PCSR_SPDIM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIM_SHIFT)) & EMVSIM_PCSR_SPDIM_MASK) 4463 #define EMVSIM_PCSR_SPDIF_MASK (0x2000000U) 4464 #define EMVSIM_PCSR_SPDIF_SHIFT (25U) 4465 /*! SPDIF - Smart Card Presence Detect Interrupt Flag 4466 * 0b0..No insertion or removal of Smart Card detected on Port (default) 4467 * 0b1..Insertion or removal of Smart Card detected on Port 4468 */ 4469 #define EMVSIM_PCSR_SPDIF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIF_SHIFT)) & EMVSIM_PCSR_SPDIF_MASK) 4470 #define EMVSIM_PCSR_SPDP_MASK (0x4000000U) 4471 #define EMVSIM_PCSR_SPDP_SHIFT (26U) 4472 /*! SPDP - Smart Card Presence Detect Pin Status 4473 * 0b0..SIM Presence Detect pin is logic low 4474 * 0b1..SIM Presence Detectpin is logic high 4475 */ 4476 #define EMVSIM_PCSR_SPDP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDP_SHIFT)) & EMVSIM_PCSR_SPDP_MASK) 4477 #define EMVSIM_PCSR_SPDES_MASK (0x8000000U) 4478 #define EMVSIM_PCSR_SPDES_SHIFT (27U) 4479 /*! SPDES - SIM Presence Detect Edge Select 4480 * 0b0..Falling edge on the pin (default) 4481 * 0b1..Rising edge on the pin 4482 */ 4483 #define EMVSIM_PCSR_SPDES(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDES_SHIFT)) & EMVSIM_PCSR_SPDES_MASK) 4484 /*! @} */ 4485 4486 /*! @name RX_BUF - Receive Data Read Buffer */ 4487 /*! @{ */ 4488 #define EMVSIM_RX_BUF_RX_BYTE_MASK (0xFFU) 4489 #define EMVSIM_RX_BUF_RX_BYTE_SHIFT (0U) 4490 #define EMVSIM_RX_BUF_RX_BYTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_BUF_RX_BYTE_SHIFT)) & EMVSIM_RX_BUF_RX_BYTE_MASK) 4491 /*! @} */ 4492 4493 /*! @name TX_BUF - Transmit Data Buffer */ 4494 /*! @{ */ 4495 #define EMVSIM_TX_BUF_TX_BYTE_MASK (0xFFU) 4496 #define EMVSIM_TX_BUF_TX_BYTE_SHIFT (0U) 4497 #define EMVSIM_TX_BUF_TX_BYTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_BUF_TX_BYTE_SHIFT)) & EMVSIM_TX_BUF_TX_BYTE_MASK) 4498 /*! @} */ 4499 4500 /*! @name TX_GETU - Transmitter Guard ETU Value Register */ 4501 /*! @{ */ 4502 #define EMVSIM_TX_GETU_GETU_MASK (0xFFU) 4503 #define EMVSIM_TX_GETU_GETU_SHIFT (0U) 4504 /*! GETU - Transmitter Guard Time Value in ETU 4505 * 0b00000000..no additional ETUs inserted (default) 4506 * 0b00000001..1 additional ETU inserted 4507 * 0b11111110..254 additional ETUs inserted 4508 * 0b11111111..Subtracts one ETU by reducing the number of STOP bits from two to one 4509 */ 4510 #define EMVSIM_TX_GETU_GETU(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_GETU_GETU_SHIFT)) & EMVSIM_TX_GETU_GETU_MASK) 4511 /*! @} */ 4512 4513 /*! @name CWT_VAL - Character Wait Time Value Register */ 4514 /*! @{ */ 4515 #define EMVSIM_CWT_VAL_CWT_MASK (0xFFFFU) 4516 #define EMVSIM_CWT_VAL_CWT_SHIFT (0U) 4517 #define EMVSIM_CWT_VAL_CWT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CWT_VAL_CWT_SHIFT)) & EMVSIM_CWT_VAL_CWT_MASK) 4518 /*! @} */ 4519 4520 /*! @name BWT_VAL - Block Wait Time Value Register */ 4521 /*! @{ */ 4522 #define EMVSIM_BWT_VAL_BWT_MASK (0xFFFFFFFFU) 4523 #define EMVSIM_BWT_VAL_BWT_SHIFT (0U) 4524 #define EMVSIM_BWT_VAL_BWT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_BWT_VAL_BWT_SHIFT)) & EMVSIM_BWT_VAL_BWT_MASK) 4525 /*! @} */ 4526 4527 /*! @name BGT_VAL - Block Guard Time Value Register */ 4528 /*! @{ */ 4529 #define EMVSIM_BGT_VAL_BGT_MASK (0xFFFFU) 4530 #define EMVSIM_BGT_VAL_BGT_SHIFT (0U) 4531 #define EMVSIM_BGT_VAL_BGT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_BGT_VAL_BGT_SHIFT)) & EMVSIM_BGT_VAL_BGT_MASK) 4532 /*! @} */ 4533 4534 /*! @name GPCNT0_VAL - General Purpose Counter 0 Timeout Value Register */ 4535 /*! @{ */ 4536 #define EMVSIM_GPCNT0_VAL_GPCNT0_MASK (0xFFFFU) 4537 #define EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT (0U) 4538 #define EMVSIM_GPCNT0_VAL_GPCNT0(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT)) & EMVSIM_GPCNT0_VAL_GPCNT0_MASK) 4539 /*! @} */ 4540 4541 /*! @name GPCNT1_VAL - General Purpose Counter 1 Timeout Value */ 4542 /*! @{ */ 4543 #define EMVSIM_GPCNT1_VAL_GPCNT1_MASK (0xFFFFU) 4544 #define EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT (0U) 4545 #define EMVSIM_GPCNT1_VAL_GPCNT1(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT)) & EMVSIM_GPCNT1_VAL_GPCNT1_MASK) 4546 /*! @} */ 4547 4548 4549 /*! 4550 * @} 4551 */ /* end of group EMVSIM_Register_Masks */ 4552 4553 4554 /* EMVSIM - Peripheral instance base addresses */ 4555 /** Peripheral EMVSIM0 base address */ 4556 #define EMVSIM0_BASE (0x40038000u) 4557 /** Peripheral EMVSIM0 base pointer */ 4558 #define EMVSIM0 ((EMVSIM_Type *)EMVSIM0_BASE) 4559 /** Array initializer of EMVSIM peripheral base addresses */ 4560 #define EMVSIM_BASE_ADDRS { EMVSIM0_BASE } 4561 /** Array initializer of EMVSIM peripheral base pointers */ 4562 #define EMVSIM_BASE_PTRS { EMVSIM0 } 4563 /** Interrupt vectors for the EMVSIM peripheral type */ 4564 #define EMVSIM_IRQS { EMVSIM0_IRQn } 4565 4566 /*! 4567 * @} 4568 */ /* end of group EMVSIM_Peripheral_Access_Layer */ 4569 4570 4571 /* ---------------------------------------------------------------------------- 4572 -- EWM Peripheral Access Layer 4573 ---------------------------------------------------------------------------- */ 4574 4575 /*! 4576 * @addtogroup EWM_Peripheral_Access_Layer EWM Peripheral Access Layer 4577 * @{ 4578 */ 4579 4580 /** EWM - Register Layout Typedef */ 4581 typedef struct { 4582 __IO uint8_t CTRL; /**< Control Register, offset: 0x0 */ 4583 __O uint8_t SERV; /**< Service Register, offset: 0x1 */ 4584 __IO uint8_t CMPL; /**< Compare Low Register, offset: 0x2 */ 4585 __IO uint8_t CMPH; /**< Compare High Register, offset: 0x3 */ 4586 uint8_t RESERVED_0[1]; 4587 __IO uint8_t CLKPRESCALER; /**< Clock Prescaler Register, offset: 0x5 */ 4588 } EWM_Type; 4589 4590 /* ---------------------------------------------------------------------------- 4591 -- EWM Register Masks 4592 ---------------------------------------------------------------------------- */ 4593 4594 /*! 4595 * @addtogroup EWM_Register_Masks EWM Register Masks 4596 * @{ 4597 */ 4598 4599 /*! @name CTRL - Control Register */ 4600 /*! @{ */ 4601 #define EWM_CTRL_EWMEN_MASK (0x1U) 4602 #define EWM_CTRL_EWMEN_SHIFT (0U) 4603 #define EWM_CTRL_EWMEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_EWMEN_SHIFT)) & EWM_CTRL_EWMEN_MASK) 4604 #define EWM_CTRL_ASSIN_MASK (0x2U) 4605 #define EWM_CTRL_ASSIN_SHIFT (1U) 4606 #define EWM_CTRL_ASSIN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_ASSIN_SHIFT)) & EWM_CTRL_ASSIN_MASK) 4607 #define EWM_CTRL_INEN_MASK (0x4U) 4608 #define EWM_CTRL_INEN_SHIFT (2U) 4609 #define EWM_CTRL_INEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INEN_SHIFT)) & EWM_CTRL_INEN_MASK) 4610 #define EWM_CTRL_INTEN_MASK (0x8U) 4611 #define EWM_CTRL_INTEN_SHIFT (3U) 4612 #define EWM_CTRL_INTEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INTEN_SHIFT)) & EWM_CTRL_INTEN_MASK) 4613 /*! @} */ 4614 4615 /*! @name SERV - Service Register */ 4616 /*! @{ */ 4617 #define EWM_SERV_SERVICE_MASK (0xFFU) 4618 #define EWM_SERV_SERVICE_SHIFT (0U) 4619 #define EWM_SERV_SERVICE(x) (((uint8_t)(((uint8_t)(x)) << EWM_SERV_SERVICE_SHIFT)) & EWM_SERV_SERVICE_MASK) 4620 /*! @} */ 4621 4622 /*! @name CMPL - Compare Low Register */ 4623 /*! @{ */ 4624 #define EWM_CMPL_COMPAREL_MASK (0xFFU) 4625 #define EWM_CMPL_COMPAREL_SHIFT (0U) 4626 #define EWM_CMPL_COMPAREL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPL_COMPAREL_SHIFT)) & EWM_CMPL_COMPAREL_MASK) 4627 /*! @} */ 4628 4629 /*! @name CMPH - Compare High Register */ 4630 /*! @{ */ 4631 #define EWM_CMPH_COMPAREH_MASK (0xFFU) 4632 #define EWM_CMPH_COMPAREH_SHIFT (0U) 4633 #define EWM_CMPH_COMPAREH(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPH_COMPAREH_SHIFT)) & EWM_CMPH_COMPAREH_MASK) 4634 /*! @} */ 4635 4636 /*! @name CLKPRESCALER - Clock Prescaler Register */ 4637 /*! @{ */ 4638 #define EWM_CLKPRESCALER_CLK_DIV_MASK (0xFFU) 4639 #define EWM_CLKPRESCALER_CLK_DIV_SHIFT (0U) 4640 #define EWM_CLKPRESCALER_CLK_DIV(x) (((uint8_t)(((uint8_t)(x)) << EWM_CLKPRESCALER_CLK_DIV_SHIFT)) & EWM_CLKPRESCALER_CLK_DIV_MASK) 4641 /*! @} */ 4642 4643 4644 /*! 4645 * @} 4646 */ /* end of group EWM_Register_Masks */ 4647 4648 4649 /* EWM - Peripheral instance base addresses */ 4650 /** Peripheral EWM base address */ 4651 #define EWM_BASE (0x40022000u) 4652 /** Peripheral EWM base pointer */ 4653 #define EWM ((EWM_Type *)EWM_BASE) 4654 /** Array initializer of EWM peripheral base addresses */ 4655 #define EWM_BASE_ADDRS { EWM_BASE } 4656 /** Array initializer of EWM peripheral base pointers */ 4657 #define EWM_BASE_PTRS { EWM } 4658 /** Interrupt vectors for the EWM peripheral type */ 4659 #define EWM_IRQS { EWM_IRQn } 4660 4661 /*! 4662 * @} 4663 */ /* end of group EWM_Peripheral_Access_Layer */ 4664 4665 4666 /* ---------------------------------------------------------------------------- 4667 -- FB Peripheral Access Layer 4668 ---------------------------------------------------------------------------- */ 4669 4670 /*! 4671 * @addtogroup FB_Peripheral_Access_Layer FB Peripheral Access Layer 4672 * @{ 4673 */ 4674 4675 /** FB - Register Layout Typedef */ 4676 typedef struct { 4677 struct { /* offset: 0x0, array step: 0xC */ 4678 __IO uint32_t CSAR; /**< Chip Select Address Register, array offset: 0x0, array step: 0xC */ 4679 __IO uint32_t CSMR; /**< Chip Select Mask Register, array offset: 0x4, array step: 0xC */ 4680 __IO uint32_t CSCR; /**< Chip Select Control Register, array offset: 0x8, array step: 0xC */ 4681 } CS[6]; 4682 uint8_t RESERVED_0[24]; 4683 __IO uint32_t CSPMCR; /**< Chip Select Port Multiplexing Control Register, offset: 0x60 */ 4684 } FB_Type; 4685 4686 /* ---------------------------------------------------------------------------- 4687 -- FB Register Masks 4688 ---------------------------------------------------------------------------- */ 4689 4690 /*! 4691 * @addtogroup FB_Register_Masks FB Register Masks 4692 * @{ 4693 */ 4694 4695 /*! @name CSAR - Chip Select Address Register */ 4696 /*! @{ */ 4697 #define FB_CSAR_BA_MASK (0xFFFF0000U) 4698 #define FB_CSAR_BA_SHIFT (16U) 4699 #define FB_CSAR_BA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSAR_BA_SHIFT)) & FB_CSAR_BA_MASK) 4700 /*! @} */ 4701 4702 /* The count of FB_CSAR */ 4703 #define FB_CSAR_COUNT (6U) 4704 4705 /*! @name CSMR - Chip Select Mask Register */ 4706 /*! @{ */ 4707 #define FB_CSMR_V_MASK (0x1U) 4708 #define FB_CSMR_V_SHIFT (0U) 4709 /*! V - Valid 4710 * 0b0..Chip-select is invalid. 4711 * 0b1..Chip-select is valid. 4712 */ 4713 #define FB_CSMR_V(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_V_SHIFT)) & FB_CSMR_V_MASK) 4714 #define FB_CSMR_WP_MASK (0x100U) 4715 #define FB_CSMR_WP_SHIFT (8U) 4716 /*! WP - Write Protect 4717 * 0b0..Write accesses are allowed. 4718 * 0b1..Write accesses are not allowed. Attempting to write to the range of addresses for which the WP bit is set 4719 * results in a bus error termination of the internal cycle and no external cycle. 4720 */ 4721 #define FB_CSMR_WP(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_WP_SHIFT)) & FB_CSMR_WP_MASK) 4722 #define FB_CSMR_BAM_MASK (0xFFFF0000U) 4723 #define FB_CSMR_BAM_SHIFT (16U) 4724 /*! BAM - Base Address Mask 4725 * 0b0000000000000000..The corresponding address bit in CSAR is used in the chip-select decode. 4726 * 0b0000000000000001..The corresponding address bit in CSAR is a don't care in the chip-select decode. 4727 */ 4728 #define FB_CSMR_BAM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_BAM_SHIFT)) & FB_CSMR_BAM_MASK) 4729 /*! @} */ 4730 4731 /* The count of FB_CSMR */ 4732 #define FB_CSMR_COUNT (6U) 4733 4734 /*! @name CSCR - Chip Select Control Register */ 4735 /*! @{ */ 4736 #define FB_CSCR_BSTW_MASK (0x8U) 4737 #define FB_CSCR_BSTW_SHIFT (3U) 4738 /*! BSTW - Burst-Write Enable 4739 * 0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst writes. 4740 * For example, a 32-bit write to an 8-bit port takes four byte writes. 4741 * 0b1..Enabled. Enables burst write of data larger than the specified port size, including 32-bit writes to 8- 4742 * and 16-bit ports, 16-bit writes to 8-bit ports, and line writes to 8-, 16-, and 32-bit ports. 4743 */ 4744 #define FB_CSCR_BSTW(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTW_SHIFT)) & FB_CSCR_BSTW_MASK) 4745 #define FB_CSCR_BSTR_MASK (0x10U) 4746 #define FB_CSCR_BSTR_SHIFT (4U) 4747 /*! BSTR - Burst-Read Enable 4748 * 0b0..Disabled. Data exceeding the specified port size is broken into individual, port-sized, non-burst reads. 4749 * For example, a 32-bit read from an 8-bit port is broken into four 8-bit reads. 4750 * 0b1..Enabled. Enables data burst reads larger than the specified port size, including 32-bit reads from 8- and 4751 * 16-bit ports, 16-bit reads from 8-bit ports, and line reads from 8-, 16-, and 32-bit ports. 4752 */ 4753 #define FB_CSCR_BSTR(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTR_SHIFT)) & FB_CSCR_BSTR_MASK) 4754 #define FB_CSCR_BEM_MASK (0x20U) 4755 #define FB_CSCR_BEM_SHIFT (5U) 4756 /*! BEM - Byte-Enable Mode 4757 * 0b0..FB_BE_B is asserted for data write only. 4758 * 0b1..FB_BE_B is asserted for data read and write accesses. 4759 */ 4760 #define FB_CSCR_BEM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BEM_SHIFT)) & FB_CSCR_BEM_MASK) 4761 #define FB_CSCR_PS_MASK (0xC0U) 4762 #define FB_CSCR_PS_SHIFT (6U) 4763 /*! PS - Port Size 4764 * 0b00..32-bit port size. Valid data is sampled and driven on FB_D[31:0]. 4765 * 0b01..8-bit port size. Valid data is sampled and driven on FB_D[31:24] when BLS is 0b, or FB_D[7:0] when BLS is 1b. 4766 * 0b1x..16-bit port size. Valid data is sampled and driven on FB_D[31:16] when BLS is 0b, or FB_D[15:0] when BLS is 1b. 4767 */ 4768 #define FB_CSCR_PS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_PS_SHIFT)) & FB_CSCR_PS_MASK) 4769 #define FB_CSCR_AA_MASK (0x100U) 4770 #define FB_CSCR_AA_SHIFT (8U) 4771 /*! AA - Auto-Acknowledge Enable 4772 * 0b0..Disabled. No internal transfer acknowledge is asserted and the cycle is terminated externally. 4773 * 0b1..Enabled. Internal transfer acknowledge is asserted as specified by WS. 4774 */ 4775 #define FB_CSCR_AA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_AA_SHIFT)) & FB_CSCR_AA_MASK) 4776 #define FB_CSCR_BLS_MASK (0x200U) 4777 #define FB_CSCR_BLS_SHIFT (9U) 4778 /*! BLS - Byte-Lane Shift 4779 * 0b0..Not shifted. Data is left-aligned on FB_AD. 4780 * 0b1..Shifted. Data is right-aligned on FB_AD. 4781 */ 4782 #define FB_CSCR_BLS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BLS_SHIFT)) & FB_CSCR_BLS_MASK) 4783 #define FB_CSCR_WS_MASK (0xFC00U) 4784 #define FB_CSCR_WS_SHIFT (10U) 4785 #define FB_CSCR_WS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WS_SHIFT)) & FB_CSCR_WS_MASK) 4786 #define FB_CSCR_WRAH_MASK (0x30000U) 4787 #define FB_CSCR_WRAH_SHIFT (16U) 4788 /*! WRAH - Write Address Hold or Deselect 4789 * 0b00..1 cycle (default for all but FB_CS0_B) 4790 * 0b01..2 cycles 4791 * 0b10..3 cycles 4792 * 0b11..4 cycles (default for FB_CS0_B) 4793 */ 4794 #define FB_CSCR_WRAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WRAH_SHIFT)) & FB_CSCR_WRAH_MASK) 4795 #define FB_CSCR_RDAH_MASK (0xC0000U) 4796 #define FB_CSCR_RDAH_SHIFT (18U) 4797 /*! RDAH - Read Address Hold or Deselect 4798 * 0b00..When AA is 1b, 1 cycle. When AA is 0b, 0 cycles. 4799 * 0b01..When AA is 1b, 2 cycles. When AA is 0b, 1 cycle. 4800 * 0b10..When AA is 1b, 3 cycles. When AA is 0b, 2 cycles. 4801 * 0b11..When AA is 1b, 4 cycles. When AA is 0b, 3 cycles. 4802 */ 4803 #define FB_CSCR_RDAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_RDAH_SHIFT)) & FB_CSCR_RDAH_MASK) 4804 #define FB_CSCR_ASET_MASK (0x300000U) 4805 #define FB_CSCR_ASET_SHIFT (20U) 4806 /*! ASET - Address Setup 4807 * 0b00..Assert FB_CSn_B on the first rising clock edge after the address is asserted (default for all but FB_CS0_B). 4808 * 0b01..Assert FB_CSn_B on the second rising clock edge after the address is asserted. 4809 * 0b10..Assert FB_CSn_B on the third rising clock edge after the address is asserted. 4810 * 0b11..Assert FB_CSn_B on the fourth rising clock edge after the address is asserted (default for FB_CS0_B ). 4811 */ 4812 #define FB_CSCR_ASET(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_ASET_SHIFT)) & FB_CSCR_ASET_MASK) 4813 #define FB_CSCR_EXTS_MASK (0x400000U) 4814 #define FB_CSCR_EXTS_SHIFT (22U) 4815 /*! EXTS - EXTS 4816 * 0b0..Disabled. FB_TS_B/FB_ALE asserts for one bus clock cycle. 4817 * 0b1..Enabled. FB_TS_B/FB_ALE remains asserted until the first positive clock edge after FB_CSn_B asserts. 4818 */ 4819 #define FB_CSCR_EXTS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_EXTS_SHIFT)) & FB_CSCR_EXTS_MASK) 4820 #define FB_CSCR_SWSEN_MASK (0x800000U) 4821 #define FB_CSCR_SWSEN_SHIFT (23U) 4822 /*! SWSEN - Secondary Wait State Enable 4823 * 0b0..Disabled. A number of wait states (specified by WS) are inserted before an internal transfer acknowledge is generated for all transfers. 4824 * 0b1..Enabled. A number of wait states (specified by SWS) are inserted before an internal transfer acknowledge 4825 * is generated for burst transfer secondary terminations. 4826 */ 4827 #define FB_CSCR_SWSEN(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWSEN_SHIFT)) & FB_CSCR_SWSEN_MASK) 4828 #define FB_CSCR_SWS_MASK (0xFC000000U) 4829 #define FB_CSCR_SWS_SHIFT (26U) 4830 #define FB_CSCR_SWS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWS_SHIFT)) & FB_CSCR_SWS_MASK) 4831 /*! @} */ 4832 4833 /* The count of FB_CSCR */ 4834 #define FB_CSCR_COUNT (6U) 4835 4836 /*! @name CSPMCR - Chip Select Port Multiplexing Control Register */ 4837 /*! @{ */ 4838 #define FB_CSPMCR_GROUP5_MASK (0xF000U) 4839 #define FB_CSPMCR_GROUP5_SHIFT (12U) 4840 /*! GROUP5 - FlexBus Signal Group 5 Multiplex control 4841 * 0b0000..FB_TA_B 4842 * 0b0001..FB_CS3_B. You must also write 1b to CSCR[AA]. 4843 * 0b0010..FB_BE_7_0_B. You must also write 1b to CSCR[AA]. 4844 */ 4845 #define FB_CSPMCR_GROUP5(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP5_SHIFT)) & FB_CSPMCR_GROUP5_MASK) 4846 #define FB_CSPMCR_GROUP4_MASK (0xF0000U) 4847 #define FB_CSPMCR_GROUP4_SHIFT (16U) 4848 /*! GROUP4 - FlexBus Signal Group 4 Multiplex control 4849 * 0b0000..FB_TBST_B 4850 * 0b0001..FB_CS2_B 4851 * 0b0010..FB_BE_15_8_B 4852 */ 4853 #define FB_CSPMCR_GROUP4(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP4_SHIFT)) & FB_CSPMCR_GROUP4_MASK) 4854 #define FB_CSPMCR_GROUP3_MASK (0xF00000U) 4855 #define FB_CSPMCR_GROUP3_SHIFT (20U) 4856 /*! GROUP3 - FlexBus Signal Group 3 Multiplex control 4857 * 0b0000..FB_CS5_B 4858 * 0b0001..FB_TSIZ1 4859 * 0b0010..FB_BE_23_16_B 4860 */ 4861 #define FB_CSPMCR_GROUP3(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP3_SHIFT)) & FB_CSPMCR_GROUP3_MASK) 4862 #define FB_CSPMCR_GROUP2_MASK (0xF000000U) 4863 #define FB_CSPMCR_GROUP2_SHIFT (24U) 4864 /*! GROUP2 - FlexBus Signal Group 2 Multiplex control 4865 * 0b0000..FB_CS4_B 4866 * 0b0001..FB_TSIZ0 4867 * 0b0010..FB_BE_31_24_B 4868 */ 4869 #define FB_CSPMCR_GROUP2(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP2_SHIFT)) & FB_CSPMCR_GROUP2_MASK) 4870 #define FB_CSPMCR_GROUP1_MASK (0xF0000000U) 4871 #define FB_CSPMCR_GROUP1_SHIFT (28U) 4872 /*! GROUP1 - FlexBus Signal Group 1 Multiplex control 4873 * 0b0000..FB_ALE 4874 * 0b0001..FB_CS1_B 4875 * 0b0010..FB_TS_B 4876 */ 4877 #define FB_CSPMCR_GROUP1(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP1_SHIFT)) & FB_CSPMCR_GROUP1_MASK) 4878 /*! @} */ 4879 4880 4881 /*! 4882 * @} 4883 */ /* end of group FB_Register_Masks */ 4884 4885 4886 /* FB - Peripheral instance base addresses */ 4887 /** Peripheral FB base address */ 4888 #define FB_BASE (0x4000C000u) 4889 /** Peripheral FB base pointer */ 4890 #define FB ((FB_Type *)FB_BASE) 4891 /** Array initializer of FB peripheral base addresses */ 4892 #define FB_BASE_ADDRS { FB_BASE } 4893 /** Array initializer of FB peripheral base pointers */ 4894 #define FB_BASE_PTRS { FB } 4895 4896 /*! 4897 * @} 4898 */ /* end of group FB_Peripheral_Access_Layer */ 4899 4900 4901 /* ---------------------------------------------------------------------------- 4902 -- FGPIO Peripheral Access Layer 4903 ---------------------------------------------------------------------------- */ 4904 4905 /*! 4906 * @addtogroup FGPIO_Peripheral_Access_Layer FGPIO Peripheral Access Layer 4907 * @{ 4908 */ 4909 4910 /** FGPIO - Register Layout Typedef */ 4911 typedef struct { 4912 __IO uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */ 4913 __O uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */ 4914 __O uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */ 4915 __O uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */ 4916 __I uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */ 4917 __IO uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */ 4918 } FGPIO_Type; 4919 4920 /* ---------------------------------------------------------------------------- 4921 -- FGPIO Register Masks 4922 ---------------------------------------------------------------------------- */ 4923 4924 /*! 4925 * @addtogroup FGPIO_Register_Masks FGPIO Register Masks 4926 * @{ 4927 */ 4928 4929 /*! @name PDOR - Port Data Output Register */ 4930 /*! @{ */ 4931 #define FGPIO_PDOR_PDO_MASK (0xFFFFFFFFU) 4932 #define FGPIO_PDOR_PDO_SHIFT (0U) 4933 #define FGPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PDOR_PDO_SHIFT)) & FGPIO_PDOR_PDO_MASK) 4934 /*! @} */ 4935 4936 /*! @name PSOR - Port Set Output Register */ 4937 /*! @{ */ 4938 #define FGPIO_PSOR_PTSO_MASK (0xFFFFFFFFU) 4939 #define FGPIO_PSOR_PTSO_SHIFT (0U) 4940 #define FGPIO_PSOR_PTSO(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PSOR_PTSO_SHIFT)) & FGPIO_PSOR_PTSO_MASK) 4941 /*! @} */ 4942 4943 /*! @name PCOR - Port Clear Output Register */ 4944 /*! @{ */ 4945 #define FGPIO_PCOR_PTCO_MASK (0xFFFFFFFFU) 4946 #define FGPIO_PCOR_PTCO_SHIFT (0U) 4947 #define FGPIO_PCOR_PTCO(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PCOR_PTCO_SHIFT)) & FGPIO_PCOR_PTCO_MASK) 4948 /*! @} */ 4949 4950 /*! @name PTOR - Port Toggle Output Register */ 4951 /*! @{ */ 4952 #define FGPIO_PTOR_PTTO_MASK (0xFFFFFFFFU) 4953 #define FGPIO_PTOR_PTTO_SHIFT (0U) 4954 #define FGPIO_PTOR_PTTO(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PTOR_PTTO_SHIFT)) & FGPIO_PTOR_PTTO_MASK) 4955 /*! @} */ 4956 4957 /*! @name PDIR - Port Data Input Register */ 4958 /*! @{ */ 4959 #define FGPIO_PDIR_PDI_MASK (0xFFFFFFFFU) 4960 #define FGPIO_PDIR_PDI_SHIFT (0U) 4961 #define FGPIO_PDIR_PDI(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PDIR_PDI_SHIFT)) & FGPIO_PDIR_PDI_MASK) 4962 /*! @} */ 4963 4964 /*! @name PDDR - Port Data Direction Register */ 4965 /*! @{ */ 4966 #define FGPIO_PDDR_PDD_MASK (0xFFFFFFFFU) 4967 #define FGPIO_PDDR_PDD_SHIFT (0U) 4968 #define FGPIO_PDDR_PDD(x) (((uint32_t)(((uint32_t)(x)) << FGPIO_PDDR_PDD_SHIFT)) & FGPIO_PDDR_PDD_MASK) 4969 /*! @} */ 4970 4971 4972 /*! 4973 * @} 4974 */ /* end of group FGPIO_Register_Masks */ 4975 4976 4977 /* FGPIO - Peripheral instance base addresses */ 4978 /** Peripheral FGPIOE base address */ 4979 #define FGPIOE_BASE (0xF8000000u) 4980 /** Peripheral FGPIOE base pointer */ 4981 #define FGPIOE ((FGPIO_Type *)FGPIOE_BASE) 4982 /** Array initializer of FGPIO peripheral base addresses */ 4983 #define FGPIO_BASE_ADDRS { 0u, 0u, 0u, 0u, FGPIOE_BASE } 4984 /** Array initializer of FGPIO peripheral base pointers */ 4985 #define FGPIO_BASE_PTRS { (FGPIO_Type *)0u, (FGPIO_Type *)0u, (FGPIO_Type *)0u, (FGPIO_Type *)0u, FGPIOE } 4986 4987 /*! 4988 * @} 4989 */ /* end of group FGPIO_Peripheral_Access_Layer */ 4990 4991 4992 /* ---------------------------------------------------------------------------- 4993 -- FLEXIO Peripheral Access Layer 4994 ---------------------------------------------------------------------------- */ 4995 4996 /*! 4997 * @addtogroup FLEXIO_Peripheral_Access_Layer FLEXIO Peripheral Access Layer 4998 * @{ 4999 */ 5000 5001 /** FLEXIO - Register Layout Typedef */ 5002 typedef struct { 5003 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 5004 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 5005 __IO uint32_t CTRL; /**< FlexIO Control Register, offset: 0x8 */ 5006 __I uint32_t PIN; /**< Pin State Register, offset: 0xC */ 5007 __IO uint32_t SHIFTSTAT; /**< Shifter Status Register, offset: 0x10 */ 5008 __IO uint32_t SHIFTERR; /**< Shifter Error Register, offset: 0x14 */ 5009 __IO uint32_t TIMSTAT; /**< Timer Status Register, offset: 0x18 */ 5010 uint8_t RESERVED_0[4]; 5011 __IO uint32_t SHIFTSIEN; /**< Shifter Status Interrupt Enable, offset: 0x20 */ 5012 __IO uint32_t SHIFTEIEN; /**< Shifter Error Interrupt Enable, offset: 0x24 */ 5013 __IO uint32_t TIMIEN; /**< Timer Interrupt Enable Register, offset: 0x28 */ 5014 uint8_t RESERVED_1[4]; 5015 __IO uint32_t SHIFTSDEN; /**< Shifter Status DMA Enable, offset: 0x30 */ 5016 uint8_t RESERVED_2[12]; 5017 __IO uint32_t SHIFTSTATE; /**< Shifter State Register, offset: 0x40 */ 5018 uint8_t RESERVED_3[60]; 5019 __IO uint32_t SHIFTCTL[8]; /**< Shifter Control N Register, array offset: 0x80, array step: 0x4 */ 5020 uint8_t RESERVED_4[96]; 5021 __IO uint32_t SHIFTCFG[8]; /**< Shifter Configuration N Register, array offset: 0x100, array step: 0x4 */ 5022 uint8_t RESERVED_5[224]; 5023 __IO uint32_t SHIFTBUF[8]; /**< Shifter Buffer N Register, array offset: 0x200, array step: 0x4 */ 5024 uint8_t RESERVED_6[96]; 5025 __IO uint32_t SHIFTBUFBIS[8]; /**< Shifter Buffer N Bit Swapped Register, array offset: 0x280, array step: 0x4 */ 5026 uint8_t RESERVED_7[96]; 5027 __IO uint32_t SHIFTBUFBYS[8]; /**< Shifter Buffer N Byte Swapped Register, array offset: 0x300, array step: 0x4 */ 5028 uint8_t RESERVED_8[96]; 5029 __IO uint32_t SHIFTBUFBBS[8]; /**< Shifter Buffer N Bit Byte Swapped Register, array offset: 0x380, array step: 0x4 */ 5030 uint8_t RESERVED_9[96]; 5031 __IO uint32_t TIMCTL[8]; /**< Timer Control N Register, array offset: 0x400, array step: 0x4 */ 5032 uint8_t RESERVED_10[96]; 5033 __IO uint32_t TIMCFG[8]; /**< Timer Configuration N Register, array offset: 0x480, array step: 0x4 */ 5034 uint8_t RESERVED_11[96]; 5035 __IO uint32_t TIMCMP[8]; /**< Timer Compare N Register, array offset: 0x500, array step: 0x4 */ 5036 uint8_t RESERVED_12[352]; 5037 __IO uint32_t SHIFTBUFNBS[8]; /**< Shifter Buffer N Nibble Byte Swapped Register, array offset: 0x680, array step: 0x4 */ 5038 uint8_t RESERVED_13[96]; 5039 __IO uint32_t SHIFTBUFHWS[8]; /**< Shifter Buffer N Half Word Swapped Register, array offset: 0x700, array step: 0x4 */ 5040 uint8_t RESERVED_14[96]; 5041 __IO uint32_t SHIFTBUFNIS[8]; /**< Shifter Buffer N Nibble Swapped Register, array offset: 0x780, array step: 0x4 */ 5042 } FLEXIO_Type; 5043 5044 /* ---------------------------------------------------------------------------- 5045 -- FLEXIO Register Masks 5046 ---------------------------------------------------------------------------- */ 5047 5048 /*! 5049 * @addtogroup FLEXIO_Register_Masks FLEXIO Register Masks 5050 * @{ 5051 */ 5052 5053 /*! @name VERID - Version ID Register */ 5054 /*! @{ */ 5055 #define FLEXIO_VERID_FEATURE_MASK (0xFFFFU) 5056 #define FLEXIO_VERID_FEATURE_SHIFT (0U) 5057 /*! FEATURE - Feature Specification Number 5058 * 0b0000000000000000..Standard features implemented. 5059 * 0b0000000000000001..Supports state, logic and parallel modes. 5060 */ 5061 #define FLEXIO_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_FEATURE_SHIFT)) & FLEXIO_VERID_FEATURE_MASK) 5062 #define FLEXIO_VERID_MINOR_MASK (0xFF0000U) 5063 #define FLEXIO_VERID_MINOR_SHIFT (16U) 5064 #define FLEXIO_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MINOR_SHIFT)) & FLEXIO_VERID_MINOR_MASK) 5065 #define FLEXIO_VERID_MAJOR_MASK (0xFF000000U) 5066 #define FLEXIO_VERID_MAJOR_SHIFT (24U) 5067 #define FLEXIO_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MAJOR_SHIFT)) & FLEXIO_VERID_MAJOR_MASK) 5068 /*! @} */ 5069 5070 /*! @name PARAM - Parameter Register */ 5071 /*! @{ */ 5072 #define FLEXIO_PARAM_SHIFTER_MASK (0xFFU) 5073 #define FLEXIO_PARAM_SHIFTER_SHIFT (0U) 5074 #define FLEXIO_PARAM_SHIFTER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_SHIFTER_SHIFT)) & FLEXIO_PARAM_SHIFTER_MASK) 5075 #define FLEXIO_PARAM_TIMER_MASK (0xFF00U) 5076 #define FLEXIO_PARAM_TIMER_SHIFT (8U) 5077 #define FLEXIO_PARAM_TIMER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TIMER_SHIFT)) & FLEXIO_PARAM_TIMER_MASK) 5078 #define FLEXIO_PARAM_PIN_MASK (0xFF0000U) 5079 #define FLEXIO_PARAM_PIN_SHIFT (16U) 5080 #define FLEXIO_PARAM_PIN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_PIN_SHIFT)) & FLEXIO_PARAM_PIN_MASK) 5081 #define FLEXIO_PARAM_TRIGGER_MASK (0xFF000000U) 5082 #define FLEXIO_PARAM_TRIGGER_SHIFT (24U) 5083 #define FLEXIO_PARAM_TRIGGER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TRIGGER_SHIFT)) & FLEXIO_PARAM_TRIGGER_MASK) 5084 /*! @} */ 5085 5086 /*! @name CTRL - FlexIO Control Register */ 5087 /*! @{ */ 5088 #define FLEXIO_CTRL_FLEXEN_MASK (0x1U) 5089 #define FLEXIO_CTRL_FLEXEN_SHIFT (0U) 5090 /*! FLEXEN - FlexIO Enable 5091 * 0b0..FlexIO module is disabled. 5092 * 0b1..FlexIO module is enabled. 5093 */ 5094 #define FLEXIO_CTRL_FLEXEN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FLEXEN_SHIFT)) & FLEXIO_CTRL_FLEXEN_MASK) 5095 #define FLEXIO_CTRL_SWRST_MASK (0x2U) 5096 #define FLEXIO_CTRL_SWRST_SHIFT (1U) 5097 /*! SWRST - Software Reset 5098 * 0b0..Software reset is disabled 5099 * 0b1..Software reset is enabled, all FlexIO registers except the Control Register are reset. 5100 */ 5101 #define FLEXIO_CTRL_SWRST(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_SWRST_SHIFT)) & FLEXIO_CTRL_SWRST_MASK) 5102 #define FLEXIO_CTRL_FASTACC_MASK (0x4U) 5103 #define FLEXIO_CTRL_FASTACC_SHIFT (2U) 5104 /*! FASTACC - Fast Access 5105 * 0b0..Configures for normal register accesses to FlexIO 5106 * 0b1..Configures for fast register accesses to FlexIO 5107 */ 5108 #define FLEXIO_CTRL_FASTACC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FASTACC_SHIFT)) & FLEXIO_CTRL_FASTACC_MASK) 5109 #define FLEXIO_CTRL_DBGE_MASK (0x40000000U) 5110 #define FLEXIO_CTRL_DBGE_SHIFT (30U) 5111 /*! DBGE - Debug Enable 5112 * 0b0..FlexIO is disabled in debug modes. 5113 * 0b1..FlexIO is enabled in debug modes 5114 */ 5115 #define FLEXIO_CTRL_DBGE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DBGE_SHIFT)) & FLEXIO_CTRL_DBGE_MASK) 5116 #define FLEXIO_CTRL_DOZEN_MASK (0x80000000U) 5117 #define FLEXIO_CTRL_DOZEN_SHIFT (31U) 5118 /*! DOZEN - Doze Enable 5119 * 0b0..FlexIO enabled in Doze modes. 5120 * 0b1..FlexIO disabled in Doze modes. 5121 */ 5122 #define FLEXIO_CTRL_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DOZEN_SHIFT)) & FLEXIO_CTRL_DOZEN_MASK) 5123 /*! @} */ 5124 5125 /*! @name PIN - Pin State Register */ 5126 /*! @{ */ 5127 #define FLEXIO_PIN_PDI_MASK (0xFFFFFFFFU) 5128 #define FLEXIO_PIN_PDI_SHIFT (0U) 5129 #define FLEXIO_PIN_PDI(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PIN_PDI_SHIFT)) & FLEXIO_PIN_PDI_MASK) 5130 /*! @} */ 5131 5132 /*! @name SHIFTSTAT - Shifter Status Register */ 5133 /*! @{ */ 5134 #define FLEXIO_SHIFTSTAT_SSF_MASK (0xFFU) 5135 #define FLEXIO_SHIFTSTAT_SSF_SHIFT (0U) 5136 #define FLEXIO_SHIFTSTAT_SSF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTAT_SSF_SHIFT)) & FLEXIO_SHIFTSTAT_SSF_MASK) 5137 /*! @} */ 5138 5139 /*! @name SHIFTERR - Shifter Error Register */ 5140 /*! @{ */ 5141 #define FLEXIO_SHIFTERR_SEF_MASK (0xFFU) 5142 #define FLEXIO_SHIFTERR_SEF_SHIFT (0U) 5143 #define FLEXIO_SHIFTERR_SEF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTERR_SEF_SHIFT)) & FLEXIO_SHIFTERR_SEF_MASK) 5144 /*! @} */ 5145 5146 /*! @name TIMSTAT - Timer Status Register */ 5147 /*! @{ */ 5148 #define FLEXIO_TIMSTAT_TSF_MASK (0xFFU) 5149 #define FLEXIO_TIMSTAT_TSF_SHIFT (0U) 5150 #define FLEXIO_TIMSTAT_TSF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMSTAT_TSF_SHIFT)) & FLEXIO_TIMSTAT_TSF_MASK) 5151 /*! @} */ 5152 5153 /*! @name SHIFTSIEN - Shifter Status Interrupt Enable */ 5154 /*! @{ */ 5155 #define FLEXIO_SHIFTSIEN_SSIE_MASK (0xFFU) 5156 #define FLEXIO_SHIFTSIEN_SSIE_SHIFT (0U) 5157 #define FLEXIO_SHIFTSIEN_SSIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSIEN_SSIE_SHIFT)) & FLEXIO_SHIFTSIEN_SSIE_MASK) 5158 /*! @} */ 5159 5160 /*! @name SHIFTEIEN - Shifter Error Interrupt Enable */ 5161 /*! @{ */ 5162 #define FLEXIO_SHIFTEIEN_SEIE_MASK (0xFFU) 5163 #define FLEXIO_SHIFTEIEN_SEIE_SHIFT (0U) 5164 #define FLEXIO_SHIFTEIEN_SEIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTEIEN_SEIE_SHIFT)) & FLEXIO_SHIFTEIEN_SEIE_MASK) 5165 /*! @} */ 5166 5167 /*! @name TIMIEN - Timer Interrupt Enable Register */ 5168 /*! @{ */ 5169 #define FLEXIO_TIMIEN_TEIE_MASK (0xFFU) 5170 #define FLEXIO_TIMIEN_TEIE_SHIFT (0U) 5171 #define FLEXIO_TIMIEN_TEIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMIEN_TEIE_SHIFT)) & FLEXIO_TIMIEN_TEIE_MASK) 5172 /*! @} */ 5173 5174 /*! @name SHIFTSDEN - Shifter Status DMA Enable */ 5175 /*! @{ */ 5176 #define FLEXIO_SHIFTSDEN_SSDE_MASK (0xFFU) 5177 #define FLEXIO_SHIFTSDEN_SSDE_SHIFT (0U) 5178 #define FLEXIO_SHIFTSDEN_SSDE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSDEN_SSDE_SHIFT)) & FLEXIO_SHIFTSDEN_SSDE_MASK) 5179 /*! @} */ 5180 5181 /*! @name SHIFTSTATE - Shifter State Register */ 5182 /*! @{ */ 5183 #define FLEXIO_SHIFTSTATE_STATE_MASK (0x7U) 5184 #define FLEXIO_SHIFTSTATE_STATE_SHIFT (0U) 5185 #define FLEXIO_SHIFTSTATE_STATE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTATE_STATE_SHIFT)) & FLEXIO_SHIFTSTATE_STATE_MASK) 5186 /*! @} */ 5187 5188 /*! @name SHIFTCTL - Shifter Control N Register */ 5189 /*! @{ */ 5190 #define FLEXIO_SHIFTCTL_SMOD_MASK (0x7U) 5191 #define FLEXIO_SHIFTCTL_SMOD_SHIFT (0U) 5192 /*! SMOD - Shifter Mode 5193 * 0b000..Disabled. 5194 * 0b001..Receive mode. Captures the current Shifter content into the SHIFTBUF on expiration of the Timer. 5195 * 0b010..Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer. 5196 * 0b011..Reserved. 5197 * 0b100..Match Store mode. Shifter data is compared to SHIFTBUF content on expiration of the Timer. 5198 * 0b101..Match Continuous mode. Shifter data is continuously compared to SHIFTBUF contents. 5199 * 0b110..State mode. SHIFTBUF contents are used for storing programmable state attributes. 5200 * 0b111..Logic mode. SHIFTBUF contents are used for implementing programmable logic look up table. 5201 */ 5202 #define FLEXIO_SHIFTCTL_SMOD(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_SMOD_SHIFT)) & FLEXIO_SHIFTCTL_SMOD_MASK) 5203 #define FLEXIO_SHIFTCTL_PINPOL_MASK (0x80U) 5204 #define FLEXIO_SHIFTCTL_PINPOL_SHIFT (7U) 5205 /*! PINPOL - Shifter Pin Polarity 5206 * 0b0..Pin is active high 5207 * 0b1..Pin is active low 5208 */ 5209 #define FLEXIO_SHIFTCTL_PINPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINPOL_SHIFT)) & FLEXIO_SHIFTCTL_PINPOL_MASK) 5210 #define FLEXIO_SHIFTCTL_PINSEL_MASK (0x1F00U) 5211 #define FLEXIO_SHIFTCTL_PINSEL_SHIFT (8U) 5212 #define FLEXIO_SHIFTCTL_PINSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINSEL_SHIFT)) & FLEXIO_SHIFTCTL_PINSEL_MASK) 5213 #define FLEXIO_SHIFTCTL_PINCFG_MASK (0x30000U) 5214 #define FLEXIO_SHIFTCTL_PINCFG_SHIFT (16U) 5215 /*! PINCFG - Shifter Pin Configuration 5216 * 0b00..Shifter pin output disabled 5217 * 0b01..Shifter pin open drain or bidirectional output enable 5218 * 0b10..Shifter pin bidirectional output data 5219 * 0b11..Shifter pin output 5220 */ 5221 #define FLEXIO_SHIFTCTL_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINCFG_SHIFT)) & FLEXIO_SHIFTCTL_PINCFG_MASK) 5222 #define FLEXIO_SHIFTCTL_TIMPOL_MASK (0x800000U) 5223 #define FLEXIO_SHIFTCTL_TIMPOL_SHIFT (23U) 5224 /*! TIMPOL - Timer Polarity 5225 * 0b0..Shift on posedge of Shift clock 5226 * 0b1..Shift on negedge of Shift clock 5227 */ 5228 #define FLEXIO_SHIFTCTL_TIMPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMPOL_SHIFT)) & FLEXIO_SHIFTCTL_TIMPOL_MASK) 5229 #define FLEXIO_SHIFTCTL_TIMSEL_MASK (0x7000000U) 5230 #define FLEXIO_SHIFTCTL_TIMSEL_SHIFT (24U) 5231 #define FLEXIO_SHIFTCTL_TIMSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMSEL_SHIFT)) & FLEXIO_SHIFTCTL_TIMSEL_MASK) 5232 /*! @} */ 5233 5234 /* The count of FLEXIO_SHIFTCTL */ 5235 #define FLEXIO_SHIFTCTL_COUNT (8U) 5236 5237 /*! @name SHIFTCFG - Shifter Configuration N Register */ 5238 /*! @{ */ 5239 #define FLEXIO_SHIFTCFG_SSTART_MASK (0x3U) 5240 #define FLEXIO_SHIFTCFG_SSTART_SHIFT (0U) 5241 /*! SSTART - Shifter Start bit 5242 * 0b00..Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable 5243 * 0b01..Start bit disabled for transmitter/receiver/match store, transmitter loads data on first shift 5244 * 0b10..Transmitter outputs start bit value 0 before loading data on first shift, receiver/match store sets error flag if start bit is not 0 5245 * 0b11..Transmitter outputs start bit value 1 before loading data on first shift, receiver/match store sets error flag if start bit is not 1 5246 */ 5247 #define FLEXIO_SHIFTCFG_SSTART(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTART_SHIFT)) & FLEXIO_SHIFTCFG_SSTART_MASK) 5248 #define FLEXIO_SHIFTCFG_SSTOP_MASK (0x30U) 5249 #define FLEXIO_SHIFTCFG_SSTOP_SHIFT (4U) 5250 /*! SSTOP - Shifter Stop bit 5251 * 0b00..Stop bit disabled for transmitter/receiver/match store 5252 * 0b01..Reserved for transmitter/receiver/match store 5253 * 0b10..Transmitter outputs stop bit value 0 on store, receiver/match store sets error flag if stop bit is not 0 5254 * 0b11..Transmitter outputs stop bit value 1 on store, receiver/match store sets error flag if stop bit is not 1 5255 */ 5256 #define FLEXIO_SHIFTCFG_SSTOP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTOP_SHIFT)) & FLEXIO_SHIFTCFG_SSTOP_MASK) 5257 #define FLEXIO_SHIFTCFG_INSRC_MASK (0x100U) 5258 #define FLEXIO_SHIFTCFG_INSRC_SHIFT (8U) 5259 /*! INSRC - Input Source 5260 * 0b0..Pin 5261 * 0b1..Shifter N+1 Output 5262 */ 5263 #define FLEXIO_SHIFTCFG_INSRC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_INSRC_SHIFT)) & FLEXIO_SHIFTCFG_INSRC_MASK) 5264 #define FLEXIO_SHIFTCFG_PWIDTH_MASK (0x1F0000U) 5265 #define FLEXIO_SHIFTCFG_PWIDTH_SHIFT (16U) 5266 #define FLEXIO_SHIFTCFG_PWIDTH(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_PWIDTH_SHIFT)) & FLEXIO_SHIFTCFG_PWIDTH_MASK) 5267 /*! @} */ 5268 5269 /* The count of FLEXIO_SHIFTCFG */ 5270 #define FLEXIO_SHIFTCFG_COUNT (8U) 5271 5272 /*! @name SHIFTBUF - Shifter Buffer N Register */ 5273 /*! @{ */ 5274 #define FLEXIO_SHIFTBUF_SHIFTBUF_MASK (0xFFFFFFFFU) 5275 #define FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT (0U) 5276 #define FLEXIO_SHIFTBUF_SHIFTBUF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT)) & FLEXIO_SHIFTBUF_SHIFTBUF_MASK) 5277 /*! @} */ 5278 5279 /* The count of FLEXIO_SHIFTBUF */ 5280 #define FLEXIO_SHIFTBUF_COUNT (8U) 5281 5282 /*! @name SHIFTBUFBIS - Shifter Buffer N Bit Swapped Register */ 5283 /*! @{ */ 5284 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK (0xFFFFFFFFU) 5285 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT (0U) 5286 #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT)) & FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK) 5287 /*! @} */ 5288 5289 /* The count of FLEXIO_SHIFTBUFBIS */ 5290 #define FLEXIO_SHIFTBUFBIS_COUNT (8U) 5291 5292 /*! @name SHIFTBUFBYS - Shifter Buffer N Byte Swapped Register */ 5293 /*! @{ */ 5294 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK (0xFFFFFFFFU) 5295 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT (0U) 5296 #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT)) & FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK) 5297 /*! @} */ 5298 5299 /* The count of FLEXIO_SHIFTBUFBYS */ 5300 #define FLEXIO_SHIFTBUFBYS_COUNT (8U) 5301 5302 /*! @name SHIFTBUFBBS - Shifter Buffer N Bit Byte Swapped Register */ 5303 /*! @{ */ 5304 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK (0xFFFFFFFFU) 5305 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT (0U) 5306 #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT)) & FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK) 5307 /*! @} */ 5308 5309 /* The count of FLEXIO_SHIFTBUFBBS */ 5310 #define FLEXIO_SHIFTBUFBBS_COUNT (8U) 5311 5312 /*! @name TIMCTL - Timer Control N Register */ 5313 /*! @{ */ 5314 #define FLEXIO_TIMCTL_TIMOD_MASK (0x3U) 5315 #define FLEXIO_TIMCTL_TIMOD_SHIFT (0U) 5316 /*! TIMOD - Timer Mode 5317 * 0b00..Timer Disabled. 5318 * 0b01..Dual 8-bit counters baud mode. 5319 * 0b10..Dual 8-bit counters PWM high mode. 5320 * 0b11..Single 16-bit counter mode. 5321 */ 5322 #define FLEXIO_TIMCTL_TIMOD(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TIMOD_SHIFT)) & FLEXIO_TIMCTL_TIMOD_MASK) 5323 #define FLEXIO_TIMCTL_PINPOL_MASK (0x80U) 5324 #define FLEXIO_TIMCTL_PINPOL_SHIFT (7U) 5325 /*! PINPOL - Timer Pin Polarity 5326 * 0b0..Pin is active high 5327 * 0b1..Pin is active low 5328 */ 5329 #define FLEXIO_TIMCTL_PINPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINPOL_SHIFT)) & FLEXIO_TIMCTL_PINPOL_MASK) 5330 #define FLEXIO_TIMCTL_PINSEL_MASK (0x1F00U) 5331 #define FLEXIO_TIMCTL_PINSEL_SHIFT (8U) 5332 #define FLEXIO_TIMCTL_PINSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINSEL_SHIFT)) & FLEXIO_TIMCTL_PINSEL_MASK) 5333 #define FLEXIO_TIMCTL_PINCFG_MASK (0x30000U) 5334 #define FLEXIO_TIMCTL_PINCFG_SHIFT (16U) 5335 /*! PINCFG - Timer Pin Configuration 5336 * 0b00..Timer pin output disabled 5337 * 0b01..Timer pin open drain or bidirectional output enable 5338 * 0b10..Timer pin bidirectional output data 5339 * 0b11..Timer pin output 5340 */ 5341 #define FLEXIO_TIMCTL_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINCFG_SHIFT)) & FLEXIO_TIMCTL_PINCFG_MASK) 5342 #define FLEXIO_TIMCTL_TRGSRC_MASK (0x400000U) 5343 #define FLEXIO_TIMCTL_TRGSRC_SHIFT (22U) 5344 /*! TRGSRC - Trigger Source 5345 * 0b0..External trigger selected 5346 * 0b1..Internal trigger selected 5347 */ 5348 #define FLEXIO_TIMCTL_TRGSRC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSRC_SHIFT)) & FLEXIO_TIMCTL_TRGSRC_MASK) 5349 #define FLEXIO_TIMCTL_TRGPOL_MASK (0x800000U) 5350 #define FLEXIO_TIMCTL_TRGPOL_SHIFT (23U) 5351 /*! TRGPOL - Trigger Polarity 5352 * 0b0..Trigger active high 5353 * 0b1..Trigger active low 5354 */ 5355 #define FLEXIO_TIMCTL_TRGPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGPOL_SHIFT)) & FLEXIO_TIMCTL_TRGPOL_MASK) 5356 #define FLEXIO_TIMCTL_TRGSEL_MASK (0x3F000000U) 5357 #define FLEXIO_TIMCTL_TRGSEL_SHIFT (24U) 5358 #define FLEXIO_TIMCTL_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSEL_SHIFT)) & FLEXIO_TIMCTL_TRGSEL_MASK) 5359 /*! @} */ 5360 5361 /* The count of FLEXIO_TIMCTL */ 5362 #define FLEXIO_TIMCTL_COUNT (8U) 5363 5364 /*! @name TIMCFG - Timer Configuration N Register */ 5365 /*! @{ */ 5366 #define FLEXIO_TIMCFG_TSTART_MASK (0x2U) 5367 #define FLEXIO_TIMCFG_TSTART_SHIFT (1U) 5368 /*! TSTART - Timer Start Bit 5369 * 0b0..Start bit disabled 5370 * 0b1..Start bit enabled 5371 */ 5372 #define FLEXIO_TIMCFG_TSTART(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTART_SHIFT)) & FLEXIO_TIMCFG_TSTART_MASK) 5373 #define FLEXIO_TIMCFG_TSTOP_MASK (0x30U) 5374 #define FLEXIO_TIMCFG_TSTOP_SHIFT (4U) 5375 /*! TSTOP - Timer Stop Bit 5376 * 0b00..Stop bit disabled 5377 * 0b01..Stop bit is enabled on timer compare 5378 * 0b10..Stop bit is enabled on timer disable 5379 * 0b11..Stop bit is enabled on timer compare and timer disable 5380 */ 5381 #define FLEXIO_TIMCFG_TSTOP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTOP_SHIFT)) & FLEXIO_TIMCFG_TSTOP_MASK) 5382 #define FLEXIO_TIMCFG_TIMENA_MASK (0x700U) 5383 #define FLEXIO_TIMCFG_TIMENA_SHIFT (8U) 5384 /*! TIMENA - Timer Enable 5385 * 0b000..Timer always enabled 5386 * 0b001..Timer enabled on Timer N-1 enable 5387 * 0b010..Timer enabled on Trigger high 5388 * 0b011..Timer enabled on Trigger high and Pin high 5389 * 0b100..Timer enabled on Pin rising edge 5390 * 0b101..Timer enabled on Pin rising edge and Trigger high 5391 * 0b110..Timer enabled on Trigger rising edge 5392 * 0b111..Timer enabled on Trigger rising or falling edge 5393 */ 5394 #define FLEXIO_TIMCFG_TIMENA(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMENA_SHIFT)) & FLEXIO_TIMCFG_TIMENA_MASK) 5395 #define FLEXIO_TIMCFG_TIMDIS_MASK (0x7000U) 5396 #define FLEXIO_TIMCFG_TIMDIS_SHIFT (12U) 5397 /*! TIMDIS - Timer Disable 5398 * 0b000..Timer never disabled 5399 * 0b001..Timer disabled on Timer N-1 disable 5400 * 0b010..Timer disabled on Timer compare (upper 8-bits match and decrement) 5401 * 0b011..Timer disabled on Timer compare (upper 8-bits match and decrement) and Trigger Low 5402 * 0b100..Timer disabled on Pin rising or falling edge 5403 * 0b101..Timer disabled on Pin rising or falling edge provided Trigger is high 5404 * 0b110..Timer disabled on Trigger falling edge 5405 * 0b111..Reserved 5406 */ 5407 #define FLEXIO_TIMCFG_TIMDIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDIS_SHIFT)) & FLEXIO_TIMCFG_TIMDIS_MASK) 5408 #define FLEXIO_TIMCFG_TIMRST_MASK (0x70000U) 5409 #define FLEXIO_TIMCFG_TIMRST_SHIFT (16U) 5410 /*! TIMRST - Timer Reset 5411 * 0b000..Timer never reset 5412 * 0b001..Reserved 5413 * 0b010..Timer reset on Timer Pin equal to Timer Output 5414 * 0b011..Timer reset on Timer Trigger equal to Timer Output 5415 * 0b100..Timer reset on Timer Pin rising edge 5416 * 0b101..Reserved 5417 * 0b110..Timer reset on Trigger rising edge 5418 * 0b111..Timer reset on Trigger rising or falling edge 5419 */ 5420 #define FLEXIO_TIMCFG_TIMRST(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMRST_SHIFT)) & FLEXIO_TIMCFG_TIMRST_MASK) 5421 #define FLEXIO_TIMCFG_TIMDEC_MASK (0x300000U) 5422 #define FLEXIO_TIMCFG_TIMDEC_SHIFT (20U) 5423 /*! TIMDEC - Timer Decrement 5424 * 0b00..Decrement counter on FlexIO clock, Shift clock equals Timer output. 5425 * 0b01..Decrement counter on Trigger input (both edges), Shift clock equals Timer output. 5426 * 0b10..Decrement counter on Pin input (both edges), Shift clock equals Pin input. 5427 * 0b11..Decrement counter on Trigger input (both edges), Shift clock equals Trigger input. 5428 */ 5429 #define FLEXIO_TIMCFG_TIMDEC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDEC_SHIFT)) & FLEXIO_TIMCFG_TIMDEC_MASK) 5430 #define FLEXIO_TIMCFG_TIMOUT_MASK (0x3000000U) 5431 #define FLEXIO_TIMCFG_TIMOUT_SHIFT (24U) 5432 /*! TIMOUT - Timer Output 5433 * 0b00..Timer output is logic one when enabled and is not affected by timer reset 5434 * 0b01..Timer output is logic zero when enabled and is not affected by timer reset 5435 * 0b10..Timer output is logic one when enabled and on timer reset 5436 * 0b11..Timer output is logic zero when enabled and on timer reset 5437 */ 5438 #define FLEXIO_TIMCFG_TIMOUT(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMOUT_SHIFT)) & FLEXIO_TIMCFG_TIMOUT_MASK) 5439 /*! @} */ 5440 5441 /* The count of FLEXIO_TIMCFG */ 5442 #define FLEXIO_TIMCFG_COUNT (8U) 5443 5444 /*! @name TIMCMP - Timer Compare N Register */ 5445 /*! @{ */ 5446 #define FLEXIO_TIMCMP_CMP_MASK (0xFFFFU) 5447 #define FLEXIO_TIMCMP_CMP_SHIFT (0U) 5448 #define FLEXIO_TIMCMP_CMP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCMP_CMP_SHIFT)) & FLEXIO_TIMCMP_CMP_MASK) 5449 /*! @} */ 5450 5451 /* The count of FLEXIO_TIMCMP */ 5452 #define FLEXIO_TIMCMP_COUNT (8U) 5453 5454 /*! @name SHIFTBUFNBS - Shifter Buffer N Nibble Byte Swapped Register */ 5455 /*! @{ */ 5456 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK (0xFFFFFFFFU) 5457 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT (0U) 5458 #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT)) & FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK) 5459 /*! @} */ 5460 5461 /* The count of FLEXIO_SHIFTBUFNBS */ 5462 #define FLEXIO_SHIFTBUFNBS_COUNT (8U) 5463 5464 /*! @name SHIFTBUFHWS - Shifter Buffer N Half Word Swapped Register */ 5465 /*! @{ */ 5466 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK (0xFFFFFFFFU) 5467 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT (0U) 5468 #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT)) & FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK) 5469 /*! @} */ 5470 5471 /* The count of FLEXIO_SHIFTBUFHWS */ 5472 #define FLEXIO_SHIFTBUFHWS_COUNT (8U) 5473 5474 /*! @name SHIFTBUFNIS - Shifter Buffer N Nibble Swapped Register */ 5475 /*! @{ */ 5476 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK (0xFFFFFFFFU) 5477 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT (0U) 5478 #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT)) & FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK) 5479 /*! @} */ 5480 5481 /* The count of FLEXIO_SHIFTBUFNIS */ 5482 #define FLEXIO_SHIFTBUFNIS_COUNT (8U) 5483 5484 5485 /*! 5486 * @} 5487 */ /* end of group FLEXIO_Register_Masks */ 5488 5489 5490 /* FLEXIO - Peripheral instance base addresses */ 5491 /** Peripheral FLEXIO0 base address */ 5492 #define FLEXIO0_BASE (0x40039000u) 5493 /** Peripheral FLEXIO0 base pointer */ 5494 #define FLEXIO0 ((FLEXIO_Type *)FLEXIO0_BASE) 5495 /** Array initializer of FLEXIO peripheral base addresses */ 5496 #define FLEXIO_BASE_ADDRS { FLEXIO0_BASE } 5497 /** Array initializer of FLEXIO peripheral base pointers */ 5498 #define FLEXIO_BASE_PTRS { FLEXIO0 } 5499 /** Interrupt vectors for the FLEXIO peripheral type */ 5500 #define FLEXIO_IRQS { FLEXIO0_IRQn } 5501 5502 /*! 5503 * @} 5504 */ /* end of group FLEXIO_Peripheral_Access_Layer */ 5505 5506 5507 /* ---------------------------------------------------------------------------- 5508 -- FTFE Peripheral Access Layer 5509 ---------------------------------------------------------------------------- */ 5510 5511 /*! 5512 * @addtogroup FTFE_Peripheral_Access_Layer FTFE Peripheral Access Layer 5513 * @{ 5514 */ 5515 5516 /** FTFE - Register Layout Typedef */ 5517 typedef struct { 5518 __IO uint8_t FSTAT; /**< Flash Status Register, offset: 0x0 */ 5519 __IO uint8_t FCNFG; /**< Flash Configuration Register, offset: 0x1 */ 5520 __I uint8_t FSEC; /**< Flash Security Register, offset: 0x2 */ 5521 uint8_t RESERVED_0[1]; 5522 __IO uint8_t FCCOB3; /**< Flash Common Command Object Registers, offset: 0x4 */ 5523 __IO uint8_t FCCOB2; /**< Flash Common Command Object Registers, offset: 0x5 */ 5524 __IO uint8_t FCCOB1; /**< Flash Common Command Object Registers, offset: 0x6 */ 5525 __IO uint8_t FCCOB0; /**< Flash Common Command Object Registers, offset: 0x7 */ 5526 __IO uint8_t FCCOB7; /**< Flash Common Command Object Registers, offset: 0x8 */ 5527 __IO uint8_t FCCOB6; /**< Flash Common Command Object Registers, offset: 0x9 */ 5528 __IO uint8_t FCCOB5; /**< Flash Common Command Object Registers, offset: 0xA */ 5529 __IO uint8_t FCCOB4; /**< Flash Common Command Object Registers, offset: 0xB */ 5530 __IO uint8_t FCCOBB; /**< Flash Common Command Object Registers, offset: 0xC */ 5531 __IO uint8_t FCCOBA; /**< Flash Common Command Object Registers, offset: 0xD */ 5532 __IO uint8_t FCCOB9; /**< Flash Common Command Object Registers, offset: 0xE */ 5533 __IO uint8_t FCCOB8; /**< Flash Common Command Object Registers, offset: 0xF */ 5534 __I uint8_t FOPT3; /**< Flash Option Registers, offset: 0x10 */ 5535 __I uint8_t FOPT2; /**< Flash Option Registers, offset: 0x11 */ 5536 __I uint8_t FOPT1; /**< Flash Option Registers, offset: 0x12 */ 5537 __I uint8_t FOPT0; /**< Flash Option Registers, offset: 0x13 */ 5538 uint8_t RESERVED_1[4]; 5539 __IO uint8_t FPROTH3; /**< Primary Program Flash Protection Registers, offset: 0x18 */ 5540 __IO uint8_t FPROTH2; /**< Primary Program Flash Protection Registers, offset: 0x19 */ 5541 __IO uint8_t FPROTH1; /**< Primary Program Flash Protection Registers, offset: 0x1A */ 5542 __IO uint8_t FPROTH0; /**< Primary Program Flash Protection Registers, offset: 0x1B */ 5543 __IO uint8_t FPROTL3; /**< Primary Program Flash Protection Registers, offset: 0x1C */ 5544 __IO uint8_t FPROTL2; /**< Primary Program Flash Protection Registers, offset: 0x1D */ 5545 __IO uint8_t FPROTL1; /**< Primary Program Flash Protection Registers, offset: 0x1E */ 5546 __IO uint8_t FPROTL0; /**< Primary Program Flash Protection Registers, offset: 0x1F */ 5547 uint8_t RESERVED_2[4]; 5548 __IO uint8_t FPROTSL; /**< Secondary Program Flash Protection Registers, offset: 0x24 */ 5549 __IO uint8_t FPROTSH; /**< Secondary Program Flash Protection Registers, offset: 0x25 */ 5550 uint8_t RESERVED_3[6]; 5551 __I uint8_t FACSS; /**< Primary Flash Access Segment Size Register, offset: 0x2C */ 5552 __I uint8_t FACSN; /**< Primary Flash Access Segment Number Register, offset: 0x2D */ 5553 __I uint8_t FACSSS; /**< Secondary Flash Access Segment Size Register, offset: 0x2E */ 5554 __I uint8_t FACSNS; /**< Secondary Flash Access Segment Number Register, offset: 0x2F */ 5555 __I uint8_t XACCH3; /**< Primary Execute-only Access Registers, offset: 0x30 */ 5556 __I uint8_t XACCH2; /**< Primary Execute-only Access Registers, offset: 0x31 */ 5557 __I uint8_t XACCH1; /**< Primary Execute-only Access Registers, offset: 0x32 */ 5558 __I uint8_t XACCH0; /**< Primary Execute-only Access Registers, offset: 0x33 */ 5559 __I uint8_t XACCL3; /**< Primary Execute-only Access Registers, offset: 0x34 */ 5560 __I uint8_t XACCL2; /**< Primary Execute-only Access Registers, offset: 0x35 */ 5561 __I uint8_t XACCL1; /**< Primary Execute-only Access Registers, offset: 0x36 */ 5562 __I uint8_t XACCL0; /**< Primary Execute-only Access Registers, offset: 0x37 */ 5563 __I uint8_t SACCH3; /**< Primary Supervisor-only Access Registers, offset: 0x38 */ 5564 __I uint8_t SACCH2; /**< Primary Supervisor-only Access Registers, offset: 0x39 */ 5565 __I uint8_t SACCH1; /**< Primary Supervisor-only Access Registers, offset: 0x3A */ 5566 __I uint8_t SACCH0; /**< Primary Supervisor-only Access Registers, offset: 0x3B */ 5567 __I uint8_t SACCL3; /**< Primary Supervisor-only Access Registers, offset: 0x3C */ 5568 __I uint8_t SACCL2; /**< Primary Supervisor-only Access Registers, offset: 0x3D */ 5569 __I uint8_t SACCL1; /**< Primary Supervisor-only Access Registers, offset: 0x3E */ 5570 __I uint8_t SACCL0; /**< Primary Supervisor-only Access Registers, offset: 0x3F */ 5571 uint8_t RESERVED_4[4]; 5572 __I uint8_t XACCSL; /**< Secondary Execute-only Access Registers, offset: 0x44 */ 5573 __I uint8_t XACCSH; /**< Secondary Execute-only Access Registers, offset: 0x45 */ 5574 uint8_t RESERVED_5[6]; 5575 __I uint8_t SACCSL; /**< Secondary Supervisor-only Access Registers, offset: 0x4C */ 5576 __I uint8_t SACCSH; /**< Secondary Supervisor-only Access Registers, offset: 0x4D */ 5577 uint8_t RESERVED_6[4]; 5578 __I uint8_t FSTDBYCTL; /**< Flash Standby Control Register, offset: 0x52 */ 5579 __IO uint8_t FSTDBY; /**< Flash Standby Register, offset: 0x53 */ 5580 } FTFE_Type; 5581 5582 /* ---------------------------------------------------------------------------- 5583 -- FTFE Register Masks 5584 ---------------------------------------------------------------------------- */ 5585 5586 /*! 5587 * @addtogroup FTFE_Register_Masks FTFE Register Masks 5588 * @{ 5589 */ 5590 5591 /*! @name FSTAT - Flash Status Register */ 5592 /*! @{ */ 5593 #define FTFE_FSTAT_MGSTAT0_MASK (0x1U) 5594 #define FTFE_FSTAT_MGSTAT0_SHIFT (0U) 5595 #define FTFE_FSTAT_MGSTAT0(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_MGSTAT0_SHIFT)) & FTFE_FSTAT_MGSTAT0_MASK) 5596 #define FTFE_FSTAT_FPVIOL_MASK (0x10U) 5597 #define FTFE_FSTAT_FPVIOL_SHIFT (4U) 5598 /*! FPVIOL - Flash Protection Violation Flag 5599 * 0b0..No protection violation detected 5600 * 0b1..Protection violation detected 5601 */ 5602 #define FTFE_FSTAT_FPVIOL(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_FPVIOL_SHIFT)) & FTFE_FSTAT_FPVIOL_MASK) 5603 #define FTFE_FSTAT_ACCERR_MASK (0x20U) 5604 #define FTFE_FSTAT_ACCERR_SHIFT (5U) 5605 /*! ACCERR - Flash Access Error Flag 5606 * 0b0..No access error detected 5607 * 0b1..Access error detected 5608 */ 5609 #define FTFE_FSTAT_ACCERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_ACCERR_SHIFT)) & FTFE_FSTAT_ACCERR_MASK) 5610 #define FTFE_FSTAT_RDCOLERR_MASK (0x40U) 5611 #define FTFE_FSTAT_RDCOLERR_SHIFT (6U) 5612 /*! RDCOLERR - Flash Read Collision Error Flag 5613 * 0b0..No collision error detected 5614 * 0b1..Collision error detected 5615 */ 5616 #define FTFE_FSTAT_RDCOLERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_RDCOLERR_SHIFT)) & FTFE_FSTAT_RDCOLERR_MASK) 5617 #define FTFE_FSTAT_CCIF_MASK (0x80U) 5618 #define FTFE_FSTAT_CCIF_SHIFT (7U) 5619 /*! CCIF - Command Complete Interrupt Flag 5620 * 0b0..Flash command in progress 5621 * 0b1..Flash command has completed 5622 */ 5623 #define FTFE_FSTAT_CCIF(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_CCIF_SHIFT)) & FTFE_FSTAT_CCIF_MASK) 5624 /*! @} */ 5625 5626 /*! @name FCNFG - Flash Configuration Register */ 5627 /*! @{ */ 5628 #define FTFE_FCNFG_RAMRDY_MASK (0x2U) 5629 #define FTFE_FCNFG_RAMRDY_SHIFT (1U) 5630 /*! RAMRDY - RAM Ready 5631 * 0b0..Programming acceleration RAM is not available 5632 * 0b1..Programming acceleration RAM is available 5633 */ 5634 #define FTFE_FCNFG_RAMRDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RAMRDY_SHIFT)) & FTFE_FCNFG_RAMRDY_MASK) 5635 #define FTFE_FCNFG_CRCRDY_MASK (0x4U) 5636 #define FTFE_FCNFG_CRCRDY_SHIFT (2U) 5637 /*! CRCRDY - CRC Ready 5638 * 0b0..Programming acceleration RAM is not available for CRC operations 5639 * 0b1..Programming acceleration RAM is available for CRC operations 5640 */ 5641 #define FTFE_FCNFG_CRCRDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CRCRDY_SHIFT)) & FTFE_FCNFG_CRCRDY_MASK) 5642 #define FTFE_FCNFG_SWAP_MASK (0x8U) 5643 #define FTFE_FCNFG_SWAP_SHIFT (3U) 5644 /*! SWAP - Swap 5645 * 0b0..Program flash 0 block is located at relative address 0x0000 5646 * 0b1..Program flash 1 block is located at relative address 0x0000 5647 */ 5648 #define FTFE_FCNFG_SWAP(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_SWAP_SHIFT)) & FTFE_FCNFG_SWAP_MASK) 5649 #define FTFE_FCNFG_ERSSUSP_MASK (0x10U) 5650 #define FTFE_FCNFG_ERSSUSP_SHIFT (4U) 5651 /*! ERSSUSP - Erase Suspend 5652 * 0b0..No suspend requested 5653 * 0b1..Suspend the current Erase Flash Sector command execution 5654 */ 5655 #define FTFE_FCNFG_ERSSUSP(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSSUSP_SHIFT)) & FTFE_FCNFG_ERSSUSP_MASK) 5656 #define FTFE_FCNFG_ERSAREQ_MASK (0x20U) 5657 #define FTFE_FCNFG_ERSAREQ_SHIFT (5U) 5658 /*! ERSAREQ - Erase All Request 5659 * 0b0..No request or request complete 5660 * 0b1..Request to: (1) run the Erase All Blocks command, (2) verify the erased state, (3) program the security 5661 * byte in the Flash Configuration Field to the unsecure state, and (4) release MCU security by setting the 5662 * FSEC[SEC] field to the unsecure state. 5663 */ 5664 #define FTFE_FCNFG_ERSAREQ(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSAREQ_SHIFT)) & FTFE_FCNFG_ERSAREQ_MASK) 5665 #define FTFE_FCNFG_RDCOLLIE_MASK (0x40U) 5666 #define FTFE_FCNFG_RDCOLLIE_SHIFT (6U) 5667 /*! RDCOLLIE - Read Collision Error Interrupt Enable 5668 * 0b0..Read collision error interrupt disabled 5669 * 0b1..Read collision error interrupt enabled. An interrupt request is generated whenever a flash read collision 5670 * error is detected (see the description of FSTAT[RDCOLERR]). 5671 */ 5672 #define FTFE_FCNFG_RDCOLLIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RDCOLLIE_SHIFT)) & FTFE_FCNFG_RDCOLLIE_MASK) 5673 #define FTFE_FCNFG_CCIE_MASK (0x80U) 5674 #define FTFE_FCNFG_CCIE_SHIFT (7U) 5675 /*! CCIE - Command Complete Interrupt Enable 5676 * 0b0..Command complete interrupt disabled 5677 * 0b1..Command complete interrupt enabled. An interrupt request is generated whenever the FSTAT[CCIF] flag is set. 5678 */ 5679 #define FTFE_FCNFG_CCIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CCIE_SHIFT)) & FTFE_FCNFG_CCIE_MASK) 5680 /*! @} */ 5681 5682 /*! @name FSEC - Flash Security Register */ 5683 /*! @{ */ 5684 #define FTFE_FSEC_SEC_MASK (0x3U) 5685 #define FTFE_FSEC_SEC_SHIFT (0U) 5686 /*! SEC - Flash Security 5687 * 0b00..MCU security status is secure 5688 * 0b01..MCU security status is secure 5689 * 0b10..MCU security status is unsecure (The standard shipping condition of the flash module is unsecure.) 5690 * 0b11..MCU security status is secure 5691 */ 5692 #define FTFE_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_SEC_SHIFT)) & FTFE_FSEC_SEC_MASK) 5693 #define FTFE_FSEC_FSLACC_MASK (0xCU) 5694 #define FTFE_FSEC_FSLACC_SHIFT (2U) 5695 /*! FSLACC - Factory Security Level Access Code 5696 * 0b00..Factory access granted 5697 * 0b01..Factory access denied 5698 * 0b10..Factory access denied 5699 * 0b11..Factory access granted 5700 */ 5701 #define FTFE_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_FSLACC_SHIFT)) & FTFE_FSEC_FSLACC_MASK) 5702 #define FTFE_FSEC_MEEN_MASK (0x30U) 5703 #define FTFE_FSEC_MEEN_SHIFT (4U) 5704 /*! MEEN - Mass Erase Enable Bits 5705 * 0b00..Mass erase is enabled 5706 * 0b01..Mass erase is enabled 5707 * 0b10..Mass erase is disabled 5708 * 0b11..Mass erase is enabled 5709 */ 5710 #define FTFE_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_MEEN_SHIFT)) & FTFE_FSEC_MEEN_MASK) 5711 #define FTFE_FSEC_KEYEN_MASK (0xC0U) 5712 #define FTFE_FSEC_KEYEN_SHIFT (6U) 5713 /*! KEYEN - Backdoor Key Security Enable 5714 * 0b00..Backdoor key access disabled 5715 * 0b01..Backdoor key access disabled (preferred KEYEN state to disable backdoor key access) 5716 * 0b10..Backdoor key access enabled 5717 * 0b11..Backdoor key access disabled 5718 */ 5719 #define FTFE_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_KEYEN_SHIFT)) & FTFE_FSEC_KEYEN_MASK) 5720 /*! @} */ 5721 5722 /*! @name FCCOB3 - Flash Common Command Object Registers */ 5723 /*! @{ */ 5724 #define FTFE_FCCOB3_CCOBn_MASK (0xFFU) 5725 #define FTFE_FCCOB3_CCOBn_SHIFT (0U) 5726 #define FTFE_FCCOB3_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB3_CCOBn_SHIFT)) & FTFE_FCCOB3_CCOBn_MASK) 5727 /*! @} */ 5728 5729 /*! @name FCCOB2 - Flash Common Command Object Registers */ 5730 /*! @{ */ 5731 #define FTFE_FCCOB2_CCOBn_MASK (0xFFU) 5732 #define FTFE_FCCOB2_CCOBn_SHIFT (0U) 5733 #define FTFE_FCCOB2_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB2_CCOBn_SHIFT)) & FTFE_FCCOB2_CCOBn_MASK) 5734 /*! @} */ 5735 5736 /*! @name FCCOB1 - Flash Common Command Object Registers */ 5737 /*! @{ */ 5738 #define FTFE_FCCOB1_CCOBn_MASK (0xFFU) 5739 #define FTFE_FCCOB1_CCOBn_SHIFT (0U) 5740 #define FTFE_FCCOB1_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB1_CCOBn_SHIFT)) & FTFE_FCCOB1_CCOBn_MASK) 5741 /*! @} */ 5742 5743 /*! @name FCCOB0 - Flash Common Command Object Registers */ 5744 /*! @{ */ 5745 #define FTFE_FCCOB0_CCOBn_MASK (0xFFU) 5746 #define FTFE_FCCOB0_CCOBn_SHIFT (0U) 5747 #define FTFE_FCCOB0_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB0_CCOBn_SHIFT)) & FTFE_FCCOB0_CCOBn_MASK) 5748 /*! @} */ 5749 5750 /*! @name FCCOB7 - Flash Common Command Object Registers */ 5751 /*! @{ */ 5752 #define FTFE_FCCOB7_CCOBn_MASK (0xFFU) 5753 #define FTFE_FCCOB7_CCOBn_SHIFT (0U) 5754 #define FTFE_FCCOB7_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB7_CCOBn_SHIFT)) & FTFE_FCCOB7_CCOBn_MASK) 5755 /*! @} */ 5756 5757 /*! @name FCCOB6 - Flash Common Command Object Registers */ 5758 /*! @{ */ 5759 #define FTFE_FCCOB6_CCOBn_MASK (0xFFU) 5760 #define FTFE_FCCOB6_CCOBn_SHIFT (0U) 5761 #define FTFE_FCCOB6_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB6_CCOBn_SHIFT)) & FTFE_FCCOB6_CCOBn_MASK) 5762 /*! @} */ 5763 5764 /*! @name FCCOB5 - Flash Common Command Object Registers */ 5765 /*! @{ */ 5766 #define FTFE_FCCOB5_CCOBn_MASK (0xFFU) 5767 #define FTFE_FCCOB5_CCOBn_SHIFT (0U) 5768 #define FTFE_FCCOB5_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB5_CCOBn_SHIFT)) & FTFE_FCCOB5_CCOBn_MASK) 5769 /*! @} */ 5770 5771 /*! @name FCCOB4 - Flash Common Command Object Registers */ 5772 /*! @{ */ 5773 #define FTFE_FCCOB4_CCOBn_MASK (0xFFU) 5774 #define FTFE_FCCOB4_CCOBn_SHIFT (0U) 5775 #define FTFE_FCCOB4_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB4_CCOBn_SHIFT)) & FTFE_FCCOB4_CCOBn_MASK) 5776 /*! @} */ 5777 5778 /*! @name FCCOBB - Flash Common Command Object Registers */ 5779 /*! @{ */ 5780 #define FTFE_FCCOBB_CCOBn_MASK (0xFFU) 5781 #define FTFE_FCCOBB_CCOBn_SHIFT (0U) 5782 #define FTFE_FCCOBB_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBB_CCOBn_SHIFT)) & FTFE_FCCOBB_CCOBn_MASK) 5783 /*! @} */ 5784 5785 /*! @name FCCOBA - Flash Common Command Object Registers */ 5786 /*! @{ */ 5787 #define FTFE_FCCOBA_CCOBn_MASK (0xFFU) 5788 #define FTFE_FCCOBA_CCOBn_SHIFT (0U) 5789 #define FTFE_FCCOBA_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBA_CCOBn_SHIFT)) & FTFE_FCCOBA_CCOBn_MASK) 5790 /*! @} */ 5791 5792 /*! @name FCCOB9 - Flash Common Command Object Registers */ 5793 /*! @{ */ 5794 #define FTFE_FCCOB9_CCOBn_MASK (0xFFU) 5795 #define FTFE_FCCOB9_CCOBn_SHIFT (0U) 5796 #define FTFE_FCCOB9_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB9_CCOBn_SHIFT)) & FTFE_FCCOB9_CCOBn_MASK) 5797 /*! @} */ 5798 5799 /*! @name FCCOB8 - Flash Common Command Object Registers */ 5800 /*! @{ */ 5801 #define FTFE_FCCOB8_CCOBn_MASK (0xFFU) 5802 #define FTFE_FCCOB8_CCOBn_SHIFT (0U) 5803 #define FTFE_FCCOB8_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB8_CCOBn_SHIFT)) & FTFE_FCCOB8_CCOBn_MASK) 5804 /*! @} */ 5805 5806 /*! @name FOPT3 - Flash Option Registers */ 5807 /*! @{ */ 5808 #define FTFE_FOPT3_OPT_MASK (0xFFU) 5809 #define FTFE_FOPT3_OPT_SHIFT (0U) 5810 #define FTFE_FOPT3_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT3_OPT_SHIFT)) & FTFE_FOPT3_OPT_MASK) 5811 /*! @} */ 5812 5813 /*! @name FOPT2 - Flash Option Registers */ 5814 /*! @{ */ 5815 #define FTFE_FOPT2_OPT_MASK (0xFFU) 5816 #define FTFE_FOPT2_OPT_SHIFT (0U) 5817 #define FTFE_FOPT2_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT2_OPT_SHIFT)) & FTFE_FOPT2_OPT_MASK) 5818 /*! @} */ 5819 5820 /*! @name FOPT1 - Flash Option Registers */ 5821 /*! @{ */ 5822 #define FTFE_FOPT1_OPT_MASK (0xFFU) 5823 #define FTFE_FOPT1_OPT_SHIFT (0U) 5824 #define FTFE_FOPT1_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT1_OPT_SHIFT)) & FTFE_FOPT1_OPT_MASK) 5825 /*! @} */ 5826 5827 /*! @name FOPT0 - Flash Option Registers */ 5828 /*! @{ */ 5829 #define FTFE_FOPT0_OPT_MASK (0xFFU) 5830 #define FTFE_FOPT0_OPT_SHIFT (0U) 5831 #define FTFE_FOPT0_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT0_OPT_SHIFT)) & FTFE_FOPT0_OPT_MASK) 5832 /*! @} */ 5833 5834 /*! @name FPROTH3 - Primary Program Flash Protection Registers */ 5835 /*! @{ */ 5836 #define FTFE_FPROTH3_PROT_MASK (0xFFU) 5837 #define FTFE_FPROTH3_PROT_SHIFT (0U) 5838 #define FTFE_FPROTH3_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH3_PROT_SHIFT)) & FTFE_FPROTH3_PROT_MASK) 5839 /*! @} */ 5840 5841 /*! @name FPROTH2 - Primary Program Flash Protection Registers */ 5842 /*! @{ */ 5843 #define FTFE_FPROTH2_PROT_MASK (0xFFU) 5844 #define FTFE_FPROTH2_PROT_SHIFT (0U) 5845 #define FTFE_FPROTH2_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH2_PROT_SHIFT)) & FTFE_FPROTH2_PROT_MASK) 5846 /*! @} */ 5847 5848 /*! @name FPROTH1 - Primary Program Flash Protection Registers */ 5849 /*! @{ */ 5850 #define FTFE_FPROTH1_PROT_MASK (0xFFU) 5851 #define FTFE_FPROTH1_PROT_SHIFT (0U) 5852 #define FTFE_FPROTH1_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH1_PROT_SHIFT)) & FTFE_FPROTH1_PROT_MASK) 5853 /*! @} */ 5854 5855 /*! @name FPROTH0 - Primary Program Flash Protection Registers */ 5856 /*! @{ */ 5857 #define FTFE_FPROTH0_PROT_MASK (0xFFU) 5858 #define FTFE_FPROTH0_PROT_SHIFT (0U) 5859 #define FTFE_FPROTH0_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTH0_PROT_SHIFT)) & FTFE_FPROTH0_PROT_MASK) 5860 /*! @} */ 5861 5862 /*! @name FPROTL3 - Primary Program Flash Protection Registers */ 5863 /*! @{ */ 5864 #define FTFE_FPROTL3_PROT_MASK (0xFFU) 5865 #define FTFE_FPROTL3_PROT_SHIFT (0U) 5866 #define FTFE_FPROTL3_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL3_PROT_SHIFT)) & FTFE_FPROTL3_PROT_MASK) 5867 /*! @} */ 5868 5869 /*! @name FPROTL2 - Primary Program Flash Protection Registers */ 5870 /*! @{ */ 5871 #define FTFE_FPROTL2_PROT_MASK (0xFFU) 5872 #define FTFE_FPROTL2_PROT_SHIFT (0U) 5873 #define FTFE_FPROTL2_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL2_PROT_SHIFT)) & FTFE_FPROTL2_PROT_MASK) 5874 /*! @} */ 5875 5876 /*! @name FPROTL1 - Primary Program Flash Protection Registers */ 5877 /*! @{ */ 5878 #define FTFE_FPROTL1_PROT_MASK (0xFFU) 5879 #define FTFE_FPROTL1_PROT_SHIFT (0U) 5880 #define FTFE_FPROTL1_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL1_PROT_SHIFT)) & FTFE_FPROTL1_PROT_MASK) 5881 /*! @} */ 5882 5883 /*! @name FPROTL0 - Primary Program Flash Protection Registers */ 5884 /*! @{ */ 5885 #define FTFE_FPROTL0_PROT_MASK (0xFFU) 5886 #define FTFE_FPROTL0_PROT_SHIFT (0U) 5887 #define FTFE_FPROTL0_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTL0_PROT_SHIFT)) & FTFE_FPROTL0_PROT_MASK) 5888 /*! @} */ 5889 5890 /*! @name FPROTSL - Secondary Program Flash Protection Registers */ 5891 /*! @{ */ 5892 #define FTFE_FPROTSL_PROTS_MASK (0xFFU) 5893 #define FTFE_FPROTSL_PROTS_SHIFT (0U) 5894 #define FTFE_FPROTSL_PROTS(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTSL_PROTS_SHIFT)) & FTFE_FPROTSL_PROTS_MASK) 5895 /*! @} */ 5896 5897 /*! @name FPROTSH - Secondary Program Flash Protection Registers */ 5898 /*! @{ */ 5899 #define FTFE_FPROTSH_PROTS_MASK (0xFFU) 5900 #define FTFE_FPROTSH_PROTS_SHIFT (0U) 5901 #define FTFE_FPROTSH_PROTS(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROTSH_PROTS_SHIFT)) & FTFE_FPROTSH_PROTS_MASK) 5902 /*! @} */ 5903 5904 /*! @name FACSS - Primary Flash Access Segment Size Register */ 5905 /*! @{ */ 5906 #define FTFE_FACSS_SGSIZE_MASK (0xFFU) 5907 #define FTFE_FACSS_SGSIZE_SHIFT (0U) 5908 #define FTFE_FACSS_SGSIZE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FACSS_SGSIZE_SHIFT)) & FTFE_FACSS_SGSIZE_MASK) 5909 /*! @} */ 5910 5911 /*! @name FACSN - Primary Flash Access Segment Number Register */ 5912 /*! @{ */ 5913 #define FTFE_FACSN_NUMSG_MASK (0xFFU) 5914 #define FTFE_FACSN_NUMSG_SHIFT (0U) 5915 /*! NUMSG - Number of Segments Indicator 5916 * 0b00110000..Primary Program flash memory is divided into 48 segments (768 Kbytes, 1.5 Mbytes) 5917 * 0b01000000..Primary Program flash memory is divided into 64 segments (512 Kbytes, 1 Mbyte, 2 Mbytes) 5918 */ 5919 #define FTFE_FACSN_NUMSG(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FACSN_NUMSG_SHIFT)) & FTFE_FACSN_NUMSG_MASK) 5920 /*! @} */ 5921 5922 /*! @name FACSSS - Secondary Flash Access Segment Size Register */ 5923 /*! @{ */ 5924 #define FTFE_FACSSS_SGSIZE_S_MASK (0xFFU) 5925 #define FTFE_FACSSS_SGSIZE_S_SHIFT (0U) 5926 #define FTFE_FACSSS_SGSIZE_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FACSSS_SGSIZE_S_SHIFT)) & FTFE_FACSSS_SGSIZE_S_MASK) 5927 /*! @} */ 5928 5929 /*! @name FACSNS - Secondary Flash Access Segment Number Register */ 5930 /*! @{ */ 5931 #define FTFE_FACSNS_NUMSG_S_MASK (0xFFU) 5932 #define FTFE_FACSNS_NUMSG_S_SHIFT (0U) 5933 /*! NUMSG_S - Number of Segments Indicator 5934 * 0b00010000..Secondary Program flash memory is divided into 16 segments 5935 */ 5936 #define FTFE_FACSNS_NUMSG_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FACSNS_NUMSG_S_SHIFT)) & FTFE_FACSNS_NUMSG_S_MASK) 5937 /*! @} */ 5938 5939 /*! @name XACCH3 - Primary Execute-only Access Registers */ 5940 /*! @{ */ 5941 #define FTFE_XACCH3_XA_MASK (0xFFU) 5942 #define FTFE_XACCH3_XA_SHIFT (0U) 5943 #define FTFE_XACCH3_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH3_XA_SHIFT)) & FTFE_XACCH3_XA_MASK) 5944 /*! @} */ 5945 5946 /*! @name XACCH2 - Primary Execute-only Access Registers */ 5947 /*! @{ */ 5948 #define FTFE_XACCH2_XA_MASK (0xFFU) 5949 #define FTFE_XACCH2_XA_SHIFT (0U) 5950 #define FTFE_XACCH2_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH2_XA_SHIFT)) & FTFE_XACCH2_XA_MASK) 5951 /*! @} */ 5952 5953 /*! @name XACCH1 - Primary Execute-only Access Registers */ 5954 /*! @{ */ 5955 #define FTFE_XACCH1_XA_MASK (0xFFU) 5956 #define FTFE_XACCH1_XA_SHIFT (0U) 5957 #define FTFE_XACCH1_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH1_XA_SHIFT)) & FTFE_XACCH1_XA_MASK) 5958 /*! @} */ 5959 5960 /*! @name XACCH0 - Primary Execute-only Access Registers */ 5961 /*! @{ */ 5962 #define FTFE_XACCH0_XA_MASK (0xFFU) 5963 #define FTFE_XACCH0_XA_SHIFT (0U) 5964 #define FTFE_XACCH0_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCH0_XA_SHIFT)) & FTFE_XACCH0_XA_MASK) 5965 /*! @} */ 5966 5967 /*! @name XACCL3 - Primary Execute-only Access Registers */ 5968 /*! @{ */ 5969 #define FTFE_XACCL3_XA_MASK (0xFFU) 5970 #define FTFE_XACCL3_XA_SHIFT (0U) 5971 #define FTFE_XACCL3_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL3_XA_SHIFT)) & FTFE_XACCL3_XA_MASK) 5972 /*! @} */ 5973 5974 /*! @name XACCL2 - Primary Execute-only Access Registers */ 5975 /*! @{ */ 5976 #define FTFE_XACCL2_XA_MASK (0xFFU) 5977 #define FTFE_XACCL2_XA_SHIFT (0U) 5978 #define FTFE_XACCL2_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL2_XA_SHIFT)) & FTFE_XACCL2_XA_MASK) 5979 /*! @} */ 5980 5981 /*! @name XACCL1 - Primary Execute-only Access Registers */ 5982 /*! @{ */ 5983 #define FTFE_XACCL1_XA_MASK (0xFFU) 5984 #define FTFE_XACCL1_XA_SHIFT (0U) 5985 #define FTFE_XACCL1_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL1_XA_SHIFT)) & FTFE_XACCL1_XA_MASK) 5986 /*! @} */ 5987 5988 /*! @name XACCL0 - Primary Execute-only Access Registers */ 5989 /*! @{ */ 5990 #define FTFE_XACCL0_XA_MASK (0xFFU) 5991 #define FTFE_XACCL0_XA_SHIFT (0U) 5992 #define FTFE_XACCL0_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCL0_XA_SHIFT)) & FTFE_XACCL0_XA_MASK) 5993 /*! @} */ 5994 5995 /*! @name SACCH3 - Primary Supervisor-only Access Registers */ 5996 /*! @{ */ 5997 #define FTFE_SACCH3_SA_MASK (0xFFU) 5998 #define FTFE_SACCH3_SA_SHIFT (0U) 5999 #define FTFE_SACCH3_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH3_SA_SHIFT)) & FTFE_SACCH3_SA_MASK) 6000 /*! @} */ 6001 6002 /*! @name SACCH2 - Primary Supervisor-only Access Registers */ 6003 /*! @{ */ 6004 #define FTFE_SACCH2_SA_MASK (0xFFU) 6005 #define FTFE_SACCH2_SA_SHIFT (0U) 6006 #define FTFE_SACCH2_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH2_SA_SHIFT)) & FTFE_SACCH2_SA_MASK) 6007 /*! @} */ 6008 6009 /*! @name SACCH1 - Primary Supervisor-only Access Registers */ 6010 /*! @{ */ 6011 #define FTFE_SACCH1_SA_MASK (0xFFU) 6012 #define FTFE_SACCH1_SA_SHIFT (0U) 6013 #define FTFE_SACCH1_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH1_SA_SHIFT)) & FTFE_SACCH1_SA_MASK) 6014 /*! @} */ 6015 6016 /*! @name SACCH0 - Primary Supervisor-only Access Registers */ 6017 /*! @{ */ 6018 #define FTFE_SACCH0_SA_MASK (0xFFU) 6019 #define FTFE_SACCH0_SA_SHIFT (0U) 6020 #define FTFE_SACCH0_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCH0_SA_SHIFT)) & FTFE_SACCH0_SA_MASK) 6021 /*! @} */ 6022 6023 /*! @name SACCL3 - Primary Supervisor-only Access Registers */ 6024 /*! @{ */ 6025 #define FTFE_SACCL3_SA_MASK (0xFFU) 6026 #define FTFE_SACCL3_SA_SHIFT (0U) 6027 #define FTFE_SACCL3_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL3_SA_SHIFT)) & FTFE_SACCL3_SA_MASK) 6028 /*! @} */ 6029 6030 /*! @name SACCL2 - Primary Supervisor-only Access Registers */ 6031 /*! @{ */ 6032 #define FTFE_SACCL2_SA_MASK (0xFFU) 6033 #define FTFE_SACCL2_SA_SHIFT (0U) 6034 #define FTFE_SACCL2_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL2_SA_SHIFT)) & FTFE_SACCL2_SA_MASK) 6035 /*! @} */ 6036 6037 /*! @name SACCL1 - Primary Supervisor-only Access Registers */ 6038 /*! @{ */ 6039 #define FTFE_SACCL1_SA_MASK (0xFFU) 6040 #define FTFE_SACCL1_SA_SHIFT (0U) 6041 #define FTFE_SACCL1_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL1_SA_SHIFT)) & FTFE_SACCL1_SA_MASK) 6042 /*! @} */ 6043 6044 /*! @name SACCL0 - Primary Supervisor-only Access Registers */ 6045 /*! @{ */ 6046 #define FTFE_SACCL0_SA_MASK (0xFFU) 6047 #define FTFE_SACCL0_SA_SHIFT (0U) 6048 #define FTFE_SACCL0_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCL0_SA_SHIFT)) & FTFE_SACCL0_SA_MASK) 6049 /*! @} */ 6050 6051 /*! @name XACCSL - Secondary Execute-only Access Registers */ 6052 /*! @{ */ 6053 #define FTFE_XACCSL_XA_S_MASK (0xFFU) 6054 #define FTFE_XACCSL_XA_S_SHIFT (0U) 6055 #define FTFE_XACCSL_XA_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCSL_XA_S_SHIFT)) & FTFE_XACCSL_XA_S_MASK) 6056 /*! @} */ 6057 6058 /*! @name XACCSH - Secondary Execute-only Access Registers */ 6059 /*! @{ */ 6060 #define FTFE_XACCSH_XA_S_MASK (0xFFU) 6061 #define FTFE_XACCSH_XA_S_SHIFT (0U) 6062 #define FTFE_XACCSH_XA_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_XACCSH_XA_S_SHIFT)) & FTFE_XACCSH_XA_S_MASK) 6063 /*! @} */ 6064 6065 /*! @name SACCSL - Secondary Supervisor-only Access Registers */ 6066 /*! @{ */ 6067 #define FTFE_SACCSL_SA_S_MASK (0xFFU) 6068 #define FTFE_SACCSL_SA_S_SHIFT (0U) 6069 #define FTFE_SACCSL_SA_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCSL_SA_S_SHIFT)) & FTFE_SACCSL_SA_S_MASK) 6070 /*! @} */ 6071 6072 /*! @name SACCSH - Secondary Supervisor-only Access Registers */ 6073 /*! @{ */ 6074 #define FTFE_SACCSH_SA_S_MASK (0xFFU) 6075 #define FTFE_SACCSH_SA_S_SHIFT (0U) 6076 #define FTFE_SACCSH_SA_S(x) (((uint8_t)(((uint8_t)(x)) << FTFE_SACCSH_SA_S_SHIFT)) & FTFE_SACCSH_SA_S_MASK) 6077 /*! @} */ 6078 6079 /*! @name FSTDBYCTL - Flash Standby Control Register */ 6080 /*! @{ */ 6081 #define FTFE_FSTDBYCTL_STDBYDIS_MASK (0x1U) 6082 #define FTFE_FSTDBYCTL_STDBYDIS_SHIFT (0U) 6083 /*! STDBYDIS - Standy Mode Disable 6084 * 0b0..Standby mode enabled for flash blocks selected by STDBYx 6085 * 0b1..Standby mode disabled (STDBYx ignored) 6086 */ 6087 #define FTFE_FSTDBYCTL_STDBYDIS(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBYCTL_STDBYDIS_SHIFT)) & FTFE_FSTDBYCTL_STDBYDIS_MASK) 6088 /*! @} */ 6089 6090 /*! @name FSTDBY - Flash Standby Register */ 6091 /*! @{ */ 6092 #define FTFE_FSTDBY_STDBY0_MASK (0x1U) 6093 #define FTFE_FSTDBY_STDBY0_SHIFT (0U) 6094 /*! STDBY0 - Standy Mode for Flash Block 0 6095 * 0b0..Standby mode not enabled for flash block 0 6096 * 0b1..If STDBYDIS is clear, standby mode is enabled for flash block 0 (when SWAP=0/1, flash block 1/0 is the inactive block) 6097 */ 6098 #define FTFE_FSTDBY_STDBY0(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY0_SHIFT)) & FTFE_FSTDBY_STDBY0_MASK) 6099 #define FTFE_FSTDBY_STDBY1_MASK (0x2U) 6100 #define FTFE_FSTDBY_STDBY1_SHIFT (1U) 6101 /*! STDBY1 - Standy Mode for Flash Block 1 6102 * 0b0..Standby mode not enabled for flash block 1 6103 * 0b1..If STDBYDIS is clear, standby mode is enabled for flash block 1 (when SWAP=0/1, flash block 1/0 is the inactive block) 6104 */ 6105 #define FTFE_FSTDBY_STDBY1(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY1_SHIFT)) & FTFE_FSTDBY_STDBY1_MASK) 6106 #define FTFE_FSTDBY_STDBY2_MASK (0x4U) 6107 #define FTFE_FSTDBY_STDBY2_SHIFT (2U) 6108 /*! STDBY2 - Standy Mode for Flash Block 2 6109 * 0b0..Standby mode not enabled for flash block 2 6110 * 0b1..If STDBYDIS is clear, standby mode is enabled for flash block 2 6111 */ 6112 #define FTFE_FSTDBY_STDBY2(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTDBY_STDBY2_SHIFT)) & FTFE_FSTDBY_STDBY2_MASK) 6113 /*! @} */ 6114 6115 6116 /*! 6117 * @} 6118 */ /* end of group FTFE_Register_Masks */ 6119 6120 6121 /* FTFE - Peripheral instance base addresses */ 6122 /** Peripheral FTFE base address */ 6123 #define FTFE_BASE (0x40023000u) 6124 /** Peripheral FTFE base pointer */ 6125 #define FTFE ((FTFE_Type *)FTFE_BASE) 6126 /** Array initializer of FTFE peripheral base addresses */ 6127 #define FTFE_BASE_ADDRS { FTFE_BASE } 6128 /** Array initializer of FTFE peripheral base pointers */ 6129 #define FTFE_BASE_PTRS { FTFE } 6130 /** Interrupt vectors for the FTFE peripheral type */ 6131 #define FTFE_COMMAND_COMPLETE_IRQS { FTFE_Command_Complete_IRQn } 6132 #define FTFE_READ_COLLISION_IRQS { FTFE_Read_Collision_IRQn } 6133 6134 /*! 6135 * @} 6136 */ /* end of group FTFE_Peripheral_Access_Layer */ 6137 6138 6139 /* ---------------------------------------------------------------------------- 6140 -- GPIO Peripheral Access Layer 6141 ---------------------------------------------------------------------------- */ 6142 6143 /*! 6144 * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer 6145 * @{ 6146 */ 6147 6148 /** GPIO - Register Layout Typedef */ 6149 typedef struct { 6150 __IO uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */ 6151 __O uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */ 6152 __O uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */ 6153 __O uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */ 6154 __I uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */ 6155 __IO uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */ 6156 } GPIO_Type; 6157 6158 /* ---------------------------------------------------------------------------- 6159 -- GPIO Register Masks 6160 ---------------------------------------------------------------------------- */ 6161 6162 /*! 6163 * @addtogroup GPIO_Register_Masks GPIO Register Masks 6164 * @{ 6165 */ 6166 6167 /*! @name PDOR - Port Data Output Register */ 6168 /*! @{ */ 6169 #define GPIO_PDOR_PDO_MASK (0xFFFFFFFFU) 6170 #define GPIO_PDOR_PDO_SHIFT (0U) 6171 #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDOR_PDO_SHIFT)) & GPIO_PDOR_PDO_MASK) 6172 /*! @} */ 6173 6174 /*! @name PSOR - Port Set Output Register */ 6175 /*! @{ */ 6176 #define GPIO_PSOR_PTSO_MASK (0xFFFFFFFFU) 6177 #define GPIO_PSOR_PTSO_SHIFT (0U) 6178 #define GPIO_PSOR_PTSO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PSOR_PTSO_SHIFT)) & GPIO_PSOR_PTSO_MASK) 6179 /*! @} */ 6180 6181 /*! @name PCOR - Port Clear Output Register */ 6182 /*! @{ */ 6183 #define GPIO_PCOR_PTCO_MASK (0xFFFFFFFFU) 6184 #define GPIO_PCOR_PTCO_SHIFT (0U) 6185 #define GPIO_PCOR_PTCO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PCOR_PTCO_SHIFT)) & GPIO_PCOR_PTCO_MASK) 6186 /*! @} */ 6187 6188 /*! @name PTOR - Port Toggle Output Register */ 6189 /*! @{ */ 6190 #define GPIO_PTOR_PTTO_MASK (0xFFFFFFFFU) 6191 #define GPIO_PTOR_PTTO_SHIFT (0U) 6192 #define GPIO_PTOR_PTTO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PTOR_PTTO_SHIFT)) & GPIO_PTOR_PTTO_MASK) 6193 /*! @} */ 6194 6195 /*! @name PDIR - Port Data Input Register */ 6196 /*! @{ */ 6197 #define GPIO_PDIR_PDI_MASK (0xFFFFFFFFU) 6198 #define GPIO_PDIR_PDI_SHIFT (0U) 6199 #define GPIO_PDIR_PDI(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDIR_PDI_SHIFT)) & GPIO_PDIR_PDI_MASK) 6200 /*! @} */ 6201 6202 /*! @name PDDR - Port Data Direction Register */ 6203 /*! @{ */ 6204 #define GPIO_PDDR_PDD_MASK (0xFFFFFFFFU) 6205 #define GPIO_PDDR_PDD_SHIFT (0U) 6206 #define GPIO_PDDR_PDD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDDR_PDD_SHIFT)) & GPIO_PDDR_PDD_MASK) 6207 /*! @} */ 6208 6209 6210 /*! 6211 * @} 6212 */ /* end of group GPIO_Register_Masks */ 6213 6214 6215 /* GPIO - Peripheral instance base addresses */ 6216 /** Peripheral GPIOA base address */ 6217 #define GPIOA_BASE (0x48020000u) 6218 /** Peripheral GPIOA base pointer */ 6219 #define GPIOA ((GPIO_Type *)GPIOA_BASE) 6220 /** Peripheral GPIOB base address */ 6221 #define GPIOB_BASE (0x48020040u) 6222 /** Peripheral GPIOB base pointer */ 6223 #define GPIOB ((GPIO_Type *)GPIOB_BASE) 6224 /** Peripheral GPIOC base address */ 6225 #define GPIOC_BASE (0x48020080u) 6226 /** Peripheral GPIOC base pointer */ 6227 #define GPIOC ((GPIO_Type *)GPIOC_BASE) 6228 /** Peripheral GPIOD base address */ 6229 #define GPIOD_BASE (0x480200C0u) 6230 /** Peripheral GPIOD base pointer */ 6231 #define GPIOD ((GPIO_Type *)GPIOD_BASE) 6232 /** Peripheral GPIOE base address */ 6233 #define GPIOE_BASE (0x4100F000u) 6234 /** Peripheral GPIOE base pointer */ 6235 #define GPIOE ((GPIO_Type *)GPIOE_BASE) 6236 /** Array initializer of GPIO peripheral base addresses */ 6237 #define GPIO_BASE_ADDRS { GPIOA_BASE, GPIOB_BASE, GPIOC_BASE, GPIOD_BASE, GPIOE_BASE } 6238 /** Array initializer of GPIO peripheral base pointers */ 6239 #define GPIO_BASE_PTRS { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE } 6240 6241 /*! 6242 * @} 6243 */ /* end of group GPIO_Peripheral_Access_Layer */ 6244 6245 6246 /* ---------------------------------------------------------------------------- 6247 -- I2S Peripheral Access Layer 6248 ---------------------------------------------------------------------------- */ 6249 6250 /*! 6251 * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer 6252 * @{ 6253 */ 6254 6255 /** I2S - Register Layout Typedef */ 6256 typedef struct { 6257 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 6258 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 6259 __IO uint32_t TCSR; /**< SAI Transmit Control Register, offset: 0x8 */ 6260 __IO uint32_t TCR1; /**< SAI Transmit Configuration 1 Register, offset: 0xC */ 6261 __IO uint32_t TCR2; /**< SAI Transmit Configuration 2 Register, offset: 0x10 */ 6262 __IO uint32_t TCR3; /**< SAI Transmit Configuration 3 Register, offset: 0x14 */ 6263 __IO uint32_t TCR4; /**< SAI Transmit Configuration 4 Register, offset: 0x18 */ 6264 __IO uint32_t TCR5; /**< SAI Transmit Configuration 5 Register, offset: 0x1C */ 6265 __O uint32_t TDR[2]; /**< SAI Transmit Data Register, array offset: 0x20, array step: 0x4 */ 6266 uint8_t RESERVED_0[24]; 6267 __I uint32_t TFR[2]; /**< SAI Transmit FIFO Register, array offset: 0x40, array step: 0x4 */ 6268 uint8_t RESERVED_1[24]; 6269 __IO uint32_t TMR; /**< SAI Transmit Mask Register, offset: 0x60 */ 6270 uint8_t RESERVED_2[36]; 6271 __IO uint32_t RCSR; /**< SAI Receive Control Register, offset: 0x88 */ 6272 __IO uint32_t RCR1; /**< SAI Receive Configuration 1 Register, offset: 0x8C */ 6273 __IO uint32_t RCR2; /**< SAI Receive Configuration 2 Register, offset: 0x90 */ 6274 __IO uint32_t RCR3; /**< SAI Receive Configuration 3 Register, offset: 0x94 */ 6275 __IO uint32_t RCR4; /**< SAI Receive Configuration 4 Register, offset: 0x98 */ 6276 __IO uint32_t RCR5; /**< SAI Receive Configuration 5 Register, offset: 0x9C */ 6277 __I uint32_t RDR[2]; /**< SAI Receive Data Register, array offset: 0xA0, array step: 0x4 */ 6278 uint8_t RESERVED_3[24]; 6279 __I uint32_t RFR[2]; /**< SAI Receive FIFO Register, array offset: 0xC0, array step: 0x4 */ 6280 uint8_t RESERVED_4[24]; 6281 __IO uint32_t RMR; /**< SAI Receive Mask Register, offset: 0xE0 */ 6282 } I2S_Type; 6283 6284 /* ---------------------------------------------------------------------------- 6285 -- I2S Register Masks 6286 ---------------------------------------------------------------------------- */ 6287 6288 /*! 6289 * @addtogroup I2S_Register_Masks I2S Register Masks 6290 * @{ 6291 */ 6292 6293 /*! @name VERID - Version ID Register */ 6294 /*! @{ */ 6295 #define I2S_VERID_FEATURE_MASK (0xFFFFU) 6296 #define I2S_VERID_FEATURE_SHIFT (0U) 6297 /*! FEATURE - Feature Specification Number 6298 * 0b0000000000000000..Standard feature set. 6299 */ 6300 #define I2S_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << I2S_VERID_FEATURE_SHIFT)) & I2S_VERID_FEATURE_MASK) 6301 #define I2S_VERID_MINOR_MASK (0xFF0000U) 6302 #define I2S_VERID_MINOR_SHIFT (16U) 6303 #define I2S_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << I2S_VERID_MINOR_SHIFT)) & I2S_VERID_MINOR_MASK) 6304 #define I2S_VERID_MAJOR_MASK (0xFF000000U) 6305 #define I2S_VERID_MAJOR_SHIFT (24U) 6306 #define I2S_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << I2S_VERID_MAJOR_SHIFT)) & I2S_VERID_MAJOR_MASK) 6307 /*! @} */ 6308 6309 /*! @name PARAM - Parameter Register */ 6310 /*! @{ */ 6311 #define I2S_PARAM_DATALINE_MASK (0xFU) 6312 #define I2S_PARAM_DATALINE_SHIFT (0U) 6313 #define I2S_PARAM_DATALINE(x) (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_DATALINE_SHIFT)) & I2S_PARAM_DATALINE_MASK) 6314 #define I2S_PARAM_FIFO_MASK (0xF00U) 6315 #define I2S_PARAM_FIFO_SHIFT (8U) 6316 #define I2S_PARAM_FIFO(x) (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_FIFO_SHIFT)) & I2S_PARAM_FIFO_MASK) 6317 #define I2S_PARAM_FRAME_MASK (0xF0000U) 6318 #define I2S_PARAM_FRAME_SHIFT (16U) 6319 #define I2S_PARAM_FRAME(x) (((uint32_t)(((uint32_t)(x)) << I2S_PARAM_FRAME_SHIFT)) & I2S_PARAM_FRAME_MASK) 6320 /*! @} */ 6321 6322 /*! @name TCSR - SAI Transmit Control Register */ 6323 /*! @{ */ 6324 #define I2S_TCSR_FRDE_MASK (0x1U) 6325 #define I2S_TCSR_FRDE_SHIFT (0U) 6326 /*! FRDE - FIFO Request DMA Enable 6327 * 0b0..Disables the DMA request. 6328 * 0b1..Enables the DMA request. 6329 */ 6330 #define I2S_TCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRDE_SHIFT)) & I2S_TCSR_FRDE_MASK) 6331 #define I2S_TCSR_FWDE_MASK (0x2U) 6332 #define I2S_TCSR_FWDE_SHIFT (1U) 6333 /*! FWDE - FIFO Warning DMA Enable 6334 * 0b0..Disables the DMA request. 6335 * 0b1..Enables the DMA request. 6336 */ 6337 #define I2S_TCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWDE_SHIFT)) & I2S_TCSR_FWDE_MASK) 6338 #define I2S_TCSR_FRIE_MASK (0x100U) 6339 #define I2S_TCSR_FRIE_SHIFT (8U) 6340 /*! FRIE - FIFO Request Interrupt Enable 6341 * 0b0..Disables the interrupt. 6342 * 0b1..Enables the interrupt. 6343 */ 6344 #define I2S_TCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRIE_SHIFT)) & I2S_TCSR_FRIE_MASK) 6345 #define I2S_TCSR_FWIE_MASK (0x200U) 6346 #define I2S_TCSR_FWIE_SHIFT (9U) 6347 /*! FWIE - FIFO Warning Interrupt Enable 6348 * 0b0..Disables the interrupt. 6349 * 0b1..Enables the interrupt. 6350 */ 6351 #define I2S_TCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWIE_SHIFT)) & I2S_TCSR_FWIE_MASK) 6352 #define I2S_TCSR_FEIE_MASK (0x400U) 6353 #define I2S_TCSR_FEIE_SHIFT (10U) 6354 /*! FEIE - FIFO Error Interrupt Enable 6355 * 0b0..Disables the interrupt. 6356 * 0b1..Enables the interrupt. 6357 */ 6358 #define I2S_TCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEIE_SHIFT)) & I2S_TCSR_FEIE_MASK) 6359 #define I2S_TCSR_SEIE_MASK (0x800U) 6360 #define I2S_TCSR_SEIE_SHIFT (11U) 6361 /*! SEIE - Sync Error Interrupt Enable 6362 * 0b0..Disables interrupt. 6363 * 0b1..Enables interrupt. 6364 */ 6365 #define I2S_TCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEIE_SHIFT)) & I2S_TCSR_SEIE_MASK) 6366 #define I2S_TCSR_WSIE_MASK (0x1000U) 6367 #define I2S_TCSR_WSIE_SHIFT (12U) 6368 /*! WSIE - Word Start Interrupt Enable 6369 * 0b0..Disables interrupt. 6370 * 0b1..Enables interrupt. 6371 */ 6372 #define I2S_TCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSIE_SHIFT)) & I2S_TCSR_WSIE_MASK) 6373 #define I2S_TCSR_FRF_MASK (0x10000U) 6374 #define I2S_TCSR_FRF_SHIFT (16U) 6375 /*! FRF - FIFO Request Flag 6376 * 0b0..Transmit FIFO watermark has not been reached. 6377 * 0b1..Transmit FIFO watermark has been reached. 6378 */ 6379 #define I2S_TCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRF_SHIFT)) & I2S_TCSR_FRF_MASK) 6380 #define I2S_TCSR_FWF_MASK (0x20000U) 6381 #define I2S_TCSR_FWF_SHIFT (17U) 6382 /*! FWF - FIFO Warning Flag 6383 * 0b0..No enabled transmit FIFO is empty. 6384 * 0b1..Enabled transmit FIFO is empty. 6385 */ 6386 #define I2S_TCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWF_SHIFT)) & I2S_TCSR_FWF_MASK) 6387 #define I2S_TCSR_FEF_MASK (0x40000U) 6388 #define I2S_TCSR_FEF_SHIFT (18U) 6389 /*! FEF - FIFO Error Flag 6390 * 0b0..Transmit underrun not detected. 6391 * 0b1..Transmit underrun detected. 6392 */ 6393 #define I2S_TCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEF_SHIFT)) & I2S_TCSR_FEF_MASK) 6394 #define I2S_TCSR_SEF_MASK (0x80000U) 6395 #define I2S_TCSR_SEF_SHIFT (19U) 6396 /*! SEF - Sync Error Flag 6397 * 0b0..Sync error not detected. 6398 * 0b1..Frame sync error detected. 6399 */ 6400 #define I2S_TCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEF_SHIFT)) & I2S_TCSR_SEF_MASK) 6401 #define I2S_TCSR_WSF_MASK (0x100000U) 6402 #define I2S_TCSR_WSF_SHIFT (20U) 6403 /*! WSF - Word Start Flag 6404 * 0b0..Start of word not detected. 6405 * 0b1..Start of word detected. 6406 */ 6407 #define I2S_TCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSF_SHIFT)) & I2S_TCSR_WSF_MASK) 6408 #define I2S_TCSR_SR_MASK (0x1000000U) 6409 #define I2S_TCSR_SR_SHIFT (24U) 6410 /*! SR - Software Reset 6411 * 0b0..No effect. 6412 * 0b1..Software reset. 6413 */ 6414 #define I2S_TCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SR_SHIFT)) & I2S_TCSR_SR_MASK) 6415 #define I2S_TCSR_FR_MASK (0x2000000U) 6416 #define I2S_TCSR_FR_SHIFT (25U) 6417 /*! FR - FIFO Reset 6418 * 0b0..No effect. 6419 * 0b1..FIFO reset. 6420 */ 6421 #define I2S_TCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FR_SHIFT)) & I2S_TCSR_FR_MASK) 6422 #define I2S_TCSR_BCE_MASK (0x10000000U) 6423 #define I2S_TCSR_BCE_SHIFT (28U) 6424 /*! BCE - Bit Clock Enable 6425 * 0b0..Transmit bit clock is disabled. 6426 * 0b1..Transmit bit clock is enabled. 6427 */ 6428 #define I2S_TCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_BCE_SHIFT)) & I2S_TCSR_BCE_MASK) 6429 #define I2S_TCSR_DBGE_MASK (0x20000000U) 6430 #define I2S_TCSR_DBGE_SHIFT (29U) 6431 /*! DBGE - Debug Enable 6432 * 0b0..Transmitter is disabled in Debug mode, after completing the current frame. 6433 * 0b1..Transmitter is enabled in Debug mode. 6434 */ 6435 #define I2S_TCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_DBGE_SHIFT)) & I2S_TCSR_DBGE_MASK) 6436 #define I2S_TCSR_STOPE_MASK (0x40000000U) 6437 #define I2S_TCSR_STOPE_SHIFT (30U) 6438 /*! STOPE - Stop Enable 6439 * 0b0..Transmitter disabled in Stop mode. 6440 * 0b1..Transmitter enabled in Stop mode. 6441 */ 6442 #define I2S_TCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_STOPE_SHIFT)) & I2S_TCSR_STOPE_MASK) 6443 #define I2S_TCSR_TE_MASK (0x80000000U) 6444 #define I2S_TCSR_TE_SHIFT (31U) 6445 /*! TE - Transmitter Enable 6446 * 0b0..Transmitter is disabled. 6447 * 0b1..Transmitter is enabled, or transmitter has been disabled and has not yet reached end of frame. 6448 */ 6449 #define I2S_TCSR_TE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_TE_SHIFT)) & I2S_TCSR_TE_MASK) 6450 /*! @} */ 6451 6452 /*! @name TCR1 - SAI Transmit Configuration 1 Register */ 6453 /*! @{ */ 6454 #define I2S_TCR1_TFW_MASK (0x7U) 6455 #define I2S_TCR1_TFW_SHIFT (0U) 6456 #define I2S_TCR1_TFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR1_TFW_SHIFT)) & I2S_TCR1_TFW_MASK) 6457 /*! @} */ 6458 6459 /*! @name TCR2 - SAI Transmit Configuration 2 Register */ 6460 /*! @{ */ 6461 #define I2S_TCR2_DIV_MASK (0xFFU) 6462 #define I2S_TCR2_DIV_SHIFT (0U) 6463 #define I2S_TCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_DIV_SHIFT)) & I2S_TCR2_DIV_MASK) 6464 #define I2S_TCR2_BCD_MASK (0x1000000U) 6465 #define I2S_TCR2_BCD_SHIFT (24U) 6466 /*! BCD - Bit Clock Direction 6467 * 0b0..Bit clock is generated externally in Slave mode. 6468 * 0b1..Bit clock is generated internally in Master mode. 6469 */ 6470 #define I2S_TCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCD_SHIFT)) & I2S_TCR2_BCD_MASK) 6471 #define I2S_TCR2_BCP_MASK (0x2000000U) 6472 #define I2S_TCR2_BCP_SHIFT (25U) 6473 /*! BCP - Bit Clock Polarity 6474 * 0b0..Bit clock is active high with drive outputs on rising edge and sample inputs on falling edge. 6475 * 0b1..Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge. 6476 */ 6477 #define I2S_TCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCP_SHIFT)) & I2S_TCR2_BCP_MASK) 6478 #define I2S_TCR2_MSEL_MASK (0xC000000U) 6479 #define I2S_TCR2_MSEL_SHIFT (26U) 6480 /*! MSEL - MCLK Select 6481 * 0b00..Bus Clock selected. 6482 * 0b01..Master Clock (MCLK) 1 option selected. 6483 * 0b10..Master Clock (MCLK) 2 option selected. 6484 * 0b11..Master Clock (MCLK) 3 option selected. 6485 */ 6486 #define I2S_TCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_MSEL_SHIFT)) & I2S_TCR2_MSEL_MASK) 6487 #define I2S_TCR2_BCI_MASK (0x10000000U) 6488 #define I2S_TCR2_BCI_SHIFT (28U) 6489 /*! BCI - Bit Clock Input 6490 * 0b0..No effect. 6491 * 0b1..Internal logic is clocked as if bit clock was externally generated. 6492 */ 6493 #define I2S_TCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCI_SHIFT)) & I2S_TCR2_BCI_MASK) 6494 #define I2S_TCR2_BCS_MASK (0x20000000U) 6495 #define I2S_TCR2_BCS_SHIFT (29U) 6496 /*! BCS - Bit Clock Swap 6497 * 0b0..Use the normal bit clock source. 6498 * 0b1..Swap the bit clock source. 6499 */ 6500 #define I2S_TCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCS_SHIFT)) & I2S_TCR2_BCS_MASK) 6501 #define I2S_TCR2_SYNC_MASK (0xC0000000U) 6502 #define I2S_TCR2_SYNC_SHIFT (30U) 6503 /*! SYNC - Synchronous Mode 6504 * 0b00..Asynchronous mode. 6505 * 0b01..Synchronous with receiver. 6506 * 0b10..Synchronous with another SAI transmitter. 6507 * 0b11..Synchronous with another SAI receiver. 6508 */ 6509 #define I2S_TCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_SYNC_SHIFT)) & I2S_TCR2_SYNC_MASK) 6510 /*! @} */ 6511 6512 /*! @name TCR3 - SAI Transmit Configuration 3 Register */ 6513 /*! @{ */ 6514 #define I2S_TCR3_WDFL_MASK (0x1FU) 6515 #define I2S_TCR3_WDFL_SHIFT (0U) 6516 #define I2S_TCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_WDFL_SHIFT)) & I2S_TCR3_WDFL_MASK) 6517 #define I2S_TCR3_TCE_MASK (0x30000U) 6518 #define I2S_TCR3_TCE_SHIFT (16U) 6519 #define I2S_TCR3_TCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_TCE_SHIFT)) & I2S_TCR3_TCE_MASK) 6520 #define I2S_TCR3_CFR_MASK (0x3000000U) 6521 #define I2S_TCR3_CFR_SHIFT (24U) 6522 #define I2S_TCR3_CFR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_CFR_SHIFT)) & I2S_TCR3_CFR_MASK) 6523 /*! @} */ 6524 6525 /*! @name TCR4 - SAI Transmit Configuration 4 Register */ 6526 /*! @{ */ 6527 #define I2S_TCR4_FSD_MASK (0x1U) 6528 #define I2S_TCR4_FSD_SHIFT (0U) 6529 /*! FSD - Frame Sync Direction 6530 * 0b0..Frame sync is generated externally in Slave mode. 6531 * 0b1..Frame sync is generated internally in Master mode. 6532 */ 6533 #define I2S_TCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSD_SHIFT)) & I2S_TCR4_FSD_MASK) 6534 #define I2S_TCR4_FSP_MASK (0x2U) 6535 #define I2S_TCR4_FSP_SHIFT (1U) 6536 /*! FSP - Frame Sync Polarity 6537 * 0b0..Frame sync is active high. 6538 * 0b1..Frame sync is active low. 6539 */ 6540 #define I2S_TCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSP_SHIFT)) & I2S_TCR4_FSP_MASK) 6541 #define I2S_TCR4_ONDEM_MASK (0x4U) 6542 #define I2S_TCR4_ONDEM_SHIFT (2U) 6543 /*! ONDEM - On Demand Mode 6544 * 0b0..Internal frame sync is generated continuously. 6545 * 0b1..Internal frame sync is generated when the FIFO warning flag is clear. 6546 */ 6547 #define I2S_TCR4_ONDEM(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_ONDEM_SHIFT)) & I2S_TCR4_ONDEM_MASK) 6548 #define I2S_TCR4_FSE_MASK (0x8U) 6549 #define I2S_TCR4_FSE_SHIFT (3U) 6550 /*! FSE - Frame Sync Early 6551 * 0b0..Frame sync asserts with the first bit of the frame. 6552 * 0b1..Frame sync asserts one bit before the first bit of the frame. 6553 */ 6554 #define I2S_TCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSE_SHIFT)) & I2S_TCR4_FSE_MASK) 6555 #define I2S_TCR4_MF_MASK (0x10U) 6556 #define I2S_TCR4_MF_SHIFT (4U) 6557 /*! MF - MSB First 6558 * 0b0..LSB is transmitted first. 6559 * 0b1..MSB is transmitted first. 6560 */ 6561 #define I2S_TCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_MF_SHIFT)) & I2S_TCR4_MF_MASK) 6562 #define I2S_TCR4_CHMOD_MASK (0x20U) 6563 #define I2S_TCR4_CHMOD_SHIFT (5U) 6564 /*! CHMOD - Channel Mode 6565 * 0b0..TDM mode, transmit data pins are tri-stated when slots are masked or channels are disabled. 6566 * 0b1..Output mode, transmit data pins are never tri-stated and will output zero when slots are masked or channels are disabled. 6567 */ 6568 #define I2S_TCR4_CHMOD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_CHMOD_SHIFT)) & I2S_TCR4_CHMOD_MASK) 6569 #define I2S_TCR4_SYWD_MASK (0x1F00U) 6570 #define I2S_TCR4_SYWD_SHIFT (8U) 6571 #define I2S_TCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_SYWD_SHIFT)) & I2S_TCR4_SYWD_MASK) 6572 #define I2S_TCR4_FRSZ_MASK (0x1F0000U) 6573 #define I2S_TCR4_FRSZ_SHIFT (16U) 6574 #define I2S_TCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FRSZ_SHIFT)) & I2S_TCR4_FRSZ_MASK) 6575 #define I2S_TCR4_FPACK_MASK (0x3000000U) 6576 #define I2S_TCR4_FPACK_SHIFT (24U) 6577 /*! FPACK - FIFO Packing Mode 6578 * 0b00..FIFO packing is disabled 6579 * 0b01..Reserved 6580 * 0b10..8-bit FIFO packing is enabled 6581 * 0b11..16-bit FIFO packing is enabled 6582 */ 6583 #define I2S_TCR4_FPACK(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FPACK_SHIFT)) & I2S_TCR4_FPACK_MASK) 6584 #define I2S_TCR4_FCOMB_MASK (0xC000000U) 6585 #define I2S_TCR4_FCOMB_SHIFT (26U) 6586 /*! FCOMB - FIFO Combine Mode 6587 * 0b00..FIFO combine mode disabled. 6588 * 0b01..FIFO combine mode enabled on FIFO reads (from transmit shift registers). 6589 * 0b10..FIFO combine mode enabled on FIFO writes (by software). 6590 * 0b11..FIFO combine mode enabled on FIFO reads (from transmit shift registers) and writes (by software). 6591 */ 6592 #define I2S_TCR4_FCOMB(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCOMB_SHIFT)) & I2S_TCR4_FCOMB_MASK) 6593 #define I2S_TCR4_FCONT_MASK (0x10000000U) 6594 #define I2S_TCR4_FCONT_SHIFT (28U) 6595 /*! FCONT - FIFO Continue on Error 6596 * 0b0..On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared. 6597 * 0b1..On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared. 6598 */ 6599 #define I2S_TCR4_FCONT(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCONT_SHIFT)) & I2S_TCR4_FCONT_MASK) 6600 /*! @} */ 6601 6602 /*! @name TCR5 - SAI Transmit Configuration 5 Register */ 6603 /*! @{ */ 6604 #define I2S_TCR5_FBT_MASK (0x1F00U) 6605 #define I2S_TCR5_FBT_SHIFT (8U) 6606 #define I2S_TCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_FBT_SHIFT)) & I2S_TCR5_FBT_MASK) 6607 #define I2S_TCR5_W0W_MASK (0x1F0000U) 6608 #define I2S_TCR5_W0W_SHIFT (16U) 6609 #define I2S_TCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_W0W_SHIFT)) & I2S_TCR5_W0W_MASK) 6610 #define I2S_TCR5_WNW_MASK (0x1F000000U) 6611 #define I2S_TCR5_WNW_SHIFT (24U) 6612 #define I2S_TCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_WNW_SHIFT)) & I2S_TCR5_WNW_MASK) 6613 /*! @} */ 6614 6615 /*! @name TDR - SAI Transmit Data Register */ 6616 /*! @{ */ 6617 #define I2S_TDR_TDR_MASK (0xFFFFFFFFU) 6618 #define I2S_TDR_TDR_SHIFT (0U) 6619 #define I2S_TDR_TDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TDR_TDR_SHIFT)) & I2S_TDR_TDR_MASK) 6620 /*! @} */ 6621 6622 /* The count of I2S_TDR */ 6623 #define I2S_TDR_COUNT (2U) 6624 6625 /*! @name TFR - SAI Transmit FIFO Register */ 6626 /*! @{ */ 6627 #define I2S_TFR_RFP_MASK (0xFU) 6628 #define I2S_TFR_RFP_SHIFT (0U) 6629 #define I2S_TFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_RFP_SHIFT)) & I2S_TFR_RFP_MASK) 6630 #define I2S_TFR_WFP_MASK (0xF0000U) 6631 #define I2S_TFR_WFP_SHIFT (16U) 6632 #define I2S_TFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WFP_SHIFT)) & I2S_TFR_WFP_MASK) 6633 #define I2S_TFR_WCP_MASK (0x80000000U) 6634 #define I2S_TFR_WCP_SHIFT (31U) 6635 /*! WCP - Write Channel Pointer 6636 * 0b0..No effect. 6637 * 0b1..FIFO combine is enabled for FIFO writes and this FIFO will be written on the next FIFO write. 6638 */ 6639 #define I2S_TFR_WCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WCP_SHIFT)) & I2S_TFR_WCP_MASK) 6640 /*! @} */ 6641 6642 /* The count of I2S_TFR */ 6643 #define I2S_TFR_COUNT (2U) 6644 6645 /*! @name TMR - SAI Transmit Mask Register */ 6646 /*! @{ */ 6647 #define I2S_TMR_TWM_MASK (0xFFFFFFFFU) 6648 #define I2S_TMR_TWM_SHIFT (0U) 6649 /*! TWM - Transmit Word Mask 6650 * 0b00000000000000000000000000000000..Word N is enabled. 6651 * 0b00000000000000000000000000000001..Word N is masked. The transmit data pins are tri-stated or drive zero when masked. 6652 */ 6653 #define I2S_TMR_TWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_TMR_TWM_SHIFT)) & I2S_TMR_TWM_MASK) 6654 /*! @} */ 6655 6656 /*! @name RCSR - SAI Receive Control Register */ 6657 /*! @{ */ 6658 #define I2S_RCSR_FRDE_MASK (0x1U) 6659 #define I2S_RCSR_FRDE_SHIFT (0U) 6660 /*! FRDE - FIFO Request DMA Enable 6661 * 0b0..Disables the DMA request. 6662 * 0b1..Enables the DMA request. 6663 */ 6664 #define I2S_RCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRDE_SHIFT)) & I2S_RCSR_FRDE_MASK) 6665 #define I2S_RCSR_FWDE_MASK (0x2U) 6666 #define I2S_RCSR_FWDE_SHIFT (1U) 6667 /*! FWDE - FIFO Warning DMA Enable 6668 * 0b0..Disables the DMA request. 6669 * 0b1..Enables the DMA request. 6670 */ 6671 #define I2S_RCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWDE_SHIFT)) & I2S_RCSR_FWDE_MASK) 6672 #define I2S_RCSR_FRIE_MASK (0x100U) 6673 #define I2S_RCSR_FRIE_SHIFT (8U) 6674 /*! FRIE - FIFO Request Interrupt Enable 6675 * 0b0..Disables the interrupt. 6676 * 0b1..Enables the interrupt. 6677 */ 6678 #define I2S_RCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRIE_SHIFT)) & I2S_RCSR_FRIE_MASK) 6679 #define I2S_RCSR_FWIE_MASK (0x200U) 6680 #define I2S_RCSR_FWIE_SHIFT (9U) 6681 /*! FWIE - FIFO Warning Interrupt Enable 6682 * 0b0..Disables the interrupt. 6683 * 0b1..Enables the interrupt. 6684 */ 6685 #define I2S_RCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWIE_SHIFT)) & I2S_RCSR_FWIE_MASK) 6686 #define I2S_RCSR_FEIE_MASK (0x400U) 6687 #define I2S_RCSR_FEIE_SHIFT (10U) 6688 /*! FEIE - FIFO Error Interrupt Enable 6689 * 0b0..Disables the interrupt. 6690 * 0b1..Enables the interrupt. 6691 */ 6692 #define I2S_RCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEIE_SHIFT)) & I2S_RCSR_FEIE_MASK) 6693 #define I2S_RCSR_SEIE_MASK (0x800U) 6694 #define I2S_RCSR_SEIE_SHIFT (11U) 6695 /*! SEIE - Sync Error Interrupt Enable 6696 * 0b0..Disables interrupt. 6697 * 0b1..Enables interrupt. 6698 */ 6699 #define I2S_RCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEIE_SHIFT)) & I2S_RCSR_SEIE_MASK) 6700 #define I2S_RCSR_WSIE_MASK (0x1000U) 6701 #define I2S_RCSR_WSIE_SHIFT (12U) 6702 /*! WSIE - Word Start Interrupt Enable 6703 * 0b0..Disables interrupt. 6704 * 0b1..Enables interrupt. 6705 */ 6706 #define I2S_RCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSIE_SHIFT)) & I2S_RCSR_WSIE_MASK) 6707 #define I2S_RCSR_FRF_MASK (0x10000U) 6708 #define I2S_RCSR_FRF_SHIFT (16U) 6709 /*! FRF - FIFO Request Flag 6710 * 0b0..Receive FIFO watermark not reached. 6711 * 0b1..Receive FIFO watermark has been reached. 6712 */ 6713 #define I2S_RCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRF_SHIFT)) & I2S_RCSR_FRF_MASK) 6714 #define I2S_RCSR_FWF_MASK (0x20000U) 6715 #define I2S_RCSR_FWF_SHIFT (17U) 6716 /*! FWF - FIFO Warning Flag 6717 * 0b0..No enabled receive FIFO is full. 6718 * 0b1..Enabled receive FIFO is full. 6719 */ 6720 #define I2S_RCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWF_SHIFT)) & I2S_RCSR_FWF_MASK) 6721 #define I2S_RCSR_FEF_MASK (0x40000U) 6722 #define I2S_RCSR_FEF_SHIFT (18U) 6723 /*! FEF - FIFO Error Flag 6724 * 0b0..Receive overflow not detected. 6725 * 0b1..Receive overflow detected. 6726 */ 6727 #define I2S_RCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEF_SHIFT)) & I2S_RCSR_FEF_MASK) 6728 #define I2S_RCSR_SEF_MASK (0x80000U) 6729 #define I2S_RCSR_SEF_SHIFT (19U) 6730 /*! SEF - Sync Error Flag 6731 * 0b0..Sync error not detected. 6732 * 0b1..Frame sync error detected. 6733 */ 6734 #define I2S_RCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEF_SHIFT)) & I2S_RCSR_SEF_MASK) 6735 #define I2S_RCSR_WSF_MASK (0x100000U) 6736 #define I2S_RCSR_WSF_SHIFT (20U) 6737 /*! WSF - Word Start Flag 6738 * 0b0..Start of word not detected. 6739 * 0b1..Start of word detected. 6740 */ 6741 #define I2S_RCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSF_SHIFT)) & I2S_RCSR_WSF_MASK) 6742 #define I2S_RCSR_SR_MASK (0x1000000U) 6743 #define I2S_RCSR_SR_SHIFT (24U) 6744 /*! SR - Software Reset 6745 * 0b0..No effect. 6746 * 0b1..Software reset. 6747 */ 6748 #define I2S_RCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SR_SHIFT)) & I2S_RCSR_SR_MASK) 6749 #define I2S_RCSR_FR_MASK (0x2000000U) 6750 #define I2S_RCSR_FR_SHIFT (25U) 6751 /*! FR - FIFO Reset 6752 * 0b0..No effect. 6753 * 0b1..FIFO reset. 6754 */ 6755 #define I2S_RCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FR_SHIFT)) & I2S_RCSR_FR_MASK) 6756 #define I2S_RCSR_BCE_MASK (0x10000000U) 6757 #define I2S_RCSR_BCE_SHIFT (28U) 6758 /*! BCE - Bit Clock Enable 6759 * 0b0..Receive bit clock is disabled. 6760 * 0b1..Receive bit clock is enabled. 6761 */ 6762 #define I2S_RCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_BCE_SHIFT)) & I2S_RCSR_BCE_MASK) 6763 #define I2S_RCSR_DBGE_MASK (0x20000000U) 6764 #define I2S_RCSR_DBGE_SHIFT (29U) 6765 /*! DBGE - Debug Enable 6766 * 0b0..Receiver is disabled in Debug mode, after completing the current frame. 6767 * 0b1..Receiver is enabled in Debug mode. 6768 */ 6769 #define I2S_RCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_DBGE_SHIFT)) & I2S_RCSR_DBGE_MASK) 6770 #define I2S_RCSR_STOPE_MASK (0x40000000U) 6771 #define I2S_RCSR_STOPE_SHIFT (30U) 6772 /*! STOPE - Stop Enable 6773 * 0b0..Receiver disabled in Stop mode. 6774 * 0b1..Receiver enabled in Stop mode. 6775 */ 6776 #define I2S_RCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_STOPE_SHIFT)) & I2S_RCSR_STOPE_MASK) 6777 #define I2S_RCSR_RE_MASK (0x80000000U) 6778 #define I2S_RCSR_RE_SHIFT (31U) 6779 /*! RE - Receiver Enable 6780 * 0b0..Receiver is disabled. 6781 * 0b1..Receiver is enabled, or receiver has been disabled and has not yet reached end of frame. 6782 */ 6783 #define I2S_RCSR_RE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_RE_SHIFT)) & I2S_RCSR_RE_MASK) 6784 /*! @} */ 6785 6786 /*! @name RCR1 - SAI Receive Configuration 1 Register */ 6787 /*! @{ */ 6788 #define I2S_RCR1_RFW_MASK (0x7U) 6789 #define I2S_RCR1_RFW_SHIFT (0U) 6790 #define I2S_RCR1_RFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR1_RFW_SHIFT)) & I2S_RCR1_RFW_MASK) 6791 /*! @} */ 6792 6793 /*! @name RCR2 - SAI Receive Configuration 2 Register */ 6794 /*! @{ */ 6795 #define I2S_RCR2_DIV_MASK (0xFFU) 6796 #define I2S_RCR2_DIV_SHIFT (0U) 6797 #define I2S_RCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_DIV_SHIFT)) & I2S_RCR2_DIV_MASK) 6798 #define I2S_RCR2_BCD_MASK (0x1000000U) 6799 #define I2S_RCR2_BCD_SHIFT (24U) 6800 /*! BCD - Bit Clock Direction 6801 * 0b0..Bit clock is generated externally in Slave mode. 6802 * 0b1..Bit clock is generated internally in Master mode. 6803 */ 6804 #define I2S_RCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCD_SHIFT)) & I2S_RCR2_BCD_MASK) 6805 #define I2S_RCR2_BCP_MASK (0x2000000U) 6806 #define I2S_RCR2_BCP_SHIFT (25U) 6807 /*! BCP - Bit Clock Polarity 6808 * 0b0..Bit Clock is active high with drive outputs on rising edge and sample inputs on falling edge. 6809 * 0b1..Bit Clock is active low with drive outputs on falling edge and sample inputs on rising edge. 6810 */ 6811 #define I2S_RCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCP_SHIFT)) & I2S_RCR2_BCP_MASK) 6812 #define I2S_RCR2_MSEL_MASK (0xC000000U) 6813 #define I2S_RCR2_MSEL_SHIFT (26U) 6814 /*! MSEL - MCLK Select 6815 * 0b00..Bus Clock selected. 6816 * 0b01..Master Clock (MCLK) 1 option selected. 6817 * 0b10..Master Clock (MCLK) 2 option selected. 6818 * 0b11..Master Clock (MCLK) 3 option selected. 6819 */ 6820 #define I2S_RCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_MSEL_SHIFT)) & I2S_RCR2_MSEL_MASK) 6821 #define I2S_RCR2_BCI_MASK (0x10000000U) 6822 #define I2S_RCR2_BCI_SHIFT (28U) 6823 /*! BCI - Bit Clock Input 6824 * 0b0..No effect. 6825 * 0b1..Internal logic is clocked as if bit clock was externally generated. 6826 */ 6827 #define I2S_RCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCI_SHIFT)) & I2S_RCR2_BCI_MASK) 6828 #define I2S_RCR2_BCS_MASK (0x20000000U) 6829 #define I2S_RCR2_BCS_SHIFT (29U) 6830 /*! BCS - Bit Clock Swap 6831 * 0b0..Use the normal bit clock source. 6832 * 0b1..Swap the bit clock source. 6833 */ 6834 #define I2S_RCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCS_SHIFT)) & I2S_RCR2_BCS_MASK) 6835 #define I2S_RCR2_SYNC_MASK (0xC0000000U) 6836 #define I2S_RCR2_SYNC_SHIFT (30U) 6837 /*! SYNC - Synchronous Mode 6838 * 0b00..Asynchronous mode. 6839 * 0b01..Synchronous with transmitter. 6840 * 0b10..Synchronous with another SAI receiver. 6841 * 0b11..Synchronous with another SAI transmitter. 6842 */ 6843 #define I2S_RCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_SYNC_SHIFT)) & I2S_RCR2_SYNC_MASK) 6844 /*! @} */ 6845 6846 /*! @name RCR3 - SAI Receive Configuration 3 Register */ 6847 /*! @{ */ 6848 #define I2S_RCR3_WDFL_MASK (0x1FU) 6849 #define I2S_RCR3_WDFL_SHIFT (0U) 6850 #define I2S_RCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_WDFL_SHIFT)) & I2S_RCR3_WDFL_MASK) 6851 #define I2S_RCR3_RCE_MASK (0x30000U) 6852 #define I2S_RCR3_RCE_SHIFT (16U) 6853 #define I2S_RCR3_RCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_RCE_SHIFT)) & I2S_RCR3_RCE_MASK) 6854 #define I2S_RCR3_CFR_MASK (0x3000000U) 6855 #define I2S_RCR3_CFR_SHIFT (24U) 6856 #define I2S_RCR3_CFR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_CFR_SHIFT)) & I2S_RCR3_CFR_MASK) 6857 /*! @} */ 6858 6859 /*! @name RCR4 - SAI Receive Configuration 4 Register */ 6860 /*! @{ */ 6861 #define I2S_RCR4_FSD_MASK (0x1U) 6862 #define I2S_RCR4_FSD_SHIFT (0U) 6863 /*! FSD - Frame Sync Direction 6864 * 0b0..Frame Sync is generated externally in Slave mode. 6865 * 0b1..Frame Sync is generated internally in Master mode. 6866 */ 6867 #define I2S_RCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSD_SHIFT)) & I2S_RCR4_FSD_MASK) 6868 #define I2S_RCR4_FSP_MASK (0x2U) 6869 #define I2S_RCR4_FSP_SHIFT (1U) 6870 /*! FSP - Frame Sync Polarity 6871 * 0b0..Frame sync is active high. 6872 * 0b1..Frame sync is active low. 6873 */ 6874 #define I2S_RCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSP_SHIFT)) & I2S_RCR4_FSP_MASK) 6875 #define I2S_RCR4_ONDEM_MASK (0x4U) 6876 #define I2S_RCR4_ONDEM_SHIFT (2U) 6877 /*! ONDEM - On Demand Mode 6878 * 0b0..Internal frame sync is generated continuously. 6879 * 0b1..Internal frame sync is generated when the FIFO warning flag is clear. 6880 */ 6881 #define I2S_RCR4_ONDEM(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_ONDEM_SHIFT)) & I2S_RCR4_ONDEM_MASK) 6882 #define I2S_RCR4_FSE_MASK (0x8U) 6883 #define I2S_RCR4_FSE_SHIFT (3U) 6884 /*! FSE - Frame Sync Early 6885 * 0b0..Frame sync asserts with the first bit of the frame. 6886 * 0b1..Frame sync asserts one bit before the first bit of the frame. 6887 */ 6888 #define I2S_RCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSE_SHIFT)) & I2S_RCR4_FSE_MASK) 6889 #define I2S_RCR4_MF_MASK (0x10U) 6890 #define I2S_RCR4_MF_SHIFT (4U) 6891 /*! MF - MSB First 6892 * 0b0..LSB is received first. 6893 * 0b1..MSB is received first. 6894 */ 6895 #define I2S_RCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_MF_SHIFT)) & I2S_RCR4_MF_MASK) 6896 #define I2S_RCR4_SYWD_MASK (0x1F00U) 6897 #define I2S_RCR4_SYWD_SHIFT (8U) 6898 #define I2S_RCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_SYWD_SHIFT)) & I2S_RCR4_SYWD_MASK) 6899 #define I2S_RCR4_FRSZ_MASK (0x1F0000U) 6900 #define I2S_RCR4_FRSZ_SHIFT (16U) 6901 #define I2S_RCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FRSZ_SHIFT)) & I2S_RCR4_FRSZ_MASK) 6902 #define I2S_RCR4_FPACK_MASK (0x3000000U) 6903 #define I2S_RCR4_FPACK_SHIFT (24U) 6904 /*! FPACK - FIFO Packing Mode 6905 * 0b00..FIFO packing is disabled 6906 * 0b01..Reserved. 6907 * 0b10..8-bit FIFO packing is enabled 6908 * 0b11..16-bit FIFO packing is enabled 6909 */ 6910 #define I2S_RCR4_FPACK(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FPACK_SHIFT)) & I2S_RCR4_FPACK_MASK) 6911 #define I2S_RCR4_FCOMB_MASK (0xC000000U) 6912 #define I2S_RCR4_FCOMB_SHIFT (26U) 6913 /*! FCOMB - FIFO Combine Mode 6914 * 0b00..FIFO combine mode disabled. 6915 * 0b01..FIFO combine mode enabled on FIFO writes (from receive shift registers). 6916 * 0b10..FIFO combine mode enabled on FIFO reads (by software). 6917 * 0b11..FIFO combine mode enabled on FIFO writes (from receive shift registers) and reads (by software). 6918 */ 6919 #define I2S_RCR4_FCOMB(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCOMB_SHIFT)) & I2S_RCR4_FCOMB_MASK) 6920 #define I2S_RCR4_FCONT_MASK (0x10000000U) 6921 #define I2S_RCR4_FCONT_SHIFT (28U) 6922 /*! FCONT - FIFO Continue on Error 6923 * 0b0..On FIFO error, the SAI will continue from the start of the next frame after the FIFO error flag has been cleared. 6924 * 0b1..On FIFO error, the SAI will continue from the same word that caused the FIFO error to set after the FIFO warning flag has been cleared. 6925 */ 6926 #define I2S_RCR4_FCONT(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCONT_SHIFT)) & I2S_RCR4_FCONT_MASK) 6927 /*! @} */ 6928 6929 /*! @name RCR5 - SAI Receive Configuration 5 Register */ 6930 /*! @{ */ 6931 #define I2S_RCR5_FBT_MASK (0x1F00U) 6932 #define I2S_RCR5_FBT_SHIFT (8U) 6933 #define I2S_RCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_FBT_SHIFT)) & I2S_RCR5_FBT_MASK) 6934 #define I2S_RCR5_W0W_MASK (0x1F0000U) 6935 #define I2S_RCR5_W0W_SHIFT (16U) 6936 #define I2S_RCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_W0W_SHIFT)) & I2S_RCR5_W0W_MASK) 6937 #define I2S_RCR5_WNW_MASK (0x1F000000U) 6938 #define I2S_RCR5_WNW_SHIFT (24U) 6939 #define I2S_RCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_WNW_SHIFT)) & I2S_RCR5_WNW_MASK) 6940 /*! @} */ 6941 6942 /*! @name RDR - SAI Receive Data Register */ 6943 /*! @{ */ 6944 #define I2S_RDR_RDR_MASK (0xFFFFFFFFU) 6945 #define I2S_RDR_RDR_SHIFT (0U) 6946 #define I2S_RDR_RDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RDR_RDR_SHIFT)) & I2S_RDR_RDR_MASK) 6947 /*! @} */ 6948 6949 /* The count of I2S_RDR */ 6950 #define I2S_RDR_COUNT (2U) 6951 6952 /*! @name RFR - SAI Receive FIFO Register */ 6953 /*! @{ */ 6954 #define I2S_RFR_RFP_MASK (0xFU) 6955 #define I2S_RFR_RFP_SHIFT (0U) 6956 #define I2S_RFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RFP_SHIFT)) & I2S_RFR_RFP_MASK) 6957 #define I2S_RFR_RCP_MASK (0x8000U) 6958 #define I2S_RFR_RCP_SHIFT (15U) 6959 /*! RCP - Receive Channel Pointer 6960 * 0b0..No effect. 6961 * 0b1..FIFO combine is enabled for FIFO reads and this FIFO will be read on the next FIFO read. 6962 */ 6963 #define I2S_RFR_RCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RCP_SHIFT)) & I2S_RFR_RCP_MASK) 6964 #define I2S_RFR_WFP_MASK (0xF0000U) 6965 #define I2S_RFR_WFP_SHIFT (16U) 6966 #define I2S_RFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_WFP_SHIFT)) & I2S_RFR_WFP_MASK) 6967 /*! @} */ 6968 6969 /* The count of I2S_RFR */ 6970 #define I2S_RFR_COUNT (2U) 6971 6972 /*! @name RMR - SAI Receive Mask Register */ 6973 /*! @{ */ 6974 #define I2S_RMR_RWM_MASK (0xFFFFFFFFU) 6975 #define I2S_RMR_RWM_SHIFT (0U) 6976 /*! RWM - Receive Word Mask 6977 * 0b00000000000000000000000000000000..Word N is enabled. 6978 * 0b00000000000000000000000000000001..Word N is masked. 6979 */ 6980 #define I2S_RMR_RWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_RMR_RWM_SHIFT)) & I2S_RMR_RWM_MASK) 6981 /*! @} */ 6982 6983 6984 /*! 6985 * @} 6986 */ /* end of group I2S_Register_Masks */ 6987 6988 6989 /* I2S - Peripheral instance base addresses */ 6990 /** Peripheral I2S0 base address */ 6991 #define I2S0_BASE (0x4003D000u) 6992 /** Peripheral I2S0 base pointer */ 6993 #define I2S0 ((I2S_Type *)I2S0_BASE) 6994 /** Array initializer of I2S peripheral base addresses */ 6995 #define I2S_BASE_ADDRS { I2S0_BASE } 6996 /** Array initializer of I2S peripheral base pointers */ 6997 #define I2S_BASE_PTRS { I2S0 } 6998 /** Interrupt vectors for the I2S peripheral type */ 6999 #define I2S_RX_IRQS { I2S0_IRQn } 7000 #define I2S_TX_IRQS { I2S0_IRQn } 7001 7002 /*! 7003 * @} 7004 */ /* end of group I2S_Peripheral_Access_Layer */ 7005 7006 7007 /* ---------------------------------------------------------------------------- 7008 -- INTMUX Peripheral Access Layer 7009 ---------------------------------------------------------------------------- */ 7010 7011 /*! 7012 * @addtogroup INTMUX_Peripheral_Access_Layer INTMUX Peripheral Access Layer 7013 * @{ 7014 */ 7015 7016 /** INTMUX - Register Layout Typedef */ 7017 typedef struct { 7018 struct { /* offset: 0x0, array step: 0x40 */ 7019 __IO uint32_t CHn_CSR; /**< Channel n Control Status Register, array offset: 0x0, array step: 0x40 */ 7020 __I uint32_t CHn_VEC; /**< Channel n Vector Number Register, array offset: 0x4, array step: 0x40 */ 7021 uint8_t RESERVED_0[8]; 7022 __IO uint32_t CHn_IER_31_0; /**< Channel n Interrupt Enable Register, array offset: 0x10, array step: 0x40 */ 7023 uint8_t RESERVED_1[12]; 7024 __I uint32_t CHn_IPR_31_0; /**< Channel n Interrupt Pending Register, array offset: 0x20, array step: 0x40 */ 7025 uint8_t RESERVED_2[28]; 7026 } CHANNEL[8]; 7027 } INTMUX_Type; 7028 7029 /* ---------------------------------------------------------------------------- 7030 -- INTMUX Register Masks 7031 ---------------------------------------------------------------------------- */ 7032 7033 /*! 7034 * @addtogroup INTMUX_Register_Masks INTMUX Register Masks 7035 * @{ 7036 */ 7037 7038 /*! @name CHn_CSR - Channel n Control Status Register */ 7039 /*! @{ */ 7040 #define INTMUX_CHn_CSR_RST_MASK (0x1U) 7041 #define INTMUX_CHn_CSR_RST_SHIFT (0U) 7042 /*! RST - Software Reset 7043 * 0b0..No operation. 7044 * 0b1..Perform a software reset on this channel. 7045 */ 7046 #define INTMUX_CHn_CSR_RST(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_RST_SHIFT)) & INTMUX_CHn_CSR_RST_MASK) 7047 #define INTMUX_CHn_CSR_AND_MASK (0x2U) 7048 #define INTMUX_CHn_CSR_AND_SHIFT (1U) 7049 /*! AND - Logic AND 7050 * 0b0..Logic OR all enabled interrupt inputs. 7051 * 0b1..Logic AND all enabled interrupt inputs. 7052 */ 7053 #define INTMUX_CHn_CSR_AND(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_AND_SHIFT)) & INTMUX_CHn_CSR_AND_MASK) 7054 #define INTMUX_CHn_CSR_IRQN_MASK (0x30U) 7055 #define INTMUX_CHn_CSR_IRQN_SHIFT (4U) 7056 /*! IRQN - Channel Input Number 7057 * 0b00..32 interrupt inputs 7058 * 0b01..Reserved 7059 * 0b10..Reserved 7060 * 0b11..Reserved 7061 */ 7062 #define INTMUX_CHn_CSR_IRQN(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_IRQN_SHIFT)) & INTMUX_CHn_CSR_IRQN_MASK) 7063 #define INTMUX_CHn_CSR_CHIN_MASK (0xF00U) 7064 #define INTMUX_CHn_CSR_CHIN_SHIFT (8U) 7065 #define INTMUX_CHn_CSR_CHIN(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_CHIN_SHIFT)) & INTMUX_CHn_CSR_CHIN_MASK) 7066 #define INTMUX_CHn_CSR_IRQP_MASK (0x80000000U) 7067 #define INTMUX_CHn_CSR_IRQP_SHIFT (31U) 7068 /*! IRQP - Channel Interrupt Request Pending 7069 * 0b0..No interrupt is pending. 7070 * 0b1..The interrupt output of this channel is pending. 7071 */ 7072 #define INTMUX_CHn_CSR_IRQP(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_CSR_IRQP_SHIFT)) & INTMUX_CHn_CSR_IRQP_MASK) 7073 /*! @} */ 7074 7075 /* The count of INTMUX_CHn_CSR */ 7076 #define INTMUX_CHn_CSR_COUNT (8U) 7077 7078 /*! @name CHn_VEC - Channel n Vector Number Register */ 7079 /*! @{ */ 7080 #define INTMUX_CHn_VEC_VECN_MASK (0x3FFCU) 7081 #define INTMUX_CHn_VEC_VECN_SHIFT (2U) 7082 #define INTMUX_CHn_VEC_VECN(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_VEC_VECN_SHIFT)) & INTMUX_CHn_VEC_VECN_MASK) 7083 /*! @} */ 7084 7085 /* The count of INTMUX_CHn_VEC */ 7086 #define INTMUX_CHn_VEC_COUNT (8U) 7087 7088 /*! @name CHn_IER_31_0 - Channel n Interrupt Enable Register */ 7089 /*! @{ */ 7090 #define INTMUX_CHn_IER_31_0_INTE_MASK (0xFFFFFFFFU) 7091 #define INTMUX_CHn_IER_31_0_INTE_SHIFT (0U) 7092 #define INTMUX_CHn_IER_31_0_INTE(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_IER_31_0_INTE_SHIFT)) & INTMUX_CHn_IER_31_0_INTE_MASK) 7093 /*! @} */ 7094 7095 /* The count of INTMUX_CHn_IER_31_0 */ 7096 #define INTMUX_CHn_IER_31_0_COUNT (8U) 7097 7098 /*! @name CHn_IPR_31_0 - Channel n Interrupt Pending Register */ 7099 /*! @{ */ 7100 #define INTMUX_CHn_IPR_31_0_INTP_MASK (0xFFFFFFFFU) 7101 #define INTMUX_CHn_IPR_31_0_INTP_SHIFT (0U) 7102 #define INTMUX_CHn_IPR_31_0_INTP(x) (((uint32_t)(((uint32_t)(x)) << INTMUX_CHn_IPR_31_0_INTP_SHIFT)) & INTMUX_CHn_IPR_31_0_INTP_MASK) 7103 /*! @} */ 7104 7105 /* The count of INTMUX_CHn_IPR_31_0 */ 7106 #define INTMUX_CHn_IPR_31_0_COUNT (8U) 7107 7108 7109 /*! 7110 * @} 7111 */ /* end of group INTMUX_Register_Masks */ 7112 7113 7114 /* INTMUX - Peripheral instance base addresses */ 7115 /** Peripheral INTMUX1 base address */ 7116 #define INTMUX1_BASE (0x41022000u) 7117 /** Peripheral INTMUX1 base pointer */ 7118 #define INTMUX1 ((INTMUX_Type *)INTMUX1_BASE) 7119 /** Array initializer of INTMUX peripheral base addresses */ 7120 #define INTMUX_BASE_ADDRS { 0u, INTMUX1_BASE } 7121 /** Array initializer of INTMUX peripheral base pointers */ 7122 #define INTMUX_BASE_PTRS { (INTMUX_Type *)0u, INTMUX1 } 7123 /** Interrupt vectors for the INTMUX peripheral type */ 7124 #define INTMUX_IRQS { { NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn }, { INTMUX1_0_IRQn, INTMUX1_1_IRQn, INTMUX1_2_IRQn, INTMUX1_3_IRQn, INTMUX1_4_IRQn, INTMUX1_5_IRQn, INTMUX1_6_IRQn, INTMUX1_7_IRQn } } 7125 7126 /*! 7127 * @} 7128 */ /* end of group INTMUX_Peripheral_Access_Layer */ 7129 7130 7131 /* ---------------------------------------------------------------------------- 7132 -- LLWU Peripheral Access Layer 7133 ---------------------------------------------------------------------------- */ 7134 7135 /*! 7136 * @addtogroup LLWU_Peripheral_Access_Layer LLWU Peripheral Access Layer 7137 * @{ 7138 */ 7139 7140 /** LLWU - Register Layout Typedef */ 7141 typedef struct { 7142 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 7143 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 7144 __IO uint32_t PE1; /**< Pin Enable 1 register, offset: 0x8 */ 7145 __IO uint32_t PE2; /**< Pin Enable 2 register, offset: 0xC */ 7146 uint8_t RESERVED_0[8]; 7147 __IO uint32_t ME; /**< Module Interrupt Enable register, offset: 0x18 */ 7148 __IO uint32_t DE; /**< Module DMA/Trigger Enable register, offset: 0x1C */ 7149 __IO uint32_t PF; /**< Pin Flag register, offset: 0x20 */ 7150 uint8_t RESERVED_1[12]; 7151 __IO uint32_t FILT; /**< Pin Filter register, offset: 0x30 */ 7152 uint8_t RESERVED_2[4]; 7153 __IO uint32_t PDC1; /**< Pin DMA/Trigger Configuration 1 register, offset: 0x38 */ 7154 __IO uint32_t PDC2; /**< Pin DMA/Trigger Configuration 2 register, offset: 0x3C */ 7155 uint8_t RESERVED_3[8]; 7156 __IO uint32_t FDC; /**< Pin Filter DMA/Trigger Configuration register, offset: 0x48 */ 7157 uint8_t RESERVED_4[4]; 7158 __IO uint32_t PMC; /**< Pin Mode Configuration register, offset: 0x50 */ 7159 uint8_t RESERVED_5[4]; 7160 __IO uint32_t FMC; /**< Pin Filter Mode Configuration register, offset: 0x58 */ 7161 } LLWU_Type; 7162 7163 /* ---------------------------------------------------------------------------- 7164 -- LLWU Register Masks 7165 ---------------------------------------------------------------------------- */ 7166 7167 /*! 7168 * @addtogroup LLWU_Register_Masks LLWU Register Masks 7169 * @{ 7170 */ 7171 7172 /*! @name VERID - Version ID Register */ 7173 /*! @{ */ 7174 #define LLWU_VERID_FEATURE_MASK (0xFFFFU) 7175 #define LLWU_VERID_FEATURE_SHIFT (0U) 7176 /*! FEATURE - Feature Specification Number 7177 * 0b0000000000000000..Standard features implemented 7178 * 0b0000000000000001..Support for DMA/Trigger generation from wakeup pins and filters enabled. Support for 7179 * external pin/filter detection during all power modes enabled. 7180 */ 7181 #define LLWU_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_FEATURE_SHIFT)) & LLWU_VERID_FEATURE_MASK) 7182 #define LLWU_VERID_MINOR_MASK (0xFF0000U) 7183 #define LLWU_VERID_MINOR_SHIFT (16U) 7184 #define LLWU_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_MINOR_SHIFT)) & LLWU_VERID_MINOR_MASK) 7185 #define LLWU_VERID_MAJOR_MASK (0xFF000000U) 7186 #define LLWU_VERID_MAJOR_SHIFT (24U) 7187 #define LLWU_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LLWU_VERID_MAJOR_SHIFT)) & LLWU_VERID_MAJOR_MASK) 7188 /*! @} */ 7189 7190 /*! @name PARAM - Parameter Register */ 7191 /*! @{ */ 7192 #define LLWU_PARAM_FILTERS_MASK (0xFFU) 7193 #define LLWU_PARAM_FILTERS_SHIFT (0U) 7194 #define LLWU_PARAM_FILTERS(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_FILTERS_SHIFT)) & LLWU_PARAM_FILTERS_MASK) 7195 #define LLWU_PARAM_DMAS_MASK (0xFF00U) 7196 #define LLWU_PARAM_DMAS_SHIFT (8U) 7197 #define LLWU_PARAM_DMAS(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_DMAS_SHIFT)) & LLWU_PARAM_DMAS_MASK) 7198 #define LLWU_PARAM_MODULES_MASK (0xFF0000U) 7199 #define LLWU_PARAM_MODULES_SHIFT (16U) 7200 #define LLWU_PARAM_MODULES(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_MODULES_SHIFT)) & LLWU_PARAM_MODULES_MASK) 7201 #define LLWU_PARAM_PINS_MASK (0xFF000000U) 7202 #define LLWU_PARAM_PINS_SHIFT (24U) 7203 #define LLWU_PARAM_PINS(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PARAM_PINS_SHIFT)) & LLWU_PARAM_PINS_MASK) 7204 /*! @} */ 7205 7206 /*! @name PE1 - Pin Enable 1 register */ 7207 /*! @{ */ 7208 #define LLWU_PE1_WUPE0_MASK (0x3U) 7209 #define LLWU_PE1_WUPE0_SHIFT (0U) 7210 /*! WUPE0 - Wakeup pin enable for LLWU_Pn 7211 * 0b00..External input pin disabled as wakeup input 7212 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7213 * level detection when configured as trigger request 7214 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7215 * level detection when configured as trigger request 7216 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7217 */ 7218 #define LLWU_PE1_WUPE0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE0_SHIFT)) & LLWU_PE1_WUPE0_MASK) 7219 #define LLWU_PE1_WUPE1_MASK (0xCU) 7220 #define LLWU_PE1_WUPE1_SHIFT (2U) 7221 /*! WUPE1 - Wakeup pin enable for LLWU_Pn 7222 * 0b00..External input pin disabled as wakeup input 7223 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7224 * level detection when configured as trigger request 7225 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7226 * level detection when configured as trigger request 7227 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7228 */ 7229 #define LLWU_PE1_WUPE1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE1_SHIFT)) & LLWU_PE1_WUPE1_MASK) 7230 #define LLWU_PE1_WUPE2_MASK (0x30U) 7231 #define LLWU_PE1_WUPE2_SHIFT (4U) 7232 /*! WUPE2 - Wakeup pin enable for LLWU_Pn 7233 * 0b00..External input pin disabled as wakeup input 7234 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7235 * level detection when configured as trigger request 7236 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7237 * level detection when configured as trigger request 7238 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7239 */ 7240 #define LLWU_PE1_WUPE2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE2_SHIFT)) & LLWU_PE1_WUPE2_MASK) 7241 #define LLWU_PE1_WUPE3_MASK (0xC0U) 7242 #define LLWU_PE1_WUPE3_SHIFT (6U) 7243 /*! WUPE3 - Wakeup pin enable for LLWU_Pn 7244 * 0b00..External input pin disabled as wakeup input 7245 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7246 * level detection when configured as trigger request 7247 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7248 * level detection when configured as trigger request 7249 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7250 */ 7251 #define LLWU_PE1_WUPE3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE3_SHIFT)) & LLWU_PE1_WUPE3_MASK) 7252 #define LLWU_PE1_WUPE4_MASK (0x300U) 7253 #define LLWU_PE1_WUPE4_SHIFT (8U) 7254 /*! WUPE4 - Wakeup pin enable for LLWU_Pn 7255 * 0b00..External input pin disabled as wakeup input 7256 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7257 * level detection when configured as trigger request 7258 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7259 * level detection when configured as trigger request 7260 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7261 */ 7262 #define LLWU_PE1_WUPE4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE4_SHIFT)) & LLWU_PE1_WUPE4_MASK) 7263 #define LLWU_PE1_WUPE5_MASK (0xC00U) 7264 #define LLWU_PE1_WUPE5_SHIFT (10U) 7265 /*! WUPE5 - Wakeup pin enable for LLWU_Pn 7266 * 0b00..External input pin disabled as wakeup input 7267 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7268 * level detection when configured as trigger request 7269 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7270 * level detection when configured as trigger request 7271 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7272 */ 7273 #define LLWU_PE1_WUPE5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE5_SHIFT)) & LLWU_PE1_WUPE5_MASK) 7274 #define LLWU_PE1_WUPE6_MASK (0x3000U) 7275 #define LLWU_PE1_WUPE6_SHIFT (12U) 7276 /*! WUPE6 - Wakeup pin enable for LLWU_Pn 7277 * 0b00..External input pin disabled as wakeup input 7278 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7279 * level detection when configured as trigger request 7280 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7281 * level detection when configured as trigger request 7282 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7283 */ 7284 #define LLWU_PE1_WUPE6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE6_SHIFT)) & LLWU_PE1_WUPE6_MASK) 7285 #define LLWU_PE1_WUPE7_MASK (0xC000U) 7286 #define LLWU_PE1_WUPE7_SHIFT (14U) 7287 /*! WUPE7 - Wakeup pin enable for LLWU_Pn 7288 * 0b00..External input pin disabled as wakeup input 7289 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7290 * level detection when configured as trigger request 7291 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7292 * level detection when configured as trigger request 7293 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7294 */ 7295 #define LLWU_PE1_WUPE7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE7_SHIFT)) & LLWU_PE1_WUPE7_MASK) 7296 #define LLWU_PE1_WUPE8_MASK (0x30000U) 7297 #define LLWU_PE1_WUPE8_SHIFT (16U) 7298 /*! WUPE8 - Wakeup pin enable for LLWU_Pn 7299 * 0b00..External input pin disabled as wakeup input 7300 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7301 * level detection when configured as trigger request 7302 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7303 * level detection when configured as trigger request 7304 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7305 */ 7306 #define LLWU_PE1_WUPE8(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE8_SHIFT)) & LLWU_PE1_WUPE8_MASK) 7307 #define LLWU_PE1_WUPE9_MASK (0xC0000U) 7308 #define LLWU_PE1_WUPE9_SHIFT (18U) 7309 /*! WUPE9 - Wakeup pin enable for LLWU_Pn 7310 * 0b00..External input pin disabled as wakeup input 7311 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7312 * level detection when configured as trigger request 7313 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7314 * level detection when configured as trigger request 7315 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7316 */ 7317 #define LLWU_PE1_WUPE9(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE9_SHIFT)) & LLWU_PE1_WUPE9_MASK) 7318 #define LLWU_PE1_WUPE10_MASK (0x300000U) 7319 #define LLWU_PE1_WUPE10_SHIFT (20U) 7320 /*! WUPE10 - Wakeup pin enable for LLWU_Pn 7321 * 0b00..External input pin disabled as wakeup input 7322 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7323 * level detection when configured as trigger request 7324 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7325 * level detection when configured as trigger request 7326 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7327 */ 7328 #define LLWU_PE1_WUPE10(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE10_SHIFT)) & LLWU_PE1_WUPE10_MASK) 7329 #define LLWU_PE1_WUPE11_MASK (0xC00000U) 7330 #define LLWU_PE1_WUPE11_SHIFT (22U) 7331 /*! WUPE11 - Wakeup pin enable for LLWU_Pn 7332 * 0b00..External input pin disabled as wakeup input 7333 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7334 * level detection when configured as trigger request 7335 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7336 * level detection when configured as trigger request 7337 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7338 */ 7339 #define LLWU_PE1_WUPE11(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE11_SHIFT)) & LLWU_PE1_WUPE11_MASK) 7340 #define LLWU_PE1_WUPE12_MASK (0x3000000U) 7341 #define LLWU_PE1_WUPE12_SHIFT (24U) 7342 /*! WUPE12 - Wakeup pin enable for LLWU_Pn 7343 * 0b00..External input pin disabled as wakeup input 7344 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7345 * level detection when configured as trigger request 7346 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7347 * level detection when configured as trigger request 7348 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7349 */ 7350 #define LLWU_PE1_WUPE12(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE12_SHIFT)) & LLWU_PE1_WUPE12_MASK) 7351 #define LLWU_PE1_WUPE13_MASK (0xC000000U) 7352 #define LLWU_PE1_WUPE13_SHIFT (26U) 7353 /*! WUPE13 - Wakeup pin enable for LLWU_Pn 7354 * 0b00..External input pin disabled as wakeup input 7355 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7356 * level detection when configured as trigger request 7357 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7358 * level detection when configured as trigger request 7359 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7360 */ 7361 #define LLWU_PE1_WUPE13(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE13_SHIFT)) & LLWU_PE1_WUPE13_MASK) 7362 #define LLWU_PE1_WUPE14_MASK (0x30000000U) 7363 #define LLWU_PE1_WUPE14_SHIFT (28U) 7364 /*! WUPE14 - Wakeup pin enable for LLWU_Pn 7365 * 0b00..External input pin disabled as wakeup input 7366 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7367 * level detection when configured as trigger request 7368 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7369 * level detection when configured as trigger request 7370 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7371 */ 7372 #define LLWU_PE1_WUPE14(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE14_SHIFT)) & LLWU_PE1_WUPE14_MASK) 7373 #define LLWU_PE1_WUPE15_MASK (0xC0000000U) 7374 #define LLWU_PE1_WUPE15_SHIFT (30U) 7375 /*! WUPE15 - Wakeup pin enable for LLWU_Pn 7376 * 0b00..External input pin disabled as wakeup input 7377 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7378 * level detection when configured as trigger request 7379 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7380 * level detection when configured as trigger request 7381 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7382 */ 7383 #define LLWU_PE1_WUPE15(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE1_WUPE15_SHIFT)) & LLWU_PE1_WUPE15_MASK) 7384 /*! @} */ 7385 7386 /*! @name PE2 - Pin Enable 2 register */ 7387 /*! @{ */ 7388 #define LLWU_PE2_WUPE16_MASK (0x3U) 7389 #define LLWU_PE2_WUPE16_SHIFT (0U) 7390 /*! WUPE16 - Wakeup pin enable for LLWU_Pn 7391 * 0b00..External input pin disabled as wakeup input 7392 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7393 * level detection when configured as trigger request 7394 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7395 * level detection when configured as trigger request 7396 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7397 */ 7398 #define LLWU_PE2_WUPE16(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE16_SHIFT)) & LLWU_PE2_WUPE16_MASK) 7399 #define LLWU_PE2_WUPE17_MASK (0xCU) 7400 #define LLWU_PE2_WUPE17_SHIFT (2U) 7401 /*! WUPE17 - Wakeup pin enable for LLWU_Pn 7402 * 0b00..External input pin disabled as wakeup input 7403 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7404 * level detection when configured as trigger request 7405 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7406 * level detection when configured as trigger request 7407 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7408 */ 7409 #define LLWU_PE2_WUPE17(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE17_SHIFT)) & LLWU_PE2_WUPE17_MASK) 7410 #define LLWU_PE2_WUPE18_MASK (0x30U) 7411 #define LLWU_PE2_WUPE18_SHIFT (4U) 7412 /*! WUPE18 - Wakeup pin enable for LLWU_Pn 7413 * 0b00..External input pin disabled as wakeup input 7414 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7415 * level detection when configured as trigger request 7416 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7417 * level detection when configured as trigger request 7418 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7419 */ 7420 #define LLWU_PE2_WUPE18(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE18_SHIFT)) & LLWU_PE2_WUPE18_MASK) 7421 #define LLWU_PE2_WUPE19_MASK (0xC0U) 7422 #define LLWU_PE2_WUPE19_SHIFT (6U) 7423 /*! WUPE19 - Wakeup pin enable for LLWU_Pn 7424 * 0b00..External input pin disabled as wakeup input 7425 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7426 * level detection when configured as trigger request 7427 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7428 * level detection when configured as trigger request 7429 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7430 */ 7431 #define LLWU_PE2_WUPE19(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE19_SHIFT)) & LLWU_PE2_WUPE19_MASK) 7432 #define LLWU_PE2_WUPE20_MASK (0x300U) 7433 #define LLWU_PE2_WUPE20_SHIFT (8U) 7434 /*! WUPE20 - Wakeup pin enable for LLWU_Pn 7435 * 0b00..External input pin disabled as wakeup input 7436 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7437 * level detection when configured as trigger request 7438 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7439 * level detection when configured as trigger request 7440 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7441 */ 7442 #define LLWU_PE2_WUPE20(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE20_SHIFT)) & LLWU_PE2_WUPE20_MASK) 7443 #define LLWU_PE2_WUPE21_MASK (0xC00U) 7444 #define LLWU_PE2_WUPE21_SHIFT (10U) 7445 /*! WUPE21 - Wakeup pin enable for LLWU_Pn 7446 * 0b00..External input pin disabled as wakeup input 7447 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7448 * level detection when configured as trigger request 7449 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7450 * level detection when configured as trigger request 7451 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7452 */ 7453 #define LLWU_PE2_WUPE21(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE21_SHIFT)) & LLWU_PE2_WUPE21_MASK) 7454 #define LLWU_PE2_WUPE22_MASK (0x3000U) 7455 #define LLWU_PE2_WUPE22_SHIFT (12U) 7456 /*! WUPE22 - Wakeup pin enable for LLWU_Pn 7457 * 0b00..External input pin disabled as wakeup input 7458 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7459 * level detection when configured as trigger request 7460 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7461 * level detection when configured as trigger request 7462 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7463 */ 7464 #define LLWU_PE2_WUPE22(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE22_SHIFT)) & LLWU_PE2_WUPE22_MASK) 7465 #define LLWU_PE2_WUPE23_MASK (0xC000U) 7466 #define LLWU_PE2_WUPE23_SHIFT (14U) 7467 /*! WUPE23 - Wakeup pin enable for LLWU_Pn 7468 * 0b00..External input pin disabled as wakeup input 7469 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7470 * level detection when configured as trigger request 7471 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7472 * level detection when configured as trigger request 7473 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7474 */ 7475 #define LLWU_PE2_WUPE23(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE23_SHIFT)) & LLWU_PE2_WUPE23_MASK) 7476 #define LLWU_PE2_WUPE24_MASK (0x30000U) 7477 #define LLWU_PE2_WUPE24_SHIFT (16U) 7478 /*! WUPE24 - Wakeup pin enable for LLWU_Pn 7479 * 0b00..External input pin disabled as wakeup input 7480 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7481 * level detection when configured as trigger request 7482 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7483 * level detection when configured as trigger request 7484 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7485 */ 7486 #define LLWU_PE2_WUPE24(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE24_SHIFT)) & LLWU_PE2_WUPE24_MASK) 7487 #define LLWU_PE2_WUPE25_MASK (0xC0000U) 7488 #define LLWU_PE2_WUPE25_SHIFT (18U) 7489 /*! WUPE25 - Wakeup pin enable for LLWU_Pn 7490 * 0b00..External input pin disabled as wakeup input 7491 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7492 * level detection when configured as trigger request 7493 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7494 * level detection when configured as trigger request 7495 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7496 */ 7497 #define LLWU_PE2_WUPE25(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE25_SHIFT)) & LLWU_PE2_WUPE25_MASK) 7498 #define LLWU_PE2_WUPE26_MASK (0x300000U) 7499 #define LLWU_PE2_WUPE26_SHIFT (20U) 7500 /*! WUPE26 - Wakeup pin enable for LLWU_Pn 7501 * 0b00..External input pin disabled as wakeup input 7502 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7503 * level detection when configured as trigger request 7504 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7505 * level detection when configured as trigger request 7506 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7507 */ 7508 #define LLWU_PE2_WUPE26(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE26_SHIFT)) & LLWU_PE2_WUPE26_MASK) 7509 #define LLWU_PE2_Reserved27_MASK (0xC00000U) 7510 #define LLWU_PE2_Reserved27_SHIFT (22U) 7511 /*! Reserved27 - Wakeup pin enable for LLWU_Pn 7512 * 0b00..External input pin disabled as wakeup input 7513 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7514 * level detection when configured as trigger request 7515 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7516 * level detection when configured as trigger request 7517 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7518 */ 7519 #define LLWU_PE2_Reserved27(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_Reserved27_SHIFT)) & LLWU_PE2_Reserved27_MASK) 7520 #define LLWU_PE2_Reserved28_MASK (0x3000000U) 7521 #define LLWU_PE2_Reserved28_SHIFT (24U) 7522 /*! Reserved28 - Wakeup pin enable for LLWU_Pn 7523 * 0b00..External input pin disabled as wakeup input 7524 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7525 * level detection when configured as trigger request 7526 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7527 * level detection when configured as trigger request 7528 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7529 */ 7530 #define LLWU_PE2_Reserved28(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_Reserved28_SHIFT)) & LLWU_PE2_Reserved28_MASK) 7531 #define LLWU_PE2_WUPE29_MASK (0xC000000U) 7532 #define LLWU_PE2_WUPE29_SHIFT (26U) 7533 /*! WUPE29 - Wakeup pin enable for LLWU_Pn 7534 * 0b00..External input pin disabled as wakeup input 7535 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7536 * level detection when configured as trigger request 7537 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7538 * level detection when configured as trigger request 7539 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7540 */ 7541 #define LLWU_PE2_WUPE29(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE29_SHIFT)) & LLWU_PE2_WUPE29_MASK) 7542 #define LLWU_PE2_WUPE30_MASK (0x30000000U) 7543 #define LLWU_PE2_WUPE30_SHIFT (28U) 7544 /*! WUPE30 - Wakeup pin enable for LLWU_Pn 7545 * 0b00..External input pin disabled as wakeup input 7546 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7547 * level detection when configured as trigger request 7548 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7549 * level detection when configured as trigger request 7550 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7551 */ 7552 #define LLWU_PE2_WUPE30(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE30_SHIFT)) & LLWU_PE2_WUPE30_MASK) 7553 #define LLWU_PE2_WUPE31_MASK (0xC0000000U) 7554 #define LLWU_PE2_WUPE31_SHIFT (30U) 7555 /*! WUPE31 - Wakeup pin enable for LLWU_Pn 7556 * 0b00..External input pin disabled as wakeup input 7557 * 0b01..External input pin enabled with rising edge detection when configured as interrupt/DMA request or high 7558 * level detection when configured as trigger request 7559 * 0b10..External input pin enabled with falling edge detection when configured as interrupt/DMA request or low 7560 * level detection when configured as trigger request 7561 * 0b11..External input pin enabled with any change detection when configured as interrupt/DMA request 7562 */ 7563 #define LLWU_PE2_WUPE31(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PE2_WUPE31_SHIFT)) & LLWU_PE2_WUPE31_MASK) 7564 /*! @} */ 7565 7566 /*! @name ME - Module Interrupt Enable register */ 7567 /*! @{ */ 7568 #define LLWU_ME_WUME0_MASK (0x1U) 7569 #define LLWU_ME_WUME0_SHIFT (0U) 7570 /*! WUME0 - Wakeup module enable for module n 7571 * 0b0..Internal module flag not used as wakeup source 7572 * 0b1..Internal module flag used as wakeup source 7573 */ 7574 #define LLWU_ME_WUME0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME0_SHIFT)) & LLWU_ME_WUME0_MASK) 7575 #define LLWU_ME_WUME1_MASK (0x2U) 7576 #define LLWU_ME_WUME1_SHIFT (1U) 7577 /*! WUME1 - Wakeup module enable for module n 7578 * 0b0..Internal module flag not used as wakeup source 7579 * 0b1..Internal module flag used as wakeup source 7580 */ 7581 #define LLWU_ME_WUME1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME1_SHIFT)) & LLWU_ME_WUME1_MASK) 7582 #define LLWU_ME_WUME2_MASK (0x4U) 7583 #define LLWU_ME_WUME2_SHIFT (2U) 7584 /*! WUME2 - Wakeup module enable for module n 7585 * 0b0..Internal module flag not used as wakeup source 7586 * 0b1..Internal module flag used as wakeup source 7587 */ 7588 #define LLWU_ME_WUME2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME2_SHIFT)) & LLWU_ME_WUME2_MASK) 7589 #define LLWU_ME_Reserved3_MASK (0x8U) 7590 #define LLWU_ME_Reserved3_SHIFT (3U) 7591 /*! Reserved3 - Wakeup module enable for module n 7592 * 0b0..Internal module flag not used as wakeup source 7593 * 0b1..Internal module flag used as wakeup source 7594 */ 7595 #define LLWU_ME_Reserved3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_Reserved3_SHIFT)) & LLWU_ME_Reserved3_MASK) 7596 #define LLWU_ME_WUME3_MASK (0x8U) 7597 #define LLWU_ME_WUME3_SHIFT (3U) 7598 /*! WUME3 - Wakeup module enable for module n 7599 * 0b0..Internal module flag not used as wakeup source 7600 * 0b1..Internal module flag used as wakeup source 7601 */ 7602 #define LLWU_ME_WUME3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME3_SHIFT)) & LLWU_ME_WUME3_MASK) 7603 #define LLWU_ME_Reserved4_MASK (0x10U) 7604 #define LLWU_ME_Reserved4_SHIFT (4U) 7605 /*! Reserved4 - Wakeup module enable for module n 7606 * 0b0..Internal module flag not used as wakeup source 7607 * 0b1..Internal module flag used as wakeup source 7608 */ 7609 #define LLWU_ME_Reserved4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_Reserved4_SHIFT)) & LLWU_ME_Reserved4_MASK) 7610 #define LLWU_ME_WUME5_MASK (0x20U) 7611 #define LLWU_ME_WUME5_SHIFT (5U) 7612 /*! WUME5 - Wakeup module enable for module n 7613 * 0b0..Internal module flag not used as wakeup source 7614 * 0b1..Internal module flag used as wakeup source 7615 */ 7616 #define LLWU_ME_WUME5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME5_SHIFT)) & LLWU_ME_WUME5_MASK) 7617 #define LLWU_ME_WUME6_MASK (0x40U) 7618 #define LLWU_ME_WUME6_SHIFT (6U) 7619 /*! WUME6 - Wakeup module enable for module n 7620 * 0b0..Internal module flag not used as wakeup source 7621 * 0b1..Internal module flag used as wakeup source 7622 */ 7623 #define LLWU_ME_WUME6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME6_SHIFT)) & LLWU_ME_WUME6_MASK) 7624 #define LLWU_ME_WUME7_MASK (0x80U) 7625 #define LLWU_ME_WUME7_SHIFT (7U) 7626 /*! WUME7 - Wakeup module enable for module n 7627 * 0b0..Internal module flag not used as wakeup source 7628 * 0b1..Internal module flag used as wakeup source 7629 */ 7630 #define LLWU_ME_WUME7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_ME_WUME7_SHIFT)) & LLWU_ME_WUME7_MASK) 7631 /*! @} */ 7632 7633 /*! @name DE - Module DMA/Trigger Enable register */ 7634 /*! @{ */ 7635 #define LLWU_DE_WUDE0_MASK (0x1U) 7636 #define LLWU_DE_WUDE0_SHIFT (0U) 7637 /*! WUDE0 - DMA/Trigger wakeup enable for module n 7638 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7639 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7640 */ 7641 #define LLWU_DE_WUDE0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE0_SHIFT)) & LLWU_DE_WUDE0_MASK) 7642 #define LLWU_DE_WUDE1_MASK (0x2U) 7643 #define LLWU_DE_WUDE1_SHIFT (1U) 7644 /*! WUDE1 - DMA/Trigger wakeup enable for module n 7645 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7646 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7647 */ 7648 #define LLWU_DE_WUDE1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE1_SHIFT)) & LLWU_DE_WUDE1_MASK) 7649 #define LLWU_DE_WUDE2_MASK (0x4U) 7650 #define LLWU_DE_WUDE2_SHIFT (2U) 7651 /*! WUDE2 - DMA/Trigger wakeup enable for module n 7652 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7653 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7654 */ 7655 #define LLWU_DE_WUDE2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE2_SHIFT)) & LLWU_DE_WUDE2_MASK) 7656 #define LLWU_DE_Reserved3_MASK (0x8U) 7657 #define LLWU_DE_Reserved3_SHIFT (3U) 7658 /*! Reserved3 - DMA/Trigger wakeup enable for module n 7659 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7660 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7661 */ 7662 #define LLWU_DE_Reserved3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_Reserved3_SHIFT)) & LLWU_DE_Reserved3_MASK) 7663 #define LLWU_DE_WUDE4_MASK (0x10U) 7664 #define LLWU_DE_WUDE4_SHIFT (4U) 7665 /*! WUDE4 - DMA/Trigger wakeup enable for module n 7666 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7667 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7668 */ 7669 #define LLWU_DE_WUDE4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE4_SHIFT)) & LLWU_DE_WUDE4_MASK) 7670 #define LLWU_DE_WUDE5_MASK (0x20U) 7671 #define LLWU_DE_WUDE5_SHIFT (5U) 7672 /*! WUDE5 - DMA/Trigger wakeup enable for module n 7673 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7674 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7675 */ 7676 #define LLWU_DE_WUDE5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE5_SHIFT)) & LLWU_DE_WUDE5_MASK) 7677 #define LLWU_DE_WUDE6_MASK (0x40U) 7678 #define LLWU_DE_WUDE6_SHIFT (6U) 7679 /*! WUDE6 - DMA/Trigger wakeup enable for module n 7680 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7681 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7682 */ 7683 #define LLWU_DE_WUDE6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_WUDE6_SHIFT)) & LLWU_DE_WUDE6_MASK) 7684 #define LLWU_DE_Reserved7_MASK (0x80U) 7685 #define LLWU_DE_Reserved7_SHIFT (7U) 7686 /*! Reserved7 - DMA/Trigger wakeup enable for module n 7687 * 0b0..Internal module request not enabled as a DMA/Trigger wakeup source 7688 * 0b1..Internal module request enabled as a DMA/Trigger wakeup source 7689 */ 7690 #define LLWU_DE_Reserved7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_DE_Reserved7_SHIFT)) & LLWU_DE_Reserved7_MASK) 7691 /*! @} */ 7692 7693 /*! @name PF - Pin Flag register */ 7694 /*! @{ */ 7695 #define LLWU_PF_WUF0_MASK (0x1U) 7696 #define LLWU_PF_WUF0_SHIFT (0U) 7697 /*! WUF0 - Wakeup flag for LLWU_Pn 7698 * 0b0..LLWU_Pn input was not a wakeup source 7699 * 0b1..LLWU_Pn input was a wakeup source 7700 */ 7701 #define LLWU_PF_WUF0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF0_SHIFT)) & LLWU_PF_WUF0_MASK) 7702 #define LLWU_PF_WUF1_MASK (0x2U) 7703 #define LLWU_PF_WUF1_SHIFT (1U) 7704 /*! WUF1 - Wakeup flag for LLWU_Pn 7705 * 0b0..LLWU_Pn input was not a wakeup source 7706 * 0b1..LLWU_Pn input was a wakeup source 7707 */ 7708 #define LLWU_PF_WUF1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF1_SHIFT)) & LLWU_PF_WUF1_MASK) 7709 #define LLWU_PF_WUF2_MASK (0x4U) 7710 #define LLWU_PF_WUF2_SHIFT (2U) 7711 /*! WUF2 - Wakeup flag for LLWU_Pn 7712 * 0b0..LLWU_Pn input was not a wakeup source 7713 * 0b1..LLWU_Pn input was a wakeup source 7714 */ 7715 #define LLWU_PF_WUF2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF2_SHIFT)) & LLWU_PF_WUF2_MASK) 7716 #define LLWU_PF_WUF3_MASK (0x8U) 7717 #define LLWU_PF_WUF3_SHIFT (3U) 7718 /*! WUF3 - Wakeup flag for LLWU_Pn 7719 * 0b0..LLWU_Pn input was not a wakeup source 7720 * 0b1..LLWU_Pn input was a wakeup source 7721 */ 7722 #define LLWU_PF_WUF3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF3_SHIFT)) & LLWU_PF_WUF3_MASK) 7723 #define LLWU_PF_WUF4_MASK (0x10U) 7724 #define LLWU_PF_WUF4_SHIFT (4U) 7725 /*! WUF4 - Wakeup flag for LLWU_Pn 7726 * 0b0..LLWU_Pn input was not a wakeup source 7727 * 0b1..LLWU_Pn input was a wakeup source 7728 */ 7729 #define LLWU_PF_WUF4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF4_SHIFT)) & LLWU_PF_WUF4_MASK) 7730 #define LLWU_PF_WUF5_MASK (0x20U) 7731 #define LLWU_PF_WUF5_SHIFT (5U) 7732 /*! WUF5 - Wakeup flag for LLWU_Pn 7733 * 0b0..LLWU_Pn input was not a wakeup source 7734 * 0b1..LLWU_Pn input was a wakeup source 7735 */ 7736 #define LLWU_PF_WUF5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF5_SHIFT)) & LLWU_PF_WUF5_MASK) 7737 #define LLWU_PF_WUF6_MASK (0x40U) 7738 #define LLWU_PF_WUF6_SHIFT (6U) 7739 /*! WUF6 - Wakeup flag for LLWU_Pn 7740 * 0b0..LLWU_Pn input was not a wakeup source 7741 * 0b1..LLWU_Pn input was a wakeup source 7742 */ 7743 #define LLWU_PF_WUF6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF6_SHIFT)) & LLWU_PF_WUF6_MASK) 7744 #define LLWU_PF_WUF7_MASK (0x80U) 7745 #define LLWU_PF_WUF7_SHIFT (7U) 7746 /*! WUF7 - Wakeup flag for LLWU_Pn 7747 * 0b0..LLWU_Pn input was not a wakeup source 7748 * 0b1..LLWU_Pn input was a wakeup source 7749 */ 7750 #define LLWU_PF_WUF7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF7_SHIFT)) & LLWU_PF_WUF7_MASK) 7751 #define LLWU_PF_WUF8_MASK (0x100U) 7752 #define LLWU_PF_WUF8_SHIFT (8U) 7753 /*! WUF8 - Wakeup flag for LLWU_Pn 7754 * 0b0..LLWU_Pn input was not a wakeup source 7755 * 0b1..LLWU_Pn input was a wakeup source 7756 */ 7757 #define LLWU_PF_WUF8(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF8_SHIFT)) & LLWU_PF_WUF8_MASK) 7758 #define LLWU_PF_WUF9_MASK (0x200U) 7759 #define LLWU_PF_WUF9_SHIFT (9U) 7760 /*! WUF9 - Wakeup flag for LLWU_Pn 7761 * 0b0..LLWU_Pn input was not a wakeup source 7762 * 0b1..LLWU_Pn input was a wakeup source 7763 */ 7764 #define LLWU_PF_WUF9(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF9_SHIFT)) & LLWU_PF_WUF9_MASK) 7765 #define LLWU_PF_WUF10_MASK (0x400U) 7766 #define LLWU_PF_WUF10_SHIFT (10U) 7767 /*! WUF10 - Wakeup flag for LLWU_Pn 7768 * 0b0..LLWU_Pn input was not a wakeup source 7769 * 0b1..LLWU_Pn input was a wakeup source 7770 */ 7771 #define LLWU_PF_WUF10(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF10_SHIFT)) & LLWU_PF_WUF10_MASK) 7772 #define LLWU_PF_WUF11_MASK (0x800U) 7773 #define LLWU_PF_WUF11_SHIFT (11U) 7774 /*! WUF11 - Wakeup flag for LLWU_Pn 7775 * 0b0..LLWU_Pn input was not a wakeup source 7776 * 0b1..LLWU_Pn input was a wakeup source 7777 */ 7778 #define LLWU_PF_WUF11(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF11_SHIFT)) & LLWU_PF_WUF11_MASK) 7779 #define LLWU_PF_WUF12_MASK (0x1000U) 7780 #define LLWU_PF_WUF12_SHIFT (12U) 7781 /*! WUF12 - Wakeup flag for LLWU_Pn 7782 * 0b0..LLWU_Pn input was not a wakeup source 7783 * 0b1..LLWU_Pn input was a wakeup source 7784 */ 7785 #define LLWU_PF_WUF12(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF12_SHIFT)) & LLWU_PF_WUF12_MASK) 7786 #define LLWU_PF_WUF13_MASK (0x2000U) 7787 #define LLWU_PF_WUF13_SHIFT (13U) 7788 /*! WUF13 - Wakeup flag for LLWU_Pn 7789 * 0b0..LLWU_Pn input was not a wakeup source 7790 * 0b1..LLWU_Pn input was a wakeup source 7791 */ 7792 #define LLWU_PF_WUF13(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF13_SHIFT)) & LLWU_PF_WUF13_MASK) 7793 #define LLWU_PF_WUF14_MASK (0x4000U) 7794 #define LLWU_PF_WUF14_SHIFT (14U) 7795 /*! WUF14 - Wakeup flag for LLWU_Pn 7796 * 0b0..LLWU_Pn input was not a wakeup source 7797 * 0b1..LLWU_Pn input was a wakeup source 7798 */ 7799 #define LLWU_PF_WUF14(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF14_SHIFT)) & LLWU_PF_WUF14_MASK) 7800 #define LLWU_PF_WUF15_MASK (0x8000U) 7801 #define LLWU_PF_WUF15_SHIFT (15U) 7802 /*! WUF15 - Wakeup flag for LLWU_Pn 7803 * 0b0..LLWU_Pn input was not a wakeup source 7804 * 0b1..LLWU_Pn input was a wakeup source 7805 */ 7806 #define LLWU_PF_WUF15(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF15_SHIFT)) & LLWU_PF_WUF15_MASK) 7807 #define LLWU_PF_WUF16_MASK (0x10000U) 7808 #define LLWU_PF_WUF16_SHIFT (16U) 7809 /*! WUF16 - Wakeup flag for LLWU_Pn 7810 * 0b0..LLWU_Pn input was not a wakeup source 7811 * 0b1..LLWU_Pn input was a wakeup source 7812 */ 7813 #define LLWU_PF_WUF16(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF16_SHIFT)) & LLWU_PF_WUF16_MASK) 7814 #define LLWU_PF_WUF17_MASK (0x20000U) 7815 #define LLWU_PF_WUF17_SHIFT (17U) 7816 /*! WUF17 - Wakeup flag for LLWU_Pn 7817 * 0b0..LLWU_Pn input was not a wakeup source 7818 * 0b1..LLWU_Pn input was a wakeup source 7819 */ 7820 #define LLWU_PF_WUF17(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF17_SHIFT)) & LLWU_PF_WUF17_MASK) 7821 #define LLWU_PF_WUF18_MASK (0x40000U) 7822 #define LLWU_PF_WUF18_SHIFT (18U) 7823 /*! WUF18 - Wakeup flag for LLWU_Pn 7824 * 0b0..LLWU_Pn input was not a wakeup source 7825 * 0b1..LLWU_Pn input was a wakeup source 7826 */ 7827 #define LLWU_PF_WUF18(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF18_SHIFT)) & LLWU_PF_WUF18_MASK) 7828 #define LLWU_PF_WUF19_MASK (0x80000U) 7829 #define LLWU_PF_WUF19_SHIFT (19U) 7830 /*! WUF19 - Wakeup flag for LLWU_Pn 7831 * 0b0..LLWU_Pn input was not a wakeup source 7832 * 0b1..LLWU_Pn input was a wakeup source 7833 */ 7834 #define LLWU_PF_WUF19(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF19_SHIFT)) & LLWU_PF_WUF19_MASK) 7835 #define LLWU_PF_WUF20_MASK (0x100000U) 7836 #define LLWU_PF_WUF20_SHIFT (20U) 7837 /*! WUF20 - Wakeup flag for LLWU_Pn 7838 * 0b0..LLWU_Pn input was not a wakeup source 7839 * 0b1..LLWU_Pn input was a wakeup source 7840 */ 7841 #define LLWU_PF_WUF20(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF20_SHIFT)) & LLWU_PF_WUF20_MASK) 7842 #define LLWU_PF_WUF21_MASK (0x200000U) 7843 #define LLWU_PF_WUF21_SHIFT (21U) 7844 /*! WUF21 - Wakeup flag for LLWU_Pn 7845 * 0b0..LLWU_Pn input was not a wakeup source 7846 * 0b1..LLWU_Pn input was a wakeup source 7847 */ 7848 #define LLWU_PF_WUF21(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF21_SHIFT)) & LLWU_PF_WUF21_MASK) 7849 #define LLWU_PF_WUF22_MASK (0x400000U) 7850 #define LLWU_PF_WUF22_SHIFT (22U) 7851 /*! WUF22 - Wakeup flag for LLWU_Pn 7852 * 0b0..LLWU_Pn input was not a wakeup source 7853 * 0b1..LLWU_Pn input was a wakeup source 7854 */ 7855 #define LLWU_PF_WUF22(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF22_SHIFT)) & LLWU_PF_WUF22_MASK) 7856 #define LLWU_PF_WUF23_MASK (0x800000U) 7857 #define LLWU_PF_WUF23_SHIFT (23U) 7858 /*! WUF23 - Wakeup flag for LLWU_Pn 7859 * 0b0..LLWU_Pn input was not a wakeup source 7860 * 0b1..LLWU_Pn input was a wakeup source 7861 */ 7862 #define LLWU_PF_WUF23(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF23_SHIFT)) & LLWU_PF_WUF23_MASK) 7863 #define LLWU_PF_WUF24_MASK (0x1000000U) 7864 #define LLWU_PF_WUF24_SHIFT (24U) 7865 /*! WUF24 - Wakeup flag for LLWU_Pn 7866 * 0b0..LLWU_Pn input was not a wakeup source 7867 * 0b1..LLWU_Pn input was a wakeup source 7868 */ 7869 #define LLWU_PF_WUF24(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF24_SHIFT)) & LLWU_PF_WUF24_MASK) 7870 #define LLWU_PF_WUF25_MASK (0x2000000U) 7871 #define LLWU_PF_WUF25_SHIFT (25U) 7872 /*! WUF25 - Wakeup flag for LLWU_Pn 7873 * 0b0..LLWU_Pn input was not a wakeup source 7874 * 0b1..LLWU_Pn input was a wakeup source 7875 */ 7876 #define LLWU_PF_WUF25(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF25_SHIFT)) & LLWU_PF_WUF25_MASK) 7877 #define LLWU_PF_WUF26_MASK (0x4000000U) 7878 #define LLWU_PF_WUF26_SHIFT (26U) 7879 /*! WUF26 - Wakeup flag for LLWU_Pn 7880 * 0b0..LLWU_Pn input was not a wakeup source 7881 * 0b1..LLWU_Pn input was a wakeup source 7882 */ 7883 #define LLWU_PF_WUF26(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF26_SHIFT)) & LLWU_PF_WUF26_MASK) 7884 #define LLWU_PF_Reserved27_MASK (0x8000000U) 7885 #define LLWU_PF_Reserved27_SHIFT (27U) 7886 /*! Reserved27 - Wakeup flag for LLWU_Pn 7887 * 0b0..LLWU_Pn input was not a wakeup source 7888 * 0b1..LLWU_Pn input was a wakeup source 7889 */ 7890 #define LLWU_PF_Reserved27(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_Reserved27_SHIFT)) & LLWU_PF_Reserved27_MASK) 7891 #define LLWU_PF_Reserved28_MASK (0x10000000U) 7892 #define LLWU_PF_Reserved28_SHIFT (28U) 7893 /*! Reserved28 - Wakeup flag for LLWU_Pn 7894 * 0b0..LLWU_Pn input was not a wakeup source 7895 * 0b1..LLWU_Pn input was a wakeup source 7896 */ 7897 #define LLWU_PF_Reserved28(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_Reserved28_SHIFT)) & LLWU_PF_Reserved28_MASK) 7898 #define LLWU_PF_WUF29_MASK (0x20000000U) 7899 #define LLWU_PF_WUF29_SHIFT (29U) 7900 /*! WUF29 - Wakeup flag for LLWU_Pn 7901 * 0b0..LLWU_Pn input was not a wakeup source 7902 * 0b1..LLWU_Pn input was a wakeup source 7903 */ 7904 #define LLWU_PF_WUF29(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF29_SHIFT)) & LLWU_PF_WUF29_MASK) 7905 #define LLWU_PF_WUF30_MASK (0x40000000U) 7906 #define LLWU_PF_WUF30_SHIFT (30U) 7907 /*! WUF30 - Wakeup flag for LLWU_Pn 7908 * 0b0..LLWU_Pn input was not a wakeup source 7909 * 0b1..LLWU_Pn input was a wakeup source 7910 */ 7911 #define LLWU_PF_WUF30(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF30_SHIFT)) & LLWU_PF_WUF30_MASK) 7912 #define LLWU_PF_WUF31_MASK (0x80000000U) 7913 #define LLWU_PF_WUF31_SHIFT (31U) 7914 /*! WUF31 - Wakeup flag for LLWU_Pn 7915 * 0b0..LLWU_Pn input was not a wakeup source 7916 * 0b1..LLWU_Pn input was a wakeup source 7917 */ 7918 #define LLWU_PF_WUF31(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PF_WUF31_SHIFT)) & LLWU_PF_WUF31_MASK) 7919 /*! @} */ 7920 7921 /*! @name FILT - Pin Filter register */ 7922 /*! @{ */ 7923 #define LLWU_FILT_FILTSEL1_MASK (0x1FU) 7924 #define LLWU_FILT_FILTSEL1_SHIFT (0U) 7925 /*! FILTSEL1 - Filter 1 Pin Select 7926 * 0b00000..Select LLWU_P0 for filter 7927 * 0b11111..Select LLWU_P31 for filter 7928 */ 7929 #define LLWU_FILT_FILTSEL1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTSEL1_SHIFT)) & LLWU_FILT_FILTSEL1_MASK) 7930 #define LLWU_FILT_FILTE1_MASK (0x60U) 7931 #define LLWU_FILT_FILTE1_SHIFT (5U) 7932 /*! FILTE1 - Filter 1 Enable 7933 * 0b00..Filter disabled 7934 * 0b01..Filter posedge detect enabled when configured as interrupt/DMA request or high level detection when configured as trigger request 7935 * 0b10..Filter negedge detect enabled when configured as interrupt/DMA request or low level detection when configured as trigger request 7936 * 0b11..Filter any edge detect enabled when configured as interrupt/DMA request 7937 */ 7938 #define LLWU_FILT_FILTE1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTE1_SHIFT)) & LLWU_FILT_FILTE1_MASK) 7939 #define LLWU_FILT_FILTF1_MASK (0x80U) 7940 #define LLWU_FILT_FILTF1_SHIFT (7U) 7941 /*! FILTF1 - Filter 1 Flag 7942 * 0b0..Pin Filter 1 was not a wakeup source 7943 * 0b1..Pin Filter 1 was a wakeup source 7944 */ 7945 #define LLWU_FILT_FILTF1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTF1_SHIFT)) & LLWU_FILT_FILTF1_MASK) 7946 #define LLWU_FILT_FILTSEL2_MASK (0x1F00U) 7947 #define LLWU_FILT_FILTSEL2_SHIFT (8U) 7948 /*! FILTSEL2 - Filter 2 Pin Select 7949 * 0b00000..Select LLWU_P0 for filter 7950 * 0b11111..Select LLWU_P31 for filter 7951 */ 7952 #define LLWU_FILT_FILTSEL2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTSEL2_SHIFT)) & LLWU_FILT_FILTSEL2_MASK) 7953 #define LLWU_FILT_FILTE2_MASK (0x6000U) 7954 #define LLWU_FILT_FILTE2_SHIFT (13U) 7955 /*! FILTE2 - Filter 2 Enable 7956 * 0b00..Filter disabled 7957 * 0b01..Filter posedge detect enabled when configured as interrupt/DMA request or high level detection when configured as trigger request 7958 * 0b10..Filter negedge detect enabled when configured as interrupt/DMA request or low level detection when configured as trigger request 7959 * 0b11..Filter any edge detect enabled when configured as interrupt/DMA request 7960 */ 7961 #define LLWU_FILT_FILTE2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTE2_SHIFT)) & LLWU_FILT_FILTE2_MASK) 7962 #define LLWU_FILT_FILTF2_MASK (0x8000U) 7963 #define LLWU_FILT_FILTF2_SHIFT (15U) 7964 /*! FILTF2 - Filter 2 Flag 7965 * 0b0..Pin Filter 2 was not a wakeup source 7966 * 0b1..Pin Filter 2 was a wakeup source 7967 */ 7968 #define LLWU_FILT_FILTF2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FILT_FILTF2_SHIFT)) & LLWU_FILT_FILTF2_MASK) 7969 /*! @} */ 7970 7971 /*! @name PDC1 - Pin DMA/Trigger Configuration 1 register */ 7972 /*! @{ */ 7973 #define LLWU_PDC1_WUPDC0_MASK (0x3U) 7974 #define LLWU_PDC1_WUPDC0_SHIFT (0U) 7975 /*! WUPDC0 - Wakeup pin configuration for LLWU_Pn 7976 * 0b00..External input pin configured as interrupt 7977 * 0b01..External input pin configured as DMA request 7978 * 0b10..External input pin configured as trigger event 7979 * 0b11..Reserved 7980 */ 7981 #define LLWU_PDC1_WUPDC0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC0_SHIFT)) & LLWU_PDC1_WUPDC0_MASK) 7982 #define LLWU_PDC1_WUPDC1_MASK (0xCU) 7983 #define LLWU_PDC1_WUPDC1_SHIFT (2U) 7984 /*! WUPDC1 - Wakeup pin configuration for LLWU_Pn 7985 * 0b00..External input pin configured as interrupt 7986 * 0b01..External input pin configured as DMA request 7987 * 0b10..External input pin configured as trigger event 7988 * 0b11..Reserved 7989 */ 7990 #define LLWU_PDC1_WUPDC1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC1_SHIFT)) & LLWU_PDC1_WUPDC1_MASK) 7991 #define LLWU_PDC1_WUPDC2_MASK (0x30U) 7992 #define LLWU_PDC1_WUPDC2_SHIFT (4U) 7993 /*! WUPDC2 - Wakeup pin configuration for LLWU_Pn 7994 * 0b00..External input pin configured as interrupt 7995 * 0b01..External input pin configured as DMA request 7996 * 0b10..External input pin configured as trigger event 7997 * 0b11..Reserved 7998 */ 7999 #define LLWU_PDC1_WUPDC2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC2_SHIFT)) & LLWU_PDC1_WUPDC2_MASK) 8000 #define LLWU_PDC1_WUPDC3_MASK (0xC0U) 8001 #define LLWU_PDC1_WUPDC3_SHIFT (6U) 8002 /*! WUPDC3 - Wakeup pin configuration for LLWU_Pn 8003 * 0b00..External input pin configured as interrupt 8004 * 0b01..External input pin configured as DMA request 8005 * 0b10..External input pin configured as trigger event 8006 * 0b11..Reserved 8007 */ 8008 #define LLWU_PDC1_WUPDC3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC3_SHIFT)) & LLWU_PDC1_WUPDC3_MASK) 8009 #define LLWU_PDC1_WUPDC4_MASK (0x300U) 8010 #define LLWU_PDC1_WUPDC4_SHIFT (8U) 8011 /*! WUPDC4 - Wakeup pin configuration for LLWU_Pn 8012 * 0b00..External input pin configured as interrupt 8013 * 0b01..External input pin configured as DMA request 8014 * 0b10..External input pin configured as trigger event 8015 * 0b11..Reserved 8016 */ 8017 #define LLWU_PDC1_WUPDC4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC4_SHIFT)) & LLWU_PDC1_WUPDC4_MASK) 8018 #define LLWU_PDC1_WUPDC5_MASK (0xC00U) 8019 #define LLWU_PDC1_WUPDC5_SHIFT (10U) 8020 /*! WUPDC5 - Wakeup pin configuration for LLWU_Pn 8021 * 0b00..External input pin configured as interrupt 8022 * 0b01..External input pin configured as DMA request 8023 * 0b10..External input pin configured as trigger event 8024 * 0b11..Reserved 8025 */ 8026 #define LLWU_PDC1_WUPDC5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC5_SHIFT)) & LLWU_PDC1_WUPDC5_MASK) 8027 #define LLWU_PDC1_WUPDC6_MASK (0x3000U) 8028 #define LLWU_PDC1_WUPDC6_SHIFT (12U) 8029 /*! WUPDC6 - Wakeup pin configuration for LLWU_Pn 8030 * 0b00..External input pin configured as interrupt 8031 * 0b01..External input pin configured as DMA request 8032 * 0b10..External input pin configured as trigger event 8033 * 0b11..Reserved 8034 */ 8035 #define LLWU_PDC1_WUPDC6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC6_SHIFT)) & LLWU_PDC1_WUPDC6_MASK) 8036 #define LLWU_PDC1_WUPDC7_MASK (0xC000U) 8037 #define LLWU_PDC1_WUPDC7_SHIFT (14U) 8038 /*! WUPDC7 - Wakeup pin configuration for LLWU_Pn 8039 * 0b00..External input pin configured as interrupt 8040 * 0b01..External input pin configured as DMA request 8041 * 0b10..External input pin configured as trigger event 8042 * 0b11..Reserved 8043 */ 8044 #define LLWU_PDC1_WUPDC7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC7_SHIFT)) & LLWU_PDC1_WUPDC7_MASK) 8045 #define LLWU_PDC1_WUPDC8_MASK (0x30000U) 8046 #define LLWU_PDC1_WUPDC8_SHIFT (16U) 8047 /*! WUPDC8 - Wakeup pin configuration for LLWU_Pn 8048 * 0b00..External input pin configured as interrupt 8049 * 0b01..External input pin configured as DMA request 8050 * 0b10..External input pin configured as trigger event 8051 * 0b11..Reserved 8052 */ 8053 #define LLWU_PDC1_WUPDC8(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC8_SHIFT)) & LLWU_PDC1_WUPDC8_MASK) 8054 #define LLWU_PDC1_WUPDC9_MASK (0xC0000U) 8055 #define LLWU_PDC1_WUPDC9_SHIFT (18U) 8056 /*! WUPDC9 - Wakeup pin configuration for LLWU_Pn 8057 * 0b00..External input pin configured as interrupt 8058 * 0b01..External input pin configured as DMA request 8059 * 0b10..External input pin configured as trigger event 8060 * 0b11..Reserved 8061 */ 8062 #define LLWU_PDC1_WUPDC9(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC9_SHIFT)) & LLWU_PDC1_WUPDC9_MASK) 8063 #define LLWU_PDC1_WUPDC10_MASK (0x300000U) 8064 #define LLWU_PDC1_WUPDC10_SHIFT (20U) 8065 /*! WUPDC10 - Wakeup pin configuration for LLWU_Pn 8066 * 0b00..External input pin configured as interrupt 8067 * 0b01..External input pin configured as DMA request 8068 * 0b10..External input pin configured as trigger event 8069 * 0b11..Reserved 8070 */ 8071 #define LLWU_PDC1_WUPDC10(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC10_SHIFT)) & LLWU_PDC1_WUPDC10_MASK) 8072 #define LLWU_PDC1_WUPDC11_MASK (0xC00000U) 8073 #define LLWU_PDC1_WUPDC11_SHIFT (22U) 8074 /*! WUPDC11 - Wakeup pin configuration for LLWU_Pn 8075 * 0b00..External input pin configured as interrupt 8076 * 0b01..External input pin configured as DMA request 8077 * 0b10..External input pin configured as trigger event 8078 * 0b11..Reserved 8079 */ 8080 #define LLWU_PDC1_WUPDC11(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC11_SHIFT)) & LLWU_PDC1_WUPDC11_MASK) 8081 #define LLWU_PDC1_WUPDC12_MASK (0x3000000U) 8082 #define LLWU_PDC1_WUPDC12_SHIFT (24U) 8083 /*! WUPDC12 - Wakeup pin configuration for LLWU_Pn 8084 * 0b00..External input pin configured as interrupt 8085 * 0b01..External input pin configured as DMA request 8086 * 0b10..External input pin configured as trigger event 8087 * 0b11..Reserved 8088 */ 8089 #define LLWU_PDC1_WUPDC12(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC12_SHIFT)) & LLWU_PDC1_WUPDC12_MASK) 8090 #define LLWU_PDC1_WUPDC13_MASK (0xC000000U) 8091 #define LLWU_PDC1_WUPDC13_SHIFT (26U) 8092 /*! WUPDC13 - Wakeup pin configuration for LLWU_Pn 8093 * 0b00..External input pin configured as interrupt 8094 * 0b01..External input pin configured as DMA request 8095 * 0b10..External input pin configured as trigger event 8096 * 0b11..Reserved 8097 */ 8098 #define LLWU_PDC1_WUPDC13(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC13_SHIFT)) & LLWU_PDC1_WUPDC13_MASK) 8099 #define LLWU_PDC1_WUPDC14_MASK (0x30000000U) 8100 #define LLWU_PDC1_WUPDC14_SHIFT (28U) 8101 /*! WUPDC14 - Wakeup pin configuration for LLWU_Pn 8102 * 0b00..External input pin configured as interrupt 8103 * 0b01..External input pin configured as DMA request 8104 * 0b10..External input pin configured as trigger event 8105 * 0b11..Reserved 8106 */ 8107 #define LLWU_PDC1_WUPDC14(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC14_SHIFT)) & LLWU_PDC1_WUPDC14_MASK) 8108 #define LLWU_PDC1_WUPDC15_MASK (0xC0000000U) 8109 #define LLWU_PDC1_WUPDC15_SHIFT (30U) 8110 /*! WUPDC15 - Wakeup pin configuration for LLWU_Pn 8111 * 0b00..External input pin configured as interrupt 8112 * 0b01..External input pin configured as DMA request 8113 * 0b10..External input pin configured as trigger event 8114 * 0b11..Reserved 8115 */ 8116 #define LLWU_PDC1_WUPDC15(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC1_WUPDC15_SHIFT)) & LLWU_PDC1_WUPDC15_MASK) 8117 /*! @} */ 8118 8119 /*! @name PDC2 - Pin DMA/Trigger Configuration 2 register */ 8120 /*! @{ */ 8121 #define LLWU_PDC2_WUPDC16_MASK (0x3U) 8122 #define LLWU_PDC2_WUPDC16_SHIFT (0U) 8123 /*! WUPDC16 - Wakeup pin configuration for LLWU_Pn 8124 * 0b00..External input pin configured as interrupt 8125 * 0b01..External input pin configured as DMA request 8126 * 0b10..External input pin configured as trigger event 8127 * 0b11..Reserved 8128 */ 8129 #define LLWU_PDC2_WUPDC16(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC16_SHIFT)) & LLWU_PDC2_WUPDC16_MASK) 8130 #define LLWU_PDC2_WUPDC17_MASK (0xCU) 8131 #define LLWU_PDC2_WUPDC17_SHIFT (2U) 8132 /*! WUPDC17 - Wakeup pin configuration for LLWU_Pn 8133 * 0b00..External input pin configured as interrupt 8134 * 0b01..External input pin configured as DMA request 8135 * 0b10..External input pin configured as trigger event 8136 * 0b11..Reserved 8137 */ 8138 #define LLWU_PDC2_WUPDC17(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC17_SHIFT)) & LLWU_PDC2_WUPDC17_MASK) 8139 #define LLWU_PDC2_WUPDC18_MASK (0x30U) 8140 #define LLWU_PDC2_WUPDC18_SHIFT (4U) 8141 /*! WUPDC18 - Wakeup pin configuration for LLWU_Pn 8142 * 0b00..External input pin configured as interrupt 8143 * 0b01..External input pin configured as DMA request 8144 * 0b10..External input pin configured as trigger event 8145 * 0b11..Reserved 8146 */ 8147 #define LLWU_PDC2_WUPDC18(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC18_SHIFT)) & LLWU_PDC2_WUPDC18_MASK) 8148 #define LLWU_PDC2_WUPDC19_MASK (0xC0U) 8149 #define LLWU_PDC2_WUPDC19_SHIFT (6U) 8150 /*! WUPDC19 - Wakeup pin configuration for LLWU_Pn 8151 * 0b00..External input pin configured as interrupt 8152 * 0b01..External input pin configured as DMA request 8153 * 0b10..External input pin configured as trigger event 8154 * 0b11..Reserved 8155 */ 8156 #define LLWU_PDC2_WUPDC19(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC19_SHIFT)) & LLWU_PDC2_WUPDC19_MASK) 8157 #define LLWU_PDC2_WUPDC20_MASK (0x300U) 8158 #define LLWU_PDC2_WUPDC20_SHIFT (8U) 8159 /*! WUPDC20 - Wakeup pin configuration for LLWU_Pn 8160 * 0b00..External input pin configured as interrupt 8161 * 0b01..External input pin configured as DMA request 8162 * 0b10..External input pin configured as trigger event 8163 * 0b11..Reserved 8164 */ 8165 #define LLWU_PDC2_WUPDC20(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC20_SHIFT)) & LLWU_PDC2_WUPDC20_MASK) 8166 #define LLWU_PDC2_WUPDC21_MASK (0xC00U) 8167 #define LLWU_PDC2_WUPDC21_SHIFT (10U) 8168 /*! WUPDC21 - Wakeup pin configuration for LLWU_Pn 8169 * 0b00..External input pin configured as interrupt 8170 * 0b01..External input pin configured as DMA request 8171 * 0b10..External input pin configured as trigger event 8172 * 0b11..Reserved 8173 */ 8174 #define LLWU_PDC2_WUPDC21(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC21_SHIFT)) & LLWU_PDC2_WUPDC21_MASK) 8175 #define LLWU_PDC2_WUPDC22_MASK (0x3000U) 8176 #define LLWU_PDC2_WUPDC22_SHIFT (12U) 8177 /*! WUPDC22 - Wakeup pin configuration for LLWU_Pn 8178 * 0b00..External input pin configured as interrupt 8179 * 0b01..External input pin configured as DMA request 8180 * 0b10..External input pin configured as trigger event 8181 * 0b11..Reserved 8182 */ 8183 #define LLWU_PDC2_WUPDC22(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC22_SHIFT)) & LLWU_PDC2_WUPDC22_MASK) 8184 #define LLWU_PDC2_WUPDC23_MASK (0xC000U) 8185 #define LLWU_PDC2_WUPDC23_SHIFT (14U) 8186 /*! WUPDC23 - Wakeup pin configuration for LLWU_Pn 8187 * 0b00..External input pin configured as interrupt 8188 * 0b01..External input pin configured as DMA request 8189 * 0b10..External input pin configured as trigger event 8190 * 0b11..Reserved 8191 */ 8192 #define LLWU_PDC2_WUPDC23(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC23_SHIFT)) & LLWU_PDC2_WUPDC23_MASK) 8193 #define LLWU_PDC2_WUPDC24_MASK (0x30000U) 8194 #define LLWU_PDC2_WUPDC24_SHIFT (16U) 8195 /*! WUPDC24 - Wakeup pin configuration for LLWU_Pn 8196 * 0b00..External input pin configured as interrupt 8197 * 0b01..External input pin configured as DMA request 8198 * 0b10..External input pin configured as trigger event 8199 * 0b11..Reserved 8200 */ 8201 #define LLWU_PDC2_WUPDC24(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC24_SHIFT)) & LLWU_PDC2_WUPDC24_MASK) 8202 #define LLWU_PDC2_WUPDC25_MASK (0xC0000U) 8203 #define LLWU_PDC2_WUPDC25_SHIFT (18U) 8204 /*! WUPDC25 - Wakeup pin configuration for LLWU_Pn 8205 * 0b00..External input pin configured as interrupt 8206 * 0b01..External input pin configured as DMA request 8207 * 0b10..External input pin configured as trigger event 8208 * 0b11..Reserved 8209 */ 8210 #define LLWU_PDC2_WUPDC25(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC25_SHIFT)) & LLWU_PDC2_WUPDC25_MASK) 8211 #define LLWU_PDC2_WUPDC26_MASK (0x300000U) 8212 #define LLWU_PDC2_WUPDC26_SHIFT (20U) 8213 /*! WUPDC26 - Wakeup pin configuration for LLWU_Pn 8214 * 0b00..External input pin configured as interrupt 8215 * 0b01..External input pin configured as DMA request 8216 * 0b10..External input pin configured as trigger event 8217 * 0b11..Reserved 8218 */ 8219 #define LLWU_PDC2_WUPDC26(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC26_SHIFT)) & LLWU_PDC2_WUPDC26_MASK) 8220 #define LLWU_PDC2_Reserved27_MASK (0xC00000U) 8221 #define LLWU_PDC2_Reserved27_SHIFT (22U) 8222 /*! Reserved27 - Wakeup pin configuration for LLWU_Pn 8223 * 0b00..External input pin configured as interrupt 8224 * 0b01..External input pin configured as DMA request 8225 * 0b10..External input pin configured as trigger event 8226 * 0b11..Reserved 8227 */ 8228 #define LLWU_PDC2_Reserved27(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_Reserved27_SHIFT)) & LLWU_PDC2_Reserved27_MASK) 8229 #define LLWU_PDC2_Reserved28_MASK (0x3000000U) 8230 #define LLWU_PDC2_Reserved28_SHIFT (24U) 8231 /*! Reserved28 - Wakeup pin configuration for LLWU_Pn 8232 * 0b00..External input pin configured as interrupt 8233 * 0b01..External input pin configured as DMA request 8234 * 0b10..External input pin configured as trigger event 8235 * 0b11..Reserved 8236 */ 8237 #define LLWU_PDC2_Reserved28(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_Reserved28_SHIFT)) & LLWU_PDC2_Reserved28_MASK) 8238 #define LLWU_PDC2_WUPDC29_MASK (0xC000000U) 8239 #define LLWU_PDC2_WUPDC29_SHIFT (26U) 8240 /*! WUPDC29 - Wakeup pin configuration for LLWU_Pn 8241 * 0b00..External input pin configured as interrupt 8242 * 0b01..External input pin configured as DMA request 8243 * 0b10..External input pin configured as trigger event 8244 * 0b11..Reserved 8245 */ 8246 #define LLWU_PDC2_WUPDC29(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC29_SHIFT)) & LLWU_PDC2_WUPDC29_MASK) 8247 #define LLWU_PDC2_WUPDC30_MASK (0x30000000U) 8248 #define LLWU_PDC2_WUPDC30_SHIFT (28U) 8249 /*! WUPDC30 - Wakeup pin configuration for LLWU_Pn 8250 * 0b00..External input pin configured as interrupt 8251 * 0b01..External input pin configured as DMA request 8252 * 0b10..External input pin configured as trigger event 8253 * 0b11..Reserved 8254 */ 8255 #define LLWU_PDC2_WUPDC30(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC30_SHIFT)) & LLWU_PDC2_WUPDC30_MASK) 8256 #define LLWU_PDC2_WUPDC31_MASK (0xC0000000U) 8257 #define LLWU_PDC2_WUPDC31_SHIFT (30U) 8258 /*! WUPDC31 - Wakeup pin configuration for LLWU_Pn 8259 * 0b00..External input pin configured as interrupt 8260 * 0b01..External input pin configured as DMA request 8261 * 0b10..External input pin configured as trigger event 8262 * 0b11..Reserved 8263 */ 8264 #define LLWU_PDC2_WUPDC31(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PDC2_WUPDC31_SHIFT)) & LLWU_PDC2_WUPDC31_MASK) 8265 /*! @} */ 8266 8267 /*! @name FDC - Pin Filter DMA/Trigger Configuration register */ 8268 /*! @{ */ 8269 #define LLWU_FDC_FILTC1_MASK (0x3U) 8270 #define LLWU_FDC_FILTC1_SHIFT (0U) 8271 /*! FILTC1 - Filter configuration for FILT1 8272 * 0b00..Filter output configured as interrupt 8273 * 0b01..Filter output configured as DMA request 8274 * 0b10..Filter output configured as trigger event 8275 * 0b11..Reserved 8276 */ 8277 #define LLWU_FDC_FILTC1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FDC_FILTC1_SHIFT)) & LLWU_FDC_FILTC1_MASK) 8278 #define LLWU_FDC_FILTC2_MASK (0xCU) 8279 #define LLWU_FDC_FILTC2_SHIFT (2U) 8280 /*! FILTC2 - Filter configuration for FILT2 8281 * 0b00..Filter output configured as interrupt 8282 * 0b01..Filter output configured as DMA request 8283 * 0b10..Filter output configured as trigger event 8284 * 0b11..Reserved 8285 */ 8286 #define LLWU_FDC_FILTC2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FDC_FILTC2_SHIFT)) & LLWU_FDC_FILTC2_MASK) 8287 /*! @} */ 8288 8289 /*! @name PMC - Pin Mode Configuration register */ 8290 /*! @{ */ 8291 #define LLWU_PMC_WUPMC0_MASK (0x1U) 8292 #define LLWU_PMC_WUPMC0_SHIFT (0U) 8293 /*! WUPMC0 - Wakeup pin mode for LLWU_Pn 8294 * 0b0..External input pin detection active only during LLS/VLLS mode 8295 * 0b1..External input pin detection active during all power modes 8296 */ 8297 #define LLWU_PMC_WUPMC0(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC0_SHIFT)) & LLWU_PMC_WUPMC0_MASK) 8298 #define LLWU_PMC_WUPMC1_MASK (0x2U) 8299 #define LLWU_PMC_WUPMC1_SHIFT (1U) 8300 /*! WUPMC1 - Wakeup pin mode for LLWU_Pn 8301 * 0b0..External input pin detection active only during LLS/VLLS mode 8302 * 0b1..External input pin detection active during all power modes 8303 */ 8304 #define LLWU_PMC_WUPMC1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC1_SHIFT)) & LLWU_PMC_WUPMC1_MASK) 8305 #define LLWU_PMC_WUPMC2_MASK (0x4U) 8306 #define LLWU_PMC_WUPMC2_SHIFT (2U) 8307 /*! WUPMC2 - Wakeup pin mode for LLWU_Pn 8308 * 0b0..External input pin detection active only during LLS/VLLS mode 8309 * 0b1..External input pin detection active during all power modes 8310 */ 8311 #define LLWU_PMC_WUPMC2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC2_SHIFT)) & LLWU_PMC_WUPMC2_MASK) 8312 #define LLWU_PMC_WUPMC3_MASK (0x8U) 8313 #define LLWU_PMC_WUPMC3_SHIFT (3U) 8314 /*! WUPMC3 - Wakeup pin mode for LLWU_Pn 8315 * 0b0..External input pin detection active only during LLS/VLLS mode 8316 * 0b1..External input pin detection active during all power modes 8317 */ 8318 #define LLWU_PMC_WUPMC3(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC3_SHIFT)) & LLWU_PMC_WUPMC3_MASK) 8319 #define LLWU_PMC_WUPMC4_MASK (0x10U) 8320 #define LLWU_PMC_WUPMC4_SHIFT (4U) 8321 /*! WUPMC4 - Wakeup pin mode for LLWU_Pn 8322 * 0b0..External input pin detection active only during LLS/VLLS mode 8323 * 0b1..External input pin detection active during all power modes 8324 */ 8325 #define LLWU_PMC_WUPMC4(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC4_SHIFT)) & LLWU_PMC_WUPMC4_MASK) 8326 #define LLWU_PMC_WUPMC5_MASK (0x20U) 8327 #define LLWU_PMC_WUPMC5_SHIFT (5U) 8328 /*! WUPMC5 - Wakeup pin mode for LLWU_Pn 8329 * 0b0..External input pin detection active only during LLS/VLLS mode 8330 * 0b1..External input pin detection active during all power modes 8331 */ 8332 #define LLWU_PMC_WUPMC5(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC5_SHIFT)) & LLWU_PMC_WUPMC5_MASK) 8333 #define LLWU_PMC_WUPMC6_MASK (0x40U) 8334 #define LLWU_PMC_WUPMC6_SHIFT (6U) 8335 /*! WUPMC6 - Wakeup pin mode for LLWU_Pn 8336 * 0b0..External input pin detection active only during LLS/VLLS mode 8337 * 0b1..External input pin detection active during all power modes 8338 */ 8339 #define LLWU_PMC_WUPMC6(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC6_SHIFT)) & LLWU_PMC_WUPMC6_MASK) 8340 #define LLWU_PMC_WUPMC7_MASK (0x80U) 8341 #define LLWU_PMC_WUPMC7_SHIFT (7U) 8342 /*! WUPMC7 - Wakeup pin mode for LLWU_Pn 8343 * 0b0..External input pin detection active only during LLS/VLLS mode 8344 * 0b1..External input pin detection active during all power modes 8345 */ 8346 #define LLWU_PMC_WUPMC7(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC7_SHIFT)) & LLWU_PMC_WUPMC7_MASK) 8347 #define LLWU_PMC_WUPMC8_MASK (0x100U) 8348 #define LLWU_PMC_WUPMC8_SHIFT (8U) 8349 /*! WUPMC8 - Wakeup pin mode for LLWU_Pn 8350 * 0b0..External input pin detection active only during LLS/VLLS mode 8351 * 0b1..External input pin detection active during all power modes 8352 */ 8353 #define LLWU_PMC_WUPMC8(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC8_SHIFT)) & LLWU_PMC_WUPMC8_MASK) 8354 #define LLWU_PMC_WUPMC9_MASK (0x200U) 8355 #define LLWU_PMC_WUPMC9_SHIFT (9U) 8356 /*! WUPMC9 - Wakeup pin mode for LLWU_Pn 8357 * 0b0..External input pin detection active only during LLS/VLLS mode 8358 * 0b1..External input pin detection active during all power modes 8359 */ 8360 #define LLWU_PMC_WUPMC9(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC9_SHIFT)) & LLWU_PMC_WUPMC9_MASK) 8361 #define LLWU_PMC_WUPMC10_MASK (0x400U) 8362 #define LLWU_PMC_WUPMC10_SHIFT (10U) 8363 /*! WUPMC10 - Wakeup pin mode for LLWU_Pn 8364 * 0b0..External input pin detection active only during LLS/VLLS mode 8365 * 0b1..External input pin detection active during all power modes 8366 */ 8367 #define LLWU_PMC_WUPMC10(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC10_SHIFT)) & LLWU_PMC_WUPMC10_MASK) 8368 #define LLWU_PMC_WUPMC11_MASK (0x800U) 8369 #define LLWU_PMC_WUPMC11_SHIFT (11U) 8370 /*! WUPMC11 - Wakeup pin mode for LLWU_Pn 8371 * 0b0..External input pin detection active only during LLS/VLLS mode 8372 * 0b1..External input pin detection active during all power modes 8373 */ 8374 #define LLWU_PMC_WUPMC11(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC11_SHIFT)) & LLWU_PMC_WUPMC11_MASK) 8375 #define LLWU_PMC_WUPMC12_MASK (0x1000U) 8376 #define LLWU_PMC_WUPMC12_SHIFT (12U) 8377 /*! WUPMC12 - Wakeup pin mode for LLWU_Pn 8378 * 0b0..External input pin detection active only during LLS/VLLS mode 8379 * 0b1..External input pin detection active during all power modes 8380 */ 8381 #define LLWU_PMC_WUPMC12(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC12_SHIFT)) & LLWU_PMC_WUPMC12_MASK) 8382 #define LLWU_PMC_WUPMC13_MASK (0x2000U) 8383 #define LLWU_PMC_WUPMC13_SHIFT (13U) 8384 /*! WUPMC13 - Wakeup pin mode for LLWU_Pn 8385 * 0b0..External input pin detection active only during LLS/VLLS mode 8386 * 0b1..External input pin detection active during all power modes 8387 */ 8388 #define LLWU_PMC_WUPMC13(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC13_SHIFT)) & LLWU_PMC_WUPMC13_MASK) 8389 #define LLWU_PMC_WUPMC14_MASK (0x4000U) 8390 #define LLWU_PMC_WUPMC14_SHIFT (14U) 8391 /*! WUPMC14 - Wakeup pin mode for LLWU_Pn 8392 * 0b0..External input pin detection active only during LLS/VLLS mode 8393 * 0b1..External input pin detection active during all power modes 8394 */ 8395 #define LLWU_PMC_WUPMC14(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC14_SHIFT)) & LLWU_PMC_WUPMC14_MASK) 8396 #define LLWU_PMC_WUPMC15_MASK (0x8000U) 8397 #define LLWU_PMC_WUPMC15_SHIFT (15U) 8398 /*! WUPMC15 - Wakeup pin mode for LLWU_Pn 8399 * 0b0..External input pin detection active only during LLS/VLLS mode 8400 * 0b1..External input pin detection active during all power modes 8401 */ 8402 #define LLWU_PMC_WUPMC15(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC15_SHIFT)) & LLWU_PMC_WUPMC15_MASK) 8403 #define LLWU_PMC_WUPMC16_MASK (0x10000U) 8404 #define LLWU_PMC_WUPMC16_SHIFT (16U) 8405 /*! WUPMC16 - Wakeup pin mode for LLWU_Pn 8406 * 0b0..External input pin detection active only during LLS/VLLS mode 8407 * 0b1..External input pin detection active during all power modes 8408 */ 8409 #define LLWU_PMC_WUPMC16(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC16_SHIFT)) & LLWU_PMC_WUPMC16_MASK) 8410 #define LLWU_PMC_WUPMC17_MASK (0x20000U) 8411 #define LLWU_PMC_WUPMC17_SHIFT (17U) 8412 /*! WUPMC17 - Wakeup pin mode for LLWU_Pn 8413 * 0b0..External input pin detection active only during LLS/VLLS mode 8414 * 0b1..External input pin detection active during all power modes 8415 */ 8416 #define LLWU_PMC_WUPMC17(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC17_SHIFT)) & LLWU_PMC_WUPMC17_MASK) 8417 #define LLWU_PMC_WUPMC18_MASK (0x40000U) 8418 #define LLWU_PMC_WUPMC18_SHIFT (18U) 8419 /*! WUPMC18 - Wakeup pin mode for LLWU_Pn 8420 * 0b0..External input pin detection active only during LLS/VLLS mode 8421 * 0b1..External input pin detection active during all power modes 8422 */ 8423 #define LLWU_PMC_WUPMC18(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC18_SHIFT)) & LLWU_PMC_WUPMC18_MASK) 8424 #define LLWU_PMC_WUPMC19_MASK (0x80000U) 8425 #define LLWU_PMC_WUPMC19_SHIFT (19U) 8426 /*! WUPMC19 - Wakeup pin mode for LLWU_Pn 8427 * 0b0..External input pin detection active only during LLS/VLLS mode 8428 * 0b1..External input pin detection active during all power modes 8429 */ 8430 #define LLWU_PMC_WUPMC19(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC19_SHIFT)) & LLWU_PMC_WUPMC19_MASK) 8431 #define LLWU_PMC_WUPMC20_MASK (0x100000U) 8432 #define LLWU_PMC_WUPMC20_SHIFT (20U) 8433 /*! WUPMC20 - Wakeup pin mode for LLWU_Pn 8434 * 0b0..External input pin detection active only during LLS/VLLS mode 8435 * 0b1..External input pin detection active during all power modes 8436 */ 8437 #define LLWU_PMC_WUPMC20(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC20_SHIFT)) & LLWU_PMC_WUPMC20_MASK) 8438 #define LLWU_PMC_WUPMC21_MASK (0x200000U) 8439 #define LLWU_PMC_WUPMC21_SHIFT (21U) 8440 /*! WUPMC21 - Wakeup pin mode for LLWU_Pn 8441 * 0b0..External input pin detection active only during LLS/VLLS mode 8442 * 0b1..External input pin detection active during all power modes 8443 */ 8444 #define LLWU_PMC_WUPMC21(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC21_SHIFT)) & LLWU_PMC_WUPMC21_MASK) 8445 #define LLWU_PMC_WUPMC22_MASK (0x400000U) 8446 #define LLWU_PMC_WUPMC22_SHIFT (22U) 8447 /*! WUPMC22 - Wakeup pin mode for LLWU_Pn 8448 * 0b0..External input pin detection active only during LLS/VLLS mode 8449 * 0b1..External input pin detection active during all power modes 8450 */ 8451 #define LLWU_PMC_WUPMC22(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC22_SHIFT)) & LLWU_PMC_WUPMC22_MASK) 8452 #define LLWU_PMC_WUPMC23_MASK (0x800000U) 8453 #define LLWU_PMC_WUPMC23_SHIFT (23U) 8454 /*! WUPMC23 - Wakeup pin mode for LLWU_Pn 8455 * 0b0..External input pin detection active only during LLS/VLLS mode 8456 * 0b1..External input pin detection active during all power modes 8457 */ 8458 #define LLWU_PMC_WUPMC23(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC23_SHIFT)) & LLWU_PMC_WUPMC23_MASK) 8459 #define LLWU_PMC_WUPMC24_MASK (0x1000000U) 8460 #define LLWU_PMC_WUPMC24_SHIFT (24U) 8461 /*! WUPMC24 - Wakeup pin mode for LLWU_Pn 8462 * 0b0..External input pin detection active only during LLS/VLLS mode 8463 * 0b1..External input pin detection active during all power modes 8464 */ 8465 #define LLWU_PMC_WUPMC24(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC24_SHIFT)) & LLWU_PMC_WUPMC24_MASK) 8466 #define LLWU_PMC_WUPMC25_MASK (0x2000000U) 8467 #define LLWU_PMC_WUPMC25_SHIFT (25U) 8468 /*! WUPMC25 - Wakeup pin mode for LLWU_Pn 8469 * 0b0..External input pin detection active only during LLS/VLLS mode 8470 * 0b1..External input pin detection active during all power modes 8471 */ 8472 #define LLWU_PMC_WUPMC25(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC25_SHIFT)) & LLWU_PMC_WUPMC25_MASK) 8473 #define LLWU_PMC_WUPMC26_MASK (0x4000000U) 8474 #define LLWU_PMC_WUPMC26_SHIFT (26U) 8475 /*! WUPMC26 - Wakeup pin mode for LLWU_Pn 8476 * 0b0..External input pin detection active only during LLS/VLLS mode 8477 * 0b1..External input pin detection active during all power modes 8478 */ 8479 #define LLWU_PMC_WUPMC26(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC26_SHIFT)) & LLWU_PMC_WUPMC26_MASK) 8480 #define LLWU_PMC_Reserved27_MASK (0x8000000U) 8481 #define LLWU_PMC_Reserved27_SHIFT (27U) 8482 /*! Reserved27 - Wakeup pin mode for LLWU_Pn 8483 * 0b0..External input pin detection active only during LLS/VLLS mode 8484 * 0b1..External input pin detection active during all power modes 8485 */ 8486 #define LLWU_PMC_Reserved27(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_Reserved27_SHIFT)) & LLWU_PMC_Reserved27_MASK) 8487 #define LLWU_PMC_Reserved28_MASK (0x10000000U) 8488 #define LLWU_PMC_Reserved28_SHIFT (28U) 8489 /*! Reserved28 - Wakeup pin mode for LLWU_Pn 8490 * 0b0..External input pin detection active only during LLS/VLLS mode 8491 * 0b1..External input pin detection active during all power modes 8492 */ 8493 #define LLWU_PMC_Reserved28(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_Reserved28_SHIFT)) & LLWU_PMC_Reserved28_MASK) 8494 #define LLWU_PMC_WUPMC29_MASK (0x20000000U) 8495 #define LLWU_PMC_WUPMC29_SHIFT (29U) 8496 /*! WUPMC29 - Wakeup pin mode for LLWU_Pn 8497 * 0b0..External input pin detection active only during LLS/VLLS mode 8498 * 0b1..External input pin detection active during all power modes 8499 */ 8500 #define LLWU_PMC_WUPMC29(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC29_SHIFT)) & LLWU_PMC_WUPMC29_MASK) 8501 #define LLWU_PMC_WUPMC30_MASK (0x40000000U) 8502 #define LLWU_PMC_WUPMC30_SHIFT (30U) 8503 /*! WUPMC30 - Wakeup pin mode for LLWU_Pn 8504 * 0b0..External input pin detection active only during LLS/VLLS mode 8505 * 0b1..External input pin detection active during all power modes 8506 */ 8507 #define LLWU_PMC_WUPMC30(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC30_SHIFT)) & LLWU_PMC_WUPMC30_MASK) 8508 #define LLWU_PMC_WUPMC31_MASK (0x80000000U) 8509 #define LLWU_PMC_WUPMC31_SHIFT (31U) 8510 /*! WUPMC31 - Wakeup pin mode for LLWU_Pn 8511 * 0b0..External input pin detection active only during LLS/VLLS mode 8512 * 0b1..External input pin detection active during all power modes 8513 */ 8514 #define LLWU_PMC_WUPMC31(x) (((uint32_t)(((uint32_t)(x)) << LLWU_PMC_WUPMC31_SHIFT)) & LLWU_PMC_WUPMC31_MASK) 8515 /*! @} */ 8516 8517 /*! @name FMC - Pin Filter Mode Configuration register */ 8518 /*! @{ */ 8519 #define LLWU_FMC_FILTM1_MASK (0x1U) 8520 #define LLWU_FMC_FILTM1_SHIFT (0U) 8521 /*! FILTM1 - Filter Mode for FILT1 8522 * 0b0..External input pin filter detection active only during LLS/VLLS mode 8523 * 0b1..External input pin filter detection active during all power modes 8524 */ 8525 #define LLWU_FMC_FILTM1(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FMC_FILTM1_SHIFT)) & LLWU_FMC_FILTM1_MASK) 8526 #define LLWU_FMC_FILTM2_MASK (0x2U) 8527 #define LLWU_FMC_FILTM2_SHIFT (1U) 8528 /*! FILTM2 - Filter Mode for FILT2 8529 * 0b0..External input pin filter detection active only during LLS/VLLS mode 8530 * 0b1..External input pin filter detection active during all power modes 8531 */ 8532 #define LLWU_FMC_FILTM2(x) (((uint32_t)(((uint32_t)(x)) << LLWU_FMC_FILTM2_SHIFT)) & LLWU_FMC_FILTM2_MASK) 8533 /*! @} */ 8534 8535 8536 /*! 8537 * @} 8538 */ /* end of group LLWU_Register_Masks */ 8539 8540 8541 /* LLWU - Peripheral instance base addresses */ 8542 /** Peripheral LLWU0 base address */ 8543 #define LLWU0_BASE (0x40024000u) 8544 /** Peripheral LLWU0 base pointer */ 8545 #define LLWU0 ((LLWU_Type *)LLWU0_BASE) 8546 /** Peripheral LLWU1 base address */ 8547 #define LLWU1_BASE (0x41023000u) 8548 /** Peripheral LLWU1 base pointer */ 8549 #define LLWU1 ((LLWU_Type *)LLWU1_BASE) 8550 /** Array initializer of LLWU peripheral base addresses */ 8551 #define LLWU_BASE_ADDRS { LLWU0_BASE, LLWU1_BASE } 8552 /** Array initializer of LLWU peripheral base pointers */ 8553 #define LLWU_BASE_PTRS { LLWU0, LLWU1 } 8554 /** Interrupt vectors for the LLWU peripheral type */ 8555 #define LLWU_IRQS { NotAvail_IRQn, LLWU1_IRQn } 8556 8557 /*! 8558 * @} 8559 */ /* end of group LLWU_Peripheral_Access_Layer */ 8560 8561 8562 /* ---------------------------------------------------------------------------- 8563 -- LPCMP Peripheral Access Layer 8564 ---------------------------------------------------------------------------- */ 8565 8566 /*! 8567 * @addtogroup LPCMP_Peripheral_Access_Layer LPCMP Peripheral Access Layer 8568 * @{ 8569 */ 8570 8571 /** LPCMP - Register Layout Typedef */ 8572 typedef struct { 8573 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 8574 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 8575 __IO uint32_t CCR0; /**< Comparator Control Register 0, offset: 0x8 */ 8576 __IO uint32_t CCR1; /**< Comparator Control Register 1, offset: 0xC */ 8577 __IO uint32_t CCR2; /**< Comparator Control Register 2, offset: 0x10 */ 8578 uint8_t RESERVED_0[4]; 8579 __IO uint32_t DCR; /**< DAC Control Register, offset: 0x18 */ 8580 __IO uint32_t IER; /**< Interrupt Enable Register, offset: 0x1C */ 8581 __IO uint32_t CSR; /**< Comparator Status Register, offset: 0x20 */ 8582 } LPCMP_Type; 8583 8584 /* ---------------------------------------------------------------------------- 8585 -- LPCMP Register Masks 8586 ---------------------------------------------------------------------------- */ 8587 8588 /*! 8589 * @addtogroup LPCMP_Register_Masks LPCMP Register Masks 8590 * @{ 8591 */ 8592 8593 /*! @name VERID - Version ID Register */ 8594 /*! @{ */ 8595 #define LPCMP_VERID_FEATURE_MASK (0xFFFFU) 8596 #define LPCMP_VERID_FEATURE_SHIFT (0U) 8597 /*! FEATURE - Feature Specification Number 8598 * 0b0000000000000001..Round robin feature 8599 */ 8600 #define LPCMP_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_FEATURE_SHIFT)) & LPCMP_VERID_FEATURE_MASK) 8601 #define LPCMP_VERID_MINOR_MASK (0xFF0000U) 8602 #define LPCMP_VERID_MINOR_SHIFT (16U) 8603 #define LPCMP_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_MINOR_SHIFT)) & LPCMP_VERID_MINOR_MASK) 8604 #define LPCMP_VERID_MAJOR_MASK (0xFF000000U) 8605 #define LPCMP_VERID_MAJOR_SHIFT (24U) 8606 #define LPCMP_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_VERID_MAJOR_SHIFT)) & LPCMP_VERID_MAJOR_MASK) 8607 /*! @} */ 8608 8609 /*! @name PARAM - Parameter Register */ 8610 /*! @{ */ 8611 #define LPCMP_PARAM_DAC_RES_MASK (0xFU) 8612 #define LPCMP_PARAM_DAC_RES_SHIFT (0U) 8613 /*! DAC_RES - DAC resolution 8614 * 0b0000..4 bit DAC 8615 * 0b0001..6 bit DAC 8616 * 0b0010..8 bit DAC 8617 * 0b0011..10 bit DAC 8618 * 0b0100..12 bit DAC 8619 * 0b0101..14 bit DAC 8620 * 0b0110..16 bit DAC 8621 */ 8622 #define LPCMP_PARAM_DAC_RES(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_PARAM_DAC_RES_SHIFT)) & LPCMP_PARAM_DAC_RES_MASK) 8623 /*! @} */ 8624 8625 /*! @name CCR0 - Comparator Control Register 0 */ 8626 /*! @{ */ 8627 #define LPCMP_CCR0_CMP_EN_MASK (0x1U) 8628 #define LPCMP_CCR0_CMP_EN_SHIFT (0U) 8629 /*! CMP_EN - Comparator Module Enable 8630 * 0b0..Analog Comparator is disabled. 8631 * 0b1..Analog Comparator is enabled. 8632 */ 8633 #define LPCMP_CCR0_CMP_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR0_CMP_EN_SHIFT)) & LPCMP_CCR0_CMP_EN_MASK) 8634 #define LPCMP_CCR0_CMP_STOP_EN_MASK (0x2U) 8635 #define LPCMP_CCR0_CMP_STOP_EN_SHIFT (1U) 8636 /*! CMP_STOP_EN - Comparator Module STOP Mode Enable 8637 * 0b0..Comparator is disabled in STOP modes regardless of CMP_EN. 8638 * 0b1..Comparator is enabled in STOP mode if CMP_EN is active 8639 */ 8640 #define LPCMP_CCR0_CMP_STOP_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR0_CMP_STOP_EN_SHIFT)) & LPCMP_CCR0_CMP_STOP_EN_MASK) 8641 /*! @} */ 8642 8643 /*! @name CCR1 - Comparator Control Register 1 */ 8644 /*! @{ */ 8645 #define LPCMP_CCR1_WINDOW_EN_MASK (0x1U) 8646 #define LPCMP_CCR1_WINDOW_EN_SHIFT (0U) 8647 /*! WINDOW_EN - Windowing Enable 8648 * 0b0..Windowing mode is not selected. 8649 * 0b1..Windowing mode is selected. 8650 */ 8651 #define LPCMP_CCR1_WINDOW_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_WINDOW_EN_SHIFT)) & LPCMP_CCR1_WINDOW_EN_MASK) 8652 #define LPCMP_CCR1_SAMPLE_EN_MASK (0x2U) 8653 #define LPCMP_CCR1_SAMPLE_EN_SHIFT (1U) 8654 /*! SAMPLE_EN - Sample Enable 8655 * 0b0..Sampling mode is not selected. 8656 * 0b1..Sampling mode is selected. 8657 */ 8658 #define LPCMP_CCR1_SAMPLE_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_SAMPLE_EN_SHIFT)) & LPCMP_CCR1_SAMPLE_EN_MASK) 8659 #define LPCMP_CCR1_DMA_EN_MASK (0x4U) 8660 #define LPCMP_CCR1_DMA_EN_SHIFT (2U) 8661 /*! DMA_EN - DMA Enable 8662 * 0b0..DMA is disabled. 8663 * 0b1..DMA is enabled. 8664 */ 8665 #define LPCMP_CCR1_DMA_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_DMA_EN_SHIFT)) & LPCMP_CCR1_DMA_EN_MASK) 8666 #define LPCMP_CCR1_COUT_INV_MASK (0x8U) 8667 #define LPCMP_CCR1_COUT_INV_SHIFT (3U) 8668 /*! COUT_INV - Comparator invert 8669 * 0b0..Does not invert the comparator output. 8670 * 0b1..Inverts the comparator output. 8671 */ 8672 #define LPCMP_CCR1_COUT_INV(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_INV_SHIFT)) & LPCMP_CCR1_COUT_INV_MASK) 8673 #define LPCMP_CCR1_COUT_SEL_MASK (0x10U) 8674 #define LPCMP_CCR1_COUT_SEL_SHIFT (4U) 8675 /*! COUT_SEL - Comparator Output Select 8676 * 0b0..Set CMPO to equal COUT (filtered comparator output). 8677 * 0b1..Set CMPO to equal COUTA (unfiltered comparator output). 8678 */ 8679 #define LPCMP_CCR1_COUT_SEL(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_SEL_SHIFT)) & LPCMP_CCR1_COUT_SEL_MASK) 8680 #define LPCMP_CCR1_COUT_PEN_MASK (0x20U) 8681 #define LPCMP_CCR1_COUT_PEN_SHIFT (5U) 8682 /*! COUT_PEN - Comparator Output Pin Enable 8683 * 0b0..When COUT_PEN is 0, the comparator output (after window/filter settings dependent on software 8684 * configuration) is not available to a packaged pin. 8685 * 0b1..When COUT_PEN is 1, and if the software has configured the comparator to own a packaged pin, the 8686 * comparator output is available in a packaged pin. 8687 */ 8688 #define LPCMP_CCR1_COUT_PEN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_COUT_PEN_SHIFT)) & LPCMP_CCR1_COUT_PEN_MASK) 8689 #define LPCMP_CCR1_FILT_CNT_MASK (0x70000U) 8690 #define LPCMP_CCR1_FILT_CNT_SHIFT (16U) 8691 /*! FILT_CNT - Filter Sample Count 8692 * 0b000..Filter is disabled. If SAMPLE_EN = 1, then COUT is a logic zero (this is not a legal state in , and is 8693 * not recommended). If SAMPLE_EN = 0, COUT = COUTA. 8694 * 0b001..1 consecutive sample must agree (comparator output is simply sampled). 8695 * 0b010..2 consecutive samples must agree. 8696 * 0b011..3 consecutive samples must agree. 8697 * 0b100..4 consecutive samples must agree. 8698 * 0b101..5 consecutive samples must agree. 8699 * 0b110..6 consecutive samples must agree. 8700 * 0b111..7 consecutive samples must agree. 8701 */ 8702 #define LPCMP_CCR1_FILT_CNT(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_FILT_CNT_SHIFT)) & LPCMP_CCR1_FILT_CNT_MASK) 8703 #define LPCMP_CCR1_FILT_PER_MASK (0xFF000000U) 8704 #define LPCMP_CCR1_FILT_PER_SHIFT (24U) 8705 #define LPCMP_CCR1_FILT_PER(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR1_FILT_PER_SHIFT)) & LPCMP_CCR1_FILT_PER_MASK) 8706 /*! @} */ 8707 8708 /*! @name CCR2 - Comparator Control Register 2 */ 8709 /*! @{ */ 8710 #define LPCMP_CCR2_CMP_HPMD_MASK (0x1U) 8711 #define LPCMP_CCR2_CMP_HPMD_SHIFT (0U) 8712 /*! CMP_HPMD - CMP High Power Mode Select 8713 * 0b0..Low speed comparison mode is selected.(when CMP_NPMD is 0) 8714 * 0b1..High speed comparison mode is selected.(when CMP_NPMD is 0) 8715 */ 8716 #define LPCMP_CCR2_CMP_HPMD(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_CMP_HPMD_SHIFT)) & LPCMP_CCR2_CMP_HPMD_MASK) 8717 #define LPCMP_CCR2_CMP_NPMD_MASK (0x2U) 8718 #define LPCMP_CCR2_CMP_NPMD_SHIFT (1U) 8719 /*! CMP_NPMD - CMP Nano Power Mode Select 8720 * 0b0..Nano Power Comparator is not enabled (mode is determined by CMP_HPMD) 8721 * 0b1..Nano Power Comparator is enabled 8722 */ 8723 #define LPCMP_CCR2_CMP_NPMD(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_CMP_NPMD_SHIFT)) & LPCMP_CCR2_CMP_NPMD_MASK) 8724 #define LPCMP_CCR2_HYSTCTR_MASK (0x30U) 8725 #define LPCMP_CCR2_HYSTCTR_SHIFT (4U) 8726 /*! HYSTCTR - Comparator hard block hysteresis control. See chip data sheet to get the actual hystersis value with each level 8727 * 0b00..The hard block output has level 0 hysteresis internally. 8728 * 0b01..The hard block output has level 1 hysteresis internally. 8729 * 0b10..The hard block output has level 2 hysteresis internally. 8730 * 0b11..The hard block output has level 3 hysteresis internally. 8731 */ 8732 #define LPCMP_CCR2_HYSTCTR(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_HYSTCTR_SHIFT)) & LPCMP_CCR2_HYSTCTR_MASK) 8733 #define LPCMP_CCR2_PSEL_MASK (0x70000U) 8734 #define LPCMP_CCR2_PSEL_SHIFT (16U) 8735 /*! PSEL - Plus Input MUX Control 8736 * 0b000..Input 0 8737 * 0b001..Input 1 8738 * 0b010..Input 2 8739 * 0b011..Input 3 8740 * 0b100..Input 4 8741 * 0b101..Input 5 8742 * 0b110..Input 6 8743 * 0b111..Internal DAC output 8744 */ 8745 #define LPCMP_CCR2_PSEL(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_PSEL_SHIFT)) & LPCMP_CCR2_PSEL_MASK) 8746 #define LPCMP_CCR2_MSEL_MASK (0x700000U) 8747 #define LPCMP_CCR2_MSEL_SHIFT (20U) 8748 /*! MSEL - Minus Input MUX Control 8749 * 0b000..Input 0 8750 * 0b001..Input 1 8751 * 0b010..Input 2 8752 * 0b011..Input 3 8753 * 0b100..Input 4 8754 * 0b101..Input 5 8755 * 0b110..Input 6 8756 * 0b111..Internal DAC output 8757 */ 8758 #define LPCMP_CCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CCR2_MSEL_SHIFT)) & LPCMP_CCR2_MSEL_MASK) 8759 /*! @} */ 8760 8761 /*! @name DCR - DAC Control Register */ 8762 /*! @{ */ 8763 #define LPCMP_DCR_DAC_EN_MASK (0x1U) 8764 #define LPCMP_DCR_DAC_EN_SHIFT (0U) 8765 /*! DAC_EN - DAC Enable 8766 * 0b0..DAC is disabled. 8767 * 0b1..DAC is enabled. 8768 */ 8769 #define LPCMP_DCR_DAC_EN(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_EN_SHIFT)) & LPCMP_DCR_DAC_EN_MASK) 8770 #define LPCMP_DCR_DAC_HPMD_MASK (0x2U) 8771 #define LPCMP_DCR_DAC_HPMD_SHIFT (1U) 8772 /*! DAC_HPMD - DAC High Power Mode Select 8773 * 0b0..DAC high power mode is not enabled. 8774 * 0b1..DAC high power mode is enabled. 8775 */ 8776 #define LPCMP_DCR_DAC_HPMD(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_HPMD_SHIFT)) & LPCMP_DCR_DAC_HPMD_MASK) 8777 #define LPCMP_DCR_VRSEL_MASK (0x100U) 8778 #define LPCMP_DCR_VRSEL_SHIFT (8U) 8779 /*! VRSEL - Supply Voltage Reference Source Select 8780 * 0b0..vrefh_int is selected as resistor ladder network supply reference Vin. 8781 * 0b1..vrefh_ext is selected as resistor ladder network supply reference Vin. 8782 */ 8783 #define LPCMP_DCR_VRSEL(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_VRSEL_SHIFT)) & LPCMP_DCR_VRSEL_MASK) 8784 #define LPCMP_DCR_DAC_DATA_MASK (0x3F0000U) 8785 #define LPCMP_DCR_DAC_DATA_SHIFT (16U) 8786 #define LPCMP_DCR_DAC_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_DCR_DAC_DATA_SHIFT)) & LPCMP_DCR_DAC_DATA_MASK) 8787 /*! @} */ 8788 8789 /*! @name IER - Interrupt Enable Register */ 8790 /*! @{ */ 8791 #define LPCMP_IER_CFR_IE_MASK (0x1U) 8792 #define LPCMP_IER_CFR_IE_SHIFT (0U) 8793 /*! CFR_IE - Comparator Flag Rising Interrupt Enable 8794 * 0b0..CFR interrupt is disabled. 8795 * 0b1..CFR interrupt is enabled. 8796 */ 8797 #define LPCMP_IER_CFR_IE(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_IER_CFR_IE_SHIFT)) & LPCMP_IER_CFR_IE_MASK) 8798 #define LPCMP_IER_CFF_IE_MASK (0x2U) 8799 #define LPCMP_IER_CFF_IE_SHIFT (1U) 8800 /*! CFF_IE - Comparator Flag Falling Interrupt Enable 8801 * 0b0..CFF interrupt is disabled. 8802 * 0b1..CFF interrupt is enabled. 8803 */ 8804 #define LPCMP_IER_CFF_IE(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_IER_CFF_IE_SHIFT)) & LPCMP_IER_CFF_IE_MASK) 8805 /*! @} */ 8806 8807 /*! @name CSR - Comparator Status Register */ 8808 /*! @{ */ 8809 #define LPCMP_CSR_CFR_MASK (0x1U) 8810 #define LPCMP_CSR_CFR_SHIFT (0U) 8811 /*! CFR - Analog Comparator Flag Rising 8812 * 0b0..A rising edge has not been detected on COUT. 8813 * 0b1..A rising edge on COUT has occurred. 8814 */ 8815 #define LPCMP_CSR_CFR(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_CFR_SHIFT)) & LPCMP_CSR_CFR_MASK) 8816 #define LPCMP_CSR_CFF_MASK (0x2U) 8817 #define LPCMP_CSR_CFF_SHIFT (1U) 8818 /*! CFF - Analog Comparator Flag Falling 8819 * 0b0..A falling edge has not been detected on COUT. 8820 * 0b1..A falling edge on COUT has occurred. 8821 */ 8822 #define LPCMP_CSR_CFF(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_CFF_SHIFT)) & LPCMP_CSR_CFF_MASK) 8823 #define LPCMP_CSR_COUT_MASK (0x100U) 8824 #define LPCMP_CSR_COUT_SHIFT (8U) 8825 #define LPCMP_CSR_COUT(x) (((uint32_t)(((uint32_t)(x)) << LPCMP_CSR_COUT_SHIFT)) & LPCMP_CSR_COUT_MASK) 8826 /*! @} */ 8827 8828 8829 /*! 8830 * @} 8831 */ /* end of group LPCMP_Register_Masks */ 8832 8833 8834 /* LPCMP - Peripheral instance base addresses */ 8835 /** Peripheral LPCMP0 base address */ 8836 #define LPCMP0_BASE (0x4004B000u) 8837 /** Peripheral LPCMP0 base pointer */ 8838 #define LPCMP0 ((LPCMP_Type *)LPCMP0_BASE) 8839 /** Peripheral LPCMP1 base address */ 8840 #define LPCMP1_BASE (0x41038000u) 8841 /** Peripheral LPCMP1 base pointer */ 8842 #define LPCMP1 ((LPCMP_Type *)LPCMP1_BASE) 8843 /** Array initializer of LPCMP peripheral base addresses */ 8844 #define LPCMP_BASE_ADDRS { LPCMP0_BASE, LPCMP1_BASE } 8845 /** Array initializer of LPCMP peripheral base pointers */ 8846 #define LPCMP_BASE_PTRS { LPCMP0, LPCMP1 } 8847 /** Interrupt vectors for the LPCMP peripheral type */ 8848 #define LPCMP_IRQS { LPCMP0_IRQn, LPCMP1_IRQn } 8849 8850 /*! 8851 * @} 8852 */ /* end of group LPCMP_Peripheral_Access_Layer */ 8853 8854 8855 /* ---------------------------------------------------------------------------- 8856 -- LPDAC Peripheral Access Layer 8857 ---------------------------------------------------------------------------- */ 8858 8859 /*! 8860 * @addtogroup LPDAC_Peripheral_Access_Layer LPDAC Peripheral Access Layer 8861 * @{ 8862 */ 8863 8864 /** LPDAC - Register Layout Typedef */ 8865 typedef struct { 8866 __I uint32_t VERID; /**< Version Identifier Register, offset: 0x0 */ 8867 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 8868 __O uint32_t DATA; /**< DAC Data Register, offset: 0x8 */ 8869 __IO uint32_t GCR; /**< DAC Global Control Register, offset: 0xC */ 8870 __IO uint32_t FCR; /**< DAC FIFO Control Register, offset: 0x10 */ 8871 __I uint32_t FPR; /**< DAC FIFO Pointer Register, offset: 0x14 */ 8872 __IO uint32_t FSR; /**< FIFO Status Register, offset: 0x18 */ 8873 __IO uint32_t IER; /**< DAC Interrupt Enable Register, offset: 0x1C */ 8874 __IO uint32_t DER; /**< DAC DMA Enable Register, offset: 0x20 */ 8875 __IO uint32_t RCR; /**< DAC Reset Control Register, offset: 0x24 */ 8876 __O uint32_t TCR; /**< DAC Trigger Control Register, offset: 0x28 */ 8877 } LPDAC_Type; 8878 8879 /* ---------------------------------------------------------------------------- 8880 -- LPDAC Register Masks 8881 ---------------------------------------------------------------------------- */ 8882 8883 /*! 8884 * @addtogroup LPDAC_Register_Masks LPDAC Register Masks 8885 * @{ 8886 */ 8887 8888 /*! @name VERID - Version Identifier Register */ 8889 /*! @{ */ 8890 #define LPDAC_VERID_FEATURE_MASK (0xFFFFU) 8891 #define LPDAC_VERID_FEATURE_SHIFT (0U) 8892 #define LPDAC_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_FEATURE_SHIFT)) & LPDAC_VERID_FEATURE_MASK) 8893 #define LPDAC_VERID_MINOR_MASK (0xFF0000U) 8894 #define LPDAC_VERID_MINOR_SHIFT (16U) 8895 #define LPDAC_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_MINOR_SHIFT)) & LPDAC_VERID_MINOR_MASK) 8896 #define LPDAC_VERID_MAJOR_MASK (0xFF000000U) 8897 #define LPDAC_VERID_MAJOR_SHIFT (24U) 8898 #define LPDAC_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_VERID_MAJOR_SHIFT)) & LPDAC_VERID_MAJOR_MASK) 8899 /*! @} */ 8900 8901 /*! @name PARAM - Parameter Register */ 8902 /*! @{ */ 8903 #define LPDAC_PARAM_FIFOSZ_MASK (0x7U) 8904 #define LPDAC_PARAM_FIFOSZ_SHIFT (0U) 8905 /*! FIFOSZ - FIFO size 8906 * 0b000..Reserved 8907 * 0b001..FIFO depth is 4 8908 * 0b010..FIFO depth is 8 8909 * 0b011..FIFO depth is 16 8910 * 0b100..FIFO depth is 32 8911 * 0b101..FIFO depth is 64 8912 * 0b110..FIFO depth is 128 8913 * 0b111..FIFO depth is 256 8914 */ 8915 #define LPDAC_PARAM_FIFOSZ(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_PARAM_FIFOSZ_SHIFT)) & LPDAC_PARAM_FIFOSZ_MASK) 8916 /*! @} */ 8917 8918 /*! @name DATA - DAC Data Register */ 8919 /*! @{ */ 8920 #define LPDAC_DATA_DATA_MASK (0xFFFU) 8921 #define LPDAC_DATA_DATA_SHIFT (0U) 8922 #define LPDAC_DATA_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_DATA_DATA_SHIFT)) & LPDAC_DATA_DATA_MASK) 8923 /*! @} */ 8924 8925 /*! @name GCR - DAC Global Control Register */ 8926 /*! @{ */ 8927 #define LPDAC_GCR_DACEN_MASK (0x1U) 8928 #define LPDAC_GCR_DACEN_SHIFT (0U) 8929 /*! DACEN - DAC Enable 8930 * 0b0..The DAC system is disabled. 8931 * 0b1..The DAC system is enabled. 8932 */ 8933 #define LPDAC_GCR_DACEN(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_DACEN_SHIFT)) & LPDAC_GCR_DACEN_MASK) 8934 #define LPDAC_GCR_DACRFS_MASK (0x2U) 8935 #define LPDAC_GCR_DACRFS_SHIFT (1U) 8936 /*! DACRFS - DAC Reference Select 8937 * 0b0..The DAC selects VREFH_INT as the reference voltage. 8938 * 0b1..The DAC selects VREFH_EXT as the reference voltage. 8939 */ 8940 #define LPDAC_GCR_DACRFS(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_DACRFS_SHIFT)) & LPDAC_GCR_DACRFS_MASK) 8941 #define LPDAC_GCR_LPEN_MASK (0x4U) 8942 #define LPDAC_GCR_LPEN_SHIFT (2U) 8943 /*! LPEN - Low Power Enable 8944 * 0b0..High-Power mode 8945 * 0b1..Low-Power mode 8946 */ 8947 #define LPDAC_GCR_LPEN(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_LPEN_SHIFT)) & LPDAC_GCR_LPEN_MASK) 8948 #define LPDAC_GCR_FIFOEN_MASK (0x8U) 8949 #define LPDAC_GCR_FIFOEN_SHIFT (3U) 8950 /*! FIFOEN - FIFO Enable 8951 * 0b0..FIFO mode is disabled and buffer mode is enabled. Any data written to DATA[DATA] goes to buffer then goes to conversion. 8952 * 0b1..FIFO mode is enabled. Data will be first read from FIFO to buffer then goes to conversion 8953 */ 8954 #define LPDAC_GCR_FIFOEN(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_FIFOEN_SHIFT)) & LPDAC_GCR_FIFOEN_MASK) 8955 #define LPDAC_GCR_SWMD_MASK (0x10U) 8956 #define LPDAC_GCR_SWMD_SHIFT (4U) 8957 /*! SWMD - Swing Back Mode 8958 * 0b0..Swing back mode disable 8959 * 0b1..Swing back mode enable 8960 */ 8961 #define LPDAC_GCR_SWMD(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_SWMD_SHIFT)) & LPDAC_GCR_SWMD_MASK) 8962 #define LPDAC_GCR_TRGSEL_MASK (0x20U) 8963 #define LPDAC_GCR_TRGSEL_SHIFT (5U) 8964 /*! TRGSEL - DAC Trigger Select 8965 * 0b0..The DAC hardware trigger is selected. 8966 * 0b1..The DAC software trigger is selected. 8967 */ 8968 #define LPDAC_GCR_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_GCR_TRGSEL_SHIFT)) & LPDAC_GCR_TRGSEL_MASK) 8969 /*! @} */ 8970 8971 /*! @name FCR - DAC FIFO Control Register */ 8972 /*! @{ */ 8973 #define LPDAC_FCR_WML_MASK (0xFU) 8974 #define LPDAC_FCR_WML_SHIFT (0U) 8975 #define LPDAC_FCR_WML(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FCR_WML_SHIFT)) & LPDAC_FCR_WML_MASK) 8976 /*! @} */ 8977 8978 /*! @name FPR - DAC FIFO Pointer Register */ 8979 /*! @{ */ 8980 #define LPDAC_FPR_FIFO_RPT_MASK (0xFU) 8981 #define LPDAC_FPR_FIFO_RPT_SHIFT (0U) 8982 #define LPDAC_FPR_FIFO_RPT(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FPR_FIFO_RPT_SHIFT)) & LPDAC_FPR_FIFO_RPT_MASK) 8983 #define LPDAC_FPR_FIFO_WPT_MASK (0xF0000U) 8984 #define LPDAC_FPR_FIFO_WPT_SHIFT (16U) 8985 #define LPDAC_FPR_FIFO_WPT(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FPR_FIFO_WPT_SHIFT)) & LPDAC_FPR_FIFO_WPT_MASK) 8986 /*! @} */ 8987 8988 /*! @name FSR - FIFO Status Register */ 8989 /*! @{ */ 8990 #define LPDAC_FSR_FULL_MASK (0x1U) 8991 #define LPDAC_FSR_FULL_SHIFT (0U) 8992 /*! FULL - FIFO Full Flag 8993 * 0b0..FIFO is not full 8994 * 0b1..FIFO is full 8995 */ 8996 #define LPDAC_FSR_FULL(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_FULL_SHIFT)) & LPDAC_FSR_FULL_MASK) 8997 #define LPDAC_FSR_EMPTY_MASK (0x2U) 8998 #define LPDAC_FSR_EMPTY_SHIFT (1U) 8999 /*! EMPTY - FIFO Empty Flag 9000 * 0b0..FIFO is not empty 9001 * 0b1..FIFO is empty 9002 */ 9003 #define LPDAC_FSR_EMPTY(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_EMPTY_SHIFT)) & LPDAC_FSR_EMPTY_MASK) 9004 #define LPDAC_FSR_WM_MASK (0x4U) 9005 #define LPDAC_FSR_WM_SHIFT (2U) 9006 /*! WM - FIFO Watermark Status Flag 9007 * 0b0..Data in FIFO is more than watermark level 9008 * 0b1..Data in FIFO is less than or equal to watermark level 9009 */ 9010 #define LPDAC_FSR_WM(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_WM_SHIFT)) & LPDAC_FSR_WM_MASK) 9011 #define LPDAC_FSR_SWBK_MASK (0x8U) 9012 #define LPDAC_FSR_SWBK_SHIFT (3U) 9013 /*! SWBK - Swing Back One Cycle Complete Flag 9014 * 0b0..No swing back cycle has completed since the last time the flag was cleared. 9015 * 0b1..At least one swing back cycle has occurred since the last time the flag was cleared. 9016 */ 9017 #define LPDAC_FSR_SWBK(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_SWBK_SHIFT)) & LPDAC_FSR_SWBK_MASK) 9018 #define LPDAC_FSR_OF_MASK (0x40U) 9019 #define LPDAC_FSR_OF_SHIFT (6U) 9020 /*! OF - FIFO Overflow Flag 9021 * 0b0..No overflow has occurred since the last time the flag was cleared. 9022 * 0b1..At least one FIFO overflow has occurred since the last time the flag was cleared. 9023 */ 9024 #define LPDAC_FSR_OF(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_OF_SHIFT)) & LPDAC_FSR_OF_MASK) 9025 #define LPDAC_FSR_UF_MASK (0x80U) 9026 #define LPDAC_FSR_UF_SHIFT (7U) 9027 /*! UF - FIFO Underflow Flag 9028 * 0b0..No underflow has occurred since the last time the flag was cleared. 9029 * 0b1..At least one trigger underflow has occurred since the last time the flag was cleared. 9030 */ 9031 #define LPDAC_FSR_UF(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_FSR_UF_SHIFT)) & LPDAC_FSR_UF_MASK) 9032 /*! @} */ 9033 9034 /*! @name IER - DAC Interrupt Enable Register */ 9035 /*! @{ */ 9036 #define LPDAC_IER_FULL_IE_MASK (0x1U) 9037 #define LPDAC_IER_FULL_IE_SHIFT (0U) 9038 /*! FULL_IE - FIFO Full Interrupt Enable 9039 * 0b0..FIFO Full interrupt is disabled. 9040 * 0b1..FIFO Full interrupt is enabled. 9041 */ 9042 #define LPDAC_IER_FULL_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_FULL_IE_SHIFT)) & LPDAC_IER_FULL_IE_MASK) 9043 #define LPDAC_IER_EMPTY_IE_MASK (0x2U) 9044 #define LPDAC_IER_EMPTY_IE_SHIFT (1U) 9045 /*! EMPTY_IE - FIFO Empty Interrupt Enable 9046 * 0b0..FIFO Empty interrupt is disabled. 9047 * 0b1..FIFO Empty interrupt is enabled. 9048 */ 9049 #define LPDAC_IER_EMPTY_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_EMPTY_IE_SHIFT)) & LPDAC_IER_EMPTY_IE_MASK) 9050 #define LPDAC_IER_WM_IE_MASK (0x4U) 9051 #define LPDAC_IER_WM_IE_SHIFT (2U) 9052 /*! WM_IE - FIFO Watermark Interrupt Enable 9053 * 0b0..Watermark interrupt is disabled. 9054 * 0b1..Watermark interrupt is enabled. 9055 */ 9056 #define LPDAC_IER_WM_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_WM_IE_SHIFT)) & LPDAC_IER_WM_IE_MASK) 9057 #define LPDAC_IER_SWBK_IE_MASK (0x8U) 9058 #define LPDAC_IER_SWBK_IE_SHIFT (3U) 9059 /*! SWBK_IE - Swing back One Cycle Complete Interrupt Enable 9060 * 0b0..Swing back one time complete interrupt is disabled. 9061 * 0b1..Swing back one time complete interrupt is enabled. 9062 */ 9063 #define LPDAC_IER_SWBK_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_SWBK_IE_SHIFT)) & LPDAC_IER_SWBK_IE_MASK) 9064 #define LPDAC_IER_OF_IE_MASK (0x40U) 9065 #define LPDAC_IER_OF_IE_SHIFT (6U) 9066 /*! OF_IE - FIFO Overflow Interrupt Enable 9067 * 0b0..Overflow interrupt is disabled 9068 * 0b1..Overflow interrupt is enabled. 9069 */ 9070 #define LPDAC_IER_OF_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_OF_IE_SHIFT)) & LPDAC_IER_OF_IE_MASK) 9071 #define LPDAC_IER_UF_IE_MASK (0x80U) 9072 #define LPDAC_IER_UF_IE_SHIFT (7U) 9073 /*! UF_IE - FIFO Underflow Interrupt Enable 9074 * 0b0..Underflow interrupt is disabled. 9075 * 0b1..Underflow interrupt is enabled. 9076 */ 9077 #define LPDAC_IER_UF_IE(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_IER_UF_IE_SHIFT)) & LPDAC_IER_UF_IE_MASK) 9078 /*! @} */ 9079 9080 /*! @name DER - DAC DMA Enable Register */ 9081 /*! @{ */ 9082 #define LPDAC_DER_EMPTY_DMAEN_MASK (0x2U) 9083 #define LPDAC_DER_EMPTY_DMAEN_SHIFT (1U) 9084 /*! EMPTY_DMAEN - FIFO Empty DMA Enable 9085 * 0b0..FIFO Empty DMA request is disabled. 9086 * 0b1..FIFO Empty DMA request is enabled. 9087 */ 9088 #define LPDAC_DER_EMPTY_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_DER_EMPTY_DMAEN_SHIFT)) & LPDAC_DER_EMPTY_DMAEN_MASK) 9089 #define LPDAC_DER_WM_DMAEN_MASK (0x4U) 9090 #define LPDAC_DER_WM_DMAEN_SHIFT (2U) 9091 /*! WM_DMAEN - FIFO Watermark DMA Enable 9092 * 0b0..Watermark DMA request is disabled. 9093 * 0b1..Watermark DMA request is enabled. 9094 */ 9095 #define LPDAC_DER_WM_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_DER_WM_DMAEN_SHIFT)) & LPDAC_DER_WM_DMAEN_MASK) 9096 /*! @} */ 9097 9098 /*! @name RCR - DAC Reset Control Register */ 9099 /*! @{ */ 9100 #define LPDAC_RCR_SWRST_MASK (0x1U) 9101 #define LPDAC_RCR_SWRST_SHIFT (0U) 9102 /*! SWRST - Software Reset 9103 * 0b0..No effect 9104 * 0b1..Software reset 9105 */ 9106 #define LPDAC_RCR_SWRST(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_RCR_SWRST_SHIFT)) & LPDAC_RCR_SWRST_MASK) 9107 #define LPDAC_RCR_FIFORST_MASK (0x2U) 9108 #define LPDAC_RCR_FIFORST_SHIFT (1U) 9109 /*! FIFORST - FIFO Reset 9110 * 0b0..No effect 9111 * 0b1..FIFO reset 9112 */ 9113 #define LPDAC_RCR_FIFORST(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_RCR_FIFORST_SHIFT)) & LPDAC_RCR_FIFORST_MASK) 9114 /*! @} */ 9115 9116 /*! @name TCR - DAC Trigger Control Register */ 9117 /*! @{ */ 9118 #define LPDAC_TCR_SWTRG_MASK (0x1U) 9119 #define LPDAC_TCR_SWTRG_SHIFT (0U) 9120 /*! SWTRG - Software Trigger 9121 * 0b0..The DAC soft trigger is not valid. 9122 * 0b1..The DAC soft trigger is valid. 9123 */ 9124 #define LPDAC_TCR_SWTRG(x) (((uint32_t)(((uint32_t)(x)) << LPDAC_TCR_SWTRG_SHIFT)) & LPDAC_TCR_SWTRG_MASK) 9125 /*! @} */ 9126 9127 9128 /*! 9129 * @} 9130 */ /* end of group LPDAC_Register_Masks */ 9131 9132 9133 /* LPDAC - Peripheral instance base addresses */ 9134 /** Peripheral LPDAC0 base address */ 9135 #define LPDAC0_BASE (0x4004C000u) 9136 /** Peripheral LPDAC0 base pointer */ 9137 #define LPDAC0 ((LPDAC_Type *)LPDAC0_BASE) 9138 /** Array initializer of LPDAC peripheral base addresses */ 9139 #define LPDAC_BASE_ADDRS { LPDAC0_BASE } 9140 /** Array initializer of LPDAC peripheral base pointers */ 9141 #define LPDAC_BASE_PTRS { LPDAC0 } 9142 /** Interrupt vectors for the LPDAC peripheral type */ 9143 #define LPDAC_IRQS { LPDAC0_IRQn } 9144 9145 /*! 9146 * @} 9147 */ /* end of group LPDAC_Peripheral_Access_Layer */ 9148 9149 9150 /* ---------------------------------------------------------------------------- 9151 -- LPI2C Peripheral Access Layer 9152 ---------------------------------------------------------------------------- */ 9153 9154 /*! 9155 * @addtogroup LPI2C_Peripheral_Access_Layer LPI2C Peripheral Access Layer 9156 * @{ 9157 */ 9158 9159 /** LPI2C - Register Layout Typedef */ 9160 typedef struct { 9161 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 9162 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 9163 uint8_t RESERVED_0[8]; 9164 __IO uint32_t MCR; /**< Master Control Register, offset: 0x10 */ 9165 __IO uint32_t MSR; /**< Master Status Register, offset: 0x14 */ 9166 __IO uint32_t MIER; /**< Master Interrupt Enable Register, offset: 0x18 */ 9167 __IO uint32_t MDER; /**< Master DMA Enable Register, offset: 0x1C */ 9168 __IO uint32_t MCFGR0; /**< Master Configuration Register 0, offset: 0x20 */ 9169 __IO uint32_t MCFGR1; /**< Master Configuration Register 1, offset: 0x24 */ 9170 __IO uint32_t MCFGR2; /**< Master Configuration Register 2, offset: 0x28 */ 9171 __IO uint32_t MCFGR3; /**< Master Configuration Register 3, offset: 0x2C */ 9172 uint8_t RESERVED_1[16]; 9173 __IO uint32_t MDMR; /**< Master Data Match Register, offset: 0x40 */ 9174 uint8_t RESERVED_2[4]; 9175 __IO uint32_t MCCR0; /**< Master Clock Configuration Register 0, offset: 0x48 */ 9176 uint8_t RESERVED_3[4]; 9177 __IO uint32_t MCCR1; /**< Master Clock Configuration Register 1, offset: 0x50 */ 9178 uint8_t RESERVED_4[4]; 9179 __IO uint32_t MFCR; /**< Master FIFO Control Register, offset: 0x58 */ 9180 __I uint32_t MFSR; /**< Master FIFO Status Register, offset: 0x5C */ 9181 __O uint32_t MTDR; /**< Master Transmit Data Register, offset: 0x60 */ 9182 uint8_t RESERVED_5[12]; 9183 __I uint32_t MRDR; /**< Master Receive Data Register, offset: 0x70 */ 9184 uint8_t RESERVED_6[156]; 9185 __IO uint32_t SCR; /**< Slave Control Register, offset: 0x110 */ 9186 __IO uint32_t SSR; /**< Slave Status Register, offset: 0x114 */ 9187 __IO uint32_t SIER; /**< Slave Interrupt Enable Register, offset: 0x118 */ 9188 __IO uint32_t SDER; /**< Slave DMA Enable Register, offset: 0x11C */ 9189 uint8_t RESERVED_7[4]; 9190 __IO uint32_t SCFGR1; /**< Slave Configuration Register 1, offset: 0x124 */ 9191 __IO uint32_t SCFGR2; /**< Slave Configuration Register 2, offset: 0x128 */ 9192 uint8_t RESERVED_8[20]; 9193 __IO uint32_t SAMR; /**< Slave Address Match Register, offset: 0x140 */ 9194 uint8_t RESERVED_9[12]; 9195 __I uint32_t SASR; /**< Slave Address Status Register, offset: 0x150 */ 9196 __IO uint32_t STAR; /**< Slave Transmit ACK Register, offset: 0x154 */ 9197 uint8_t RESERVED_10[8]; 9198 __O uint32_t STDR; /**< Slave Transmit Data Register, offset: 0x160 */ 9199 uint8_t RESERVED_11[12]; 9200 __I uint32_t SRDR; /**< Slave Receive Data Register, offset: 0x170 */ 9201 } LPI2C_Type; 9202 9203 /* ---------------------------------------------------------------------------- 9204 -- LPI2C Register Masks 9205 ---------------------------------------------------------------------------- */ 9206 9207 /*! 9208 * @addtogroup LPI2C_Register_Masks LPI2C Register Masks 9209 * @{ 9210 */ 9211 9212 /*! @name VERID - Version ID Register */ 9213 /*! @{ */ 9214 #define LPI2C_VERID_FEATURE_MASK (0xFFFFU) 9215 #define LPI2C_VERID_FEATURE_SHIFT (0U) 9216 /*! FEATURE - Feature Specification Number 9217 * 0b0000000000000010..Master only, with standard feature set 9218 * 0b0000000000000011..Master and slave, with standard feature set 9219 */ 9220 #define LPI2C_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_FEATURE_SHIFT)) & LPI2C_VERID_FEATURE_MASK) 9221 #define LPI2C_VERID_MINOR_MASK (0xFF0000U) 9222 #define LPI2C_VERID_MINOR_SHIFT (16U) 9223 #define LPI2C_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_MINOR_SHIFT)) & LPI2C_VERID_MINOR_MASK) 9224 #define LPI2C_VERID_MAJOR_MASK (0xFF000000U) 9225 #define LPI2C_VERID_MAJOR_SHIFT (24U) 9226 #define LPI2C_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_VERID_MAJOR_SHIFT)) & LPI2C_VERID_MAJOR_MASK) 9227 /*! @} */ 9228 9229 /*! @name PARAM - Parameter Register */ 9230 /*! @{ */ 9231 #define LPI2C_PARAM_MTXFIFO_MASK (0xFU) 9232 #define LPI2C_PARAM_MTXFIFO_SHIFT (0U) 9233 #define LPI2C_PARAM_MTXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_PARAM_MTXFIFO_SHIFT)) & LPI2C_PARAM_MTXFIFO_MASK) 9234 #define LPI2C_PARAM_MRXFIFO_MASK (0xF00U) 9235 #define LPI2C_PARAM_MRXFIFO_SHIFT (8U) 9236 #define LPI2C_PARAM_MRXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_PARAM_MRXFIFO_SHIFT)) & LPI2C_PARAM_MRXFIFO_MASK) 9237 /*! @} */ 9238 9239 /*! @name MCR - Master Control Register */ 9240 /*! @{ */ 9241 #define LPI2C_MCR_MEN_MASK (0x1U) 9242 #define LPI2C_MCR_MEN_SHIFT (0U) 9243 /*! MEN - Master Enable 9244 * 0b0..Master logic is disabled 9245 * 0b1..Master logic is enabled 9246 */ 9247 #define LPI2C_MCR_MEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_MEN_SHIFT)) & LPI2C_MCR_MEN_MASK) 9248 #define LPI2C_MCR_RST_MASK (0x2U) 9249 #define LPI2C_MCR_RST_SHIFT (1U) 9250 /*! RST - Software Reset 9251 * 0b0..Master logic is not reset 9252 * 0b1..Master logic is reset 9253 */ 9254 #define LPI2C_MCR_RST(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RST_SHIFT)) & LPI2C_MCR_RST_MASK) 9255 #define LPI2C_MCR_DOZEN_MASK (0x4U) 9256 #define LPI2C_MCR_DOZEN_SHIFT (2U) 9257 /*! DOZEN - Doze mode enable 9258 * 0b0..Master is enabled in Doze mode 9259 * 0b1..Master is disabled in Doze mode 9260 */ 9261 #define LPI2C_MCR_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_DOZEN_SHIFT)) & LPI2C_MCR_DOZEN_MASK) 9262 #define LPI2C_MCR_DBGEN_MASK (0x8U) 9263 #define LPI2C_MCR_DBGEN_SHIFT (3U) 9264 /*! DBGEN - Debug Enable 9265 * 0b0..Master is disabled in debug mode 9266 * 0b1..Master is enabled in debug mode 9267 */ 9268 #define LPI2C_MCR_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_DBGEN_SHIFT)) & LPI2C_MCR_DBGEN_MASK) 9269 #define LPI2C_MCR_RTF_MASK (0x100U) 9270 #define LPI2C_MCR_RTF_SHIFT (8U) 9271 /*! RTF - Reset Transmit FIFO 9272 * 0b0..No effect 9273 * 0b1..Transmit FIFO is reset 9274 */ 9275 #define LPI2C_MCR_RTF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RTF_SHIFT)) & LPI2C_MCR_RTF_MASK) 9276 #define LPI2C_MCR_RRF_MASK (0x200U) 9277 #define LPI2C_MCR_RRF_SHIFT (9U) 9278 /*! RRF - Reset Receive FIFO 9279 * 0b0..No effect 9280 * 0b1..Receive FIFO is reset 9281 */ 9282 #define LPI2C_MCR_RRF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCR_RRF_SHIFT)) & LPI2C_MCR_RRF_MASK) 9283 /*! @} */ 9284 9285 /*! @name MSR - Master Status Register */ 9286 /*! @{ */ 9287 #define LPI2C_MSR_TDF_MASK (0x1U) 9288 #define LPI2C_MSR_TDF_SHIFT (0U) 9289 /*! TDF - Transmit Data Flag 9290 * 0b0..Transmit data is not requested 9291 * 0b1..Transmit data is requested 9292 */ 9293 #define LPI2C_MSR_TDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_TDF_SHIFT)) & LPI2C_MSR_TDF_MASK) 9294 #define LPI2C_MSR_RDF_MASK (0x2U) 9295 #define LPI2C_MSR_RDF_SHIFT (1U) 9296 /*! RDF - Receive Data Flag 9297 * 0b0..Receive Data is not ready 9298 * 0b1..Receive data is ready 9299 */ 9300 #define LPI2C_MSR_RDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_RDF_SHIFT)) & LPI2C_MSR_RDF_MASK) 9301 #define LPI2C_MSR_EPF_MASK (0x100U) 9302 #define LPI2C_MSR_EPF_SHIFT (8U) 9303 /*! EPF - End Packet Flag 9304 * 0b0..Master has not generated a STOP or Repeated START condition 9305 * 0b1..Master has generated a STOP or Repeated START condition 9306 */ 9307 #define LPI2C_MSR_EPF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_EPF_SHIFT)) & LPI2C_MSR_EPF_MASK) 9308 #define LPI2C_MSR_SDF_MASK (0x200U) 9309 #define LPI2C_MSR_SDF_SHIFT (9U) 9310 /*! SDF - STOP Detect Flag 9311 * 0b0..Master has not generated a STOP condition 9312 * 0b1..Master has generated a STOP condition 9313 */ 9314 #define LPI2C_MSR_SDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_SDF_SHIFT)) & LPI2C_MSR_SDF_MASK) 9315 #define LPI2C_MSR_NDF_MASK (0x400U) 9316 #define LPI2C_MSR_NDF_SHIFT (10U) 9317 /*! NDF - NACK Detect Flag 9318 * 0b0..Unexpected NACK was not detected 9319 * 0b1..Unexpected NACK was detected 9320 */ 9321 #define LPI2C_MSR_NDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_NDF_SHIFT)) & LPI2C_MSR_NDF_MASK) 9322 #define LPI2C_MSR_ALF_MASK (0x800U) 9323 #define LPI2C_MSR_ALF_SHIFT (11U) 9324 /*! ALF - Arbitration Lost Flag 9325 * 0b0..Master has not lost arbitration 9326 * 0b1..Master has lost arbitration 9327 */ 9328 #define LPI2C_MSR_ALF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_ALF_SHIFT)) & LPI2C_MSR_ALF_MASK) 9329 #define LPI2C_MSR_FEF_MASK (0x1000U) 9330 #define LPI2C_MSR_FEF_SHIFT (12U) 9331 /*! FEF - FIFO Error Flag 9332 * 0b0..No error 9333 * 0b1..Master sending or receiving data without a START condition 9334 */ 9335 #define LPI2C_MSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_FEF_SHIFT)) & LPI2C_MSR_FEF_MASK) 9336 #define LPI2C_MSR_PLTF_MASK (0x2000U) 9337 #define LPI2C_MSR_PLTF_SHIFT (13U) 9338 /*! PLTF - Pin Low Timeout Flag 9339 * 0b0..Pin low timeout has not occurred or is disabled 9340 * 0b1..Pin low timeout has occurred 9341 */ 9342 #define LPI2C_MSR_PLTF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_PLTF_SHIFT)) & LPI2C_MSR_PLTF_MASK) 9343 #define LPI2C_MSR_DMF_MASK (0x4000U) 9344 #define LPI2C_MSR_DMF_SHIFT (14U) 9345 /*! DMF - Data Match Flag 9346 * 0b0..Have not received matching data 9347 * 0b1..Have received matching data 9348 */ 9349 #define LPI2C_MSR_DMF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_DMF_SHIFT)) & LPI2C_MSR_DMF_MASK) 9350 #define LPI2C_MSR_MBF_MASK (0x1000000U) 9351 #define LPI2C_MSR_MBF_SHIFT (24U) 9352 /*! MBF - Master Busy Flag 9353 * 0b0..I2C Master is idle 9354 * 0b1..I2C Master is busy 9355 */ 9356 #define LPI2C_MSR_MBF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_MBF_SHIFT)) & LPI2C_MSR_MBF_MASK) 9357 #define LPI2C_MSR_BBF_MASK (0x2000000U) 9358 #define LPI2C_MSR_BBF_SHIFT (25U) 9359 /*! BBF - Bus Busy Flag 9360 * 0b0..I2C Bus is idle 9361 * 0b1..I2C Bus is busy 9362 */ 9363 #define LPI2C_MSR_BBF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MSR_BBF_SHIFT)) & LPI2C_MSR_BBF_MASK) 9364 /*! @} */ 9365 9366 /*! @name MIER - Master Interrupt Enable Register */ 9367 /*! @{ */ 9368 #define LPI2C_MIER_TDIE_MASK (0x1U) 9369 #define LPI2C_MIER_TDIE_SHIFT (0U) 9370 /*! TDIE - Transmit Data Interrupt Enable 9371 * 0b0..Disabled 9372 * 0b1..Enabled 9373 */ 9374 #define LPI2C_MIER_TDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_TDIE_SHIFT)) & LPI2C_MIER_TDIE_MASK) 9375 #define LPI2C_MIER_RDIE_MASK (0x2U) 9376 #define LPI2C_MIER_RDIE_SHIFT (1U) 9377 /*! RDIE - Receive Data Interrupt Enable 9378 * 0b0..Disabled 9379 * 0b1..Enabled 9380 */ 9381 #define LPI2C_MIER_RDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_RDIE_SHIFT)) & LPI2C_MIER_RDIE_MASK) 9382 #define LPI2C_MIER_EPIE_MASK (0x100U) 9383 #define LPI2C_MIER_EPIE_SHIFT (8U) 9384 /*! EPIE - End Packet Interrupt Enable 9385 * 0b0..Disabled 9386 * 0b1..Enabled 9387 */ 9388 #define LPI2C_MIER_EPIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_EPIE_SHIFT)) & LPI2C_MIER_EPIE_MASK) 9389 #define LPI2C_MIER_SDIE_MASK (0x200U) 9390 #define LPI2C_MIER_SDIE_SHIFT (9U) 9391 /*! SDIE - STOP Detect Interrupt Enable 9392 * 0b0..Disabled 9393 * 0b1..Enabled 9394 */ 9395 #define LPI2C_MIER_SDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_SDIE_SHIFT)) & LPI2C_MIER_SDIE_MASK) 9396 #define LPI2C_MIER_NDIE_MASK (0x400U) 9397 #define LPI2C_MIER_NDIE_SHIFT (10U) 9398 /*! NDIE - NACK Detect Interrupt Enable 9399 * 0b0..Disabled 9400 * 0b1..Enabled 9401 */ 9402 #define LPI2C_MIER_NDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_NDIE_SHIFT)) & LPI2C_MIER_NDIE_MASK) 9403 #define LPI2C_MIER_ALIE_MASK (0x800U) 9404 #define LPI2C_MIER_ALIE_SHIFT (11U) 9405 /*! ALIE - Arbitration Lost Interrupt Enable 9406 * 0b0..Disabled 9407 * 0b1..Enabled 9408 */ 9409 #define LPI2C_MIER_ALIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_ALIE_SHIFT)) & LPI2C_MIER_ALIE_MASK) 9410 #define LPI2C_MIER_FEIE_MASK (0x1000U) 9411 #define LPI2C_MIER_FEIE_SHIFT (12U) 9412 /*! FEIE - FIFO Error Interrupt Enable 9413 * 0b0..Enabled 9414 * 0b1..Disabled 9415 */ 9416 #define LPI2C_MIER_FEIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_FEIE_SHIFT)) & LPI2C_MIER_FEIE_MASK) 9417 #define LPI2C_MIER_PLTIE_MASK (0x2000U) 9418 #define LPI2C_MIER_PLTIE_SHIFT (13U) 9419 /*! PLTIE - Pin Low Timeout Interrupt Enable 9420 * 0b0..Disabled 9421 * 0b1..Enabled 9422 */ 9423 #define LPI2C_MIER_PLTIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_PLTIE_SHIFT)) & LPI2C_MIER_PLTIE_MASK) 9424 #define LPI2C_MIER_DMIE_MASK (0x4000U) 9425 #define LPI2C_MIER_DMIE_SHIFT (14U) 9426 /*! DMIE - Data Match Interrupt Enable 9427 * 0b0..Disabled 9428 * 0b1..Enabled 9429 */ 9430 #define LPI2C_MIER_DMIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MIER_DMIE_SHIFT)) & LPI2C_MIER_DMIE_MASK) 9431 /*! @} */ 9432 9433 /*! @name MDER - Master DMA Enable Register */ 9434 /*! @{ */ 9435 #define LPI2C_MDER_TDDE_MASK (0x1U) 9436 #define LPI2C_MDER_TDDE_SHIFT (0U) 9437 /*! TDDE - Transmit Data DMA Enable 9438 * 0b0..DMA request is disabled 9439 * 0b1..DMA request is enabled 9440 */ 9441 #define LPI2C_MDER_TDDE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MDER_TDDE_SHIFT)) & LPI2C_MDER_TDDE_MASK) 9442 #define LPI2C_MDER_RDDE_MASK (0x2U) 9443 #define LPI2C_MDER_RDDE_SHIFT (1U) 9444 /*! RDDE - Receive Data DMA Enable 9445 * 0b0..DMA request is disabled 9446 * 0b1..DMA request is enabled 9447 */ 9448 #define LPI2C_MDER_RDDE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MDER_RDDE_SHIFT)) & LPI2C_MDER_RDDE_MASK) 9449 /*! @} */ 9450 9451 /*! @name MCFGR0 - Master Configuration Register 0 */ 9452 /*! @{ */ 9453 #define LPI2C_MCFGR0_HREN_MASK (0x1U) 9454 #define LPI2C_MCFGR0_HREN_SHIFT (0U) 9455 /*! HREN - Host Request Enable 9456 * 0b0..Host request input is disabled 9457 * 0b1..Host request input is enabled 9458 */ 9459 #define LPI2C_MCFGR0_HREN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HREN_SHIFT)) & LPI2C_MCFGR0_HREN_MASK) 9460 #define LPI2C_MCFGR0_HRPOL_MASK (0x2U) 9461 #define LPI2C_MCFGR0_HRPOL_SHIFT (1U) 9462 /*! HRPOL - Host Request Polarity 9463 * 0b0..Active low 9464 * 0b1..Active high 9465 */ 9466 #define LPI2C_MCFGR0_HRPOL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HRPOL_SHIFT)) & LPI2C_MCFGR0_HRPOL_MASK) 9467 #define LPI2C_MCFGR0_HRSEL_MASK (0x4U) 9468 #define LPI2C_MCFGR0_HRSEL_SHIFT (2U) 9469 /*! HRSEL - Host Request Select 9470 * 0b0..Host request input is pin HREQ 9471 * 0b1..Host request input is input trigger 9472 */ 9473 #define LPI2C_MCFGR0_HRSEL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_HRSEL_SHIFT)) & LPI2C_MCFGR0_HRSEL_MASK) 9474 #define LPI2C_MCFGR0_CIRFIFO_MASK (0x100U) 9475 #define LPI2C_MCFGR0_CIRFIFO_SHIFT (8U) 9476 /*! CIRFIFO - Circular FIFO Enable 9477 * 0b0..Circular FIFO is disabled 9478 * 0b1..Circular FIFO is enabled 9479 */ 9480 #define LPI2C_MCFGR0_CIRFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_CIRFIFO_SHIFT)) & LPI2C_MCFGR0_CIRFIFO_MASK) 9481 #define LPI2C_MCFGR0_RDMO_MASK (0x200U) 9482 #define LPI2C_MCFGR0_RDMO_SHIFT (9U) 9483 /*! RDMO - Receive Data Match Only 9484 * 0b0..Received data is stored in the receive FIFO 9485 * 0b1..Received data is discarded unless the the Data Match Flag (MSR[DMF]) is set 9486 */ 9487 #define LPI2C_MCFGR0_RDMO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR0_RDMO_SHIFT)) & LPI2C_MCFGR0_RDMO_MASK) 9488 /*! @} */ 9489 9490 /*! @name MCFGR1 - Master Configuration Register 1 */ 9491 /*! @{ */ 9492 #define LPI2C_MCFGR1_PRESCALE_MASK (0x7U) 9493 #define LPI2C_MCFGR1_PRESCALE_SHIFT (0U) 9494 /*! PRESCALE - Prescaler 9495 * 0b000..Divide by 1 9496 * 0b001..Divide by 2 9497 * 0b010..Divide by 4 9498 * 0b011..Divide by 8 9499 * 0b100..Divide by 16 9500 * 0b101..Divide by 32 9501 * 0b110..Divide by 64 9502 * 0b111..Divide by 128 9503 */ 9504 #define LPI2C_MCFGR1_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_PRESCALE_SHIFT)) & LPI2C_MCFGR1_PRESCALE_MASK) 9505 #define LPI2C_MCFGR1_AUTOSTOP_MASK (0x100U) 9506 #define LPI2C_MCFGR1_AUTOSTOP_SHIFT (8U) 9507 /*! AUTOSTOP - Automatic STOP Generation 9508 * 0b0..No effect 9509 * 0b1..STOP condition is automatically generated whenever the transmit FIFO is empty and the LPI2C master is busy 9510 */ 9511 #define LPI2C_MCFGR1_AUTOSTOP(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_AUTOSTOP_SHIFT)) & LPI2C_MCFGR1_AUTOSTOP_MASK) 9512 #define LPI2C_MCFGR1_IGNACK_MASK (0x200U) 9513 #define LPI2C_MCFGR1_IGNACK_SHIFT (9U) 9514 /*! IGNACK - IGNACK 9515 * 0b0..LPI2C Master will receive ACK and NACK normally 9516 * 0b1..LPI2C Master will treat a received NACK as if it (NACK) was an ACK 9517 */ 9518 #define LPI2C_MCFGR1_IGNACK(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_IGNACK_SHIFT)) & LPI2C_MCFGR1_IGNACK_MASK) 9519 #define LPI2C_MCFGR1_TIMECFG_MASK (0x400U) 9520 #define LPI2C_MCFGR1_TIMECFG_SHIFT (10U) 9521 /*! TIMECFG - Timeout Configuration 9522 * 0b0..Pin Low Timeout Flag will set if SCL is low for longer than the configured timeout 9523 * 0b1..Pin Low Timeout Flag will set if either SCL or SDA is low for longer than the configured timeout 9524 */ 9525 #define LPI2C_MCFGR1_TIMECFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_TIMECFG_SHIFT)) & LPI2C_MCFGR1_TIMECFG_MASK) 9526 #define LPI2C_MCFGR1_MATCFG_MASK (0x70000U) 9527 #define LPI2C_MCFGR1_MATCFG_SHIFT (16U) 9528 /*! MATCFG - Match Configuration 9529 * 0b000..Match is disabled 9530 * 0b001..Reserved 9531 * 0b010..Match is enabled (1st data word equals MATCH0 OR MATCH1) 9532 * 0b011..Match is enabled (any data word equals MATCH0 OR MATCH1) 9533 * 0b100..Match is enabled (1st data word equals MATCH0 AND 2nd data word equals MATCH1) 9534 * 0b101..Match is enabled (any data word equals MATCH0 AND next data word equals MATCH1) 9535 * 0b110..Match is enabled (1st data word AND MATCH1 equals MATCH0 AND MATCH1) 9536 * 0b111..Match is enabled (any data word AND MATCH1 equals MATCH0 AND MATCH1) 9537 */ 9538 #define LPI2C_MCFGR1_MATCFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_MATCFG_SHIFT)) & LPI2C_MCFGR1_MATCFG_MASK) 9539 #define LPI2C_MCFGR1_PINCFG_MASK (0x7000000U) 9540 #define LPI2C_MCFGR1_PINCFG_SHIFT (24U) 9541 /*! PINCFG - Pin Configuration 9542 * 0b000..2-pin open drain mode 9543 * 0b001..2-pin output only mode (ultra-fast mode) 9544 * 0b010..2-pin push-pull mode 9545 * 0b011..4-pin push-pull mode 9546 * 0b100..2-pin open drain mode with separate LPI2C slave 9547 * 0b101..2-pin output only mode (ultra-fast mode) with separate LPI2C slave 9548 * 0b110..2-pin push-pull mode with separate LPI2C slave 9549 * 0b111..4-pin push-pull mode (inverted outputs) 9550 */ 9551 #define LPI2C_MCFGR1_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR1_PINCFG_SHIFT)) & LPI2C_MCFGR1_PINCFG_MASK) 9552 /*! @} */ 9553 9554 /*! @name MCFGR2 - Master Configuration Register 2 */ 9555 /*! @{ */ 9556 #define LPI2C_MCFGR2_BUSIDLE_MASK (0xFFFU) 9557 #define LPI2C_MCFGR2_BUSIDLE_SHIFT (0U) 9558 #define LPI2C_MCFGR2_BUSIDLE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_BUSIDLE_SHIFT)) & LPI2C_MCFGR2_BUSIDLE_MASK) 9559 #define LPI2C_MCFGR2_FILTSCL_MASK (0xF0000U) 9560 #define LPI2C_MCFGR2_FILTSCL_SHIFT (16U) 9561 #define LPI2C_MCFGR2_FILTSCL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_FILTSCL_SHIFT)) & LPI2C_MCFGR2_FILTSCL_MASK) 9562 #define LPI2C_MCFGR2_FILTSDA_MASK (0xF000000U) 9563 #define LPI2C_MCFGR2_FILTSDA_SHIFT (24U) 9564 #define LPI2C_MCFGR2_FILTSDA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR2_FILTSDA_SHIFT)) & LPI2C_MCFGR2_FILTSDA_MASK) 9565 /*! @} */ 9566 9567 /*! @name MCFGR3 - Master Configuration Register 3 */ 9568 /*! @{ */ 9569 #define LPI2C_MCFGR3_PINLOW_MASK (0xFFF00U) 9570 #define LPI2C_MCFGR3_PINLOW_SHIFT (8U) 9571 #define LPI2C_MCFGR3_PINLOW(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCFGR3_PINLOW_SHIFT)) & LPI2C_MCFGR3_PINLOW_MASK) 9572 /*! @} */ 9573 9574 /*! @name MDMR - Master Data Match Register */ 9575 /*! @{ */ 9576 #define LPI2C_MDMR_MATCH0_MASK (0xFFU) 9577 #define LPI2C_MDMR_MATCH0_SHIFT (0U) 9578 #define LPI2C_MDMR_MATCH0(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MDMR_MATCH0_SHIFT)) & LPI2C_MDMR_MATCH0_MASK) 9579 #define LPI2C_MDMR_MATCH1_MASK (0xFF0000U) 9580 #define LPI2C_MDMR_MATCH1_SHIFT (16U) 9581 #define LPI2C_MDMR_MATCH1(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MDMR_MATCH1_SHIFT)) & LPI2C_MDMR_MATCH1_MASK) 9582 /*! @} */ 9583 9584 /*! @name MCCR0 - Master Clock Configuration Register 0 */ 9585 /*! @{ */ 9586 #define LPI2C_MCCR0_CLKLO_MASK (0x3FU) 9587 #define LPI2C_MCCR0_CLKLO_SHIFT (0U) 9588 #define LPI2C_MCCR0_CLKLO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_CLKLO_SHIFT)) & LPI2C_MCCR0_CLKLO_MASK) 9589 #define LPI2C_MCCR0_CLKHI_MASK (0x3F00U) 9590 #define LPI2C_MCCR0_CLKHI_SHIFT (8U) 9591 #define LPI2C_MCCR0_CLKHI(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_CLKHI_SHIFT)) & LPI2C_MCCR0_CLKHI_MASK) 9592 #define LPI2C_MCCR0_SETHOLD_MASK (0x3F0000U) 9593 #define LPI2C_MCCR0_SETHOLD_SHIFT (16U) 9594 #define LPI2C_MCCR0_SETHOLD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_SETHOLD_SHIFT)) & LPI2C_MCCR0_SETHOLD_MASK) 9595 #define LPI2C_MCCR0_DATAVD_MASK (0x3F000000U) 9596 #define LPI2C_MCCR0_DATAVD_SHIFT (24U) 9597 #define LPI2C_MCCR0_DATAVD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR0_DATAVD_SHIFT)) & LPI2C_MCCR0_DATAVD_MASK) 9598 /*! @} */ 9599 9600 /*! @name MCCR1 - Master Clock Configuration Register 1 */ 9601 /*! @{ */ 9602 #define LPI2C_MCCR1_CLKLO_MASK (0x3FU) 9603 #define LPI2C_MCCR1_CLKLO_SHIFT (0U) 9604 #define LPI2C_MCCR1_CLKLO(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_CLKLO_SHIFT)) & LPI2C_MCCR1_CLKLO_MASK) 9605 #define LPI2C_MCCR1_CLKHI_MASK (0x3F00U) 9606 #define LPI2C_MCCR1_CLKHI_SHIFT (8U) 9607 #define LPI2C_MCCR1_CLKHI(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_CLKHI_SHIFT)) & LPI2C_MCCR1_CLKHI_MASK) 9608 #define LPI2C_MCCR1_SETHOLD_MASK (0x3F0000U) 9609 #define LPI2C_MCCR1_SETHOLD_SHIFT (16U) 9610 #define LPI2C_MCCR1_SETHOLD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_SETHOLD_SHIFT)) & LPI2C_MCCR1_SETHOLD_MASK) 9611 #define LPI2C_MCCR1_DATAVD_MASK (0x3F000000U) 9612 #define LPI2C_MCCR1_DATAVD_SHIFT (24U) 9613 #define LPI2C_MCCR1_DATAVD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MCCR1_DATAVD_SHIFT)) & LPI2C_MCCR1_DATAVD_MASK) 9614 /*! @} */ 9615 9616 /*! @name MFCR - Master FIFO Control Register */ 9617 /*! @{ */ 9618 #define LPI2C_MFCR_TXWATER_MASK (0x3U) 9619 #define LPI2C_MFCR_TXWATER_SHIFT (0U) 9620 #define LPI2C_MFCR_TXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MFCR_TXWATER_SHIFT)) & LPI2C_MFCR_TXWATER_MASK) 9621 #define LPI2C_MFCR_RXWATER_MASK (0x30000U) 9622 #define LPI2C_MFCR_RXWATER_SHIFT (16U) 9623 #define LPI2C_MFCR_RXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MFCR_RXWATER_SHIFT)) & LPI2C_MFCR_RXWATER_MASK) 9624 /*! @} */ 9625 9626 /*! @name MFSR - Master FIFO Status Register */ 9627 /*! @{ */ 9628 #define LPI2C_MFSR_TXCOUNT_MASK (0x7U) 9629 #define LPI2C_MFSR_TXCOUNT_SHIFT (0U) 9630 #define LPI2C_MFSR_TXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MFSR_TXCOUNT_SHIFT)) & LPI2C_MFSR_TXCOUNT_MASK) 9631 #define LPI2C_MFSR_RXCOUNT_MASK (0x70000U) 9632 #define LPI2C_MFSR_RXCOUNT_SHIFT (16U) 9633 #define LPI2C_MFSR_RXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MFSR_RXCOUNT_SHIFT)) & LPI2C_MFSR_RXCOUNT_MASK) 9634 /*! @} */ 9635 9636 /*! @name MTDR - Master Transmit Data Register */ 9637 /*! @{ */ 9638 #define LPI2C_MTDR_DATA_MASK (0xFFU) 9639 #define LPI2C_MTDR_DATA_SHIFT (0U) 9640 #define LPI2C_MTDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MTDR_DATA_SHIFT)) & LPI2C_MTDR_DATA_MASK) 9641 #define LPI2C_MTDR_CMD_MASK (0x700U) 9642 #define LPI2C_MTDR_CMD_SHIFT (8U) 9643 /*! CMD - Command Data 9644 * 0b000..Transmit DATA[7:0] 9645 * 0b001..Receive (DATA[7:0] + 1) bytes 9646 * 0b010..Generate STOP condition 9647 * 0b011..Receive and discard (DATA[7:0] + 1) bytes 9648 * 0b100..Generate (repeated) START and transmit address in DATA[7:0] 9649 * 0b101..Generate (repeated) START and transmit address in DATA[7:0]. This transfer expects a NACK to be returned. 9650 * 0b110..Generate (repeated) START and transmit address in DATA[7:0] using high speed mode 9651 * 0b111..Generate (repeated) START and transmit address in DATA[7:0] using high speed mode. This transfer expects a NACK to be returned. 9652 */ 9653 #define LPI2C_MTDR_CMD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MTDR_CMD_SHIFT)) & LPI2C_MTDR_CMD_MASK) 9654 /*! @} */ 9655 9656 /*! @name MRDR - Master Receive Data Register */ 9657 /*! @{ */ 9658 #define LPI2C_MRDR_DATA_MASK (0xFFU) 9659 #define LPI2C_MRDR_DATA_SHIFT (0U) 9660 #define LPI2C_MRDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MRDR_DATA_SHIFT)) & LPI2C_MRDR_DATA_MASK) 9661 #define LPI2C_MRDR_RXEMPTY_MASK (0x4000U) 9662 #define LPI2C_MRDR_RXEMPTY_SHIFT (14U) 9663 /*! RXEMPTY - RX Empty 9664 * 0b0..Receive FIFO is not empty 9665 * 0b1..Receive FIFO is empty 9666 */ 9667 #define LPI2C_MRDR_RXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_MRDR_RXEMPTY_SHIFT)) & LPI2C_MRDR_RXEMPTY_MASK) 9668 /*! @} */ 9669 9670 /*! @name SCR - Slave Control Register */ 9671 /*! @{ */ 9672 #define LPI2C_SCR_SEN_MASK (0x1U) 9673 #define LPI2C_SCR_SEN_SHIFT (0U) 9674 /*! SEN - Slave Enable 9675 * 0b0..I2C Slave mode is disabled 9676 * 0b1..I2C Slave mode is enabled 9677 */ 9678 #define LPI2C_SCR_SEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_SEN_SHIFT)) & LPI2C_SCR_SEN_MASK) 9679 #define LPI2C_SCR_RST_MASK (0x2U) 9680 #define LPI2C_SCR_RST_SHIFT (1U) 9681 /*! RST - Software Reset 9682 * 0b0..Slave mode logic is not reset 9683 * 0b1..Slave mode logic is reset 9684 */ 9685 #define LPI2C_SCR_RST(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RST_SHIFT)) & LPI2C_SCR_RST_MASK) 9686 #define LPI2C_SCR_FILTEN_MASK (0x10U) 9687 #define LPI2C_SCR_FILTEN_SHIFT (4U) 9688 /*! FILTEN - Filter Enable 9689 * 0b0..Disable digital filter and output delay counter for slave mode 9690 * 0b1..Enable digital filter and output delay counter for slave mode 9691 */ 9692 #define LPI2C_SCR_FILTEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_FILTEN_SHIFT)) & LPI2C_SCR_FILTEN_MASK) 9693 #define LPI2C_SCR_FILTDZ_MASK (0x20U) 9694 #define LPI2C_SCR_FILTDZ_SHIFT (5U) 9695 /*! FILTDZ - Filter Doze Enable 9696 * 0b0..Filter remains enabled in Doze mode 9697 * 0b1..Filter is disabled in Doze mode 9698 */ 9699 #define LPI2C_SCR_FILTDZ(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_FILTDZ_SHIFT)) & LPI2C_SCR_FILTDZ_MASK) 9700 #define LPI2C_SCR_RTF_MASK (0x100U) 9701 #define LPI2C_SCR_RTF_SHIFT (8U) 9702 /*! RTF - Reset Transmit FIFO 9703 * 0b0..No effect 9704 * 0b1..Transmit Data Register is now empty 9705 */ 9706 #define LPI2C_SCR_RTF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RTF_SHIFT)) & LPI2C_SCR_RTF_MASK) 9707 #define LPI2C_SCR_RRF_MASK (0x200U) 9708 #define LPI2C_SCR_RRF_SHIFT (9U) 9709 /*! RRF - Reset Receive FIFO 9710 * 0b0..No effect 9711 * 0b1..Receive Data Register is now empty 9712 */ 9713 #define LPI2C_SCR_RRF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCR_RRF_SHIFT)) & LPI2C_SCR_RRF_MASK) 9714 /*! @} */ 9715 9716 /*! @name SSR - Slave Status Register */ 9717 /*! @{ */ 9718 #define LPI2C_SSR_TDF_MASK (0x1U) 9719 #define LPI2C_SSR_TDF_SHIFT (0U) 9720 /*! TDF - Transmit Data Flag 9721 * 0b0..Transmit data not requested 9722 * 0b1..Transmit data is requested 9723 */ 9724 #define LPI2C_SSR_TDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_TDF_SHIFT)) & LPI2C_SSR_TDF_MASK) 9725 #define LPI2C_SSR_RDF_MASK (0x2U) 9726 #define LPI2C_SSR_RDF_SHIFT (1U) 9727 /*! RDF - Receive Data Flag 9728 * 0b0..Receive data is not ready 9729 * 0b1..Receive data is ready 9730 */ 9731 #define LPI2C_SSR_RDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_RDF_SHIFT)) & LPI2C_SSR_RDF_MASK) 9732 #define LPI2C_SSR_AVF_MASK (0x4U) 9733 #define LPI2C_SSR_AVF_SHIFT (2U) 9734 /*! AVF - Address Valid Flag 9735 * 0b0..Address Status Register is not valid 9736 * 0b1..Address Status Register is valid 9737 */ 9738 #define LPI2C_SSR_AVF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AVF_SHIFT)) & LPI2C_SSR_AVF_MASK) 9739 #define LPI2C_SSR_TAF_MASK (0x8U) 9740 #define LPI2C_SSR_TAF_SHIFT (3U) 9741 /*! TAF - Transmit ACK Flag 9742 * 0b0..Transmit ACK/NACK is not required 9743 * 0b1..Transmit ACK/NACK is required 9744 */ 9745 #define LPI2C_SSR_TAF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_TAF_SHIFT)) & LPI2C_SSR_TAF_MASK) 9746 #define LPI2C_SSR_RSF_MASK (0x100U) 9747 #define LPI2C_SSR_RSF_SHIFT (8U) 9748 /*! RSF - Repeated Start Flag 9749 * 0b0..Slave has not detected a Repeated START condition 9750 * 0b1..Slave has detected a Repeated START condition 9751 */ 9752 #define LPI2C_SSR_RSF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_RSF_SHIFT)) & LPI2C_SSR_RSF_MASK) 9753 #define LPI2C_SSR_SDF_MASK (0x200U) 9754 #define LPI2C_SSR_SDF_SHIFT (9U) 9755 /*! SDF - STOP Detect Flag 9756 * 0b0..Slave has not detected a STOP condition 9757 * 0b1..Slave has detected a STOP condition 9758 */ 9759 #define LPI2C_SSR_SDF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SDF_SHIFT)) & LPI2C_SSR_SDF_MASK) 9760 #define LPI2C_SSR_BEF_MASK (0x400U) 9761 #define LPI2C_SSR_BEF_SHIFT (10U) 9762 /*! BEF - Bit Error Flag 9763 * 0b0..Slave has not detected a bit error 9764 * 0b1..Slave has detected a bit error 9765 */ 9766 #define LPI2C_SSR_BEF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_BEF_SHIFT)) & LPI2C_SSR_BEF_MASK) 9767 #define LPI2C_SSR_FEF_MASK (0x800U) 9768 #define LPI2C_SSR_FEF_SHIFT (11U) 9769 /*! FEF - FIFO Error Flag 9770 * 0b0..FIFO underflow or overflow was not detected 9771 * 0b1..FIFO underflow or overflow was detected 9772 */ 9773 #define LPI2C_SSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_FEF_SHIFT)) & LPI2C_SSR_FEF_MASK) 9774 #define LPI2C_SSR_AM0F_MASK (0x1000U) 9775 #define LPI2C_SSR_AM0F_SHIFT (12U) 9776 /*! AM0F - Address Match 0 Flag 9777 * 0b0..Have not received an ADDR0 matching address 9778 * 0b1..Have received an ADDR0 matching address 9779 */ 9780 #define LPI2C_SSR_AM0F(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AM0F_SHIFT)) & LPI2C_SSR_AM0F_MASK) 9781 #define LPI2C_SSR_AM1F_MASK (0x2000U) 9782 #define LPI2C_SSR_AM1F_SHIFT (13U) 9783 /*! AM1F - Address Match 1 Flag 9784 * 0b0..Have not received an ADDR1 or ADDR0/ADDR1 range matching address 9785 * 0b1..Have received an ADDR1 or ADDR0/ADDR1 range matching address 9786 */ 9787 #define LPI2C_SSR_AM1F(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_AM1F_SHIFT)) & LPI2C_SSR_AM1F_MASK) 9788 #define LPI2C_SSR_GCF_MASK (0x4000U) 9789 #define LPI2C_SSR_GCF_SHIFT (14U) 9790 /*! GCF - General Call Flag 9791 * 0b0..Slave has not detected the General Call Address or the General Call Address is disabled 9792 * 0b1..Slave has detected the General Call Address 9793 */ 9794 #define LPI2C_SSR_GCF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_GCF_SHIFT)) & LPI2C_SSR_GCF_MASK) 9795 #define LPI2C_SSR_SARF_MASK (0x8000U) 9796 #define LPI2C_SSR_SARF_SHIFT (15U) 9797 /*! SARF - SMBus Alert Response Flag 9798 * 0b0..SMBus Alert Response is disabled or not detected 9799 * 0b1..SMBus Alert Response is enabled and detected 9800 */ 9801 #define LPI2C_SSR_SARF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SARF_SHIFT)) & LPI2C_SSR_SARF_MASK) 9802 #define LPI2C_SSR_SBF_MASK (0x1000000U) 9803 #define LPI2C_SSR_SBF_SHIFT (24U) 9804 /*! SBF - Slave Busy Flag 9805 * 0b0..I2C Slave is idle 9806 * 0b1..I2C Slave is busy 9807 */ 9808 #define LPI2C_SSR_SBF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_SBF_SHIFT)) & LPI2C_SSR_SBF_MASK) 9809 #define LPI2C_SSR_BBF_MASK (0x2000000U) 9810 #define LPI2C_SSR_BBF_SHIFT (25U) 9811 /*! BBF - Bus Busy Flag 9812 * 0b0..I2C Bus is idle 9813 * 0b1..I2C Bus is busy 9814 */ 9815 #define LPI2C_SSR_BBF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SSR_BBF_SHIFT)) & LPI2C_SSR_BBF_MASK) 9816 /*! @} */ 9817 9818 /*! @name SIER - Slave Interrupt Enable Register */ 9819 /*! @{ */ 9820 #define LPI2C_SIER_TDIE_MASK (0x1U) 9821 #define LPI2C_SIER_TDIE_SHIFT (0U) 9822 /*! TDIE - Transmit Data Interrupt Enable 9823 * 0b0..Disabled 9824 * 0b1..Enabled 9825 */ 9826 #define LPI2C_SIER_TDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_TDIE_SHIFT)) & LPI2C_SIER_TDIE_MASK) 9827 #define LPI2C_SIER_RDIE_MASK (0x2U) 9828 #define LPI2C_SIER_RDIE_SHIFT (1U) 9829 /*! RDIE - Receive Data Interrupt Enable 9830 * 0b0..Disabled 9831 * 0b1..Enabled 9832 */ 9833 #define LPI2C_SIER_RDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_RDIE_SHIFT)) & LPI2C_SIER_RDIE_MASK) 9834 #define LPI2C_SIER_AVIE_MASK (0x4U) 9835 #define LPI2C_SIER_AVIE_SHIFT (2U) 9836 /*! AVIE - Address Valid Interrupt Enable 9837 * 0b0..Disabled 9838 * 0b1..Enabled 9839 */ 9840 #define LPI2C_SIER_AVIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AVIE_SHIFT)) & LPI2C_SIER_AVIE_MASK) 9841 #define LPI2C_SIER_TAIE_MASK (0x8U) 9842 #define LPI2C_SIER_TAIE_SHIFT (3U) 9843 /*! TAIE - Transmit ACK Interrupt Enable 9844 * 0b0..Disabled 9845 * 0b1..Enabled 9846 */ 9847 #define LPI2C_SIER_TAIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_TAIE_SHIFT)) & LPI2C_SIER_TAIE_MASK) 9848 #define LPI2C_SIER_RSIE_MASK (0x100U) 9849 #define LPI2C_SIER_RSIE_SHIFT (8U) 9850 /*! RSIE - Repeated Start Interrupt Enable 9851 * 0b0..Disabled 9852 * 0b1..Enabled 9853 */ 9854 #define LPI2C_SIER_RSIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_RSIE_SHIFT)) & LPI2C_SIER_RSIE_MASK) 9855 #define LPI2C_SIER_SDIE_MASK (0x200U) 9856 #define LPI2C_SIER_SDIE_SHIFT (9U) 9857 /*! SDIE - STOP Detect Interrupt Enable 9858 * 0b0..Disabled 9859 * 0b1..Enabled 9860 */ 9861 #define LPI2C_SIER_SDIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_SDIE_SHIFT)) & LPI2C_SIER_SDIE_MASK) 9862 #define LPI2C_SIER_BEIE_MASK (0x400U) 9863 #define LPI2C_SIER_BEIE_SHIFT (10U) 9864 /*! BEIE - Bit Error Interrupt Enable 9865 * 0b0..Disabled 9866 * 0b1..Enabled 9867 */ 9868 #define LPI2C_SIER_BEIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_BEIE_SHIFT)) & LPI2C_SIER_BEIE_MASK) 9869 #define LPI2C_SIER_FEIE_MASK (0x800U) 9870 #define LPI2C_SIER_FEIE_SHIFT (11U) 9871 /*! FEIE - FIFO Error Interrupt Enable 9872 * 0b0..Disabled 9873 * 0b1..Enabled 9874 */ 9875 #define LPI2C_SIER_FEIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_FEIE_SHIFT)) & LPI2C_SIER_FEIE_MASK) 9876 #define LPI2C_SIER_AM0IE_MASK (0x1000U) 9877 #define LPI2C_SIER_AM0IE_SHIFT (12U) 9878 /*! AM0IE - Address Match 0 Interrupt Enable 9879 * 0b0..Enabled 9880 * 0b1..Disabled 9881 */ 9882 #define LPI2C_SIER_AM0IE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AM0IE_SHIFT)) & LPI2C_SIER_AM0IE_MASK) 9883 #define LPI2C_SIER_AM1F_MASK (0x2000U) 9884 #define LPI2C_SIER_AM1F_SHIFT (13U) 9885 /*! AM1F - Address Match 1 Interrupt Enable 9886 * 0b0..Disabled 9887 * 0b1..Enabled 9888 */ 9889 #define LPI2C_SIER_AM1F(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_AM1F_SHIFT)) & LPI2C_SIER_AM1F_MASK) 9890 #define LPI2C_SIER_GCIE_MASK (0x4000U) 9891 #define LPI2C_SIER_GCIE_SHIFT (14U) 9892 /*! GCIE - General Call Interrupt Enable 9893 * 0b0..Disabled 9894 * 0b1..Enabled 9895 */ 9896 #define LPI2C_SIER_GCIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_GCIE_SHIFT)) & LPI2C_SIER_GCIE_MASK) 9897 #define LPI2C_SIER_SARIE_MASK (0x8000U) 9898 #define LPI2C_SIER_SARIE_SHIFT (15U) 9899 /*! SARIE - SMBus Alert Response Interrupt Enable 9900 * 0b0..Disabled 9901 * 0b1..Enabled 9902 */ 9903 #define LPI2C_SIER_SARIE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SIER_SARIE_SHIFT)) & LPI2C_SIER_SARIE_MASK) 9904 /*! @} */ 9905 9906 /*! @name SDER - Slave DMA Enable Register */ 9907 /*! @{ */ 9908 #define LPI2C_SDER_TDDE_MASK (0x1U) 9909 #define LPI2C_SDER_TDDE_SHIFT (0U) 9910 /*! TDDE - Transmit Data DMA Enable 9911 * 0b0..DMA request is disabled 9912 * 0b1..DMA request is enabled 9913 */ 9914 #define LPI2C_SDER_TDDE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_TDDE_SHIFT)) & LPI2C_SDER_TDDE_MASK) 9915 #define LPI2C_SDER_RDDE_MASK (0x2U) 9916 #define LPI2C_SDER_RDDE_SHIFT (1U) 9917 /*! RDDE - Receive Data DMA Enable 9918 * 0b0..DMA request is disabled 9919 * 0b1..DMA request is enabled 9920 */ 9921 #define LPI2C_SDER_RDDE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_RDDE_SHIFT)) & LPI2C_SDER_RDDE_MASK) 9922 #define LPI2C_SDER_AVDE_MASK (0x4U) 9923 #define LPI2C_SDER_AVDE_SHIFT (2U) 9924 /*! AVDE - Address Valid DMA Enable 9925 * 0b0..DMA request is disabled 9926 * 0b1..DMA request is enabled 9927 */ 9928 #define LPI2C_SDER_AVDE(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SDER_AVDE_SHIFT)) & LPI2C_SDER_AVDE_MASK) 9929 /*! @} */ 9930 9931 /*! @name SCFGR1 - Slave Configuration Register 1 */ 9932 /*! @{ */ 9933 #define LPI2C_SCFGR1_ADRSTALL_MASK (0x1U) 9934 #define LPI2C_SCFGR1_ADRSTALL_SHIFT (0U) 9935 /*! ADRSTALL - Address SCL Stall 9936 * 0b0..Clock stretching is disabled 9937 * 0b1..Clock stretching is enabled 9938 */ 9939 #define LPI2C_SCFGR1_ADRSTALL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ADRSTALL_SHIFT)) & LPI2C_SCFGR1_ADRSTALL_MASK) 9940 #define LPI2C_SCFGR1_RXSTALL_MASK (0x2U) 9941 #define LPI2C_SCFGR1_RXSTALL_SHIFT (1U) 9942 /*! RXSTALL - RX SCL Stall 9943 * 0b0..Clock stretching is disabled 9944 * 0b1..Clock stretching is enabled 9945 */ 9946 #define LPI2C_SCFGR1_RXSTALL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_RXSTALL_SHIFT)) & LPI2C_SCFGR1_RXSTALL_MASK) 9947 #define LPI2C_SCFGR1_TXDSTALL_MASK (0x4U) 9948 #define LPI2C_SCFGR1_TXDSTALL_SHIFT (2U) 9949 /*! TXDSTALL - TX Data SCL Stall 9950 * 0b0..Clock stretching is disabled 9951 * 0b1..Clock stretching is enabled 9952 */ 9953 #define LPI2C_SCFGR1_TXDSTALL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_TXDSTALL_SHIFT)) & LPI2C_SCFGR1_TXDSTALL_MASK) 9954 #define LPI2C_SCFGR1_ACKSTALL_MASK (0x8U) 9955 #define LPI2C_SCFGR1_ACKSTALL_SHIFT (3U) 9956 /*! ACKSTALL - ACK SCL Stall 9957 * 0b0..Clock stretching is disabled 9958 * 0b1..Clock stretching is enabled 9959 */ 9960 #define LPI2C_SCFGR1_ACKSTALL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ACKSTALL_SHIFT)) & LPI2C_SCFGR1_ACKSTALL_MASK) 9961 #define LPI2C_SCFGR1_GCEN_MASK (0x100U) 9962 #define LPI2C_SCFGR1_GCEN_SHIFT (8U) 9963 /*! GCEN - General Call Enable 9964 * 0b0..General Call address is disabled 9965 * 0b1..General Call address is enabled 9966 */ 9967 #define LPI2C_SCFGR1_GCEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_GCEN_SHIFT)) & LPI2C_SCFGR1_GCEN_MASK) 9968 #define LPI2C_SCFGR1_SAEN_MASK (0x200U) 9969 #define LPI2C_SCFGR1_SAEN_SHIFT (9U) 9970 /*! SAEN - SMBus Alert Enable 9971 * 0b0..Disables match on SMBus Alert 9972 * 0b1..Enables match on SMBus Alert 9973 */ 9974 #define LPI2C_SCFGR1_SAEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_SAEN_SHIFT)) & LPI2C_SCFGR1_SAEN_MASK) 9975 #define LPI2C_SCFGR1_TXCFG_MASK (0x400U) 9976 #define LPI2C_SCFGR1_TXCFG_SHIFT (10U) 9977 /*! TXCFG - Transmit Flag Configuration 9978 * 0b0..Transmit Data Flag will only assert during a slave-transmit transfer when the Transmit Data register is empty 9979 * 0b1..Transmit Data Flag will assert whenever the Transmit Data register is empty 9980 */ 9981 #define LPI2C_SCFGR1_TXCFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_TXCFG_SHIFT)) & LPI2C_SCFGR1_TXCFG_MASK) 9982 #define LPI2C_SCFGR1_RXCFG_MASK (0x800U) 9983 #define LPI2C_SCFGR1_RXCFG_SHIFT (11U) 9984 /*! RXCFG - Receive Data Configuration 9985 * 0b0..Reading the Receive Data register will return received data and clear the Receive Data flag (MSR[RDF]). 9986 * 0b1..Reading the Receive Data register when the Address Valid flag (SSR[AVF])is set, will return the Address 9987 * Status register and clear the Address Valid flag. Reading the Receive Data register when the Address Valid 9988 * flag is clear, will return received data and clear the Receive Data flag (MSR[RDF]). 9989 */ 9990 #define LPI2C_SCFGR1_RXCFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_RXCFG_SHIFT)) & LPI2C_SCFGR1_RXCFG_MASK) 9991 #define LPI2C_SCFGR1_IGNACK_MASK (0x1000U) 9992 #define LPI2C_SCFGR1_IGNACK_SHIFT (12U) 9993 /*! IGNACK - Ignore NACK 9994 * 0b0..Slave will end transfer when NACK is detected 9995 * 0b1..Slave will not end transfer when NACK detected 9996 */ 9997 #define LPI2C_SCFGR1_IGNACK(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_IGNACK_SHIFT)) & LPI2C_SCFGR1_IGNACK_MASK) 9998 #define LPI2C_SCFGR1_HSMEN_MASK (0x2000U) 9999 #define LPI2C_SCFGR1_HSMEN_SHIFT (13U) 10000 /*! HSMEN - High Speed Mode Enable 10001 * 0b0..Disables detection of HS-mode master code 10002 * 0b1..Enables detection of HS-mode master code 10003 */ 10004 #define LPI2C_SCFGR1_HSMEN(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_HSMEN_SHIFT)) & LPI2C_SCFGR1_HSMEN_MASK) 10005 #define LPI2C_SCFGR1_ADDRCFG_MASK (0x70000U) 10006 #define LPI2C_SCFGR1_ADDRCFG_SHIFT (16U) 10007 /*! ADDRCFG - Address Configuration 10008 * 0b000..Address match 0 (7-bit) 10009 * 0b001..Address match 0 (10-bit) 10010 * 0b010..Address match 0 (7-bit) or Address match 1 (7-bit) 10011 * 0b011..Address match 0 (10-bit) or Address match 1 (10-bit) 10012 * 0b100..Address match 0 (7-bit) or Address match 1 (10-bit) 10013 * 0b101..Address match 0 (10-bit) or Address match 1 (7-bit) 10014 * 0b110..From Address match 0 (7-bit) to Address match 1 (7-bit) 10015 * 0b111..From Address match 0 (10-bit) to Address match 1 (10-bit) 10016 */ 10017 #define LPI2C_SCFGR1_ADDRCFG(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR1_ADDRCFG_SHIFT)) & LPI2C_SCFGR1_ADDRCFG_MASK) 10018 /*! @} */ 10019 10020 /*! @name SCFGR2 - Slave Configuration Register 2 */ 10021 /*! @{ */ 10022 #define LPI2C_SCFGR2_CLKHOLD_MASK (0xFU) 10023 #define LPI2C_SCFGR2_CLKHOLD_SHIFT (0U) 10024 #define LPI2C_SCFGR2_CLKHOLD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_CLKHOLD_SHIFT)) & LPI2C_SCFGR2_CLKHOLD_MASK) 10025 #define LPI2C_SCFGR2_DATAVD_MASK (0x3F00U) 10026 #define LPI2C_SCFGR2_DATAVD_SHIFT (8U) 10027 #define LPI2C_SCFGR2_DATAVD(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_DATAVD_SHIFT)) & LPI2C_SCFGR2_DATAVD_MASK) 10028 #define LPI2C_SCFGR2_FILTSCL_MASK (0xF0000U) 10029 #define LPI2C_SCFGR2_FILTSCL_SHIFT (16U) 10030 #define LPI2C_SCFGR2_FILTSCL(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_FILTSCL_SHIFT)) & LPI2C_SCFGR2_FILTSCL_MASK) 10031 #define LPI2C_SCFGR2_FILTSDA_MASK (0xF000000U) 10032 #define LPI2C_SCFGR2_FILTSDA_SHIFT (24U) 10033 #define LPI2C_SCFGR2_FILTSDA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SCFGR2_FILTSDA_SHIFT)) & LPI2C_SCFGR2_FILTSDA_MASK) 10034 /*! @} */ 10035 10036 /*! @name SAMR - Slave Address Match Register */ 10037 /*! @{ */ 10038 #define LPI2C_SAMR_ADDR0_MASK (0x7FEU) 10039 #define LPI2C_SAMR_ADDR0_SHIFT (1U) 10040 #define LPI2C_SAMR_ADDR0(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SAMR_ADDR0_SHIFT)) & LPI2C_SAMR_ADDR0_MASK) 10041 #define LPI2C_SAMR_ADDR1_MASK (0x7FE0000U) 10042 #define LPI2C_SAMR_ADDR1_SHIFT (17U) 10043 #define LPI2C_SAMR_ADDR1(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SAMR_ADDR1_SHIFT)) & LPI2C_SAMR_ADDR1_MASK) 10044 /*! @} */ 10045 10046 /*! @name SASR - Slave Address Status Register */ 10047 /*! @{ */ 10048 #define LPI2C_SASR_RADDR_MASK (0x7FFU) 10049 #define LPI2C_SASR_RADDR_SHIFT (0U) 10050 #define LPI2C_SASR_RADDR(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SASR_RADDR_SHIFT)) & LPI2C_SASR_RADDR_MASK) 10051 #define LPI2C_SASR_ANV_MASK (0x4000U) 10052 #define LPI2C_SASR_ANV_SHIFT (14U) 10053 /*! ANV - Address Not Valid 10054 * 0b0..Received Address (RADDR) is valid 10055 * 0b1..Received Address (RADDR) is not valid 10056 */ 10057 #define LPI2C_SASR_ANV(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SASR_ANV_SHIFT)) & LPI2C_SASR_ANV_MASK) 10058 /*! @} */ 10059 10060 /*! @name STAR - Slave Transmit ACK Register */ 10061 /*! @{ */ 10062 #define LPI2C_STAR_TXNACK_MASK (0x1U) 10063 #define LPI2C_STAR_TXNACK_SHIFT (0U) 10064 /*! TXNACK - Transmit NACK 10065 * 0b0..Write a Transmit ACK for each received word 10066 * 0b1..Write a Transmit NACK for each received word 10067 */ 10068 #define LPI2C_STAR_TXNACK(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_STAR_TXNACK_SHIFT)) & LPI2C_STAR_TXNACK_MASK) 10069 /*! @} */ 10070 10071 /*! @name STDR - Slave Transmit Data Register */ 10072 /*! @{ */ 10073 #define LPI2C_STDR_DATA_MASK (0xFFU) 10074 #define LPI2C_STDR_DATA_SHIFT (0U) 10075 #define LPI2C_STDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_STDR_DATA_SHIFT)) & LPI2C_STDR_DATA_MASK) 10076 /*! @} */ 10077 10078 /*! @name SRDR - Slave Receive Data Register */ 10079 /*! @{ */ 10080 #define LPI2C_SRDR_DATA_MASK (0xFFU) 10081 #define LPI2C_SRDR_DATA_SHIFT (0U) 10082 #define LPI2C_SRDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_DATA_SHIFT)) & LPI2C_SRDR_DATA_MASK) 10083 #define LPI2C_SRDR_RXEMPTY_MASK (0x4000U) 10084 #define LPI2C_SRDR_RXEMPTY_SHIFT (14U) 10085 /*! RXEMPTY - RX Empty 10086 * 0b0..The Receive Data Register is not empty 10087 * 0b1..The Receive Data Register is empty 10088 */ 10089 #define LPI2C_SRDR_RXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_RXEMPTY_SHIFT)) & LPI2C_SRDR_RXEMPTY_MASK) 10090 #define LPI2C_SRDR_SOF_MASK (0x8000U) 10091 #define LPI2C_SRDR_SOF_SHIFT (15U) 10092 /*! SOF - Start Of Frame 10093 * 0b0..Indicates this is not the first data word since a (repeated) START or STOP condition 10094 * 0b1..Indicates this is the first data word since a (repeated) START or STOP condition 10095 */ 10096 #define LPI2C_SRDR_SOF(x) (((uint32_t)(((uint32_t)(x)) << LPI2C_SRDR_SOF_SHIFT)) & LPI2C_SRDR_SOF_MASK) 10097 /*! @} */ 10098 10099 10100 /*! 10101 * @} 10102 */ /* end of group LPI2C_Register_Masks */ 10103 10104 10105 /* LPI2C - Peripheral instance base addresses */ 10106 /** Peripheral LPI2C0 base address */ 10107 #define LPI2C0_BASE (0x4003A000u) 10108 /** Peripheral LPI2C0 base pointer */ 10109 #define LPI2C0 ((LPI2C_Type *)LPI2C0_BASE) 10110 /** Peripheral LPI2C1 base address */ 10111 #define LPI2C1_BASE (0x4003B000u) 10112 /** Peripheral LPI2C1 base pointer */ 10113 #define LPI2C1 ((LPI2C_Type *)LPI2C1_BASE) 10114 /** Peripheral LPI2C2 base address */ 10115 #define LPI2C2_BASE (0x4003C000u) 10116 /** Peripheral LPI2C2 base pointer */ 10117 #define LPI2C2 ((LPI2C_Type *)LPI2C2_BASE) 10118 /** Peripheral LPI2C3 base address */ 10119 #define LPI2C3_BASE (0x4102E000u) 10120 /** Peripheral LPI2C3 base pointer */ 10121 #define LPI2C3 ((LPI2C_Type *)LPI2C3_BASE) 10122 /** Array initializer of LPI2C peripheral base addresses */ 10123 #define LPI2C_BASE_ADDRS { LPI2C0_BASE, LPI2C1_BASE, LPI2C2_BASE, LPI2C3_BASE } 10124 /** Array initializer of LPI2C peripheral base pointers */ 10125 #define LPI2C_BASE_PTRS { LPI2C0, LPI2C1, LPI2C2, LPI2C3 } 10126 /** Interrupt vectors for the LPI2C peripheral type */ 10127 #define LPI2C_IRQS { LPI2C0_IRQn, LPI2C1_IRQn, LPI2C2_IRQn, LPI2C3_IRQn } 10128 10129 /*! 10130 * @} 10131 */ /* end of group LPI2C_Peripheral_Access_Layer */ 10132 10133 10134 /* ---------------------------------------------------------------------------- 10135 -- LPIT Peripheral Access Layer 10136 ---------------------------------------------------------------------------- */ 10137 10138 /*! 10139 * @addtogroup LPIT_Peripheral_Access_Layer LPIT Peripheral Access Layer 10140 * @{ 10141 */ 10142 10143 /** LPIT - Register Layout Typedef */ 10144 typedef struct { 10145 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 10146 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 10147 __IO uint32_t MCR; /**< Module Control Register, offset: 0x8 */ 10148 __IO uint32_t MSR; /**< Module Status Register, offset: 0xC */ 10149 __IO uint32_t MIER; /**< Module Interrupt Enable Register, offset: 0x10 */ 10150 __IO uint32_t SETTEN; /**< Set Timer Enable Register, offset: 0x14 */ 10151 __O uint32_t CLRTEN; /**< Clear Timer Enable Register, offset: 0x18 */ 10152 uint8_t RESERVED_0[4]; 10153 struct { /* offset: 0x20, array step: 0x10 */ 10154 __IO uint32_t TVAL; /**< Timer Value Register, array offset: 0x20, array step: 0x10 */ 10155 __I uint32_t CVAL; /**< Current Timer Value, array offset: 0x24, array step: 0x10 */ 10156 __IO uint32_t TCTRL; /**< Timer Control Register, array offset: 0x28, array step: 0x10 */ 10157 uint8_t RESERVED_0[4]; 10158 } CHANNEL[4]; 10159 } LPIT_Type; 10160 10161 /* ---------------------------------------------------------------------------- 10162 -- LPIT Register Masks 10163 ---------------------------------------------------------------------------- */ 10164 10165 /*! 10166 * @addtogroup LPIT_Register_Masks LPIT Register Masks 10167 * @{ 10168 */ 10169 10170 /*! @name VERID - Version ID Register */ 10171 /*! @{ */ 10172 #define LPIT_VERID_FEATURE_MASK (0xFFFFU) 10173 #define LPIT_VERID_FEATURE_SHIFT (0U) 10174 #define LPIT_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_FEATURE_SHIFT)) & LPIT_VERID_FEATURE_MASK) 10175 #define LPIT_VERID_MINOR_MASK (0xFF0000U) 10176 #define LPIT_VERID_MINOR_SHIFT (16U) 10177 #define LPIT_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_MINOR_SHIFT)) & LPIT_VERID_MINOR_MASK) 10178 #define LPIT_VERID_MAJOR_MASK (0xFF000000U) 10179 #define LPIT_VERID_MAJOR_SHIFT (24U) 10180 #define LPIT_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPIT_VERID_MAJOR_SHIFT)) & LPIT_VERID_MAJOR_MASK) 10181 /*! @} */ 10182 10183 /*! @name PARAM - Parameter Register */ 10184 /*! @{ */ 10185 #define LPIT_PARAM_CHANNEL_MASK (0xFFU) 10186 #define LPIT_PARAM_CHANNEL_SHIFT (0U) 10187 #define LPIT_PARAM_CHANNEL(x) (((uint32_t)(((uint32_t)(x)) << LPIT_PARAM_CHANNEL_SHIFT)) & LPIT_PARAM_CHANNEL_MASK) 10188 #define LPIT_PARAM_EXT_TRIG_MASK (0xFF00U) 10189 #define LPIT_PARAM_EXT_TRIG_SHIFT (8U) 10190 #define LPIT_PARAM_EXT_TRIG(x) (((uint32_t)(((uint32_t)(x)) << LPIT_PARAM_EXT_TRIG_SHIFT)) & LPIT_PARAM_EXT_TRIG_MASK) 10191 /*! @} */ 10192 10193 /*! @name MCR - Module Control Register */ 10194 /*! @{ */ 10195 #define LPIT_MCR_M_CEN_MASK (0x1U) 10196 #define LPIT_MCR_M_CEN_SHIFT (0U) 10197 /*! M_CEN - Module Clock Enable 10198 * 0b0..Disable peripheral clock to timers 10199 * 0b1..Enable peripheral clock to timers 10200 */ 10201 #define LPIT_MCR_M_CEN(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_M_CEN_SHIFT)) & LPIT_MCR_M_CEN_MASK) 10202 #define LPIT_MCR_SW_RST_MASK (0x2U) 10203 #define LPIT_MCR_SW_RST_SHIFT (1U) 10204 /*! SW_RST - Software Reset Bit 10205 * 0b0..Timer channels and registers are not reset 10206 * 0b1..Reset timer channels and registers 10207 */ 10208 #define LPIT_MCR_SW_RST(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_SW_RST_SHIFT)) & LPIT_MCR_SW_RST_MASK) 10209 #define LPIT_MCR_DOZE_EN_MASK (0x4U) 10210 #define LPIT_MCR_DOZE_EN_SHIFT (2U) 10211 /*! DOZE_EN - DOZE Mode Enable Bit 10212 * 0b0..Stop timer channels in DOZE mode 10213 * 0b1..Allow timer channels to continue to run in DOZE mode 10214 */ 10215 #define LPIT_MCR_DOZE_EN(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_DOZE_EN_SHIFT)) & LPIT_MCR_DOZE_EN_MASK) 10216 #define LPIT_MCR_DBG_EN_MASK (0x8U) 10217 #define LPIT_MCR_DBG_EN_SHIFT (3U) 10218 /*! DBG_EN - Debug Enable Bit 10219 * 0b0..Stop timer channels in Debug mode 10220 * 0b1..Allow timer channels to continue to run in Debug mode 10221 */ 10222 #define LPIT_MCR_DBG_EN(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MCR_DBG_EN_SHIFT)) & LPIT_MCR_DBG_EN_MASK) 10223 /*! @} */ 10224 10225 /*! @name MSR - Module Status Register */ 10226 /*! @{ */ 10227 #define LPIT_MSR_TIF0_MASK (0x1U) 10228 #define LPIT_MSR_TIF0_SHIFT (0U) 10229 /*! TIF0 - Channel 0 Timer Interrupt Flag 10230 * 0b0..Timer has not timed out 10231 * 0b1..Timeout has occurred (timer has timed out) 10232 */ 10233 #define LPIT_MSR_TIF0(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF0_SHIFT)) & LPIT_MSR_TIF0_MASK) 10234 #define LPIT_MSR_TIF1_MASK (0x2U) 10235 #define LPIT_MSR_TIF1_SHIFT (1U) 10236 /*! TIF1 - Channel 1 Timer Interrupt Flag 10237 * 0b0..Timer has not timed out 10238 * 0b1..Timeout has occurred (timer has timed out) 10239 */ 10240 #define LPIT_MSR_TIF1(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF1_SHIFT)) & LPIT_MSR_TIF1_MASK) 10241 #define LPIT_MSR_TIF2_MASK (0x4U) 10242 #define LPIT_MSR_TIF2_SHIFT (2U) 10243 /*! TIF2 - Channel 2 Timer Interrupt Flag 10244 * 0b0..Timer has not timed out 10245 * 0b1..Timeout has occurred (timer has timed out) 10246 */ 10247 #define LPIT_MSR_TIF2(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF2_SHIFT)) & LPIT_MSR_TIF2_MASK) 10248 #define LPIT_MSR_TIF3_MASK (0x8U) 10249 #define LPIT_MSR_TIF3_SHIFT (3U) 10250 /*! TIF3 - Channel 3 Timer Interrupt Flag 10251 * 0b0..Timer has not timed out 10252 * 0b1..Timeout has occurred (timer has timed out) 10253 */ 10254 #define LPIT_MSR_TIF3(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MSR_TIF3_SHIFT)) & LPIT_MSR_TIF3_MASK) 10255 /*! @} */ 10256 10257 /*! @name MIER - Module Interrupt Enable Register */ 10258 /*! @{ */ 10259 #define LPIT_MIER_TIE0_MASK (0x1U) 10260 #define LPIT_MIER_TIE0_SHIFT (0U) 10261 /*! TIE0 - Channel 0 Timer Interrupt Enable 10262 * 0b0..Disabled 10263 * 0b1..Enabled 10264 */ 10265 #define LPIT_MIER_TIE0(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE0_SHIFT)) & LPIT_MIER_TIE0_MASK) 10266 #define LPIT_MIER_TIE1_MASK (0x2U) 10267 #define LPIT_MIER_TIE1_SHIFT (1U) 10268 /*! TIE1 - Channel 1 Timer Interrupt Enable 10269 * 0b0..Disabled 10270 * 0b1..Enabled 10271 */ 10272 #define LPIT_MIER_TIE1(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE1_SHIFT)) & LPIT_MIER_TIE1_MASK) 10273 #define LPIT_MIER_TIE2_MASK (0x4U) 10274 #define LPIT_MIER_TIE2_SHIFT (2U) 10275 /*! TIE2 - Channel 2 Timer Interrupt Enable 10276 * 0b0..Disabled 10277 * 0b1..Enabled 10278 */ 10279 #define LPIT_MIER_TIE2(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE2_SHIFT)) & LPIT_MIER_TIE2_MASK) 10280 #define LPIT_MIER_TIE3_MASK (0x8U) 10281 #define LPIT_MIER_TIE3_SHIFT (3U) 10282 /*! TIE3 - Channel 3 Timer Interrupt Enable 10283 * 0b0..Disabled 10284 * 0b1..Enabled 10285 */ 10286 #define LPIT_MIER_TIE3(x) (((uint32_t)(((uint32_t)(x)) << LPIT_MIER_TIE3_SHIFT)) & LPIT_MIER_TIE3_MASK) 10287 /*! @} */ 10288 10289 /*! @name SETTEN - Set Timer Enable Register */ 10290 /*! @{ */ 10291 #define LPIT_SETTEN_SET_T_EN_0_MASK (0x1U) 10292 #define LPIT_SETTEN_SET_T_EN_0_SHIFT (0U) 10293 /*! SET_T_EN_0 - Set Timer 0 Enable 10294 * 0b0..No effect 10295 * 0b1..Enables Timer Channel 0 10296 */ 10297 #define LPIT_SETTEN_SET_T_EN_0(x) (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_0_SHIFT)) & LPIT_SETTEN_SET_T_EN_0_MASK) 10298 #define LPIT_SETTEN_SET_T_EN_1_MASK (0x2U) 10299 #define LPIT_SETTEN_SET_T_EN_1_SHIFT (1U) 10300 /*! SET_T_EN_1 - Set Timer 1 Enable 10301 * 0b0..No Effect 10302 * 0b1..Enables Timer Channel 1 10303 */ 10304 #define LPIT_SETTEN_SET_T_EN_1(x) (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_1_SHIFT)) & LPIT_SETTEN_SET_T_EN_1_MASK) 10305 #define LPIT_SETTEN_SET_T_EN_2_MASK (0x4U) 10306 #define LPIT_SETTEN_SET_T_EN_2_SHIFT (2U) 10307 /*! SET_T_EN_2 - Set Timer 2 Enable 10308 * 0b0..No Effect 10309 * 0b1..Enables Timer Channel 2 10310 */ 10311 #define LPIT_SETTEN_SET_T_EN_2(x) (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_2_SHIFT)) & LPIT_SETTEN_SET_T_EN_2_MASK) 10312 #define LPIT_SETTEN_SET_T_EN_3_MASK (0x8U) 10313 #define LPIT_SETTEN_SET_T_EN_3_SHIFT (3U) 10314 /*! SET_T_EN_3 - Set Timer 3 Enable 10315 * 0b0..No effect 10316 * 0b1..Enables Timer Channel 3 10317 */ 10318 #define LPIT_SETTEN_SET_T_EN_3(x) (((uint32_t)(((uint32_t)(x)) << LPIT_SETTEN_SET_T_EN_3_SHIFT)) & LPIT_SETTEN_SET_T_EN_3_MASK) 10319 /*! @} */ 10320 10321 /*! @name CLRTEN - Clear Timer Enable Register */ 10322 /*! @{ */ 10323 #define LPIT_CLRTEN_CLR_T_EN_0_MASK (0x1U) 10324 #define LPIT_CLRTEN_CLR_T_EN_0_SHIFT (0U) 10325 /*! CLR_T_EN_0 - Clear Timer 0 Enable 10326 * 0b0..No action 10327 * 0b1..Clear the Timer Enable bit (TCTRL0[T_EN]) for Timer Channel 0 10328 */ 10329 #define LPIT_CLRTEN_CLR_T_EN_0(x) (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_0_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_0_MASK) 10330 #define LPIT_CLRTEN_CLR_T_EN_1_MASK (0x2U) 10331 #define LPIT_CLRTEN_CLR_T_EN_1_SHIFT (1U) 10332 /*! CLR_T_EN_1 - Clear Timer 1 Enable 10333 * 0b0..No Action 10334 * 0b1..Clear the Timer Enable bit (TCTRL1[T_EN]) for Timer Channel 1 10335 */ 10336 #define LPIT_CLRTEN_CLR_T_EN_1(x) (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_1_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_1_MASK) 10337 #define LPIT_CLRTEN_CLR_T_EN_2_MASK (0x4U) 10338 #define LPIT_CLRTEN_CLR_T_EN_2_SHIFT (2U) 10339 /*! CLR_T_EN_2 - Clear Timer 2 Enable 10340 * 0b0..No Action 10341 * 0b1..Clear the Timer Enable bit (TCTRL2[T_EN]) for Timer Channel 2 10342 */ 10343 #define LPIT_CLRTEN_CLR_T_EN_2(x) (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_2_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_2_MASK) 10344 #define LPIT_CLRTEN_CLR_T_EN_3_MASK (0x8U) 10345 #define LPIT_CLRTEN_CLR_T_EN_3_SHIFT (3U) 10346 /*! CLR_T_EN_3 - Clear Timer 3 Enable 10347 * 0b0..No Action 10348 * 0b1..Clear the Timer Enable bit (TCTRL3[T_EN]) for Timer Channel 3 10349 */ 10350 #define LPIT_CLRTEN_CLR_T_EN_3(x) (((uint32_t)(((uint32_t)(x)) << LPIT_CLRTEN_CLR_T_EN_3_SHIFT)) & LPIT_CLRTEN_CLR_T_EN_3_MASK) 10351 /*! @} */ 10352 10353 /*! @name TVAL - Timer Value Register */ 10354 /*! @{ */ 10355 #define LPIT_TVAL_TMR_VAL_MASK (0xFFFFFFFFU) 10356 #define LPIT_TVAL_TMR_VAL_SHIFT (0U) 10357 /*! TMR_VAL - Timer Value 10358 * 0b00000000000000000000000000000000..Invalid load value in compare mode 10359 * 0b00000000000000000000000000000001..Invalid load value in compare mode 10360 * 0b00000000000000000000000000000010-0b11111111111111111111111111111111..In compare mode: the value to be loaded; in capture mode, the value of the timer 10361 */ 10362 #define LPIT_TVAL_TMR_VAL(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TVAL_TMR_VAL_SHIFT)) & LPIT_TVAL_TMR_VAL_MASK) 10363 /*! @} */ 10364 10365 /* The count of LPIT_TVAL */ 10366 #define LPIT_TVAL_COUNT (4U) 10367 10368 /*! @name CVAL - Current Timer Value */ 10369 /*! @{ */ 10370 #define LPIT_CVAL_TMR_CUR_VAL_MASK (0xFFFFFFFFU) 10371 #define LPIT_CVAL_TMR_CUR_VAL_SHIFT (0U) 10372 #define LPIT_CVAL_TMR_CUR_VAL(x) (((uint32_t)(((uint32_t)(x)) << LPIT_CVAL_TMR_CUR_VAL_SHIFT)) & LPIT_CVAL_TMR_CUR_VAL_MASK) 10373 /*! @} */ 10374 10375 /* The count of LPIT_CVAL */ 10376 #define LPIT_CVAL_COUNT (4U) 10377 10378 /*! @name TCTRL - Timer Control Register */ 10379 /*! @{ */ 10380 #define LPIT_TCTRL_T_EN_MASK (0x1U) 10381 #define LPIT_TCTRL_T_EN_SHIFT (0U) 10382 /*! T_EN - Timer Enable 10383 * 0b0..Timer Channel is disabled 10384 * 0b1..Timer Channel is enabled 10385 */ 10386 #define LPIT_TCTRL_T_EN(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_T_EN_SHIFT)) & LPIT_TCTRL_T_EN_MASK) 10387 #define LPIT_TCTRL_CHAIN_MASK (0x2U) 10388 #define LPIT_TCTRL_CHAIN_SHIFT (1U) 10389 /*! CHAIN - Chain Channel 10390 * 0b0..Channel Chaining is disabled. The channel timer runs independently. 10391 * 0b1..Channel Chaining is enabled. The timer decrements on the previous channel's timeout. 10392 */ 10393 #define LPIT_TCTRL_CHAIN(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_CHAIN_SHIFT)) & LPIT_TCTRL_CHAIN_MASK) 10394 #define LPIT_TCTRL_MODE_MASK (0xCU) 10395 #define LPIT_TCTRL_MODE_SHIFT (2U) 10396 /*! MODE - Timer Operation Mode 10397 * 0b00..32-bit Periodic Counter 10398 * 0b01..Dual 16-bit Periodic Counter 10399 * 0b10..32-bit Trigger Accumulator 10400 * 0b11..32-bit Trigger Input Capture 10401 */ 10402 #define LPIT_TCTRL_MODE(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_MODE_SHIFT)) & LPIT_TCTRL_MODE_MASK) 10403 #define LPIT_TCTRL_TSOT_MASK (0x10000U) 10404 #define LPIT_TCTRL_TSOT_SHIFT (16U) 10405 /*! TSOT - Timer Start On Trigger 10406 * 0b0..Timer starts to decrement immediately based on the restart condition (controlled by the Timer Stop On Interrupt bit (TSOI)) 10407 * 0b1..Timer starts to decrement when a rising edge on a selected trigger is detected 10408 */ 10409 #define LPIT_TCTRL_TSOT(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TSOT_SHIFT)) & LPIT_TCTRL_TSOT_MASK) 10410 #define LPIT_TCTRL_TSOI_MASK (0x20000U) 10411 #define LPIT_TCTRL_TSOI_SHIFT (17U) 10412 /*! TSOI - Timer Stop On Interrupt 10413 * 0b0..The channel timer does not stop after timeout 10414 * 0b1..The channel timer will stop after a timeout, and the channel timer will restart based on Timer Start On 10415 * Trigger bit (TSOT). When TSOT = 0, the channel timer will restart after a rising edge on the Timer Enable 10416 * bit (T_EN) is detected (which means that the timer channel is disabled and then enabled). When TSOT = 1, 10417 * the channel timer will restart after a rising edge on the selected trigger is detected. 10418 */ 10419 #define LPIT_TCTRL_TSOI(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TSOI_SHIFT)) & LPIT_TCTRL_TSOI_MASK) 10420 #define LPIT_TCTRL_TROT_MASK (0x40000U) 10421 #define LPIT_TCTRL_TROT_SHIFT (18U) 10422 /*! TROT - Timer Reload On Trigger 10423 * 0b0..Timer will not reload on the selected trigger 10424 * 0b1..Timer will reload on the selected trigger 10425 */ 10426 #define LPIT_TCTRL_TROT(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TROT_SHIFT)) & LPIT_TCTRL_TROT_MASK) 10427 #define LPIT_TCTRL_TRG_SRC_MASK (0x800000U) 10428 #define LPIT_TCTRL_TRG_SRC_SHIFT (23U) 10429 /*! TRG_SRC - Trigger Source 10430 * 0b0..Selects external triggers 10431 * 0b1..Selects internal triggers 10432 */ 10433 #define LPIT_TCTRL_TRG_SRC(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TRG_SRC_SHIFT)) & LPIT_TCTRL_TRG_SRC_MASK) 10434 #define LPIT_TCTRL_TRG_SEL_MASK (0xF000000U) 10435 #define LPIT_TCTRL_TRG_SEL_SHIFT (24U) 10436 /*! TRG_SEL - Trigger Select 10437 * 0b0000-0b0011..Timer channel 0 - 3 trigger source is selected 10438 * 0b0100-0b1111..Reserved 10439 */ 10440 #define LPIT_TCTRL_TRG_SEL(x) (((uint32_t)(((uint32_t)(x)) << LPIT_TCTRL_TRG_SEL_SHIFT)) & LPIT_TCTRL_TRG_SEL_MASK) 10441 /*! @} */ 10442 10443 /* The count of LPIT_TCTRL */ 10444 #define LPIT_TCTRL_COUNT (4U) 10445 10446 10447 /*! 10448 * @} 10449 */ /* end of group LPIT_Register_Masks */ 10450 10451 10452 /* LPIT - Peripheral instance base addresses */ 10453 /** Peripheral LPIT0 base address */ 10454 #define LPIT0_BASE (0x40030000u) 10455 /** Peripheral LPIT0 base pointer */ 10456 #define LPIT0 ((LPIT_Type *)LPIT0_BASE) 10457 /** Peripheral LPIT1 base address */ 10458 #define LPIT1_BASE (0x4102A000u) 10459 /** Peripheral LPIT1 base pointer */ 10460 #define LPIT1 ((LPIT_Type *)LPIT1_BASE) 10461 /** Array initializer of LPIT peripheral base addresses */ 10462 #define LPIT_BASE_ADDRS { LPIT0_BASE, LPIT1_BASE } 10463 /** Array initializer of LPIT peripheral base pointers */ 10464 #define LPIT_BASE_PTRS { LPIT0, LPIT1 } 10465 /** Interrupt vectors for the LPIT peripheral type */ 10466 #define LPIT_IRQS { { LPIT0_IRQn, LPIT0_IRQn, LPIT0_IRQn, LPIT0_IRQn }, { LPIT1_IRQn, LPIT1_IRQn, LPIT1_IRQn, LPIT1_IRQn } } 10467 10468 /*! 10469 * @} 10470 */ /* end of group LPIT_Peripheral_Access_Layer */ 10471 10472 10473 /* ---------------------------------------------------------------------------- 10474 -- LPSPI Peripheral Access Layer 10475 ---------------------------------------------------------------------------- */ 10476 10477 /*! 10478 * @addtogroup LPSPI_Peripheral_Access_Layer LPSPI Peripheral Access Layer 10479 * @{ 10480 */ 10481 10482 /** LPSPI - Register Layout Typedef */ 10483 typedef struct { 10484 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 10485 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 10486 uint8_t RESERVED_0[8]; 10487 __IO uint32_t CR; /**< Control Register, offset: 0x10 */ 10488 __IO uint32_t SR; /**< Status Register, offset: 0x14 */ 10489 __IO uint32_t IER; /**< Interrupt Enable Register, offset: 0x18 */ 10490 __IO uint32_t DER; /**< DMA Enable Register, offset: 0x1C */ 10491 __IO uint32_t CFGR0; /**< Configuration Register 0, offset: 0x20 */ 10492 __IO uint32_t CFGR1; /**< Configuration Register 1, offset: 0x24 */ 10493 uint8_t RESERVED_1[8]; 10494 __IO uint32_t DMR0; /**< Data Match Register 0, offset: 0x30 */ 10495 __IO uint32_t DMR1; /**< Data Match Register 1, offset: 0x34 */ 10496 uint8_t RESERVED_2[8]; 10497 __IO uint32_t CCR; /**< Clock Configuration Register, offset: 0x40 */ 10498 uint8_t RESERVED_3[20]; 10499 __IO uint32_t FCR; /**< FIFO Control Register, offset: 0x58 */ 10500 __I uint32_t FSR; /**< FIFO Status Register, offset: 0x5C */ 10501 __IO uint32_t TCR; /**< Transmit Command Register, offset: 0x60 */ 10502 __O uint32_t TDR; /**< Transmit Data Register, offset: 0x64 */ 10503 uint8_t RESERVED_4[8]; 10504 __I uint32_t RSR; /**< Receive Status Register, offset: 0x70 */ 10505 __I uint32_t RDR; /**< Receive Data Register, offset: 0x74 */ 10506 } LPSPI_Type; 10507 10508 /* ---------------------------------------------------------------------------- 10509 -- LPSPI Register Masks 10510 ---------------------------------------------------------------------------- */ 10511 10512 /*! 10513 * @addtogroup LPSPI_Register_Masks LPSPI Register Masks 10514 * @{ 10515 */ 10516 10517 /*! @name VERID - Version ID Register */ 10518 /*! @{ */ 10519 #define LPSPI_VERID_FEATURE_MASK (0xFFFFU) 10520 #define LPSPI_VERID_FEATURE_SHIFT (0U) 10521 /*! FEATURE - Module Identification Number 10522 * 0b0000000000000100..Standard feature set supporting a 32-bit shift register. 10523 */ 10524 #define LPSPI_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_FEATURE_SHIFT)) & LPSPI_VERID_FEATURE_MASK) 10525 #define LPSPI_VERID_MINOR_MASK (0xFF0000U) 10526 #define LPSPI_VERID_MINOR_SHIFT (16U) 10527 #define LPSPI_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_MINOR_SHIFT)) & LPSPI_VERID_MINOR_MASK) 10528 #define LPSPI_VERID_MAJOR_MASK (0xFF000000U) 10529 #define LPSPI_VERID_MAJOR_SHIFT (24U) 10530 #define LPSPI_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_VERID_MAJOR_SHIFT)) & LPSPI_VERID_MAJOR_MASK) 10531 /*! @} */ 10532 10533 /*! @name PARAM - Parameter Register */ 10534 /*! @{ */ 10535 #define LPSPI_PARAM_TXFIFO_MASK (0xFFU) 10536 #define LPSPI_PARAM_TXFIFO_SHIFT (0U) 10537 #define LPSPI_PARAM_TXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_PARAM_TXFIFO_SHIFT)) & LPSPI_PARAM_TXFIFO_MASK) 10538 #define LPSPI_PARAM_RXFIFO_MASK (0xFF00U) 10539 #define LPSPI_PARAM_RXFIFO_SHIFT (8U) 10540 #define LPSPI_PARAM_RXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_PARAM_RXFIFO_SHIFT)) & LPSPI_PARAM_RXFIFO_MASK) 10541 /*! @} */ 10542 10543 /*! @name CR - Control Register */ 10544 /*! @{ */ 10545 #define LPSPI_CR_MEN_MASK (0x1U) 10546 #define LPSPI_CR_MEN_SHIFT (0U) 10547 /*! MEN - Module Enable 10548 * 0b0..Module is disabled 10549 * 0b1..Module is enabled 10550 */ 10551 #define LPSPI_CR_MEN(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_MEN_SHIFT)) & LPSPI_CR_MEN_MASK) 10552 #define LPSPI_CR_RST_MASK (0x2U) 10553 #define LPSPI_CR_RST_SHIFT (1U) 10554 /*! RST - Software Reset 10555 * 0b0..Master logic is not reset 10556 * 0b1..Master logic is reset 10557 */ 10558 #define LPSPI_CR_RST(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RST_SHIFT)) & LPSPI_CR_RST_MASK) 10559 #define LPSPI_CR_DOZEN_MASK (0x4U) 10560 #define LPSPI_CR_DOZEN_SHIFT (2U) 10561 /*! DOZEN - Doze mode enable 10562 * 0b0..Module is enabled in Doze mode 10563 * 0b1..Module is disabled in Doze mode 10564 */ 10565 #define LPSPI_CR_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_DOZEN_SHIFT)) & LPSPI_CR_DOZEN_MASK) 10566 #define LPSPI_CR_DBGEN_MASK (0x8U) 10567 #define LPSPI_CR_DBGEN_SHIFT (3U) 10568 /*! DBGEN - Debug Enable 10569 * 0b0..Module is disabled in debug mode 10570 * 0b1..Module is enabled in debug mode 10571 */ 10572 #define LPSPI_CR_DBGEN(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_DBGEN_SHIFT)) & LPSPI_CR_DBGEN_MASK) 10573 #define LPSPI_CR_RTF_MASK (0x100U) 10574 #define LPSPI_CR_RTF_SHIFT (8U) 10575 /*! RTF - Reset Transmit FIFO 10576 * 0b0..No effect 10577 * 0b1..Transmit FIFO is reset 10578 */ 10579 #define LPSPI_CR_RTF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RTF_SHIFT)) & LPSPI_CR_RTF_MASK) 10580 #define LPSPI_CR_RRF_MASK (0x200U) 10581 #define LPSPI_CR_RRF_SHIFT (9U) 10582 /*! RRF - Reset Receive FIFO 10583 * 0b0..No effect 10584 * 0b1..Receive FIFO is reset 10585 */ 10586 #define LPSPI_CR_RRF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CR_RRF_SHIFT)) & LPSPI_CR_RRF_MASK) 10587 /*! @} */ 10588 10589 /*! @name SR - Status Register */ 10590 /*! @{ */ 10591 #define LPSPI_SR_TDF_MASK (0x1U) 10592 #define LPSPI_SR_TDF_SHIFT (0U) 10593 /*! TDF - Transmit Data Flag 10594 * 0b0..Transmit data not requested 10595 * 0b1..Transmit data is requested 10596 */ 10597 #define LPSPI_SR_TDF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TDF_SHIFT)) & LPSPI_SR_TDF_MASK) 10598 #define LPSPI_SR_RDF_MASK (0x2U) 10599 #define LPSPI_SR_RDF_SHIFT (1U) 10600 /*! RDF - Receive Data Flag 10601 * 0b0..Receive Data is not ready 10602 * 0b1..Receive data is ready 10603 */ 10604 #define LPSPI_SR_RDF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_RDF_SHIFT)) & LPSPI_SR_RDF_MASK) 10605 #define LPSPI_SR_WCF_MASK (0x100U) 10606 #define LPSPI_SR_WCF_SHIFT (8U) 10607 /*! WCF - Word Complete Flag 10608 * 0b0..Transfer of a received word has not yet completed 10609 * 0b1..Transfer of a received word has completed 10610 */ 10611 #define LPSPI_SR_WCF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_WCF_SHIFT)) & LPSPI_SR_WCF_MASK) 10612 #define LPSPI_SR_FCF_MASK (0x200U) 10613 #define LPSPI_SR_FCF_SHIFT (9U) 10614 /*! FCF - Frame Complete Flag 10615 * 0b0..Frame transfer has not completed 10616 * 0b1..Frame transfer has completed 10617 */ 10618 #define LPSPI_SR_FCF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_FCF_SHIFT)) & LPSPI_SR_FCF_MASK) 10619 #define LPSPI_SR_TCF_MASK (0x400U) 10620 #define LPSPI_SR_TCF_SHIFT (10U) 10621 /*! TCF - Transfer Complete Flag 10622 * 0b0..All transfers have not completed 10623 * 0b1..All transfers have completed 10624 */ 10625 #define LPSPI_SR_TCF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TCF_SHIFT)) & LPSPI_SR_TCF_MASK) 10626 #define LPSPI_SR_TEF_MASK (0x800U) 10627 #define LPSPI_SR_TEF_SHIFT (11U) 10628 /*! TEF - Transmit Error Flag 10629 * 0b0..Transmit FIFO underrun has not occurred 10630 * 0b1..Transmit FIFO underrun has occurred 10631 */ 10632 #define LPSPI_SR_TEF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_TEF_SHIFT)) & LPSPI_SR_TEF_MASK) 10633 #define LPSPI_SR_REF_MASK (0x1000U) 10634 #define LPSPI_SR_REF_SHIFT (12U) 10635 /*! REF - Receive Error Flag 10636 * 0b0..Receive FIFO has not overflowed 10637 * 0b1..Receive FIFO has overflowed 10638 */ 10639 #define LPSPI_SR_REF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_REF_SHIFT)) & LPSPI_SR_REF_MASK) 10640 #define LPSPI_SR_DMF_MASK (0x2000U) 10641 #define LPSPI_SR_DMF_SHIFT (13U) 10642 /*! DMF - Data Match Flag 10643 * 0b0..Have not received matching data 10644 * 0b1..Have received matching data 10645 */ 10646 #define LPSPI_SR_DMF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_DMF_SHIFT)) & LPSPI_SR_DMF_MASK) 10647 #define LPSPI_SR_MBF_MASK (0x1000000U) 10648 #define LPSPI_SR_MBF_SHIFT (24U) 10649 /*! MBF - Module Busy Flag 10650 * 0b0..LPSPI is idle 10651 * 0b1..LPSPI is busy 10652 */ 10653 #define LPSPI_SR_MBF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_SR_MBF_SHIFT)) & LPSPI_SR_MBF_MASK) 10654 /*! @} */ 10655 10656 /*! @name IER - Interrupt Enable Register */ 10657 /*! @{ */ 10658 #define LPSPI_IER_TDIE_MASK (0x1U) 10659 #define LPSPI_IER_TDIE_SHIFT (0U) 10660 /*! TDIE - Transmit Data Interrupt Enable 10661 * 0b0..Disabled 10662 * 0b1..Enabled 10663 */ 10664 #define LPSPI_IER_TDIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TDIE_SHIFT)) & LPSPI_IER_TDIE_MASK) 10665 #define LPSPI_IER_RDIE_MASK (0x2U) 10666 #define LPSPI_IER_RDIE_SHIFT (1U) 10667 /*! RDIE - Receive Data Interrupt Enable 10668 * 0b0..Disabled 10669 * 0b1..Enabled 10670 */ 10671 #define LPSPI_IER_RDIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_RDIE_SHIFT)) & LPSPI_IER_RDIE_MASK) 10672 #define LPSPI_IER_WCIE_MASK (0x100U) 10673 #define LPSPI_IER_WCIE_SHIFT (8U) 10674 /*! WCIE - Word Complete Interrupt Enable 10675 * 0b0..Disabled 10676 * 0b1..Enabled 10677 */ 10678 #define LPSPI_IER_WCIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_WCIE_SHIFT)) & LPSPI_IER_WCIE_MASK) 10679 #define LPSPI_IER_FCIE_MASK (0x200U) 10680 #define LPSPI_IER_FCIE_SHIFT (9U) 10681 /*! FCIE - Frame Complete Interrupt Enable 10682 * 0b0..Disabled 10683 * 0b1..Enabled 10684 */ 10685 #define LPSPI_IER_FCIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_FCIE_SHIFT)) & LPSPI_IER_FCIE_MASK) 10686 #define LPSPI_IER_TCIE_MASK (0x400U) 10687 #define LPSPI_IER_TCIE_SHIFT (10U) 10688 /*! TCIE - Transfer Complete Interrupt Enable 10689 * 0b0..Disabled 10690 * 0b1..Enabled 10691 */ 10692 #define LPSPI_IER_TCIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TCIE_SHIFT)) & LPSPI_IER_TCIE_MASK) 10693 #define LPSPI_IER_TEIE_MASK (0x800U) 10694 #define LPSPI_IER_TEIE_SHIFT (11U) 10695 /*! TEIE - Transmit Error Interrupt Enable 10696 * 0b0..Disabled 10697 * 0b1..Enabled 10698 */ 10699 #define LPSPI_IER_TEIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_TEIE_SHIFT)) & LPSPI_IER_TEIE_MASK) 10700 #define LPSPI_IER_REIE_MASK (0x1000U) 10701 #define LPSPI_IER_REIE_SHIFT (12U) 10702 /*! REIE - Receive Error Interrupt Enable 10703 * 0b0..Disabled 10704 * 0b1..Enabled 10705 */ 10706 #define LPSPI_IER_REIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_REIE_SHIFT)) & LPSPI_IER_REIE_MASK) 10707 #define LPSPI_IER_DMIE_MASK (0x2000U) 10708 #define LPSPI_IER_DMIE_SHIFT (13U) 10709 /*! DMIE - Data Match Interrupt Enable 10710 * 0b0..Disabled 10711 * 0b1..Enabled 10712 */ 10713 #define LPSPI_IER_DMIE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_IER_DMIE_SHIFT)) & LPSPI_IER_DMIE_MASK) 10714 /*! @} */ 10715 10716 /*! @name DER - DMA Enable Register */ 10717 /*! @{ */ 10718 #define LPSPI_DER_TDDE_MASK (0x1U) 10719 #define LPSPI_DER_TDDE_SHIFT (0U) 10720 /*! TDDE - Transmit Data DMA Enable 10721 * 0b0..DMA request is disabled 10722 * 0b1..DMA request is enabled 10723 */ 10724 #define LPSPI_DER_TDDE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_DER_TDDE_SHIFT)) & LPSPI_DER_TDDE_MASK) 10725 #define LPSPI_DER_RDDE_MASK (0x2U) 10726 #define LPSPI_DER_RDDE_SHIFT (1U) 10727 /*! RDDE - Receive Data DMA Enable 10728 * 0b0..DMA request is disabled 10729 * 0b1..DMA request is enabled 10730 */ 10731 #define LPSPI_DER_RDDE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_DER_RDDE_SHIFT)) & LPSPI_DER_RDDE_MASK) 10732 /*! @} */ 10733 10734 /*! @name CFGR0 - Configuration Register 0 */ 10735 /*! @{ */ 10736 #define LPSPI_CFGR0_HREN_MASK (0x1U) 10737 #define LPSPI_CFGR0_HREN_SHIFT (0U) 10738 /*! HREN - Host Request Enable 10739 * 0b0..Host request is disabled 10740 * 0b1..Host request is enabled 10741 */ 10742 #define LPSPI_CFGR0_HREN(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HREN_SHIFT)) & LPSPI_CFGR0_HREN_MASK) 10743 #define LPSPI_CFGR0_HRPOL_MASK (0x2U) 10744 #define LPSPI_CFGR0_HRPOL_SHIFT (1U) 10745 /*! HRPOL - Host Request Polarity 10746 * 0b0..Active low 10747 * 0b1..Active high 10748 */ 10749 #define LPSPI_CFGR0_HRPOL(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HRPOL_SHIFT)) & LPSPI_CFGR0_HRPOL_MASK) 10750 #define LPSPI_CFGR0_HRSEL_MASK (0x4U) 10751 #define LPSPI_CFGR0_HRSEL_SHIFT (2U) 10752 /*! HRSEL - Host Request Select 10753 * 0b0..Host request input is the LPSPI_HREQ pin 10754 * 0b1..Host request input is the input trigger 10755 */ 10756 #define LPSPI_CFGR0_HRSEL(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_HRSEL_SHIFT)) & LPSPI_CFGR0_HRSEL_MASK) 10757 #define LPSPI_CFGR0_CIRFIFO_MASK (0x100U) 10758 #define LPSPI_CFGR0_CIRFIFO_SHIFT (8U) 10759 /*! CIRFIFO - Circular FIFO Enable 10760 * 0b0..Circular FIFO is disabled 10761 * 0b1..Circular FIFO is enabled 10762 */ 10763 #define LPSPI_CFGR0_CIRFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_CIRFIFO_SHIFT)) & LPSPI_CFGR0_CIRFIFO_MASK) 10764 #define LPSPI_CFGR0_RDMO_MASK (0x200U) 10765 #define LPSPI_CFGR0_RDMO_SHIFT (9U) 10766 /*! RDMO - Receive Data Match Only 10767 * 0b0..Received data is stored in the receive FIFO as in normal operations 10768 * 0b1..Received data is discarded unless the Data Match Flag (DMF) is set 10769 */ 10770 #define LPSPI_CFGR0_RDMO(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR0_RDMO_SHIFT)) & LPSPI_CFGR0_RDMO_MASK) 10771 /*! @} */ 10772 10773 /*! @name CFGR1 - Configuration Register 1 */ 10774 /*! @{ */ 10775 #define LPSPI_CFGR1_MASTER_MASK (0x1U) 10776 #define LPSPI_CFGR1_MASTER_SHIFT (0U) 10777 /*! MASTER - Master Mode 10778 * 0b0..Slave mode 10779 * 0b1..Master mode 10780 */ 10781 #define LPSPI_CFGR1_MASTER(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_MASTER_SHIFT)) & LPSPI_CFGR1_MASTER_MASK) 10782 #define LPSPI_CFGR1_SAMPLE_MASK (0x2U) 10783 #define LPSPI_CFGR1_SAMPLE_SHIFT (1U) 10784 /*! SAMPLE - Sample Point 10785 * 0b0..Input data is sampled on SCK edge 10786 * 0b1..Input data is sampled on delayed SCK edge 10787 */ 10788 #define LPSPI_CFGR1_SAMPLE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_SAMPLE_SHIFT)) & LPSPI_CFGR1_SAMPLE_MASK) 10789 #define LPSPI_CFGR1_AUTOPCS_MASK (0x4U) 10790 #define LPSPI_CFGR1_AUTOPCS_SHIFT (2U) 10791 /*! AUTOPCS - Automatic PCS 10792 * 0b0..Automatic PCS generation is disabled 10793 * 0b1..Automatic PCS generation is enabled 10794 */ 10795 #define LPSPI_CFGR1_AUTOPCS(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_AUTOPCS_SHIFT)) & LPSPI_CFGR1_AUTOPCS_MASK) 10796 #define LPSPI_CFGR1_NOSTALL_MASK (0x8U) 10797 #define LPSPI_CFGR1_NOSTALL_SHIFT (3U) 10798 /*! NOSTALL - No Stall 10799 * 0b0..Transfers will stall when the transmit FIFO is empty or the receive FIFO is full 10800 * 0b1..Transfers will not stall, allowing transmit FIFO underruns or receive FIFO overruns to occur 10801 */ 10802 #define LPSPI_CFGR1_NOSTALL(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_NOSTALL_SHIFT)) & LPSPI_CFGR1_NOSTALL_MASK) 10803 #define LPSPI_CFGR1_PCSPOL_MASK (0xF00U) 10804 #define LPSPI_CFGR1_PCSPOL_SHIFT (8U) 10805 /*! PCSPOL - Peripheral Chip Select Polarity 10806 * 0b0000..The Peripheral Chip Select pin PCSx is active low 10807 * 0b0001..The Peripheral Chip Select pin PCSx is active high 10808 */ 10809 #define LPSPI_CFGR1_PCSPOL(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PCSPOL_SHIFT)) & LPSPI_CFGR1_PCSPOL_MASK) 10810 #define LPSPI_CFGR1_MATCFG_MASK (0x70000U) 10811 #define LPSPI_CFGR1_MATCFG_SHIFT (16U) 10812 /*! MATCFG - Match Configuration 10813 * 0b000..Match is disabled 10814 * 0b001..Reserved 10815 * 0b010..010b - Match is enabled, if 1st data word equals MATCH0 OR MATCH1, i.e., (1st data word = MATCH0 + MATCH1) 10816 * 0b011..011b - Match is enabled, if any data word equals MATCH0 OR MATCH1, i.e., (any data word = MATCH0 + MATCH1) 10817 * 0b100..100b - Match is enabled, if 1st data word equals MATCH0 AND 2nd data word equals MATCH1, i.e., [(1st 10818 * data word = MATCH0) * (2nd data word = MATCH1)] 10819 * 0b101..101b - Match is enabled, if any data word equals MATCH0 AND the next data word equals MATCH1, i.e., 10820 * [(any data word = MATCH0) * (next data word = MATCH1)] 10821 * 0b110..110b - Match is enabled, if (1st data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., [(1st data word * MATCH1) = (MATCH0 * MATCH1)] 10822 * 0b111..111b - Match is enabled, if (any data word AND MATCH1) equals (MATCH0 AND MATCH1), i.e., [(any data word * MATCH1) = (MATCH0 * MATCH1)] 10823 */ 10824 #define LPSPI_CFGR1_MATCFG(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_MATCFG_SHIFT)) & LPSPI_CFGR1_MATCFG_MASK) 10825 #define LPSPI_CFGR1_PINCFG_MASK (0x3000000U) 10826 #define LPSPI_CFGR1_PINCFG_SHIFT (24U) 10827 /*! PINCFG - Pin Configuration 10828 * 0b00..SIN is used for input data and SOUT is used for output data 10829 * 0b01..SIN is used for both input and output data 10830 * 0b10..SOUT is used for both input and output data 10831 * 0b11..SOUT is used for input data and SIN is used for output data 10832 */ 10833 #define LPSPI_CFGR1_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PINCFG_SHIFT)) & LPSPI_CFGR1_PINCFG_MASK) 10834 #define LPSPI_CFGR1_OUTCFG_MASK (0x4000000U) 10835 #define LPSPI_CFGR1_OUTCFG_SHIFT (26U) 10836 /*! OUTCFG - Output Config 10837 * 0b0..Output data retains last value when chip select is negated 10838 * 0b1..Output data is tristated when chip select is negated 10839 */ 10840 #define LPSPI_CFGR1_OUTCFG(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_OUTCFG_SHIFT)) & LPSPI_CFGR1_OUTCFG_MASK) 10841 #define LPSPI_CFGR1_PCSCFG_MASK (0x8000000U) 10842 #define LPSPI_CFGR1_PCSCFG_SHIFT (27U) 10843 /*! PCSCFG - Peripheral Chip Select Configuration 10844 * 0b0..PCS[3:2] are enabled 10845 * 0b1..PCS[3:2] are disabled 10846 */ 10847 #define LPSPI_CFGR1_PCSCFG(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CFGR1_PCSCFG_SHIFT)) & LPSPI_CFGR1_PCSCFG_MASK) 10848 /*! @} */ 10849 10850 /*! @name DMR0 - Data Match Register 0 */ 10851 /*! @{ */ 10852 #define LPSPI_DMR0_MATCH0_MASK (0xFFFFFFFFU) 10853 #define LPSPI_DMR0_MATCH0_SHIFT (0U) 10854 #define LPSPI_DMR0_MATCH0(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_DMR0_MATCH0_SHIFT)) & LPSPI_DMR0_MATCH0_MASK) 10855 /*! @} */ 10856 10857 /*! @name DMR1 - Data Match Register 1 */ 10858 /*! @{ */ 10859 #define LPSPI_DMR1_MATCH1_MASK (0xFFFFFFFFU) 10860 #define LPSPI_DMR1_MATCH1_SHIFT (0U) 10861 #define LPSPI_DMR1_MATCH1(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_DMR1_MATCH1_SHIFT)) & LPSPI_DMR1_MATCH1_MASK) 10862 /*! @} */ 10863 10864 /*! @name CCR - Clock Configuration Register */ 10865 /*! @{ */ 10866 #define LPSPI_CCR_SCKDIV_MASK (0xFFU) 10867 #define LPSPI_CCR_SCKDIV_SHIFT (0U) 10868 #define LPSPI_CCR_SCKDIV(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_SCKDIV_SHIFT)) & LPSPI_CCR_SCKDIV_MASK) 10869 #define LPSPI_CCR_DBT_MASK (0xFF00U) 10870 #define LPSPI_CCR_DBT_SHIFT (8U) 10871 #define LPSPI_CCR_DBT(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_DBT_SHIFT)) & LPSPI_CCR_DBT_MASK) 10872 #define LPSPI_CCR_PCSSCK_MASK (0xFF0000U) 10873 #define LPSPI_CCR_PCSSCK_SHIFT (16U) 10874 #define LPSPI_CCR_PCSSCK(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_PCSSCK_SHIFT)) & LPSPI_CCR_PCSSCK_MASK) 10875 #define LPSPI_CCR_SCKPCS_MASK (0xFF000000U) 10876 #define LPSPI_CCR_SCKPCS_SHIFT (24U) 10877 #define LPSPI_CCR_SCKPCS(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_CCR_SCKPCS_SHIFT)) & LPSPI_CCR_SCKPCS_MASK) 10878 /*! @} */ 10879 10880 /*! @name FCR - FIFO Control Register */ 10881 /*! @{ */ 10882 #define LPSPI_FCR_TXWATER_MASK (0x3U) 10883 #define LPSPI_FCR_TXWATER_SHIFT (0U) 10884 #define LPSPI_FCR_TXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_FCR_TXWATER_SHIFT)) & LPSPI_FCR_TXWATER_MASK) 10885 #define LPSPI_FCR_RXWATER_MASK (0x30000U) 10886 #define LPSPI_FCR_RXWATER_SHIFT (16U) 10887 #define LPSPI_FCR_RXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_FCR_RXWATER_SHIFT)) & LPSPI_FCR_RXWATER_MASK) 10888 /*! @} */ 10889 10890 /*! @name FSR - FIFO Status Register */ 10891 /*! @{ */ 10892 #define LPSPI_FSR_TXCOUNT_MASK (0x7U) 10893 #define LPSPI_FSR_TXCOUNT_SHIFT (0U) 10894 #define LPSPI_FSR_TXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_FSR_TXCOUNT_SHIFT)) & LPSPI_FSR_TXCOUNT_MASK) 10895 #define LPSPI_FSR_RXCOUNT_MASK (0x70000U) 10896 #define LPSPI_FSR_RXCOUNT_SHIFT (16U) 10897 #define LPSPI_FSR_RXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_FSR_RXCOUNT_SHIFT)) & LPSPI_FSR_RXCOUNT_MASK) 10898 /*! @} */ 10899 10900 /*! @name TCR - Transmit Command Register */ 10901 /*! @{ */ 10902 #define LPSPI_TCR_FRAMESZ_MASK (0xFFFU) 10903 #define LPSPI_TCR_FRAMESZ_SHIFT (0U) 10904 #define LPSPI_TCR_FRAMESZ(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_FRAMESZ_SHIFT)) & LPSPI_TCR_FRAMESZ_MASK) 10905 #define LPSPI_TCR_WIDTH_MASK (0x30000U) 10906 #define LPSPI_TCR_WIDTH_SHIFT (16U) 10907 /*! WIDTH - Transfer Width 10908 * 0b00..1 bit transfer 10909 * 0b01..2 bit transfer 10910 * 0b10..4 bit transfer 10911 * 0b11..Reserved 10912 */ 10913 #define LPSPI_TCR_WIDTH(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_WIDTH_SHIFT)) & LPSPI_TCR_WIDTH_MASK) 10914 #define LPSPI_TCR_TXMSK_MASK (0x40000U) 10915 #define LPSPI_TCR_TXMSK_SHIFT (18U) 10916 /*! TXMSK - Transmit Data Mask 10917 * 0b0..Normal transfer 10918 * 0b1..Mask transmit data 10919 */ 10920 #define LPSPI_TCR_TXMSK(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_TXMSK_SHIFT)) & LPSPI_TCR_TXMSK_MASK) 10921 #define LPSPI_TCR_RXMSK_MASK (0x80000U) 10922 #define LPSPI_TCR_RXMSK_SHIFT (19U) 10923 /*! RXMSK - Receive Data Mask 10924 * 0b0..Normal transfer 10925 * 0b1..Receive data is masked 10926 */ 10927 #define LPSPI_TCR_RXMSK(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_RXMSK_SHIFT)) & LPSPI_TCR_RXMSK_MASK) 10928 #define LPSPI_TCR_CONTC_MASK (0x100000U) 10929 #define LPSPI_TCR_CONTC_SHIFT (20U) 10930 /*! CONTC - Continuing Command 10931 * 0b0..Command word for start of new transfer 10932 * 0b1..Command word for continuing transfer 10933 */ 10934 #define LPSPI_TCR_CONTC(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CONTC_SHIFT)) & LPSPI_TCR_CONTC_MASK) 10935 #define LPSPI_TCR_CONT_MASK (0x200000U) 10936 #define LPSPI_TCR_CONT_SHIFT (21U) 10937 /*! CONT - Continuous Transfer 10938 * 0b0..Continuous transfer is disabled 10939 * 0b1..Continuous transfer is enabled 10940 */ 10941 #define LPSPI_TCR_CONT(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CONT_SHIFT)) & LPSPI_TCR_CONT_MASK) 10942 #define LPSPI_TCR_BYSW_MASK (0x400000U) 10943 #define LPSPI_TCR_BYSW_SHIFT (22U) 10944 /*! BYSW - Byte Swap 10945 * 0b0..Byte swap is disabled 10946 * 0b1..Byte swap is enabled 10947 */ 10948 #define LPSPI_TCR_BYSW(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_BYSW_SHIFT)) & LPSPI_TCR_BYSW_MASK) 10949 #define LPSPI_TCR_LSBF_MASK (0x800000U) 10950 #define LPSPI_TCR_LSBF_SHIFT (23U) 10951 /*! LSBF - LSB First 10952 * 0b0..Data is transferred MSB first 10953 * 0b1..Data is transferred LSB first 10954 */ 10955 #define LPSPI_TCR_LSBF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_LSBF_SHIFT)) & LPSPI_TCR_LSBF_MASK) 10956 #define LPSPI_TCR_PCS_MASK (0x3000000U) 10957 #define LPSPI_TCR_PCS_SHIFT (24U) 10958 /*! PCS - Peripheral Chip Select 10959 * 0b00..Transfer using LPSPI_PCS[0] 10960 * 0b01..Transfer using LPSPI_PCS[1] 10961 * 0b10..Transfer using LPSPI_PCS[2] 10962 * 0b11..Transfer using LPSPI_PCS[3] 10963 */ 10964 #define LPSPI_TCR_PCS(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_PCS_SHIFT)) & LPSPI_TCR_PCS_MASK) 10965 #define LPSPI_TCR_PRESCALE_MASK (0x38000000U) 10966 #define LPSPI_TCR_PRESCALE_SHIFT (27U) 10967 /*! PRESCALE - Prescaler Value 10968 * 0b000..Divide by 1 10969 * 0b001..Divide by 2 10970 * 0b010..Divide by 4 10971 * 0b011..Divide by 8 10972 * 0b100..Divide by 16 10973 * 0b101..Divide by 32 10974 * 0b110..Divide by 64 10975 * 0b111..Divide by 128 10976 */ 10977 #define LPSPI_TCR_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_PRESCALE_SHIFT)) & LPSPI_TCR_PRESCALE_MASK) 10978 #define LPSPI_TCR_CPHA_MASK (0x40000000U) 10979 #define LPSPI_TCR_CPHA_SHIFT (30U) 10980 /*! CPHA - Clock Phase 10981 * 0b0..Data is captured on the leading edge of SCK and changed on the following edge of SCK 10982 * 0b1..Data is changed on the leading edge of SCK and captured on the following edge of SCK 10983 */ 10984 #define LPSPI_TCR_CPHA(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CPHA_SHIFT)) & LPSPI_TCR_CPHA_MASK) 10985 #define LPSPI_TCR_CPOL_MASK (0x80000000U) 10986 #define LPSPI_TCR_CPOL_SHIFT (31U) 10987 /*! CPOL - Clock Polarity 10988 * 0b0..The inactive state value of SCK is low 10989 * 0b1..The inactive state value of SCK is high 10990 */ 10991 #define LPSPI_TCR_CPOL(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TCR_CPOL_SHIFT)) & LPSPI_TCR_CPOL_MASK) 10992 /*! @} */ 10993 10994 /*! @name TDR - Transmit Data Register */ 10995 /*! @{ */ 10996 #define LPSPI_TDR_DATA_MASK (0xFFFFFFFFU) 10997 #define LPSPI_TDR_DATA_SHIFT (0U) 10998 #define LPSPI_TDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_TDR_DATA_SHIFT)) & LPSPI_TDR_DATA_MASK) 10999 /*! @} */ 11000 11001 /*! @name RSR - Receive Status Register */ 11002 /*! @{ */ 11003 #define LPSPI_RSR_SOF_MASK (0x1U) 11004 #define LPSPI_RSR_SOF_SHIFT (0U) 11005 /*! SOF - Start Of Frame 11006 * 0b0..Subsequent data word received after LPSPI_PCS assertion 11007 * 0b1..First data word received after LPSPI_PCS assertion 11008 */ 11009 #define LPSPI_RSR_SOF(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_RSR_SOF_SHIFT)) & LPSPI_RSR_SOF_MASK) 11010 #define LPSPI_RSR_RXEMPTY_MASK (0x2U) 11011 #define LPSPI_RSR_RXEMPTY_SHIFT (1U) 11012 /*! RXEMPTY - RX FIFO Empty 11013 * 0b0..RX FIFO is not empty 11014 * 0b1..RX FIFO is empty 11015 */ 11016 #define LPSPI_RSR_RXEMPTY(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_RSR_RXEMPTY_SHIFT)) & LPSPI_RSR_RXEMPTY_MASK) 11017 /*! @} */ 11018 11019 /*! @name RDR - Receive Data Register */ 11020 /*! @{ */ 11021 #define LPSPI_RDR_DATA_MASK (0xFFFFFFFFU) 11022 #define LPSPI_RDR_DATA_SHIFT (0U) 11023 #define LPSPI_RDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LPSPI_RDR_DATA_SHIFT)) & LPSPI_RDR_DATA_MASK) 11024 /*! @} */ 11025 11026 11027 /*! 11028 * @} 11029 */ /* end of group LPSPI_Register_Masks */ 11030 11031 11032 /* LPSPI - Peripheral instance base addresses */ 11033 /** Peripheral LPSPI0 base address */ 11034 #define LPSPI0_BASE (0x4003F000u) 11035 /** Peripheral LPSPI0 base pointer */ 11036 #define LPSPI0 ((LPSPI_Type *)LPSPI0_BASE) 11037 /** Peripheral LPSPI1 base address */ 11038 #define LPSPI1_BASE (0x40040000u) 11039 /** Peripheral LPSPI1 base pointer */ 11040 #define LPSPI1 ((LPSPI_Type *)LPSPI1_BASE) 11041 /** Peripheral LPSPI2 base address */ 11042 #define LPSPI2_BASE (0x40041000u) 11043 /** Peripheral LPSPI2 base pointer */ 11044 #define LPSPI2 ((LPSPI_Type *)LPSPI2_BASE) 11045 /** Peripheral LPSPI3 base address */ 11046 #define LPSPI3_BASE (0x41035000u) 11047 /** Peripheral LPSPI3 base pointer */ 11048 #define LPSPI3 ((LPSPI_Type *)LPSPI3_BASE) 11049 /** Array initializer of LPSPI peripheral base addresses */ 11050 #define LPSPI_BASE_ADDRS { LPSPI0_BASE, LPSPI1_BASE, LPSPI2_BASE, LPSPI3_BASE } 11051 /** Array initializer of LPSPI peripheral base pointers */ 11052 #define LPSPI_BASE_PTRS { LPSPI0, LPSPI1, LPSPI2, LPSPI3 } 11053 /** Interrupt vectors for the LPSPI peripheral type */ 11054 #define LPSPI_IRQS { LPSPI0_IRQn, LPSPI1_IRQn, LPSPI2_IRQn, LPSPI3_IRQn } 11055 11056 /*! 11057 * @} 11058 */ /* end of group LPSPI_Peripheral_Access_Layer */ 11059 11060 11061 /* ---------------------------------------------------------------------------- 11062 -- LPTMR Peripheral Access Layer 11063 ---------------------------------------------------------------------------- */ 11064 11065 /*! 11066 * @addtogroup LPTMR_Peripheral_Access_Layer LPTMR Peripheral Access Layer 11067 * @{ 11068 */ 11069 11070 /** LPTMR - Register Layout Typedef */ 11071 typedef struct { 11072 __IO uint32_t CSR; /**< Low Power Timer Control Status Register, offset: 0x0 */ 11073 __IO uint32_t PSR; /**< Low Power Timer Prescale Register, offset: 0x4 */ 11074 __IO uint32_t CMR; /**< Low Power Timer Compare Register, offset: 0x8 */ 11075 __IO uint32_t CNR; /**< Low Power Timer Counter Register, offset: 0xC */ 11076 } LPTMR_Type; 11077 11078 /* ---------------------------------------------------------------------------- 11079 -- LPTMR Register Masks 11080 ---------------------------------------------------------------------------- */ 11081 11082 /*! 11083 * @addtogroup LPTMR_Register_Masks LPTMR Register Masks 11084 * @{ 11085 */ 11086 11087 /*! @name CSR - Low Power Timer Control Status Register */ 11088 /*! @{ */ 11089 #define LPTMR_CSR_TEN_MASK (0x1U) 11090 #define LPTMR_CSR_TEN_SHIFT (0U) 11091 /*! TEN - Timer Enable 11092 * 0b0..LPTMR is disabled and internal logic is reset. 11093 * 0b1..LPTMR is enabled. 11094 */ 11095 #define LPTMR_CSR_TEN(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TEN_SHIFT)) & LPTMR_CSR_TEN_MASK) 11096 #define LPTMR_CSR_TMS_MASK (0x2U) 11097 #define LPTMR_CSR_TMS_SHIFT (1U) 11098 /*! TMS - Timer Mode Select 11099 * 0b0..Time Counter mode. 11100 * 0b1..Pulse Counter mode. 11101 */ 11102 #define LPTMR_CSR_TMS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TMS_SHIFT)) & LPTMR_CSR_TMS_MASK) 11103 #define LPTMR_CSR_TFC_MASK (0x4U) 11104 #define LPTMR_CSR_TFC_SHIFT (2U) 11105 /*! TFC - Timer Free-Running Counter 11106 * 0b0..CNR is reset whenever TCF is set. 11107 * 0b1..CNR is reset on overflow. 11108 */ 11109 #define LPTMR_CSR_TFC(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TFC_SHIFT)) & LPTMR_CSR_TFC_MASK) 11110 #define LPTMR_CSR_TPP_MASK (0x8U) 11111 #define LPTMR_CSR_TPP_SHIFT (3U) 11112 /*! TPP - Timer Pin Polarity 11113 * 0b0..Pulse Counter input source is active-high, and the CNR will increment on the rising-edge. 11114 * 0b1..Pulse Counter input source is active-low, and the CNR will increment on the falling-edge. 11115 */ 11116 #define LPTMR_CSR_TPP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPP_SHIFT)) & LPTMR_CSR_TPP_MASK) 11117 #define LPTMR_CSR_TPS_MASK (0x30U) 11118 #define LPTMR_CSR_TPS_SHIFT (4U) 11119 /*! TPS - Timer Pin Select 11120 * 0b00..Pulse counter input 0 is selected. 11121 * 0b01..Pulse counter input 1 is selected. 11122 * 0b10..Pulse counter input 2 is selected. 11123 * 0b11..Pulse counter input 3 is selected. 11124 */ 11125 #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPS_SHIFT)) & LPTMR_CSR_TPS_MASK) 11126 #define LPTMR_CSR_TIE_MASK (0x40U) 11127 #define LPTMR_CSR_TIE_SHIFT (6U) 11128 /*! TIE - Timer Interrupt Enable 11129 * 0b0..Timer interrupt disabled. 11130 * 0b1..Timer interrupt enabled. 11131 */ 11132 #define LPTMR_CSR_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TIE_SHIFT)) & LPTMR_CSR_TIE_MASK) 11133 #define LPTMR_CSR_TCF_MASK (0x80U) 11134 #define LPTMR_CSR_TCF_SHIFT (7U) 11135 /*! TCF - Timer Compare Flag 11136 * 0b0..The value of CNR is not equal to CMR and increments. 11137 * 0b1..The value of CNR is equal to CMR and increments. 11138 */ 11139 #define LPTMR_CSR_TCF(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TCF_SHIFT)) & LPTMR_CSR_TCF_MASK) 11140 #define LPTMR_CSR_TDRE_MASK (0x100U) 11141 #define LPTMR_CSR_TDRE_SHIFT (8U) 11142 /*! TDRE - Timer DMA Request Enable 11143 * 0b0..Timer DMA Request disabled. 11144 * 0b1..Timer DMA Request enabled. 11145 */ 11146 #define LPTMR_CSR_TDRE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TDRE_SHIFT)) & LPTMR_CSR_TDRE_MASK) 11147 /*! @} */ 11148 11149 /*! @name PSR - Low Power Timer Prescale Register */ 11150 /*! @{ */ 11151 #define LPTMR_PSR_PCS_MASK (0x3U) 11152 #define LPTMR_PSR_PCS_SHIFT (0U) 11153 /*! PCS - Prescaler Clock Select 11154 * 0b00..Prescaler/glitch filter clock 0 selected. 11155 * 0b01..Prescaler/glitch filter clock 1 selected. 11156 * 0b10..Prescaler/glitch filter clock 2 selected. 11157 * 0b11..Prescaler/glitch filter clock 3 selected. 11158 */ 11159 #define LPTMR_PSR_PCS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PCS_SHIFT)) & LPTMR_PSR_PCS_MASK) 11160 #define LPTMR_PSR_PBYP_MASK (0x4U) 11161 #define LPTMR_PSR_PBYP_SHIFT (2U) 11162 /*! PBYP - Prescaler Bypass 11163 * 0b0..Prescaler/glitch filter is enabled. 11164 * 0b1..Prescaler/glitch filter is bypassed. 11165 */ 11166 #define LPTMR_PSR_PBYP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PBYP_SHIFT)) & LPTMR_PSR_PBYP_MASK) 11167 #define LPTMR_PSR_PRESCALE_MASK (0x78U) 11168 #define LPTMR_PSR_PRESCALE_SHIFT (3U) 11169 /*! PRESCALE - Prescale Value 11170 * 0b0000..Prescaler divides the prescaler clock by 2; glitch filter does not support this configuration. 11171 * 0b0001..Prescaler divides the prescaler clock by 4; glitch filter recognizes change on input pin after 2 rising clock edges. 11172 * 0b0010..Prescaler divides the prescaler clock by 8; glitch filter recognizes change on input pin after 4 rising clock edges. 11173 * 0b0011..Prescaler divides the prescaler clock by 16; glitch filter recognizes change on input pin after 8 rising clock edges. 11174 * 0b0100..Prescaler divides the prescaler clock by 32; glitch filter recognizes change on input pin after 16 rising clock edges. 11175 * 0b0101..Prescaler divides the prescaler clock by 64; glitch filter recognizes change on input pin after 32 rising clock edges. 11176 * 0b0110..Prescaler divides the prescaler clock by 128; glitch filter recognizes change on input pin after 64 rising clock edges. 11177 * 0b0111..Prescaler divides the prescaler clock by 256; glitch filter recognizes change on input pin after 128 rising clock edges. 11178 * 0b1000..Prescaler divides the prescaler clock by 512; glitch filter recognizes change on input pin after 256 rising clock edges. 11179 * 0b1001..Prescaler divides the prescaler clock by 1024; glitch filter recognizes change on input pin after 512 rising clock edges. 11180 * 0b1010..Prescaler divides the prescaler clock by 2048; glitch filter recognizes change on input pin after 1024 rising clock edges. 11181 * 0b1011..Prescaler divides the prescaler clock by 4096; glitch filter recognizes change on input pin after 2048 rising clock edges. 11182 * 0b1100..Prescaler divides the prescaler clock by 8192; glitch filter recognizes change on input pin after 4096 rising clock edges. 11183 * 0b1101..Prescaler divides the prescaler clock by 16,384; glitch filter recognizes change on input pin after 8192 rising clock edges. 11184 * 0b1110..Prescaler divides the prescaler clock by 32,768; glitch filter recognizes change on input pin after 16,384 rising clock edges. 11185 * 0b1111..Prescaler divides the prescaler clock by 65,536; glitch filter recognizes change on input pin after 32,768 rising clock edges. 11186 */ 11187 #define LPTMR_PSR_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PRESCALE_SHIFT)) & LPTMR_PSR_PRESCALE_MASK) 11188 /*! @} */ 11189 11190 /*! @name CMR - Low Power Timer Compare Register */ 11191 /*! @{ */ 11192 #define LPTMR_CMR_COMPARE_MASK (0xFFFFFFFFU) 11193 #define LPTMR_CMR_COMPARE_SHIFT (0U) 11194 #define LPTMR_CMR_COMPARE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CMR_COMPARE_SHIFT)) & LPTMR_CMR_COMPARE_MASK) 11195 /*! @} */ 11196 11197 /*! @name CNR - Low Power Timer Counter Register */ 11198 /*! @{ */ 11199 #define LPTMR_CNR_COUNTER_MASK (0xFFFFFFFFU) 11200 #define LPTMR_CNR_COUNTER_SHIFT (0U) 11201 #define LPTMR_CNR_COUNTER(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CNR_COUNTER_SHIFT)) & LPTMR_CNR_COUNTER_MASK) 11202 /*! @} */ 11203 11204 11205 /*! 11206 * @} 11207 */ /* end of group LPTMR_Register_Masks */ 11208 11209 11210 /* LPTMR - Peripheral instance base addresses */ 11211 /** Peripheral LPTMR0 base address */ 11212 #define LPTMR0_BASE (0x40032000u) 11213 /** Peripheral LPTMR0 base pointer */ 11214 #define LPTMR0 ((LPTMR_Type *)LPTMR0_BASE) 11215 /** Peripheral LPTMR1 base address */ 11216 #define LPTMR1_BASE (0x40033000u) 11217 /** Peripheral LPTMR1 base pointer */ 11218 #define LPTMR1 ((LPTMR_Type *)LPTMR1_BASE) 11219 /** Peripheral LPTMR2 base address */ 11220 #define LPTMR2_BASE (0x4102B000u) 11221 /** Peripheral LPTMR2 base pointer */ 11222 #define LPTMR2 ((LPTMR_Type *)LPTMR2_BASE) 11223 /** Array initializer of LPTMR peripheral base addresses */ 11224 #define LPTMR_BASE_ADDRS { LPTMR0_BASE, LPTMR1_BASE, LPTMR2_BASE } 11225 /** Array initializer of LPTMR peripheral base pointers */ 11226 #define LPTMR_BASE_PTRS { LPTMR0, LPTMR1, LPTMR2 } 11227 /** Interrupt vectors for the LPTMR peripheral type */ 11228 #define LPTMR_IRQS { LPTMR0_IRQn, LPTMR1_IRQn, LPTMR2_IRQn } 11229 11230 /*! 11231 * @} 11232 */ /* end of group LPTMR_Peripheral_Access_Layer */ 11233 11234 11235 /* ---------------------------------------------------------------------------- 11236 -- LPUART Peripheral Access Layer 11237 ---------------------------------------------------------------------------- */ 11238 11239 /*! 11240 * @addtogroup LPUART_Peripheral_Access_Layer LPUART Peripheral Access Layer 11241 * @{ 11242 */ 11243 11244 /** LPUART - Register Layout Typedef */ 11245 typedef struct { 11246 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 11247 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 11248 __IO uint32_t GLOBAL; /**< LPUART Global Register, offset: 0x8 */ 11249 __IO uint32_t PINCFG; /**< LPUART Pin Configuration Register, offset: 0xC */ 11250 __IO uint32_t BAUD; /**< LPUART Baud Rate Register, offset: 0x10 */ 11251 __IO uint32_t STAT; /**< LPUART Status Register, offset: 0x14 */ 11252 __IO uint32_t CTRL; /**< LPUART Control Register, offset: 0x18 */ 11253 __IO uint32_t DATA; /**< LPUART Data Register, offset: 0x1C */ 11254 __IO uint32_t MATCH; /**< LPUART Match Address Register, offset: 0x20 */ 11255 __IO uint32_t MODIR; /**< LPUART Modem IrDA Register, offset: 0x24 */ 11256 __IO uint32_t FIFO; /**< LPUART FIFO Register, offset: 0x28 */ 11257 __IO uint32_t WATER; /**< LPUART Watermark Register, offset: 0x2C */ 11258 } LPUART_Type; 11259 11260 /* ---------------------------------------------------------------------------- 11261 -- LPUART Register Masks 11262 ---------------------------------------------------------------------------- */ 11263 11264 /*! 11265 * @addtogroup LPUART_Register_Masks LPUART Register Masks 11266 * @{ 11267 */ 11268 11269 /*! @name VERID - Version ID Register */ 11270 /*! @{ */ 11271 #define LPUART_VERID_FEATURE_MASK (0xFFFFU) 11272 #define LPUART_VERID_FEATURE_SHIFT (0U) 11273 /*! FEATURE - Feature Identification Number 11274 * 0b0000000000000001..Standard feature set. 11275 * 0b0000000000000011..Standard feature set with MODEM/IrDA support. 11276 */ 11277 #define LPUART_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_FEATURE_SHIFT)) & LPUART_VERID_FEATURE_MASK) 11278 #define LPUART_VERID_MINOR_MASK (0xFF0000U) 11279 #define LPUART_VERID_MINOR_SHIFT (16U) 11280 #define LPUART_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_MINOR_SHIFT)) & LPUART_VERID_MINOR_MASK) 11281 #define LPUART_VERID_MAJOR_MASK (0xFF000000U) 11282 #define LPUART_VERID_MAJOR_SHIFT (24U) 11283 #define LPUART_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_VERID_MAJOR_SHIFT)) & LPUART_VERID_MAJOR_MASK) 11284 /*! @} */ 11285 11286 /*! @name PARAM - Parameter Register */ 11287 /*! @{ */ 11288 #define LPUART_PARAM_TXFIFO_MASK (0xFFU) 11289 #define LPUART_PARAM_TXFIFO_SHIFT (0U) 11290 #define LPUART_PARAM_TXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPUART_PARAM_TXFIFO_SHIFT)) & LPUART_PARAM_TXFIFO_MASK) 11291 #define LPUART_PARAM_RXFIFO_MASK (0xFF00U) 11292 #define LPUART_PARAM_RXFIFO_SHIFT (8U) 11293 #define LPUART_PARAM_RXFIFO(x) (((uint32_t)(((uint32_t)(x)) << LPUART_PARAM_RXFIFO_SHIFT)) & LPUART_PARAM_RXFIFO_MASK) 11294 /*! @} */ 11295 11296 /*! @name GLOBAL - LPUART Global Register */ 11297 /*! @{ */ 11298 #define LPUART_GLOBAL_RST_MASK (0x2U) 11299 #define LPUART_GLOBAL_RST_SHIFT (1U) 11300 /*! RST - Software Reset 11301 * 0b0..Module is not reset. 11302 * 0b1..Module is reset. 11303 */ 11304 #define LPUART_GLOBAL_RST(x) (((uint32_t)(((uint32_t)(x)) << LPUART_GLOBAL_RST_SHIFT)) & LPUART_GLOBAL_RST_MASK) 11305 /*! @} */ 11306 11307 /*! @name PINCFG - LPUART Pin Configuration Register */ 11308 /*! @{ */ 11309 #define LPUART_PINCFG_TRGSEL_MASK (0x3U) 11310 #define LPUART_PINCFG_TRGSEL_SHIFT (0U) 11311 /*! TRGSEL - Trigger Select 11312 * 0b00..Input trigger is disabled. 11313 * 0b01..Input trigger is used instead of RXD pin input. 11314 * 0b10..Input trigger is used instead of CTS_B pin input. 11315 * 0b11..Input trigger is used to modulate the TXD pin output. The TXD pin output (after TXINV configuration) is ANDed with the input trigger. 11316 */ 11317 #define LPUART_PINCFG_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << LPUART_PINCFG_TRGSEL_SHIFT)) & LPUART_PINCFG_TRGSEL_MASK) 11318 /*! @} */ 11319 11320 /*! @name BAUD - LPUART Baud Rate Register */ 11321 /*! @{ */ 11322 #define LPUART_BAUD_SBR_MASK (0x1FFFU) 11323 #define LPUART_BAUD_SBR_SHIFT (0U) 11324 #define LPUART_BAUD_SBR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBR_SHIFT)) & LPUART_BAUD_SBR_MASK) 11325 #define LPUART_BAUD_SBNS_MASK (0x2000U) 11326 #define LPUART_BAUD_SBNS_SHIFT (13U) 11327 /*! SBNS - Stop Bit Number Select 11328 * 0b0..One stop bit. 11329 * 0b1..Two stop bits. 11330 */ 11331 #define LPUART_BAUD_SBNS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBNS_SHIFT)) & LPUART_BAUD_SBNS_MASK) 11332 #define LPUART_BAUD_RXEDGIE_MASK (0x4000U) 11333 #define LPUART_BAUD_RXEDGIE_SHIFT (14U) 11334 /*! RXEDGIE - RX Input Active Edge Interrupt Enable 11335 * 0b0..Hardware interrupts from LPUART_STAT[RXEDGIF] disabled. 11336 * 0b1..Hardware interrupt requested when LPUART_STAT[RXEDGIF] flag is 1. 11337 */ 11338 #define LPUART_BAUD_RXEDGIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RXEDGIE_SHIFT)) & LPUART_BAUD_RXEDGIE_MASK) 11339 #define LPUART_BAUD_LBKDIE_MASK (0x8000U) 11340 #define LPUART_BAUD_LBKDIE_SHIFT (15U) 11341 /*! LBKDIE - LIN Break Detect Interrupt Enable 11342 * 0b0..Hardware interrupts from LPUART_STAT[LBKDIF] disabled (use polling). 11343 * 0b1..Hardware interrupt requested when LPUART_STAT[LBKDIF] flag is 1. 11344 */ 11345 #define LPUART_BAUD_LBKDIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_LBKDIE_SHIFT)) & LPUART_BAUD_LBKDIE_MASK) 11346 #define LPUART_BAUD_RESYNCDIS_MASK (0x10000U) 11347 #define LPUART_BAUD_RESYNCDIS_SHIFT (16U) 11348 /*! RESYNCDIS - Resynchronization Disable 11349 * 0b0..Resynchronization during received data word is supported 11350 * 0b1..Resynchronization during received data word is disabled 11351 */ 11352 #define LPUART_BAUD_RESYNCDIS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RESYNCDIS_SHIFT)) & LPUART_BAUD_RESYNCDIS_MASK) 11353 #define LPUART_BAUD_BOTHEDGE_MASK (0x20000U) 11354 #define LPUART_BAUD_BOTHEDGE_SHIFT (17U) 11355 /*! BOTHEDGE - Both Edge Sampling 11356 * 0b0..Receiver samples input data using the rising edge of the baud rate clock. 11357 * 0b1..Receiver samples input data using the rising and falling edge of the baud rate clock. 11358 */ 11359 #define LPUART_BAUD_BOTHEDGE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_BOTHEDGE_SHIFT)) & LPUART_BAUD_BOTHEDGE_MASK) 11360 #define LPUART_BAUD_MATCFG_MASK (0xC0000U) 11361 #define LPUART_BAUD_MATCFG_SHIFT (18U) 11362 /*! MATCFG - Match Configuration 11363 * 0b00..Address Match Wakeup 11364 * 0b01..Idle Match Wakeup 11365 * 0b10..Match On and Match Off 11366 * 0b11..Enables RWU on Data Match and Match On/Off for transmitter CTS input 11367 */ 11368 #define LPUART_BAUD_MATCFG(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MATCFG_SHIFT)) & LPUART_BAUD_MATCFG_MASK) 11369 #define LPUART_BAUD_RIDMAE_MASK (0x100000U) 11370 #define LPUART_BAUD_RIDMAE_SHIFT (20U) 11371 /*! RIDMAE - Receiver Idle DMA Enable 11372 * 0b0..DMA request disabled. 11373 * 0b1..DMA request enabled. 11374 */ 11375 #define LPUART_BAUD_RIDMAE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RIDMAE_SHIFT)) & LPUART_BAUD_RIDMAE_MASK) 11376 #define LPUART_BAUD_RDMAE_MASK (0x200000U) 11377 #define LPUART_BAUD_RDMAE_SHIFT (21U) 11378 /*! RDMAE - Receiver Full DMA Enable 11379 * 0b0..DMA request disabled. 11380 * 0b1..DMA request enabled. 11381 */ 11382 #define LPUART_BAUD_RDMAE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RDMAE_SHIFT)) & LPUART_BAUD_RDMAE_MASK) 11383 #define LPUART_BAUD_TDMAE_MASK (0x800000U) 11384 #define LPUART_BAUD_TDMAE_SHIFT (23U) 11385 /*! TDMAE - Transmitter DMA Enable 11386 * 0b0..DMA request disabled. 11387 * 0b1..DMA request enabled. 11388 */ 11389 #define LPUART_BAUD_TDMAE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_TDMAE_SHIFT)) & LPUART_BAUD_TDMAE_MASK) 11390 #define LPUART_BAUD_OSR_MASK (0x1F000000U) 11391 #define LPUART_BAUD_OSR_SHIFT (24U) 11392 /*! OSR - Oversampling Ratio 11393 * 0b00000..Writing 0 to this field will result in an oversampling ratio of 16 11394 * 0b00001..Reserved 11395 * 0b00010..Reserved 11396 * 0b00011..Oversampling ratio of 4, requires BOTHEDGE to be set. 11397 * 0b00100..Oversampling ratio of 5, requires BOTHEDGE to be set. 11398 * 0b00101..Oversampling ratio of 6, requires BOTHEDGE to be set. 11399 * 0b00110..Oversampling ratio of 7, requires BOTHEDGE to be set. 11400 * 0b00111..Oversampling ratio of 8. 11401 * 0b01000..Oversampling ratio of 9. 11402 * 0b01001..Oversampling ratio of 10. 11403 * 0b01010..Oversampling ratio of 11. 11404 * 0b01011..Oversampling ratio of 12. 11405 * 0b01100..Oversampling ratio of 13. 11406 * 0b01101..Oversampling ratio of 14. 11407 * 0b01110..Oversampling ratio of 15. 11408 * 0b01111..Oversampling ratio of 16. 11409 * 0b10000..Oversampling ratio of 17. 11410 * 0b10001..Oversampling ratio of 18. 11411 * 0b10010..Oversampling ratio of 19. 11412 * 0b10011..Oversampling ratio of 20. 11413 * 0b10100..Oversampling ratio of 21. 11414 * 0b10101..Oversampling ratio of 22. 11415 * 0b10110..Oversampling ratio of 23. 11416 * 0b10111..Oversampling ratio of 24. 11417 * 0b11000..Oversampling ratio of 25. 11418 * 0b11001..Oversampling ratio of 26. 11419 * 0b11010..Oversampling ratio of 27. 11420 * 0b11011..Oversampling ratio of 28. 11421 * 0b11100..Oversampling ratio of 29. 11422 * 0b11101..Oversampling ratio of 30. 11423 * 0b11110..Oversampling ratio of 31. 11424 * 0b11111..Oversampling ratio of 32. 11425 */ 11426 #define LPUART_BAUD_OSR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_OSR_SHIFT)) & LPUART_BAUD_OSR_MASK) 11427 #define LPUART_BAUD_M10_MASK (0x20000000U) 11428 #define LPUART_BAUD_M10_SHIFT (29U) 11429 /*! M10 - 10-bit Mode select 11430 * 0b0..Receiver and transmitter use 7-bit to 9-bit data characters. 11431 * 0b1..Receiver and transmitter use 10-bit data characters. 11432 */ 11433 #define LPUART_BAUD_M10(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_M10_SHIFT)) & LPUART_BAUD_M10_MASK) 11434 #define LPUART_BAUD_MAEN2_MASK (0x40000000U) 11435 #define LPUART_BAUD_MAEN2_SHIFT (30U) 11436 /*! MAEN2 - Match Address Mode Enable 2 11437 * 0b0..Normal operation. 11438 * 0b1..Enables automatic address matching or data matching mode for MATCH[MA2]. 11439 */ 11440 #define LPUART_BAUD_MAEN2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN2_SHIFT)) & LPUART_BAUD_MAEN2_MASK) 11441 #define LPUART_BAUD_MAEN1_MASK (0x80000000U) 11442 #define LPUART_BAUD_MAEN1_SHIFT (31U) 11443 /*! MAEN1 - Match Address Mode Enable 1 11444 * 0b0..Normal operation. 11445 * 0b1..Enables automatic address matching or data matching mode for MATCH[MA1]. 11446 */ 11447 #define LPUART_BAUD_MAEN1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN1_SHIFT)) & LPUART_BAUD_MAEN1_MASK) 11448 /*! @} */ 11449 11450 /*! @name STAT - LPUART Status Register */ 11451 /*! @{ */ 11452 #define LPUART_STAT_MA2F_MASK (0x4000U) 11453 #define LPUART_STAT_MA2F_SHIFT (14U) 11454 /*! MA2F - Match 2 Flag 11455 * 0b0..Received data is not equal to MA2 11456 * 0b1..Received data is equal to MA2 11457 */ 11458 #define LPUART_STAT_MA2F(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA2F_SHIFT)) & LPUART_STAT_MA2F_MASK) 11459 #define LPUART_STAT_MA1F_MASK (0x8000U) 11460 #define LPUART_STAT_MA1F_SHIFT (15U) 11461 /*! MA1F - Match 1 Flag 11462 * 0b0..Received data is not equal to MA1 11463 * 0b1..Received data is equal to MA1 11464 */ 11465 #define LPUART_STAT_MA1F(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA1F_SHIFT)) & LPUART_STAT_MA1F_MASK) 11466 #define LPUART_STAT_PF_MASK (0x10000U) 11467 #define LPUART_STAT_PF_SHIFT (16U) 11468 /*! PF - Parity Error Flag 11469 * 0b0..No parity error. 11470 * 0b1..Parity error. 11471 */ 11472 #define LPUART_STAT_PF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_PF_SHIFT)) & LPUART_STAT_PF_MASK) 11473 #define LPUART_STAT_FE_MASK (0x20000U) 11474 #define LPUART_STAT_FE_SHIFT (17U) 11475 /*! FE - Framing Error Flag 11476 * 0b0..No framing error detected. This does not guarantee the framing is correct. 11477 * 0b1..Framing error. 11478 */ 11479 #define LPUART_STAT_FE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_FE_SHIFT)) & LPUART_STAT_FE_MASK) 11480 #define LPUART_STAT_NF_MASK (0x40000U) 11481 #define LPUART_STAT_NF_SHIFT (18U) 11482 /*! NF - Noise Flag 11483 * 0b0..No noise detected. 11484 * 0b1..Noise detected in the received character in LPUART_DATA. 11485 */ 11486 #define LPUART_STAT_NF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_NF_SHIFT)) & LPUART_STAT_NF_MASK) 11487 #define LPUART_STAT_OR_MASK (0x80000U) 11488 #define LPUART_STAT_OR_SHIFT (19U) 11489 /*! OR - Receiver Overrun Flag 11490 * 0b0..No overrun. 11491 * 0b1..Receive overrun (new LPUART data lost). 11492 */ 11493 #define LPUART_STAT_OR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_OR_SHIFT)) & LPUART_STAT_OR_MASK) 11494 #define LPUART_STAT_IDLE_MASK (0x100000U) 11495 #define LPUART_STAT_IDLE_SHIFT (20U) 11496 /*! IDLE - Idle Line Flag 11497 * 0b0..No idle line detected. 11498 * 0b1..Idle line was detected. 11499 */ 11500 #define LPUART_STAT_IDLE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_IDLE_SHIFT)) & LPUART_STAT_IDLE_MASK) 11501 #define LPUART_STAT_RDRF_MASK (0x200000U) 11502 #define LPUART_STAT_RDRF_SHIFT (21U) 11503 /*! RDRF - Receive Data Register Full Flag 11504 * 0b0..Receive data buffer empty. 11505 * 0b1..Receive data buffer full. 11506 */ 11507 #define LPUART_STAT_RDRF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RDRF_SHIFT)) & LPUART_STAT_RDRF_MASK) 11508 #define LPUART_STAT_TC_MASK (0x400000U) 11509 #define LPUART_STAT_TC_SHIFT (22U) 11510 /*! TC - Transmission Complete Flag 11511 * 0b0..Transmitter active (sending data, a preamble, or a break). 11512 * 0b1..Transmitter idle (transmission activity complete). 11513 */ 11514 #define LPUART_STAT_TC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TC_SHIFT)) & LPUART_STAT_TC_MASK) 11515 #define LPUART_STAT_TDRE_MASK (0x800000U) 11516 #define LPUART_STAT_TDRE_SHIFT (23U) 11517 /*! TDRE - Transmit Data Register Empty Flag 11518 * 0b0..Transmit data buffer full. 11519 * 0b1..Transmit data buffer empty. 11520 */ 11521 #define LPUART_STAT_TDRE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TDRE_SHIFT)) & LPUART_STAT_TDRE_MASK) 11522 #define LPUART_STAT_RAF_MASK (0x1000000U) 11523 #define LPUART_STAT_RAF_SHIFT (24U) 11524 /*! RAF - Receiver Active Flag 11525 * 0b0..LPUART receiver idle waiting for a start bit. 11526 * 0b1..LPUART receiver active (RXD input not idle). 11527 */ 11528 #define LPUART_STAT_RAF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RAF_SHIFT)) & LPUART_STAT_RAF_MASK) 11529 #define LPUART_STAT_LBKDE_MASK (0x2000000U) 11530 #define LPUART_STAT_LBKDE_SHIFT (25U) 11531 /*! LBKDE - LIN Break Detection Enable 11532 * 0b0..LIN break detect is disabled, normal break character can be detected. 11533 * 0b1..LIN break detect is enabled. LIN break character is detected at length of 11 bit times (if M = 0) or 12 (if M = 1) or 13 (M10 = 1). 11534 */ 11535 #define LPUART_STAT_LBKDE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDE_SHIFT)) & LPUART_STAT_LBKDE_MASK) 11536 #define LPUART_STAT_BRK13_MASK (0x4000000U) 11537 #define LPUART_STAT_BRK13_SHIFT (26U) 11538 /*! BRK13 - Break Character Generation Length 11539 * 0b0..Break character is transmitted with length of 9 to 13 bit times. 11540 * 0b1..Break character is transmitted with length of 12 to 15 bit times. 11541 */ 11542 #define LPUART_STAT_BRK13(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_BRK13_SHIFT)) & LPUART_STAT_BRK13_MASK) 11543 #define LPUART_STAT_RWUID_MASK (0x8000000U) 11544 #define LPUART_STAT_RWUID_SHIFT (27U) 11545 /*! RWUID - Receive Wake Up Idle Detect 11546 * 0b0..During receive standby state (RWU = 1), the IDLE bit does not get set upon detection of an idle 11547 * character. During address match wakeup, the IDLE bit does not set when an address does not match. 11548 * 0b1..During receive standby state (RWU = 1), the IDLE bit gets set upon detection of an idle character. During 11549 * address match wakeup, the IDLE bit does set when an address does not match. 11550 */ 11551 #define LPUART_STAT_RWUID(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RWUID_SHIFT)) & LPUART_STAT_RWUID_MASK) 11552 #define LPUART_STAT_RXINV_MASK (0x10000000U) 11553 #define LPUART_STAT_RXINV_SHIFT (28U) 11554 /*! RXINV - Receive Data Inversion 11555 * 0b0..Receive data not inverted. 11556 * 0b1..Receive data inverted. 11557 */ 11558 #define LPUART_STAT_RXINV(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXINV_SHIFT)) & LPUART_STAT_RXINV_MASK) 11559 #define LPUART_STAT_MSBF_MASK (0x20000000U) 11560 #define LPUART_STAT_MSBF_SHIFT (29U) 11561 /*! MSBF - MSB First 11562 * 0b0..LSB (bit0) is the first bit that is transmitted following the start bit. Further, the first bit received 11563 * after the start bit is identified as bit0. 11564 * 0b1..MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted following the start bit depending on 11565 * the setting of CTRL[M], CTRL[PE] and BAUD[M10]. Further, the first bit received after the start bit is 11566 * identified as bit9, bit8, bit7 or bit6 depending on the setting of CTRL[M] and CTRL[PE]. 11567 */ 11568 #define LPUART_STAT_MSBF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MSBF_SHIFT)) & LPUART_STAT_MSBF_MASK) 11569 #define LPUART_STAT_RXEDGIF_MASK (0x40000000U) 11570 #define LPUART_STAT_RXEDGIF_SHIFT (30U) 11571 /*! RXEDGIF - RXD Pin Active Edge Interrupt Flag 11572 * 0b0..No active edge on the receive pin has occurred. 11573 * 0b1..An active edge on the receive pin has occurred. 11574 */ 11575 #define LPUART_STAT_RXEDGIF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXEDGIF_SHIFT)) & LPUART_STAT_RXEDGIF_MASK) 11576 #define LPUART_STAT_LBKDIF_MASK (0x80000000U) 11577 #define LPUART_STAT_LBKDIF_SHIFT (31U) 11578 /*! LBKDIF - LIN Break Detect Interrupt Flag 11579 * 0b0..No LIN break character has been detected. 11580 * 0b1..LIN break character has been detected. 11581 */ 11582 #define LPUART_STAT_LBKDIF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDIF_SHIFT)) & LPUART_STAT_LBKDIF_MASK) 11583 /*! @} */ 11584 11585 /*! @name CTRL - LPUART Control Register */ 11586 /*! @{ */ 11587 #define LPUART_CTRL_PT_MASK (0x1U) 11588 #define LPUART_CTRL_PT_SHIFT (0U) 11589 /*! PT - Parity Type 11590 * 0b0..Even parity. 11591 * 0b1..Odd parity. 11592 */ 11593 #define LPUART_CTRL_PT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PT_SHIFT)) & LPUART_CTRL_PT_MASK) 11594 #define LPUART_CTRL_PE_MASK (0x2U) 11595 #define LPUART_CTRL_PE_SHIFT (1U) 11596 /*! PE - Parity Enable 11597 * 0b0..No hardware parity generation or checking. 11598 * 0b1..Parity enabled. 11599 */ 11600 #define LPUART_CTRL_PE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PE_SHIFT)) & LPUART_CTRL_PE_MASK) 11601 #define LPUART_CTRL_ILT_MASK (0x4U) 11602 #define LPUART_CTRL_ILT_SHIFT (2U) 11603 /*! ILT - Idle Line Type Select 11604 * 0b0..Idle character bit count starts after start bit. 11605 * 0b1..Idle character bit count starts after stop bit. 11606 */ 11607 #define LPUART_CTRL_ILT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILT_SHIFT)) & LPUART_CTRL_ILT_MASK) 11608 #define LPUART_CTRL_WAKE_MASK (0x8U) 11609 #define LPUART_CTRL_WAKE_SHIFT (3U) 11610 /*! WAKE - Receiver Wakeup Method Select 11611 * 0b0..Configures RWU for idle-line wakeup. 11612 * 0b1..Configures RWU with address-mark wakeup. 11613 */ 11614 #define LPUART_CTRL_WAKE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_WAKE_SHIFT)) & LPUART_CTRL_WAKE_MASK) 11615 #define LPUART_CTRL_M_MASK (0x10U) 11616 #define LPUART_CTRL_M_SHIFT (4U) 11617 /*! M - 9-Bit or 8-Bit Mode Select 11618 * 0b0..Receiver and transmitter use 8-bit data characters. 11619 * 0b1..Receiver and transmitter use 9-bit data characters. 11620 */ 11621 #define LPUART_CTRL_M(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_M_SHIFT)) & LPUART_CTRL_M_MASK) 11622 #define LPUART_CTRL_RSRC_MASK (0x20U) 11623 #define LPUART_CTRL_RSRC_SHIFT (5U) 11624 /*! RSRC - Receiver Source Select 11625 * 0b0..Provided LOOPS is set, RSRC is cleared, selects internal loop back mode and the LPUART does not use the RXD pin. 11626 * 0b1..Single-wire LPUART mode where the TXD pin is connected to the transmitter output and receiver input. 11627 */ 11628 #define LPUART_CTRL_RSRC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RSRC_SHIFT)) & LPUART_CTRL_RSRC_MASK) 11629 #define LPUART_CTRL_DOZEEN_MASK (0x40U) 11630 #define LPUART_CTRL_DOZEEN_SHIFT (6U) 11631 /*! DOZEEN - Doze Enable 11632 * 0b0..LPUART is enabled in Doze mode. 11633 * 0b1..LPUART is disabled in Doze mode. 11634 */ 11635 #define LPUART_CTRL_DOZEEN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_DOZEEN_SHIFT)) & LPUART_CTRL_DOZEEN_MASK) 11636 #define LPUART_CTRL_LOOPS_MASK (0x80U) 11637 #define LPUART_CTRL_LOOPS_SHIFT (7U) 11638 /*! LOOPS - Loop Mode Select 11639 * 0b0..Normal operation - RXD and TXD use separate pins. 11640 * 0b1..Loop mode or single-wire mode where transmitter outputs are internally connected to receiver input (see RSRC bit). 11641 */ 11642 #define LPUART_CTRL_LOOPS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_LOOPS_SHIFT)) & LPUART_CTRL_LOOPS_MASK) 11643 #define LPUART_CTRL_IDLECFG_MASK (0x700U) 11644 #define LPUART_CTRL_IDLECFG_SHIFT (8U) 11645 /*! IDLECFG - Idle Configuration 11646 * 0b000..1 idle character 11647 * 0b001..2 idle characters 11648 * 0b010..4 idle characters 11649 * 0b011..8 idle characters 11650 * 0b100..16 idle characters 11651 * 0b101..32 idle characters 11652 * 0b110..64 idle characters 11653 * 0b111..128 idle characters 11654 */ 11655 #define LPUART_CTRL_IDLECFG(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_IDLECFG_SHIFT)) & LPUART_CTRL_IDLECFG_MASK) 11656 #define LPUART_CTRL_M7_MASK (0x800U) 11657 #define LPUART_CTRL_M7_SHIFT (11U) 11658 /*! M7 - 7-Bit Mode Select 11659 * 0b0..Receiver and transmitter use 8-bit to 10-bit data characters. 11660 * 0b1..Receiver and transmitter use 7-bit data characters. 11661 */ 11662 #define LPUART_CTRL_M7(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_M7_SHIFT)) & LPUART_CTRL_M7_MASK) 11663 #define LPUART_CTRL_MA2IE_MASK (0x4000U) 11664 #define LPUART_CTRL_MA2IE_SHIFT (14U) 11665 /*! MA2IE - Match 2 Interrupt Enable 11666 * 0b0..MA2F interrupt disabled 11667 * 0b1..MA2F interrupt enabled 11668 */ 11669 #define LPUART_CTRL_MA2IE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA2IE_SHIFT)) & LPUART_CTRL_MA2IE_MASK) 11670 #define LPUART_CTRL_MA1IE_MASK (0x8000U) 11671 #define LPUART_CTRL_MA1IE_SHIFT (15U) 11672 /*! MA1IE - Match 1 Interrupt Enable 11673 * 0b0..MA1F interrupt disabled 11674 * 0b1..MA1F interrupt enabled 11675 */ 11676 #define LPUART_CTRL_MA1IE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA1IE_SHIFT)) & LPUART_CTRL_MA1IE_MASK) 11677 #define LPUART_CTRL_SBK_MASK (0x10000U) 11678 #define LPUART_CTRL_SBK_SHIFT (16U) 11679 /*! SBK - Send Break 11680 * 0b0..Normal transmitter operation. 11681 * 0b1..Queue break character(s) to be sent. 11682 */ 11683 #define LPUART_CTRL_SBK(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_SBK_SHIFT)) & LPUART_CTRL_SBK_MASK) 11684 #define LPUART_CTRL_RWU_MASK (0x20000U) 11685 #define LPUART_CTRL_RWU_SHIFT (17U) 11686 /*! RWU - Receiver Wakeup Control 11687 * 0b0..Normal receiver operation. 11688 * 0b1..LPUART receiver in standby waiting for wakeup condition. 11689 */ 11690 #define LPUART_CTRL_RWU(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RWU_SHIFT)) & LPUART_CTRL_RWU_MASK) 11691 #define LPUART_CTRL_RE_MASK (0x40000U) 11692 #define LPUART_CTRL_RE_SHIFT (18U) 11693 /*! RE - Receiver Enable 11694 * 0b0..Receiver disabled. 11695 * 0b1..Receiver enabled. 11696 */ 11697 #define LPUART_CTRL_RE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RE_SHIFT)) & LPUART_CTRL_RE_MASK) 11698 #define LPUART_CTRL_TE_MASK (0x80000U) 11699 #define LPUART_CTRL_TE_SHIFT (19U) 11700 /*! TE - Transmitter Enable 11701 * 0b0..Transmitter disabled. 11702 * 0b1..Transmitter enabled. 11703 */ 11704 #define LPUART_CTRL_TE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TE_SHIFT)) & LPUART_CTRL_TE_MASK) 11705 #define LPUART_CTRL_ILIE_MASK (0x100000U) 11706 #define LPUART_CTRL_ILIE_SHIFT (20U) 11707 /*! ILIE - Idle Line Interrupt Enable 11708 * 0b0..Hardware interrupts from IDLE disabled; use polling. 11709 * 0b1..Hardware interrupt requested when IDLE flag is 1. 11710 */ 11711 #define LPUART_CTRL_ILIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILIE_SHIFT)) & LPUART_CTRL_ILIE_MASK) 11712 #define LPUART_CTRL_RIE_MASK (0x200000U) 11713 #define LPUART_CTRL_RIE_SHIFT (21U) 11714 /*! RIE - Receiver Interrupt Enable 11715 * 0b0..Hardware interrupts from RDRF disabled; use polling. 11716 * 0b1..Hardware interrupt requested when RDRF flag is 1. 11717 */ 11718 #define LPUART_CTRL_RIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RIE_SHIFT)) & LPUART_CTRL_RIE_MASK) 11719 #define LPUART_CTRL_TCIE_MASK (0x400000U) 11720 #define LPUART_CTRL_TCIE_SHIFT (22U) 11721 /*! TCIE - Transmission Complete Interrupt Enable for 11722 * 0b0..Hardware interrupts from TC disabled; use polling. 11723 * 0b1..Hardware interrupt requested when TC flag is 1. 11724 */ 11725 #define LPUART_CTRL_TCIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TCIE_SHIFT)) & LPUART_CTRL_TCIE_MASK) 11726 #define LPUART_CTRL_TIE_MASK (0x800000U) 11727 #define LPUART_CTRL_TIE_SHIFT (23U) 11728 /*! TIE - Transmit Interrupt Enable 11729 * 0b0..Hardware interrupts from TDRE disabled; use polling. 11730 * 0b1..Hardware interrupt requested when TDRE flag is 1. 11731 */ 11732 #define LPUART_CTRL_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TIE_SHIFT)) & LPUART_CTRL_TIE_MASK) 11733 #define LPUART_CTRL_PEIE_MASK (0x1000000U) 11734 #define LPUART_CTRL_PEIE_SHIFT (24U) 11735 /*! PEIE - Parity Error Interrupt Enable 11736 * 0b0..PF interrupts disabled; use polling). 11737 * 0b1..Hardware interrupt requested when PF is set. 11738 */ 11739 #define LPUART_CTRL_PEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PEIE_SHIFT)) & LPUART_CTRL_PEIE_MASK) 11740 #define LPUART_CTRL_FEIE_MASK (0x2000000U) 11741 #define LPUART_CTRL_FEIE_SHIFT (25U) 11742 /*! FEIE - Framing Error Interrupt Enable 11743 * 0b0..FE interrupts disabled; use polling. 11744 * 0b1..Hardware interrupt requested when FE is set. 11745 */ 11746 #define LPUART_CTRL_FEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_FEIE_SHIFT)) & LPUART_CTRL_FEIE_MASK) 11747 #define LPUART_CTRL_NEIE_MASK (0x4000000U) 11748 #define LPUART_CTRL_NEIE_SHIFT (26U) 11749 /*! NEIE - Noise Error Interrupt Enable 11750 * 0b0..NF interrupts disabled; use polling. 11751 * 0b1..Hardware interrupt requested when NF is set. 11752 */ 11753 #define LPUART_CTRL_NEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_NEIE_SHIFT)) & LPUART_CTRL_NEIE_MASK) 11754 #define LPUART_CTRL_ORIE_MASK (0x8000000U) 11755 #define LPUART_CTRL_ORIE_SHIFT (27U) 11756 /*! ORIE - Overrun Interrupt Enable 11757 * 0b0..OR interrupts disabled; use polling. 11758 * 0b1..Hardware interrupt requested when OR is set. 11759 */ 11760 #define LPUART_CTRL_ORIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ORIE_SHIFT)) & LPUART_CTRL_ORIE_MASK) 11761 #define LPUART_CTRL_TXINV_MASK (0x10000000U) 11762 #define LPUART_CTRL_TXINV_SHIFT (28U) 11763 /*! TXINV - Transmit Data Inversion 11764 * 0b0..Transmit data not inverted. 11765 * 0b1..Transmit data inverted. 11766 */ 11767 #define LPUART_CTRL_TXINV(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXINV_SHIFT)) & LPUART_CTRL_TXINV_MASK) 11768 #define LPUART_CTRL_TXDIR_MASK (0x20000000U) 11769 #define LPUART_CTRL_TXDIR_SHIFT (29U) 11770 /*! TXDIR - TXD Pin Direction in Single-Wire Mode 11771 * 0b0..TXD pin is an input in single-wire mode. 11772 * 0b1..TXD pin is an output in single-wire mode. 11773 */ 11774 #define LPUART_CTRL_TXDIR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXDIR_SHIFT)) & LPUART_CTRL_TXDIR_MASK) 11775 #define LPUART_CTRL_R9T8_MASK (0x40000000U) 11776 #define LPUART_CTRL_R9T8_SHIFT (30U) 11777 #define LPUART_CTRL_R9T8(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R9T8_SHIFT)) & LPUART_CTRL_R9T8_MASK) 11778 #define LPUART_CTRL_R8T9_MASK (0x80000000U) 11779 #define LPUART_CTRL_R8T9_SHIFT (31U) 11780 #define LPUART_CTRL_R8T9(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R8T9_SHIFT)) & LPUART_CTRL_R8T9_MASK) 11781 /*! @} */ 11782 11783 /*! @name DATA - LPUART Data Register */ 11784 /*! @{ */ 11785 #define LPUART_DATA_R0T0_MASK (0x1U) 11786 #define LPUART_DATA_R0T0_SHIFT (0U) 11787 #define LPUART_DATA_R0T0(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R0T0_SHIFT)) & LPUART_DATA_R0T0_MASK) 11788 #define LPUART_DATA_R1T1_MASK (0x2U) 11789 #define LPUART_DATA_R1T1_SHIFT (1U) 11790 #define LPUART_DATA_R1T1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R1T1_SHIFT)) & LPUART_DATA_R1T1_MASK) 11791 #define LPUART_DATA_R2T2_MASK (0x4U) 11792 #define LPUART_DATA_R2T2_SHIFT (2U) 11793 #define LPUART_DATA_R2T2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R2T2_SHIFT)) & LPUART_DATA_R2T2_MASK) 11794 #define LPUART_DATA_R3T3_MASK (0x8U) 11795 #define LPUART_DATA_R3T3_SHIFT (3U) 11796 #define LPUART_DATA_R3T3(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R3T3_SHIFT)) & LPUART_DATA_R3T3_MASK) 11797 #define LPUART_DATA_R4T4_MASK (0x10U) 11798 #define LPUART_DATA_R4T4_SHIFT (4U) 11799 #define LPUART_DATA_R4T4(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R4T4_SHIFT)) & LPUART_DATA_R4T4_MASK) 11800 #define LPUART_DATA_R5T5_MASK (0x20U) 11801 #define LPUART_DATA_R5T5_SHIFT (5U) 11802 #define LPUART_DATA_R5T5(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R5T5_SHIFT)) & LPUART_DATA_R5T5_MASK) 11803 #define LPUART_DATA_R6T6_MASK (0x40U) 11804 #define LPUART_DATA_R6T6_SHIFT (6U) 11805 #define LPUART_DATA_R6T6(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R6T6_SHIFT)) & LPUART_DATA_R6T6_MASK) 11806 #define LPUART_DATA_R7T7_MASK (0x80U) 11807 #define LPUART_DATA_R7T7_SHIFT (7U) 11808 #define LPUART_DATA_R7T7(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R7T7_SHIFT)) & LPUART_DATA_R7T7_MASK) 11809 #define LPUART_DATA_R8T8_MASK (0x100U) 11810 #define LPUART_DATA_R8T8_SHIFT (8U) 11811 #define LPUART_DATA_R8T8(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R8T8_SHIFT)) & LPUART_DATA_R8T8_MASK) 11812 #define LPUART_DATA_R9T9_MASK (0x200U) 11813 #define LPUART_DATA_R9T9_SHIFT (9U) 11814 #define LPUART_DATA_R9T9(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R9T9_SHIFT)) & LPUART_DATA_R9T9_MASK) 11815 #define LPUART_DATA_IDLINE_MASK (0x800U) 11816 #define LPUART_DATA_IDLINE_SHIFT (11U) 11817 /*! IDLINE - Idle Line 11818 * 0b0..Receiver was not idle before receiving this character. 11819 * 0b1..Receiver was idle before receiving this character. 11820 */ 11821 #define LPUART_DATA_IDLINE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_IDLINE_SHIFT)) & LPUART_DATA_IDLINE_MASK) 11822 #define LPUART_DATA_RXEMPT_MASK (0x1000U) 11823 #define LPUART_DATA_RXEMPT_SHIFT (12U) 11824 /*! RXEMPT - Receive Buffer Empty 11825 * 0b0..Receive buffer contains valid data. 11826 * 0b1..Receive buffer is empty, data returned on read is not valid. 11827 */ 11828 #define LPUART_DATA_RXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_RXEMPT_SHIFT)) & LPUART_DATA_RXEMPT_MASK) 11829 #define LPUART_DATA_FRETSC_MASK (0x2000U) 11830 #define LPUART_DATA_FRETSC_SHIFT (13U) 11831 /*! FRETSC - Frame Error / Transmit Special Character 11832 * 0b0..The dataword was received without a frame error on read, or transmit a normal character on write. 11833 * 0b1..The dataword was received with a frame error, or transmit an idle or break character on transmit. 11834 */ 11835 #define LPUART_DATA_FRETSC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_FRETSC_SHIFT)) & LPUART_DATA_FRETSC_MASK) 11836 #define LPUART_DATA_PARITYE_MASK (0x4000U) 11837 #define LPUART_DATA_PARITYE_SHIFT (14U) 11838 /*! PARITYE - PARITYE 11839 * 0b0..The dataword was received without a parity error. 11840 * 0b1..The dataword was received with a parity error. 11841 */ 11842 #define LPUART_DATA_PARITYE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_PARITYE_SHIFT)) & LPUART_DATA_PARITYE_MASK) 11843 #define LPUART_DATA_NOISY_MASK (0x8000U) 11844 #define LPUART_DATA_NOISY_SHIFT (15U) 11845 /*! NOISY - NOISY 11846 * 0b0..The dataword was received without noise. 11847 * 0b1..The data was received with noise. 11848 */ 11849 #define LPUART_DATA_NOISY(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_NOISY_SHIFT)) & LPUART_DATA_NOISY_MASK) 11850 /*! @} */ 11851 11852 /*! @name MATCH - LPUART Match Address Register */ 11853 /*! @{ */ 11854 #define LPUART_MATCH_MA1_MASK (0x3FFU) 11855 #define LPUART_MATCH_MA1_SHIFT (0U) 11856 #define LPUART_MATCH_MA1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA1_SHIFT)) & LPUART_MATCH_MA1_MASK) 11857 #define LPUART_MATCH_MA2_MASK (0x3FF0000U) 11858 #define LPUART_MATCH_MA2_SHIFT (16U) 11859 #define LPUART_MATCH_MA2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA2_SHIFT)) & LPUART_MATCH_MA2_MASK) 11860 /*! @} */ 11861 11862 /*! @name MODIR - LPUART Modem IrDA Register */ 11863 /*! @{ */ 11864 #define LPUART_MODIR_TXCTSE_MASK (0x1U) 11865 #define LPUART_MODIR_TXCTSE_SHIFT (0U) 11866 /*! TXCTSE - Transmitter clear-to-send enable 11867 * 0b0..CTS has no effect on the transmitter. 11868 * 0b1..Enables clear-to-send operation. The transmitter checks the state of CTS each time it is ready to send a 11869 * character. If CTS is asserted, the character is sent. If CTS is deasserted, the signal TXD remains in the 11870 * mark state and transmission is delayed until CTS is asserted. Changes in CTS as a character is being sent 11871 * do not affect its transmission. 11872 */ 11873 #define LPUART_MODIR_TXCTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSE_SHIFT)) & LPUART_MODIR_TXCTSE_MASK) 11874 #define LPUART_MODIR_TXRTSE_MASK (0x2U) 11875 #define LPUART_MODIR_TXRTSE_SHIFT (1U) 11876 /*! TXRTSE - Transmitter request-to-send enable 11877 * 0b0..The transmitter has no effect on RTS. 11878 * 0b1..When a character is placed into an empty transmitter data buffer , RTS asserts one bit time before the 11879 * start bit is transmitted. RTS deasserts one bit time after all characters in the transmitter data buffer and 11880 * shift register are completely sent, including the last stop bit. 11881 */ 11882 #define LPUART_MODIR_TXRTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSE_SHIFT)) & LPUART_MODIR_TXRTSE_MASK) 11883 #define LPUART_MODIR_TXRTSPOL_MASK (0x4U) 11884 #define LPUART_MODIR_TXRTSPOL_SHIFT (2U) 11885 /*! TXRTSPOL - Transmitter request-to-send polarity 11886 * 0b0..Transmitter RTS is active low. 11887 * 0b1..Transmitter RTS is active high. 11888 */ 11889 #define LPUART_MODIR_TXRTSPOL(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSPOL_SHIFT)) & LPUART_MODIR_TXRTSPOL_MASK) 11890 #define LPUART_MODIR_RXRTSE_MASK (0x8U) 11891 #define LPUART_MODIR_RXRTSE_SHIFT (3U) 11892 /*! RXRTSE - Receiver request-to-send enable 11893 * 0b0..The receiver has no effect on RTS. 11894 * 0b1..RTS is deasserted if the receiver data register is full or a start bit has been detected that would cause 11895 * the receiver data register to become full. RTS is asserted if the receiver data register is not full and 11896 * has not detected a start bit that would cause the receiver data register to become full. 11897 */ 11898 #define LPUART_MODIR_RXRTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RXRTSE_SHIFT)) & LPUART_MODIR_RXRTSE_MASK) 11899 #define LPUART_MODIR_TXCTSC_MASK (0x10U) 11900 #define LPUART_MODIR_TXCTSC_SHIFT (4U) 11901 /*! TXCTSC - Transmit CTS Configuration 11902 * 0b0..CTS input is sampled at the start of each character. 11903 * 0b1..CTS input is sampled when the transmitter is idle. 11904 */ 11905 #define LPUART_MODIR_TXCTSC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSC_SHIFT)) & LPUART_MODIR_TXCTSC_MASK) 11906 #define LPUART_MODIR_TXCTSSRC_MASK (0x20U) 11907 #define LPUART_MODIR_TXCTSSRC_SHIFT (5U) 11908 /*! TXCTSSRC - Transmit CTS Source 11909 * 0b0..CTS input is the CTS_B pin. 11910 * 0b1..CTS input is the inverted Receiver Match result. 11911 */ 11912 #define LPUART_MODIR_TXCTSSRC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSSRC_SHIFT)) & LPUART_MODIR_TXCTSSRC_MASK) 11913 #define LPUART_MODIR_RTSWATER_MASK (0x700U) 11914 #define LPUART_MODIR_RTSWATER_SHIFT (8U) 11915 #define LPUART_MODIR_RTSWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RTSWATER_SHIFT)) & LPUART_MODIR_RTSWATER_MASK) 11916 #define LPUART_MODIR_TNP_MASK (0x30000U) 11917 #define LPUART_MODIR_TNP_SHIFT (16U) 11918 /*! TNP - Transmitter narrow pulse 11919 * 0b00..1/OSR. 11920 * 0b01..2/OSR. 11921 * 0b10..3/OSR. 11922 * 0b11..4/OSR. 11923 */ 11924 #define LPUART_MODIR_TNP(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TNP_SHIFT)) & LPUART_MODIR_TNP_MASK) 11925 #define LPUART_MODIR_IREN_MASK (0x40000U) 11926 #define LPUART_MODIR_IREN_SHIFT (18U) 11927 /*! IREN - Infrared enable 11928 * 0b0..IR disabled. 11929 * 0b1..IR enabled. 11930 */ 11931 #define LPUART_MODIR_IREN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_IREN_SHIFT)) & LPUART_MODIR_IREN_MASK) 11932 /*! @} */ 11933 11934 /*! @name FIFO - LPUART FIFO Register */ 11935 /*! @{ */ 11936 #define LPUART_FIFO_RXFIFOSIZE_MASK (0x7U) 11937 #define LPUART_FIFO_RXFIFOSIZE_SHIFT (0U) 11938 /*! RXFIFOSIZE - Receive FIFO. Buffer Depth 11939 * 0b000..Receive FIFO/Buffer depth = 1 dataword. 11940 * 0b001..Receive FIFO/Buffer depth = 4 datawords. 11941 * 0b010..Receive FIFO/Buffer depth = 8 datawords. 11942 * 0b011..Receive FIFO/Buffer depth = 16 datawords. 11943 * 0b100..Receive FIFO/Buffer depth = 32 datawords. 11944 * 0b101..Receive FIFO/Buffer depth = 64 datawords. 11945 * 0b110..Receive FIFO/Buffer depth = 128 datawords. 11946 * 0b111..Receive FIFO/Buffer depth = 256 datawords. 11947 */ 11948 #define LPUART_FIFO_RXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFIFOSIZE_SHIFT)) & LPUART_FIFO_RXFIFOSIZE_MASK) 11949 #define LPUART_FIFO_RXFE_MASK (0x8U) 11950 #define LPUART_FIFO_RXFE_SHIFT (3U) 11951 /*! RXFE - Receive FIFO Enable 11952 * 0b0..Receive FIFO is not enabled. Buffer is depth 1. (Legacy support) 11953 * 0b1..Receive FIFO is enabled. Buffer is depth indicted by RXFIFOSIZE. 11954 */ 11955 #define LPUART_FIFO_RXFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFE_SHIFT)) & LPUART_FIFO_RXFE_MASK) 11956 #define LPUART_FIFO_TXFIFOSIZE_MASK (0x70U) 11957 #define LPUART_FIFO_TXFIFOSIZE_SHIFT (4U) 11958 /*! TXFIFOSIZE - Transmit FIFO. Buffer Depth 11959 * 0b000..Transmit FIFO/Buffer depth = 1 dataword. 11960 * 0b001..Transmit FIFO/Buffer depth = 4 datawords. 11961 * 0b010..Transmit FIFO/Buffer depth = 8 datawords. 11962 * 0b011..Transmit FIFO/Buffer depth = 16 datawords. 11963 * 0b100..Transmit FIFO/Buffer depth = 32 datawords. 11964 * 0b101..Transmit FIFO/Buffer depth = 64 datawords. 11965 * 0b110..Transmit FIFO/Buffer depth = 128 datawords. 11966 * 0b111..Transmit FIFO/Buffer depth = 256 datawords 11967 */ 11968 #define LPUART_FIFO_TXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFIFOSIZE_SHIFT)) & LPUART_FIFO_TXFIFOSIZE_MASK) 11969 #define LPUART_FIFO_TXFE_MASK (0x80U) 11970 #define LPUART_FIFO_TXFE_SHIFT (7U) 11971 /*! TXFE - Transmit FIFO Enable 11972 * 0b0..Transmit FIFO is not enabled. Buffer is depth 1. (Legacy support). 11973 * 0b1..Transmit FIFO is enabled. Buffer is depth indicated by TXFIFOSIZE. 11974 */ 11975 #define LPUART_FIFO_TXFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFE_SHIFT)) & LPUART_FIFO_TXFE_MASK) 11976 #define LPUART_FIFO_RXUFE_MASK (0x100U) 11977 #define LPUART_FIFO_RXUFE_SHIFT (8U) 11978 /*! RXUFE - Receive FIFO Underflow Interrupt Enable 11979 * 0b0..RXUF flag does not generate an interrupt to the host. 11980 * 0b1..RXUF flag generates an interrupt to the host. 11981 */ 11982 #define LPUART_FIFO_RXUFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUFE_SHIFT)) & LPUART_FIFO_RXUFE_MASK) 11983 #define LPUART_FIFO_TXOFE_MASK (0x200U) 11984 #define LPUART_FIFO_TXOFE_SHIFT (9U) 11985 /*! TXOFE - Transmit FIFO Overflow Interrupt Enable 11986 * 0b0..TXOF flag does not generate an interrupt to the host. 11987 * 0b1..TXOF flag generates an interrupt to the host. 11988 */ 11989 #define LPUART_FIFO_TXOFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOFE_SHIFT)) & LPUART_FIFO_TXOFE_MASK) 11990 #define LPUART_FIFO_RXIDEN_MASK (0x1C00U) 11991 #define LPUART_FIFO_RXIDEN_SHIFT (10U) 11992 /*! RXIDEN - Receiver Idle Empty Enable 11993 * 0b000..Disable RDRF assertion due to partially filled FIFO when receiver is idle. 11994 * 0b001..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 1 character. 11995 * 0b010..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 2 characters. 11996 * 0b011..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 4 characters. 11997 * 0b100..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 8 characters. 11998 * 0b101..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 16 characters. 11999 * 0b110..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 32 characters. 12000 * 0b111..Enable RDRF assertion due to partially filled FIFO when receiver is idle for 64 characters. 12001 */ 12002 #define LPUART_FIFO_RXIDEN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXIDEN_SHIFT)) & LPUART_FIFO_RXIDEN_MASK) 12003 #define LPUART_FIFO_RXFLUSH_MASK (0x4000U) 12004 #define LPUART_FIFO_RXFLUSH_SHIFT (14U) 12005 /*! RXFLUSH - Receive FIFO/Buffer Flush 12006 * 0b0..No flush operation occurs. 12007 * 0b1..All data in the receive FIFO/buffer is cleared out. 12008 */ 12009 #define LPUART_FIFO_RXFLUSH(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFLUSH_SHIFT)) & LPUART_FIFO_RXFLUSH_MASK) 12010 #define LPUART_FIFO_TXFLUSH_MASK (0x8000U) 12011 #define LPUART_FIFO_TXFLUSH_SHIFT (15U) 12012 /*! TXFLUSH - Transmit FIFO/Buffer Flush 12013 * 0b0..No flush operation occurs. 12014 * 0b1..All data in the transmit FIFO/Buffer is cleared out. 12015 */ 12016 #define LPUART_FIFO_TXFLUSH(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFLUSH_SHIFT)) & LPUART_FIFO_TXFLUSH_MASK) 12017 #define LPUART_FIFO_RXUF_MASK (0x10000U) 12018 #define LPUART_FIFO_RXUF_SHIFT (16U) 12019 /*! RXUF - Receiver Buffer Underflow Flag 12020 * 0b0..No receive buffer underflow has occurred since the last time the flag was cleared. 12021 * 0b1..At least one receive buffer underflow has occurred since the last time the flag was cleared. 12022 */ 12023 #define LPUART_FIFO_RXUF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUF_SHIFT)) & LPUART_FIFO_RXUF_MASK) 12024 #define LPUART_FIFO_TXOF_MASK (0x20000U) 12025 #define LPUART_FIFO_TXOF_SHIFT (17U) 12026 /*! TXOF - Transmitter Buffer Overflow Flag 12027 * 0b0..No transmit buffer overflow has occurred since the last time the flag was cleared. 12028 * 0b1..At least one transmit buffer overflow has occurred since the last time the flag was cleared. 12029 */ 12030 #define LPUART_FIFO_TXOF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOF_SHIFT)) & LPUART_FIFO_TXOF_MASK) 12031 #define LPUART_FIFO_RXEMPT_MASK (0x400000U) 12032 #define LPUART_FIFO_RXEMPT_SHIFT (22U) 12033 /*! RXEMPT - Receive Buffer/FIFO Empty 12034 * 0b0..Receive buffer is not empty. 12035 * 0b1..Receive buffer is empty. 12036 */ 12037 #define LPUART_FIFO_RXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXEMPT_SHIFT)) & LPUART_FIFO_RXEMPT_MASK) 12038 #define LPUART_FIFO_TXEMPT_MASK (0x800000U) 12039 #define LPUART_FIFO_TXEMPT_SHIFT (23U) 12040 /*! TXEMPT - Transmit Buffer/FIFO Empty 12041 * 0b0..Transmit buffer is not empty. 12042 * 0b1..Transmit buffer is empty. 12043 */ 12044 #define LPUART_FIFO_TXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXEMPT_SHIFT)) & LPUART_FIFO_TXEMPT_MASK) 12045 /*! @} */ 12046 12047 /*! @name WATER - LPUART Watermark Register */ 12048 /*! @{ */ 12049 #define LPUART_WATER_TXWATER_MASK (0x7U) 12050 #define LPUART_WATER_TXWATER_SHIFT (0U) 12051 #define LPUART_WATER_TXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXWATER_SHIFT)) & LPUART_WATER_TXWATER_MASK) 12052 #define LPUART_WATER_TXCOUNT_MASK (0xF00U) 12053 #define LPUART_WATER_TXCOUNT_SHIFT (8U) 12054 #define LPUART_WATER_TXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXCOUNT_SHIFT)) & LPUART_WATER_TXCOUNT_MASK) 12055 #define LPUART_WATER_RXWATER_MASK (0x70000U) 12056 #define LPUART_WATER_RXWATER_SHIFT (16U) 12057 #define LPUART_WATER_RXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXWATER_SHIFT)) & LPUART_WATER_RXWATER_MASK) 12058 #define LPUART_WATER_RXCOUNT_MASK (0xF000000U) 12059 #define LPUART_WATER_RXCOUNT_SHIFT (24U) 12060 #define LPUART_WATER_RXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXCOUNT_SHIFT)) & LPUART_WATER_RXCOUNT_MASK) 12061 /*! @} */ 12062 12063 12064 /*! 12065 * @} 12066 */ /* end of group LPUART_Register_Masks */ 12067 12068 12069 /* LPUART - Peripheral instance base addresses */ 12070 /** Peripheral LPUART0 base address */ 12071 #define LPUART0_BASE (0x40042000u) 12072 /** Peripheral LPUART0 base pointer */ 12073 #define LPUART0 ((LPUART_Type *)LPUART0_BASE) 12074 /** Peripheral LPUART1 base address */ 12075 #define LPUART1_BASE (0x40043000u) 12076 /** Peripheral LPUART1 base pointer */ 12077 #define LPUART1 ((LPUART_Type *)LPUART1_BASE) 12078 /** Peripheral LPUART2 base address */ 12079 #define LPUART2_BASE (0x40044000u) 12080 /** Peripheral LPUART2 base pointer */ 12081 #define LPUART2 ((LPUART_Type *)LPUART2_BASE) 12082 /** Peripheral LPUART3 base address */ 12083 #define LPUART3_BASE (0x41036000u) 12084 /** Peripheral LPUART3 base pointer */ 12085 #define LPUART3 ((LPUART_Type *)LPUART3_BASE) 12086 /** Array initializer of LPUART peripheral base addresses */ 12087 #define LPUART_BASE_ADDRS { LPUART0_BASE, LPUART1_BASE, LPUART2_BASE, LPUART3_BASE } 12088 /** Array initializer of LPUART peripheral base pointers */ 12089 #define LPUART_BASE_PTRS { LPUART0, LPUART1, LPUART2, LPUART3 } 12090 /** Interrupt vectors for the LPUART peripheral type */ 12091 #define LPUART_RX_TX_IRQS { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn } 12092 #define LPUART_ERR_IRQS { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn } 12093 12094 /*! 12095 * @} 12096 */ /* end of group LPUART_Peripheral_Access_Layer */ 12097 12098 12099 /* ---------------------------------------------------------------------------- 12100 -- MCM Peripheral Access Layer 12101 ---------------------------------------------------------------------------- */ 12102 12103 /*! 12104 * @addtogroup MCM_Peripheral_Access_Layer MCM Peripheral Access Layer 12105 * @{ 12106 */ 12107 12108 /** MCM - Register Layout Typedef */ 12109 typedef struct { 12110 uint8_t RESERVED_0[8]; 12111 __I uint16_t PLASC; /**< Crossbar Switch (AXBS) Slave Configuration, offset: 0x8 */ 12112 __I uint16_t PLAMC; /**< Crossbar Switch (AXBS) Master Configuration, offset: 0xA */ 12113 __IO uint32_t CPCR; /**< Core Platform Control Register, offset: 0xC */ 12114 uint8_t RESERVED_1[36]; 12115 __IO uint32_t CPCR2; /**< Core Platform Control Register 2, offset: 0x34 */ 12116 uint8_t RESERVED_2[8]; 12117 __IO uint32_t CPO; /**< Compute Operation Control Register, offset: 0x40 */ 12118 } MCM_Type; 12119 12120 /* ---------------------------------------------------------------------------- 12121 -- MCM Register Masks 12122 ---------------------------------------------------------------------------- */ 12123 12124 /*! 12125 * @addtogroup MCM_Register_Masks MCM Register Masks 12126 * @{ 12127 */ 12128 12129 /*! @name PLASC - Crossbar Switch (AXBS) Slave Configuration */ 12130 /*! @{ */ 12131 #define MCM_PLASC_ASC_MASK (0xFFU) 12132 #define MCM_PLASC_ASC_SHIFT (0U) 12133 /*! ASC - Each bit in the ASC field indicates whether there is a corresponding connection to the 12134 * crossbar switch's slave input port. 12135 * 0b00000000..A bus slave connection to AXBS input port n is absent 12136 * 0b00000001..A bus slave connection to AXBS input port n is present 12137 */ 12138 #define MCM_PLASC_ASC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLASC_ASC_SHIFT)) & MCM_PLASC_ASC_MASK) 12139 /*! @} */ 12140 12141 /*! @name PLAMC - Crossbar Switch (AXBS) Master Configuration */ 12142 /*! @{ */ 12143 #define MCM_PLAMC_AMC_MASK (0xFFU) 12144 #define MCM_PLAMC_AMC_SHIFT (0U) 12145 /*! AMC - Each bit in the AMC field indicates whether there is a corresponding connection to the AXBS master input port. 12146 * 0b00000000..A bus master connection to AXBS input port n is absent 12147 * 0b00000001..A bus master connection to AXBS input port n is present 12148 */ 12149 #define MCM_PLAMC_AMC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLAMC_AMC_SHIFT)) & MCM_PLAMC_AMC_MASK) 12150 /*! @} */ 12151 12152 /*! @name CPCR - Core Platform Control Register */ 12153 /*! @{ */ 12154 #define MCM_CPCR_ARB_MASK (0x200U) 12155 #define MCM_CPCR_ARB_SHIFT (9U) 12156 /*! ARB - Arbitration select 12157 * 0b0..Fixed-priority arbitration for the crossbar masters 12158 * 0b1..Round-robin arbitration for the crossbar masters 12159 */ 12160 #define MCM_CPCR_ARB(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPCR_ARB_SHIFT)) & MCM_CPCR_ARB_MASK) 12161 /*! @} */ 12162 12163 /*! @name CPCR2 - Core Platform Control Register 2 */ 12164 /*! @{ */ 12165 #define MCM_CPCR2_CCBC_MASK (0x1U) 12166 #define MCM_CPCR2_CCBC_SHIFT (0U) 12167 #define MCM_CPCR2_CCBC(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_CCBC_SHIFT)) & MCM_CPCR2_CCBC_MASK) 12168 #define MCM_CPCR2_DCC_MASK (0x8U) 12169 #define MCM_CPCR2_DCC_SHIFT (3U) 12170 #define MCM_CPCR2_DCC(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_DCC_SHIFT)) & MCM_CPCR2_DCC_MASK) 12171 #define MCM_CPCR2_CCSIZ_MASK (0xF0U) 12172 #define MCM_CPCR2_CCSIZ_SHIFT (4U) 12173 /*! CCSIZ - Code cache size 12174 * 0b0000..No cache 12175 * 0b0010..2KB 12176 * 0b0011..4KB 12177 * 0b0100..8KB 12178 */ 12179 #define MCM_CPCR2_CCSIZ(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPCR2_CCSIZ_SHIFT)) & MCM_CPCR2_CCSIZ_MASK) 12180 /*! @} */ 12181 12182 /*! @name CPO - Compute Operation Control Register */ 12183 /*! @{ */ 12184 #define MCM_CPO_CPOREQ_MASK (0x1U) 12185 #define MCM_CPO_CPOREQ_SHIFT (0U) 12186 /*! CPOREQ - Compute Operation request 12187 * 0b0..Request is cleared. 12188 * 0b1..Request Compute Operation. 12189 */ 12190 #define MCM_CPO_CPOREQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOREQ_SHIFT)) & MCM_CPO_CPOREQ_MASK) 12191 #define MCM_CPO_CPOACK_MASK (0x2U) 12192 #define MCM_CPO_CPOACK_SHIFT (1U) 12193 /*! CPOACK - Compute Operation acknowledge 12194 * 0b0..Compute operation entry has not completed or compute operation exit has completed. 12195 * 0b1..Compute operation entry has completed or compute operation exit has not completed. 12196 */ 12197 #define MCM_CPO_CPOACK(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOACK_SHIFT)) & MCM_CPO_CPOACK_MASK) 12198 #define MCM_CPO_CPOWOI_MASK (0x4U) 12199 #define MCM_CPO_CPOWOI_SHIFT (2U) 12200 /*! CPOWOI - Compute Operation wakeup on interrupt 12201 * 0b0..No effect. 12202 * 0b1..When set, the CPOREQ is cleared on any interrupt or exception vector fetch. 12203 */ 12204 #define MCM_CPO_CPOWOI(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOWOI_SHIFT)) & MCM_CPO_CPOWOI_MASK) 12205 /*! @} */ 12206 12207 12208 /*! 12209 * @} 12210 */ /* end of group MCM_Register_Masks */ 12211 12212 12213 /* MCM - Peripheral instance base addresses */ 12214 /** Peripheral MCM1 base address */ 12215 #define MCM1_BASE (0xF0003000u) 12216 /** Peripheral MCM1 base pointer */ 12217 #define MCM1 ((MCM_Type *)MCM1_BASE) 12218 /** Array initializer of MCM peripheral base addresses */ 12219 #define MCM_BASE_ADDRS { 0u, MCM1_BASE } 12220 /** Array initializer of MCM peripheral base pointers */ 12221 #define MCM_BASE_PTRS { (MCM_Type *)0u, MCM1 } 12222 /* MCM compatibility definitions */ 12223 #define MCM_BASE MCM1_BASE 12224 #define MCM MCM1 12225 12226 12227 /*! 12228 * @} 12229 */ /* end of group MCM_Peripheral_Access_Layer */ 12230 12231 12232 /* ---------------------------------------------------------------------------- 12233 -- MMDVSQ Peripheral Access Layer 12234 ---------------------------------------------------------------------------- */ 12235 12236 /*! 12237 * @addtogroup MMDVSQ_Peripheral_Access_Layer MMDVSQ Peripheral Access Layer 12238 * @{ 12239 */ 12240 12241 /** MMDVSQ - Register Layout Typedef */ 12242 typedef struct { 12243 __IO uint32_t DEND; /**< Dividend Register, offset: 0x0 */ 12244 __IO uint32_t DSOR; /**< Divisor Register, offset: 0x4 */ 12245 __IO uint32_t CSR; /**< Control/Status Register, offset: 0x8 */ 12246 __IO uint32_t RES; /**< Result Register, offset: 0xC */ 12247 __O uint32_t RCND; /**< Radicand Register, offset: 0x10 */ 12248 } MMDVSQ_Type; 12249 12250 /* ---------------------------------------------------------------------------- 12251 -- MMDVSQ Register Masks 12252 ---------------------------------------------------------------------------- */ 12253 12254 /*! 12255 * @addtogroup MMDVSQ_Register_Masks MMDVSQ Register Masks 12256 * @{ 12257 */ 12258 12259 /*! @name DEND - Dividend Register */ 12260 /*! @{ */ 12261 #define MMDVSQ_DEND_DIVIDEND_MASK (0xFFFFFFFFU) 12262 #define MMDVSQ_DEND_DIVIDEND_SHIFT (0U) 12263 #define MMDVSQ_DEND_DIVIDEND(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_DEND_DIVIDEND_SHIFT)) & MMDVSQ_DEND_DIVIDEND_MASK) 12264 /*! @} */ 12265 12266 /*! @name DSOR - Divisor Register */ 12267 /*! @{ */ 12268 #define MMDVSQ_DSOR_DIVISOR_MASK (0xFFFFFFFFU) 12269 #define MMDVSQ_DSOR_DIVISOR_SHIFT (0U) 12270 #define MMDVSQ_DSOR_DIVISOR(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_DSOR_DIVISOR_SHIFT)) & MMDVSQ_DSOR_DIVISOR_MASK) 12271 /*! @} */ 12272 12273 /*! @name CSR - Control/Status Register */ 12274 /*! @{ */ 12275 #define MMDVSQ_CSR_SRT_MASK (0x1U) 12276 #define MMDVSQ_CSR_SRT_SHIFT (0U) 12277 /*! SRT - Start 12278 * 0b0..No operation initiated 12279 * 0b1..If CSR[DFS] = 1, then initiate a divide calculation, else ignore 12280 */ 12281 #define MMDVSQ_CSR_SRT(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_SRT_SHIFT)) & MMDVSQ_CSR_SRT_MASK) 12282 #define MMDVSQ_CSR_USGN_MASK (0x2U) 12283 #define MMDVSQ_CSR_USGN_SHIFT (1U) 12284 /*! USGN - Unsigned calculation 12285 * 0b0..Perform a signed divide 12286 * 0b1..Perform an unsigned divide 12287 */ 12288 #define MMDVSQ_CSR_USGN(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_USGN_SHIFT)) & MMDVSQ_CSR_USGN_MASK) 12289 #define MMDVSQ_CSR_REM_MASK (0x4U) 12290 #define MMDVSQ_CSR_REM_SHIFT (2U) 12291 /*! REM - REMainder calculation 12292 * 0b0..Return the quotient in the RES for the divide calculation 12293 * 0b1..Return the remainder in the RES for the divide calculation 12294 */ 12295 #define MMDVSQ_CSR_REM(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_REM_SHIFT)) & MMDVSQ_CSR_REM_MASK) 12296 #define MMDVSQ_CSR_DZE_MASK (0x8U) 12297 #define MMDVSQ_CSR_DZE_SHIFT (3U) 12298 /*! DZE - Divide-by-Zero-Enable 12299 * 0b0..Reads of the RES register return the register contents 12300 * 0b1..If CSR[DZ] = 1, an attempted read of RES register is error terminated to signal a divide-by-zero, else the register contents are returned 12301 */ 12302 #define MMDVSQ_CSR_DZE(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DZE_SHIFT)) & MMDVSQ_CSR_DZE_MASK) 12303 #define MMDVSQ_CSR_DZ_MASK (0x10U) 12304 #define MMDVSQ_CSR_DZ_SHIFT (4U) 12305 /*! DZ - Divide-by-Zero 12306 * 0b0..The last divide operation had a non-zero divisor, that is, DSOR != 0 12307 * 0b1..The last divide operation had a zero divisor, that is, DSOR = 0 12308 */ 12309 #define MMDVSQ_CSR_DZ(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DZ_SHIFT)) & MMDVSQ_CSR_DZ_MASK) 12310 #define MMDVSQ_CSR_DFS_MASK (0x20U) 12311 #define MMDVSQ_CSR_DFS_SHIFT (5U) 12312 /*! DFS - Disable Fast Start 12313 * 0b0..A divide operation is initiated by a write to the DSOR register 12314 * 0b1..A divide operation is initiated by a write to the CSR register with CSR[SRT] = 1 12315 */ 12316 #define MMDVSQ_CSR_DFS(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DFS_SHIFT)) & MMDVSQ_CSR_DFS_MASK) 12317 #define MMDVSQ_CSR_SQRT_MASK (0x20000000U) 12318 #define MMDVSQ_CSR_SQRT_SHIFT (29U) 12319 /*! SQRT - SQUARE ROOT 12320 * 0b0..Current or last MMDVSQ operation was not a square root 12321 * 0b1..Current or last MMDVSQ operation was a square root 12322 */ 12323 #define MMDVSQ_CSR_SQRT(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_SQRT_SHIFT)) & MMDVSQ_CSR_SQRT_MASK) 12324 #define MMDVSQ_CSR_DIV_MASK (0x40000000U) 12325 #define MMDVSQ_CSR_DIV_SHIFT (30U) 12326 /*! DIV - DIVIDE 12327 * 0b0..Current or last MMDVSQ operation was not a divide 12328 * 0b1..Current or last MMDVSQ operation was a divide 12329 */ 12330 #define MMDVSQ_CSR_DIV(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_DIV_SHIFT)) & MMDVSQ_CSR_DIV_MASK) 12331 #define MMDVSQ_CSR_BUSY_MASK (0x80000000U) 12332 #define MMDVSQ_CSR_BUSY_SHIFT (31U) 12333 /*! BUSY - BUSY 12334 * 0b0..MMDVSQ is idle 12335 * 0b1..MMDVSQ is busy performing a divide or square root calculation 12336 */ 12337 #define MMDVSQ_CSR_BUSY(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_CSR_BUSY_SHIFT)) & MMDVSQ_CSR_BUSY_MASK) 12338 /*! @} */ 12339 12340 /*! @name RES - Result Register */ 12341 /*! @{ */ 12342 #define MMDVSQ_RES_RESULT_MASK (0xFFFFFFFFU) 12343 #define MMDVSQ_RES_RESULT_SHIFT (0U) 12344 #define MMDVSQ_RES_RESULT(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_RES_RESULT_SHIFT)) & MMDVSQ_RES_RESULT_MASK) 12345 /*! @} */ 12346 12347 /*! @name RCND - Radicand Register */ 12348 /*! @{ */ 12349 #define MMDVSQ_RCND_RADICAND_MASK (0xFFFFFFFFU) 12350 #define MMDVSQ_RCND_RADICAND_SHIFT (0U) 12351 #define MMDVSQ_RCND_RADICAND(x) (((uint32_t)(((uint32_t)(x)) << MMDVSQ_RCND_RADICAND_SHIFT)) & MMDVSQ_RCND_RADICAND_MASK) 12352 /*! @} */ 12353 12354 12355 /*! 12356 * @} 12357 */ /* end of group MMDVSQ_Register_Masks */ 12358 12359 12360 /* MMDVSQ - Peripheral instance base addresses */ 12361 /** Peripheral MMDVSQ1 base address */ 12362 #define MMDVSQ1_BASE (0xF0004000u) 12363 /** Peripheral MMDVSQ1 base pointer */ 12364 #define MMDVSQ1 ((MMDVSQ_Type *)MMDVSQ1_BASE) 12365 /** Array initializer of MMDVSQ peripheral base addresses */ 12366 #define MMDVSQ_BASE_ADDRS { 0u, MMDVSQ1_BASE } 12367 /** Array initializer of MMDVSQ peripheral base pointers */ 12368 #define MMDVSQ_BASE_PTRS { (MMDVSQ_Type *)0u, MMDVSQ1 } 12369 12370 /*! 12371 * @} 12372 */ /* end of group MMDVSQ_Peripheral_Access_Layer */ 12373 12374 12375 /* ---------------------------------------------------------------------------- 12376 -- MSCM Peripheral Access Layer 12377 ---------------------------------------------------------------------------- */ 12378 12379 /*! 12380 * @addtogroup MSCM_Peripheral_Access_Layer MSCM Peripheral Access Layer 12381 * @{ 12382 */ 12383 12384 /** MSCM - Register Layout Typedef */ 12385 typedef struct { 12386 __I uint32_t CPXTYPE; /**< Processor X Type Register, offset: 0x0 */ 12387 __I uint32_t CPXNUM; /**< Processor X Number Register, offset: 0x4 */ 12388 __I uint32_t CPXMASTER; /**< Processor X Master Register, offset: 0x8 */ 12389 __I uint32_t CPXCOUNT; /**< Processor X Count Register, offset: 0xC */ 12390 __I uint32_t CPXCFG0; /**< Processor X Configuration Register 0, offset: 0x10 */ 12391 __I uint32_t CPXCFG1; /**< Processor X Configuration Register 1, offset: 0x14 */ 12392 __I uint32_t CPXCFG2; /**< Processor X Configuration Register 2, offset: 0x18 */ 12393 __I uint32_t CPXCFG3; /**< Processor X Configuration Register 3, offset: 0x1C */ 12394 struct { /* offset: 0x20, array step: 0x20 */ 12395 __I uint32_t TYPE; /**< Processor 0 Type Register..Processor 1 Type Register, array offset: 0x20, array step: 0x20 */ 12396 __I uint32_t NUM; /**< Processor 0 Number Register..Processor 1 Number Register, array offset: 0x24, array step: 0x20 */ 12397 __I uint32_t MASTER; /**< Processor 0 Master Register..Processor 1 Master Register, array offset: 0x28, array step: 0x20 */ 12398 __I uint32_t COUNT; /**< Processor 0 Count Register..Processor 1 Count Register, array offset: 0x2C, array step: 0x20 */ 12399 __I uint32_t CFG0; /**< Processor 0 Configuration Register 0..Processor 1 Configuration Register 0, array offset: 0x30, array step: 0x20 */ 12400 __I uint32_t CFG1; /**< Processor 0 Configuration Register 1..Processor 1 Configuration Register 1, array offset: 0x34, array step: 0x20 */ 12401 __I uint32_t CFG2; /**< Processor 0 Configuration Register 2..Processor 1 Configuration Register 2, array offset: 0x38, array step: 0x20 */ 12402 __I uint32_t CFG3; /**< Processor 0 Configuration Register 3..Processor 1 Configuration Register 3, array offset: 0x3C, array step: 0x20 */ 12403 } CP[2]; 12404 uint8_t RESERVED_0[928]; 12405 __IO uint32_t OCMDR0; /**< On-Chip Memory Descriptor Register, offset: 0x400 */ 12406 __IO uint32_t OCMDR1; /**< On-Chip Memory Descriptor Register, offset: 0x404 */ 12407 __IO uint32_t OCMDR2; /**< On-Chip Memory Descriptor Register, offset: 0x408 */ 12408 __IO uint32_t OCMDR3; /**< On-Chip Memory Descriptor Register, offset: 0x40C */ 12409 } MSCM_Type; 12410 12411 /* ---------------------------------------------------------------------------- 12412 -- MSCM Register Masks 12413 ---------------------------------------------------------------------------- */ 12414 12415 /*! 12416 * @addtogroup MSCM_Register_Masks MSCM Register Masks 12417 * @{ 12418 */ 12419 12420 /*! @name CPXTYPE - Processor X Type Register */ 12421 /*! @{ */ 12422 #define MSCM_CPXTYPE_RYPZ_MASK (0xFFU) 12423 #define MSCM_CPXTYPE_RYPZ_SHIFT (0U) 12424 #define MSCM_CPXTYPE_RYPZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXTYPE_RYPZ_SHIFT)) & MSCM_CPXTYPE_RYPZ_MASK) 12425 #define MSCM_CPXTYPE_PERSONALITY_MASK (0xFFFFFF00U) 12426 #define MSCM_CPXTYPE_PERSONALITY_SHIFT (8U) 12427 #define MSCM_CPXTYPE_PERSONALITY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXTYPE_PERSONALITY_SHIFT)) & MSCM_CPXTYPE_PERSONALITY_MASK) 12428 /*! @} */ 12429 12430 /*! @name CPXNUM - Processor X Number Register */ 12431 /*! @{ */ 12432 #define MSCM_CPXNUM_CPN_MASK (0x1U) 12433 #define MSCM_CPXNUM_CPN_SHIFT (0U) 12434 #define MSCM_CPXNUM_CPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXNUM_CPN_SHIFT)) & MSCM_CPXNUM_CPN_MASK) 12435 /*! @} */ 12436 12437 /*! @name CPXMASTER - Processor X Master Register */ 12438 /*! @{ */ 12439 #define MSCM_CPXMASTER_PPMN_MASK (0x3FU) 12440 #define MSCM_CPXMASTER_PPMN_SHIFT (0U) 12441 #define MSCM_CPXMASTER_PPMN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXMASTER_PPMN_SHIFT)) & MSCM_CPXMASTER_PPMN_MASK) 12442 /*! @} */ 12443 12444 /*! @name CPXCOUNT - Processor X Count Register */ 12445 /*! @{ */ 12446 #define MSCM_CPXCOUNT_PCNT_MASK (0x3U) 12447 #define MSCM_CPXCOUNT_PCNT_SHIFT (0U) 12448 #define MSCM_CPXCOUNT_PCNT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCOUNT_PCNT_SHIFT)) & MSCM_CPXCOUNT_PCNT_MASK) 12449 /*! @} */ 12450 12451 /*! @name CPXCFG0 - Processor X Configuration Register 0 */ 12452 /*! @{ */ 12453 #define MSCM_CPXCFG0_DCWY_MASK (0xFFU) 12454 #define MSCM_CPXCFG0_DCWY_SHIFT (0U) 12455 #define MSCM_CPXCFG0_DCWY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_DCWY_SHIFT)) & MSCM_CPXCFG0_DCWY_MASK) 12456 #define MSCM_CPXCFG0_DCSZ_MASK (0xFF00U) 12457 #define MSCM_CPXCFG0_DCSZ_SHIFT (8U) 12458 #define MSCM_CPXCFG0_DCSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_DCSZ_SHIFT)) & MSCM_CPXCFG0_DCSZ_MASK) 12459 #define MSCM_CPXCFG0_ICWY_MASK (0xFF0000U) 12460 #define MSCM_CPXCFG0_ICWY_SHIFT (16U) 12461 #define MSCM_CPXCFG0_ICWY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_ICWY_SHIFT)) & MSCM_CPXCFG0_ICWY_MASK) 12462 #define MSCM_CPXCFG0_ICSZ_MASK (0xFF000000U) 12463 #define MSCM_CPXCFG0_ICSZ_SHIFT (24U) 12464 #define MSCM_CPXCFG0_ICSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG0_ICSZ_SHIFT)) & MSCM_CPXCFG0_ICSZ_MASK) 12465 /*! @} */ 12466 12467 /*! @name CPXCFG1 - Processor X Configuration Register 1 */ 12468 /*! @{ */ 12469 #define MSCM_CPXCFG1_L2WY_MASK (0xFF0000U) 12470 #define MSCM_CPXCFG1_L2WY_SHIFT (16U) 12471 #define MSCM_CPXCFG1_L2WY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG1_L2WY_SHIFT)) & MSCM_CPXCFG1_L2WY_MASK) 12472 #define MSCM_CPXCFG1_L2SZ_MASK (0xFF000000U) 12473 #define MSCM_CPXCFG1_L2SZ_SHIFT (24U) 12474 #define MSCM_CPXCFG1_L2SZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG1_L2SZ_SHIFT)) & MSCM_CPXCFG1_L2SZ_MASK) 12475 /*! @} */ 12476 12477 /*! @name CPXCFG2 - Processor X Configuration Register 2 */ 12478 /*! @{ */ 12479 #define MSCM_CPXCFG2_TMUSZ_MASK (0xFF00U) 12480 #define MSCM_CPXCFG2_TMUSZ_SHIFT (8U) 12481 #define MSCM_CPXCFG2_TMUSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG2_TMUSZ_SHIFT)) & MSCM_CPXCFG2_TMUSZ_MASK) 12482 #define MSCM_CPXCFG2_TMLSZ_MASK (0xFF000000U) 12483 #define MSCM_CPXCFG2_TMLSZ_SHIFT (24U) 12484 #define MSCM_CPXCFG2_TMLSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG2_TMLSZ_SHIFT)) & MSCM_CPXCFG2_TMLSZ_MASK) 12485 /*! @} */ 12486 12487 /*! @name CPXCFG3 - Processor X Configuration Register 3 */ 12488 /*! @{ */ 12489 #define MSCM_CPXCFG3_FPU_MASK (0x1U) 12490 #define MSCM_CPXCFG3_FPU_SHIFT (0U) 12491 /*! FPU - Floating Point Unit 12492 * 0b0..FPU support is not included. 12493 * 0b1..FPU support is included. 12494 */ 12495 #define MSCM_CPXCFG3_FPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_FPU_SHIFT)) & MSCM_CPXCFG3_FPU_MASK) 12496 #define MSCM_CPXCFG3_SIMD_MASK (0x2U) 12497 #define MSCM_CPXCFG3_SIMD_SHIFT (1U) 12498 /*! SIMD - SIMD/NEON instruction support 12499 * 0b0..SIMD/NEON support is not included. 12500 * 0b1..SIMD/NEON support is included. 12501 */ 12502 #define MSCM_CPXCFG3_SIMD(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_SIMD_SHIFT)) & MSCM_CPXCFG3_SIMD_MASK) 12503 #define MSCM_CPXCFG3_JAZ_MASK (0x4U) 12504 #define MSCM_CPXCFG3_JAZ_SHIFT (2U) 12505 /*! JAZ - Jazelle support 12506 * 0b0..Jazelle support is not included. 12507 * 0b1..Jazelle support is included. 12508 */ 12509 #define MSCM_CPXCFG3_JAZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_JAZ_SHIFT)) & MSCM_CPXCFG3_JAZ_MASK) 12510 #define MSCM_CPXCFG3_MMU_MASK (0x8U) 12511 #define MSCM_CPXCFG3_MMU_SHIFT (3U) 12512 /*! MMU - Memory Management Unit 12513 * 0b0..MMU support is not included. 12514 * 0b1..MMU support is included. 12515 */ 12516 #define MSCM_CPXCFG3_MMU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_MMU_SHIFT)) & MSCM_CPXCFG3_MMU_MASK) 12517 #define MSCM_CPXCFG3_TZ_MASK (0x10U) 12518 #define MSCM_CPXCFG3_TZ_SHIFT (4U) 12519 /*! TZ - Trust Zone 12520 * 0b0..Trust Zone support is not included. 12521 * 0b1..Trust Zone support is included. 12522 */ 12523 #define MSCM_CPXCFG3_TZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_TZ_SHIFT)) & MSCM_CPXCFG3_TZ_MASK) 12524 #define MSCM_CPXCFG3_CMP_MASK (0x20U) 12525 #define MSCM_CPXCFG3_CMP_SHIFT (5U) 12526 /*! CMP - Core Memory Protection unit 12527 * 0b0..Core Memory Protection is not included. 12528 * 0b1..Core Memory Protection is included. 12529 */ 12530 #define MSCM_CPXCFG3_CMP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_CMP_SHIFT)) & MSCM_CPXCFG3_CMP_MASK) 12531 #define MSCM_CPXCFG3_BB_MASK (0x40U) 12532 #define MSCM_CPXCFG3_BB_SHIFT (6U) 12533 /*! BB - Bit Banding 12534 * 0b0..Bit Banding is not supported. 12535 * 0b1..Bit Banding is supported. 12536 */ 12537 #define MSCM_CPXCFG3_BB(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_BB_SHIFT)) & MSCM_CPXCFG3_BB_MASK) 12538 #define MSCM_CPXCFG3_SBP_MASK (0x300U) 12539 #define MSCM_CPXCFG3_SBP_SHIFT (8U) 12540 #define MSCM_CPXCFG3_SBP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CPXCFG3_SBP_SHIFT)) & MSCM_CPXCFG3_SBP_MASK) 12541 /*! @} */ 12542 12543 /*! @name TYPE - Processor 0 Type Register..Processor 1 Type Register */ 12544 /*! @{ */ 12545 #define MSCM_TYPE_RYPZ_MASK (0xFFU) 12546 #define MSCM_TYPE_RYPZ_SHIFT (0U) 12547 #define MSCM_TYPE_RYPZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_RYPZ_SHIFT)) & MSCM_TYPE_RYPZ_MASK) 12548 #define MSCM_TYPE_PERSONALITY_MASK (0xFFFFFF00U) 12549 #define MSCM_TYPE_PERSONALITY_SHIFT (8U) 12550 #define MSCM_TYPE_PERSONALITY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_TYPE_PERSONALITY_SHIFT)) & MSCM_TYPE_PERSONALITY_MASK) 12551 /*! @} */ 12552 12553 /* The count of MSCM_TYPE */ 12554 #define MSCM_TYPE_COUNT (2U) 12555 12556 /*! @name NUM - Processor 0 Number Register..Processor 1 Number Register */ 12557 /*! @{ */ 12558 #define MSCM_NUM_CPN_MASK (0x1U) 12559 #define MSCM_NUM_CPN_SHIFT (0U) 12560 #define MSCM_NUM_CPN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_NUM_CPN_SHIFT)) & MSCM_NUM_CPN_MASK) 12561 /*! @} */ 12562 12563 /* The count of MSCM_NUM */ 12564 #define MSCM_NUM_COUNT (2U) 12565 12566 /*! @name MASTER - Processor 0 Master Register..Processor 1 Master Register */ 12567 /*! @{ */ 12568 #define MSCM_MASTER_PPMN_MASK (0x3FU) 12569 #define MSCM_MASTER_PPMN_SHIFT (0U) 12570 #define MSCM_MASTER_PPMN(x) (((uint32_t)(((uint32_t)(x)) << MSCM_MASTER_PPMN_SHIFT)) & MSCM_MASTER_PPMN_MASK) 12571 /*! @} */ 12572 12573 /* The count of MSCM_MASTER */ 12574 #define MSCM_MASTER_COUNT (2U) 12575 12576 /*! @name COUNT - Processor 0 Count Register..Processor 1 Count Register */ 12577 /*! @{ */ 12578 #define MSCM_COUNT_PCNT_MASK (0x3U) 12579 #define MSCM_COUNT_PCNT_SHIFT (0U) 12580 #define MSCM_COUNT_PCNT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_COUNT_PCNT_SHIFT)) & MSCM_COUNT_PCNT_MASK) 12581 /*! @} */ 12582 12583 /* The count of MSCM_COUNT */ 12584 #define MSCM_COUNT_COUNT (2U) 12585 12586 /*! @name CFG0 - Processor 0 Configuration Register 0..Processor 1 Configuration Register 0 */ 12587 /*! @{ */ 12588 #define MSCM_CFG0_DCWY_MASK (0xFFU) 12589 #define MSCM_CFG0_DCWY_SHIFT (0U) 12590 #define MSCM_CFG0_DCWY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_DCWY_SHIFT)) & MSCM_CFG0_DCWY_MASK) 12591 #define MSCM_CFG0_DCSZ_MASK (0xFF00U) 12592 #define MSCM_CFG0_DCSZ_SHIFT (8U) 12593 #define MSCM_CFG0_DCSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_DCSZ_SHIFT)) & MSCM_CFG0_DCSZ_MASK) 12594 #define MSCM_CFG0_ICWY_MASK (0xFF0000U) 12595 #define MSCM_CFG0_ICWY_SHIFT (16U) 12596 #define MSCM_CFG0_ICWY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_ICWY_SHIFT)) & MSCM_CFG0_ICWY_MASK) 12597 #define MSCM_CFG0_ICSZ_MASK (0xFF000000U) 12598 #define MSCM_CFG0_ICSZ_SHIFT (24U) 12599 #define MSCM_CFG0_ICSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG0_ICSZ_SHIFT)) & MSCM_CFG0_ICSZ_MASK) 12600 /*! @} */ 12601 12602 /* The count of MSCM_CFG0 */ 12603 #define MSCM_CFG0_COUNT (2U) 12604 12605 /*! @name CFG1 - Processor 0 Configuration Register 1..Processor 1 Configuration Register 1 */ 12606 /*! @{ */ 12607 #define MSCM_CFG1_L2WY_MASK (0xFF0000U) 12608 #define MSCM_CFG1_L2WY_SHIFT (16U) 12609 #define MSCM_CFG1_L2WY(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2WY_SHIFT)) & MSCM_CFG1_L2WY_MASK) 12610 #define MSCM_CFG1_L2SZ_MASK (0xFF000000U) 12611 #define MSCM_CFG1_L2SZ_SHIFT (24U) 12612 #define MSCM_CFG1_L2SZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG1_L2SZ_SHIFT)) & MSCM_CFG1_L2SZ_MASK) 12613 /*! @} */ 12614 12615 /* The count of MSCM_CFG1 */ 12616 #define MSCM_CFG1_COUNT (2U) 12617 12618 /*! @name CFG2 - Processor 0 Configuration Register 2..Processor 1 Configuration Register 2 */ 12619 /*! @{ */ 12620 #define MSCM_CFG2_TMUSZ_MASK (0xFF00U) 12621 #define MSCM_CFG2_TMUSZ_SHIFT (8U) 12622 #define MSCM_CFG2_TMUSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG2_TMUSZ_SHIFT)) & MSCM_CFG2_TMUSZ_MASK) 12623 #define MSCM_CFG2_TMLSZ_MASK (0xFF000000U) 12624 #define MSCM_CFG2_TMLSZ_SHIFT (24U) 12625 #define MSCM_CFG2_TMLSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG2_TMLSZ_SHIFT)) & MSCM_CFG2_TMLSZ_MASK) 12626 /*! @} */ 12627 12628 /* The count of MSCM_CFG2 */ 12629 #define MSCM_CFG2_COUNT (2U) 12630 12631 /*! @name CFG3 - Processor 0 Configuration Register 3..Processor 1 Configuration Register 3 */ 12632 /*! @{ */ 12633 #define MSCM_CFG3_FPU_MASK (0x1U) 12634 #define MSCM_CFG3_FPU_SHIFT (0U) 12635 /*! FPU - Floating Point Unit 12636 * 0b0..FPU support is not included. 12637 * 0b1..FPU support is included. 12638 */ 12639 #define MSCM_CFG3_FPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_FPU_SHIFT)) & MSCM_CFG3_FPU_MASK) 12640 #define MSCM_CFG3_SIMD_MASK (0x2U) 12641 #define MSCM_CFG3_SIMD_SHIFT (1U) 12642 /*! SIMD - SIMD/NEON instruction support 12643 * 0b0..SIMD/NEON support is not included. 12644 * 0b1..SIMD/NEON support is included. 12645 */ 12646 #define MSCM_CFG3_SIMD(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SIMD_SHIFT)) & MSCM_CFG3_SIMD_MASK) 12647 #define MSCM_CFG3_JAZ_MASK (0x4U) 12648 #define MSCM_CFG3_JAZ_SHIFT (2U) 12649 /*! JAZ - Jazelle support 12650 * 0b0..Jazelle support is not included. 12651 * 0b1..Jazelle support is included. 12652 */ 12653 #define MSCM_CFG3_JAZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_JAZ_SHIFT)) & MSCM_CFG3_JAZ_MASK) 12654 #define MSCM_CFG3_MMU_MASK (0x8U) 12655 #define MSCM_CFG3_MMU_SHIFT (3U) 12656 /*! MMU - Memory Management Unit 12657 * 0b0..MMU support is not included. 12658 * 0b1..MMU support is included. 12659 */ 12660 #define MSCM_CFG3_MMU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_MMU_SHIFT)) & MSCM_CFG3_MMU_MASK) 12661 #define MSCM_CFG3_TZ_MASK (0x10U) 12662 #define MSCM_CFG3_TZ_SHIFT (4U) 12663 /*! TZ - Trust Zone 12664 * 0b0..Trust Zone support is not included. 12665 * 0b1..Trust Zone support is included. 12666 */ 12667 #define MSCM_CFG3_TZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_TZ_SHIFT)) & MSCM_CFG3_TZ_MASK) 12668 #define MSCM_CFG3_CMP_MASK (0x20U) 12669 #define MSCM_CFG3_CMP_SHIFT (5U) 12670 /*! CMP - Core Memory Protection unit 12671 * 0b0..Core Memory Protection is not included. 12672 * 0b1..Core Memory Protection is included. 12673 */ 12674 #define MSCM_CFG3_CMP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_CMP_SHIFT)) & MSCM_CFG3_CMP_MASK) 12675 #define MSCM_CFG3_BB_MASK (0x40U) 12676 #define MSCM_CFG3_BB_SHIFT (6U) 12677 /*! BB - Bit Banding 12678 * 0b0..Bit Banding is not supported. 12679 * 0b1..Bit Banding is supported. 12680 */ 12681 #define MSCM_CFG3_BB(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_BB_SHIFT)) & MSCM_CFG3_BB_MASK) 12682 #define MSCM_CFG3_SBP_MASK (0x300U) 12683 #define MSCM_CFG3_SBP_SHIFT (8U) 12684 #define MSCM_CFG3_SBP(x) (((uint32_t)(((uint32_t)(x)) << MSCM_CFG3_SBP_SHIFT)) & MSCM_CFG3_SBP_MASK) 12685 /*! @} */ 12686 12687 /* The count of MSCM_CFG3 */ 12688 #define MSCM_CFG3_COUNT (2U) 12689 12690 /*! @name OCMDR0 - On-Chip Memory Descriptor Register */ 12691 /*! @{ */ 12692 #define MSCM_OCMDR0_OCM1_MASK (0x30U) 12693 #define MSCM_OCMDR0_OCM1_SHIFT (4U) 12694 #define MSCM_OCMDR0_OCM1(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCM1_SHIFT)) & MSCM_OCMDR0_OCM1_MASK) 12695 #define MSCM_OCMDR0_OCMPU_MASK (0x1000U) 12696 #define MSCM_OCMDR0_OCMPU_SHIFT (12U) 12697 #define MSCM_OCMDR0_OCMPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMPU_SHIFT)) & MSCM_OCMDR0_OCMPU_MASK) 12698 #define MSCM_OCMDR0_OCMT_MASK (0xE000U) 12699 #define MSCM_OCMDR0_OCMT_SHIFT (13U) 12700 /*! OCMT - OCMT 12701 * 0b000..Reserved 12702 * 0b001..Reserved 12703 * 0b010..Reserved 12704 * 0b011..OCMEMn is a ROM. 12705 * 0b100..OCMEMn is a Program Flash. 12706 * 0b101..Reserved 12707 * 0b110..OCMEMn is an EEE. 12708 * 0b111..Reserved 12709 */ 12710 #define MSCM_OCMDR0_OCMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMT_SHIFT)) & MSCM_OCMDR0_OCMT_MASK) 12711 #define MSCM_OCMDR0_RO_MASK (0x10000U) 12712 #define MSCM_OCMDR0_RO_SHIFT (16U) 12713 /*! RO - RO 12714 * 0b0..Writes to the OCMDRn[11:0] are allowed 12715 * 0b1..Writes to the OCMDRn[11:0] are ignored 12716 */ 12717 #define MSCM_OCMDR0_RO(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_RO_SHIFT)) & MSCM_OCMDR0_RO_MASK) 12718 #define MSCM_OCMDR0_OCMW_MASK (0xE0000U) 12719 #define MSCM_OCMDR0_OCMW_SHIFT (17U) 12720 /*! OCMW - OCMW 12721 * 0b000-0b001..Reserved 12722 * 0b010..OCMEMn 32-bits wide 12723 * 0b011..OCMEMn 64-bits wide 12724 * 0b100..OCMEMn 128-bits wide 12725 * 0b101..OCMEMn 256-bits wide 12726 * 0b110-0b111..Reserved 12727 */ 12728 #define MSCM_OCMDR0_OCMW(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMW_SHIFT)) & MSCM_OCMDR0_OCMW_MASK) 12729 #define MSCM_OCMDR0_OCMSZ_MASK (0xF000000U) 12730 #define MSCM_OCMDR0_OCMSZ_SHIFT (24U) 12731 /*! OCMSZ - OCMSZ 12732 * 0b0000..no OCMEMn 12733 * 0b0001..1KB OCMEMn 12734 * 0b0010..2KB OCMEMn 12735 * 0b0011..4KB OCMEMn 12736 * 0b0100..8KB OCMEMn 12737 * 0b0101..16KB OCMEMn 12738 * 0b0110..32KB OCMEMn 12739 * 0b0111..64KB OCMEMn 12740 * 0b1000..128KB OCMEMn 12741 * 0b1001..256KB OCMEMn 12742 * 0b1010..512KB OCMEMn 12743 * 0b1011..1MB OCMEMn 12744 * 0b1100..2MB OCMEMn 12745 * 0b1101..4MB OCMEMn 12746 * 0b1110..8MB OCMEMn 12747 * 0b1111..16MB OCMEMn 12748 */ 12749 #define MSCM_OCMDR0_OCMSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMSZ_SHIFT)) & MSCM_OCMDR0_OCMSZ_MASK) 12750 #define MSCM_OCMDR0_OCMSZH_MASK (0x10000000U) 12751 #define MSCM_OCMDR0_OCMSZH_SHIFT (28U) 12752 /*! OCMSZH - OCMSZH 12753 * 0b0..OCMEMn is a power-of-2 capacity. 12754 * 0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ. 12755 */ 12756 #define MSCM_OCMDR0_OCMSZH(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_OCMSZH_SHIFT)) & MSCM_OCMDR0_OCMSZH_MASK) 12757 #define MSCM_OCMDR0_V_MASK (0x80000000U) 12758 #define MSCM_OCMDR0_V_SHIFT (31U) 12759 /*! V - V 12760 * 0b0..OCMEMn is not present. 12761 * 0b1..OCMEMn is present. 12762 */ 12763 #define MSCM_OCMDR0_V(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR0_V_SHIFT)) & MSCM_OCMDR0_V_MASK) 12764 /*! @} */ 12765 12766 /*! @name OCMDR1 - On-Chip Memory Descriptor Register */ 12767 /*! @{ */ 12768 #define MSCM_OCMDR1_OCM1_MASK (0x30U) 12769 #define MSCM_OCMDR1_OCM1_SHIFT (4U) 12770 #define MSCM_OCMDR1_OCM1(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCM1_SHIFT)) & MSCM_OCMDR1_OCM1_MASK) 12771 #define MSCM_OCMDR1_OCMPU_MASK (0x1000U) 12772 #define MSCM_OCMDR1_OCMPU_SHIFT (12U) 12773 #define MSCM_OCMDR1_OCMPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMPU_SHIFT)) & MSCM_OCMDR1_OCMPU_MASK) 12774 #define MSCM_OCMDR1_OCMT_MASK (0xE000U) 12775 #define MSCM_OCMDR1_OCMT_SHIFT (13U) 12776 /*! OCMT - OCMT 12777 * 0b000..Reserved 12778 * 0b001..Reserved 12779 * 0b010..Reserved 12780 * 0b011..OCMEMn is a ROM. 12781 * 0b100..OCMEMn is a Program Flash. 12782 * 0b101..Reserved 12783 * 0b110..OCMEMn is an EEE. 12784 * 0b111..Reserved 12785 */ 12786 #define MSCM_OCMDR1_OCMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMT_SHIFT)) & MSCM_OCMDR1_OCMT_MASK) 12787 #define MSCM_OCMDR1_RO_MASK (0x10000U) 12788 #define MSCM_OCMDR1_RO_SHIFT (16U) 12789 /*! RO - RO 12790 * 0b0..Writes to the OCMDRn[11:0] are allowed 12791 * 0b1..Writes to the OCMDRn[11:0] are ignored 12792 */ 12793 #define MSCM_OCMDR1_RO(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_RO_SHIFT)) & MSCM_OCMDR1_RO_MASK) 12794 #define MSCM_OCMDR1_OCMW_MASK (0xE0000U) 12795 #define MSCM_OCMDR1_OCMW_SHIFT (17U) 12796 /*! OCMW - OCMW 12797 * 0b000-0b001..Reserved 12798 * 0b010..OCMEMn 32-bits wide 12799 * 0b011..OCMEMn 64-bits wide 12800 * 0b100..OCMEMn 128-bits wide 12801 * 0b101..OCMEMn 256-bits wide 12802 * 0b110-0b111..Reserved 12803 */ 12804 #define MSCM_OCMDR1_OCMW(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMW_SHIFT)) & MSCM_OCMDR1_OCMW_MASK) 12805 #define MSCM_OCMDR1_OCMSZ_MASK (0xF000000U) 12806 #define MSCM_OCMDR1_OCMSZ_SHIFT (24U) 12807 /*! OCMSZ - OCMSZ 12808 * 0b0000..no OCMEMn 12809 * 0b0001..1KB OCMEMn 12810 * 0b0010..2KB OCMEMn 12811 * 0b0011..4KB OCMEMn 12812 * 0b0100..8KB OCMEMn 12813 * 0b0101..16KB OCMEMn 12814 * 0b0110..32KB OCMEMn 12815 * 0b0111..64KB OCMEMn 12816 * 0b1000..128KB OCMEMn 12817 * 0b1001..256KB OCMEMn 12818 * 0b1010..512KB OCMEMn 12819 * 0b1011..1MB OCMEMn 12820 * 0b1100..2MB OCMEMn 12821 * 0b1101..4MB OCMEMn 12822 * 0b1110..8MB OCMEMn 12823 * 0b1111..16MB OCMEMn 12824 */ 12825 #define MSCM_OCMDR1_OCMSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMSZ_SHIFT)) & MSCM_OCMDR1_OCMSZ_MASK) 12826 #define MSCM_OCMDR1_OCMSZH_MASK (0x10000000U) 12827 #define MSCM_OCMDR1_OCMSZH_SHIFT (28U) 12828 /*! OCMSZH - OCMSZH 12829 * 0b0..OCMEMn is a power-of-2 capacity. 12830 * 0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ. 12831 */ 12832 #define MSCM_OCMDR1_OCMSZH(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_OCMSZH_SHIFT)) & MSCM_OCMDR1_OCMSZH_MASK) 12833 #define MSCM_OCMDR1_V_MASK (0x80000000U) 12834 #define MSCM_OCMDR1_V_SHIFT (31U) 12835 /*! V - V 12836 * 0b0..OCMEMn is not present. 12837 * 0b1..OCMEMn is present. 12838 */ 12839 #define MSCM_OCMDR1_V(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR1_V_SHIFT)) & MSCM_OCMDR1_V_MASK) 12840 /*! @} */ 12841 12842 /*! @name OCMDR2 - On-Chip Memory Descriptor Register */ 12843 /*! @{ */ 12844 #define MSCM_OCMDR2_OCMPU_MASK (0x1000U) 12845 #define MSCM_OCMDR2_OCMPU_SHIFT (12U) 12846 #define MSCM_OCMDR2_OCMPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMPU_SHIFT)) & MSCM_OCMDR2_OCMPU_MASK) 12847 #define MSCM_OCMDR2_OCMT_MASK (0xE000U) 12848 #define MSCM_OCMDR2_OCMT_SHIFT (13U) 12849 /*! OCMT - OCMT 12850 * 0b000..Reserved 12851 * 0b001..Reserved 12852 * 0b010..Reserved 12853 * 0b011..OCMEMn is a ROM. 12854 * 0b100..OCMEMn is a Program Flash. 12855 * 0b101..Reserved 12856 * 0b110..OCMEMn is an EEE. 12857 * 0b111..Reserved 12858 */ 12859 #define MSCM_OCMDR2_OCMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMT_SHIFT)) & MSCM_OCMDR2_OCMT_MASK) 12860 #define MSCM_OCMDR2_RO_MASK (0x10000U) 12861 #define MSCM_OCMDR2_RO_SHIFT (16U) 12862 /*! RO - RO 12863 * 0b0..Writes to the OCMDRn[11:0] are allowed 12864 * 0b1..Writes to the OCMDRn[11:0] are ignored 12865 */ 12866 #define MSCM_OCMDR2_RO(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_RO_SHIFT)) & MSCM_OCMDR2_RO_MASK) 12867 #define MSCM_OCMDR2_OCMW_MASK (0xE0000U) 12868 #define MSCM_OCMDR2_OCMW_SHIFT (17U) 12869 /*! OCMW - OCMW 12870 * 0b000-0b001..Reserved 12871 * 0b010..OCMEMn 32-bits wide 12872 * 0b011..OCMEMn 64-bits wide 12873 * 0b100..OCMEMn 128-bits wide 12874 * 0b101..OCMEMn 256-bits wide 12875 * 0b110-0b111..Reserved 12876 */ 12877 #define MSCM_OCMDR2_OCMW(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMW_SHIFT)) & MSCM_OCMDR2_OCMW_MASK) 12878 #define MSCM_OCMDR2_OCMSZ_MASK (0xF000000U) 12879 #define MSCM_OCMDR2_OCMSZ_SHIFT (24U) 12880 /*! OCMSZ - OCMSZ 12881 * 0b0000..no OCMEMn 12882 * 0b0001..1KB OCMEMn 12883 * 0b0010..2KB OCMEMn 12884 * 0b0011..4KB OCMEMn 12885 * 0b0100..8KB OCMEMn 12886 * 0b0101..16KB OCMEMn 12887 * 0b0110..32KB OCMEMn 12888 * 0b0111..64KB OCMEMn 12889 * 0b1000..128KB OCMEMn 12890 * 0b1001..256KB OCMEMn 12891 * 0b1010..512KB OCMEMn 12892 * 0b1011..1MB OCMEMn 12893 * 0b1100..2MB OCMEMn 12894 * 0b1101..4MB OCMEMn 12895 * 0b1110..8MB OCMEMn 12896 * 0b1111..16MB OCMEMn 12897 */ 12898 #define MSCM_OCMDR2_OCMSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMSZ_SHIFT)) & MSCM_OCMDR2_OCMSZ_MASK) 12899 #define MSCM_OCMDR2_OCMSZH_MASK (0x10000000U) 12900 #define MSCM_OCMDR2_OCMSZH_SHIFT (28U) 12901 /*! OCMSZH - OCMSZH 12902 * 0b0..OCMEMn is a power-of-2 capacity. 12903 * 0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ. 12904 */ 12905 #define MSCM_OCMDR2_OCMSZH(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_OCMSZH_SHIFT)) & MSCM_OCMDR2_OCMSZH_MASK) 12906 #define MSCM_OCMDR2_V_MASK (0x80000000U) 12907 #define MSCM_OCMDR2_V_SHIFT (31U) 12908 /*! V - V 12909 * 0b0..OCMEMn is not present. 12910 * 0b1..OCMEMn is present. 12911 */ 12912 #define MSCM_OCMDR2_V(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR2_V_SHIFT)) & MSCM_OCMDR2_V_MASK) 12913 /*! @} */ 12914 12915 /*! @name OCMDR3 - On-Chip Memory Descriptor Register */ 12916 /*! @{ */ 12917 #define MSCM_OCMDR3_OCMPU_MASK (0x1000U) 12918 #define MSCM_OCMDR3_OCMPU_SHIFT (12U) 12919 #define MSCM_OCMDR3_OCMPU(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMPU_SHIFT)) & MSCM_OCMDR3_OCMPU_MASK) 12920 #define MSCM_OCMDR3_OCMT_MASK (0xE000U) 12921 #define MSCM_OCMDR3_OCMT_SHIFT (13U) 12922 /*! OCMT - OCMT 12923 * 0b000..Reserved 12924 * 0b001..Reserved 12925 * 0b010..Reserved 12926 * 0b011..OCMEMn is a ROM. 12927 * 0b100..OCMEMn is a Program Flash. 12928 * 0b101..Reserved 12929 * 0b110..OCMEMn is an EEE. 12930 * 0b111..Reserved 12931 */ 12932 #define MSCM_OCMDR3_OCMT(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMT_SHIFT)) & MSCM_OCMDR3_OCMT_MASK) 12933 #define MSCM_OCMDR3_RO_MASK (0x10000U) 12934 #define MSCM_OCMDR3_RO_SHIFT (16U) 12935 /*! RO - RO 12936 * 0b0..Writes to the OCMDRn[11:0] are allowed 12937 * 0b1..Writes to the OCMDRn[11:0] are ignored 12938 */ 12939 #define MSCM_OCMDR3_RO(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_RO_SHIFT)) & MSCM_OCMDR3_RO_MASK) 12940 #define MSCM_OCMDR3_OCMW_MASK (0xE0000U) 12941 #define MSCM_OCMDR3_OCMW_SHIFT (17U) 12942 /*! OCMW - OCMW 12943 * 0b000-0b001..Reserved 12944 * 0b010..OCMEMn 32-bits wide 12945 * 0b011..OCMEMn 64-bits wide 12946 * 0b100..OCMEMn 128-bits wide 12947 * 0b101..OCMEMn 256-bits wide 12948 * 0b110-0b111..Reserved 12949 */ 12950 #define MSCM_OCMDR3_OCMW(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMW_SHIFT)) & MSCM_OCMDR3_OCMW_MASK) 12951 #define MSCM_OCMDR3_OCMSZ_MASK (0xF000000U) 12952 #define MSCM_OCMDR3_OCMSZ_SHIFT (24U) 12953 /*! OCMSZ - OCMSZ 12954 * 0b0000..no OCMEMn 12955 * 0b0001..1KB OCMEMn 12956 * 0b0010..2KB OCMEMn 12957 * 0b0011..4KB OCMEMn 12958 * 0b0100..8KB OCMEMn 12959 * 0b0101..16KB OCMEMn 12960 * 0b0110..32KB OCMEMn 12961 * 0b0111..64KB OCMEMn 12962 * 0b1000..128KB OCMEMn 12963 * 0b1001..256KB OCMEMn 12964 * 0b1010..512KB OCMEMn 12965 * 0b1011..1MB OCMEMn 12966 * 0b1100..2MB OCMEMn 12967 * 0b1101..4MB OCMEMn 12968 * 0b1110..8MB OCMEMn 12969 * 0b1111..16MB OCMEMn 12970 */ 12971 #define MSCM_OCMDR3_OCMSZ(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMSZ_SHIFT)) & MSCM_OCMDR3_OCMSZ_MASK) 12972 #define MSCM_OCMDR3_OCMSZH_MASK (0x10000000U) 12973 #define MSCM_OCMDR3_OCMSZH_SHIFT (28U) 12974 /*! OCMSZH - OCMSZH 12975 * 0b0..OCMEMn is a power-of-2 capacity. 12976 * 0b1..OCMEMn is not a power-of-2, with a capacity is 0.75 * OCMSZ. 12977 */ 12978 #define MSCM_OCMDR3_OCMSZH(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_OCMSZH_SHIFT)) & MSCM_OCMDR3_OCMSZH_MASK) 12979 #define MSCM_OCMDR3_V_MASK (0x80000000U) 12980 #define MSCM_OCMDR3_V_SHIFT (31U) 12981 /*! V - V 12982 * 0b0..OCMEMn is not present. 12983 * 0b1..OCMEMn is present. 12984 */ 12985 #define MSCM_OCMDR3_V(x) (((uint32_t)(((uint32_t)(x)) << MSCM_OCMDR3_V_SHIFT)) & MSCM_OCMDR3_V_MASK) 12986 /*! @} */ 12987 12988 12989 /*! 12990 * @} 12991 */ /* end of group MSCM_Register_Masks */ 12992 12993 12994 /* MSCM - Peripheral instance base addresses */ 12995 /** Peripheral MSCM base address */ 12996 #define MSCM_BASE (0x40001000u) 12997 /** Peripheral MSCM base pointer */ 12998 #define MSCM ((MSCM_Type *)MSCM_BASE) 12999 /** Array initializer of MSCM peripheral base addresses */ 13000 #define MSCM_BASE_ADDRS { MSCM_BASE } 13001 /** Array initializer of MSCM peripheral base pointers */ 13002 #define MSCM_BASE_PTRS { MSCM } 13003 13004 /*! 13005 * @} 13006 */ /* end of group MSCM_Peripheral_Access_Layer */ 13007 13008 13009 /* ---------------------------------------------------------------------------- 13010 -- MTB Peripheral Access Layer 13011 ---------------------------------------------------------------------------- */ 13012 13013 /*! 13014 * @addtogroup MTB_Peripheral_Access_Layer MTB Peripheral Access Layer 13015 * @{ 13016 */ 13017 13018 /** MTB - Register Layout Typedef */ 13019 typedef struct { 13020 __IO uint32_t POSITION; /**< MTB Position Register, offset: 0x0 */ 13021 __IO uint32_t MASTER; /**< MTB Master Register, offset: 0x4 */ 13022 __IO uint32_t FLOW; /**< MTB Flow Register, offset: 0x8 */ 13023 __I uint32_t BASE; /**< MTB Base Register, offset: 0xC */ 13024 uint8_t RESERVED_0[3824]; 13025 __I uint32_t MODECTRL; /**< Integration Mode Control Register, offset: 0xF00 */ 13026 uint8_t RESERVED_1[156]; 13027 __I uint32_t TAGSET; /**< Claim TAG Set Register, offset: 0xFA0 */ 13028 __I uint32_t TAGCLEAR; /**< Claim TAG Clear Register, offset: 0xFA4 */ 13029 uint8_t RESERVED_2[8]; 13030 __I uint32_t LOCKACCESS; /**< Lock Access Register, offset: 0xFB0 */ 13031 __I uint32_t LOCKSTAT; /**< Lock Status Register, offset: 0xFB4 */ 13032 __I uint32_t AUTHSTAT; /**< Authentication Status Register, offset: 0xFB8 */ 13033 __I uint32_t DEVICEARCH; /**< Device Architecture Register, offset: 0xFBC */ 13034 uint8_t RESERVED_3[8]; 13035 __I uint32_t DEVICECFG; /**< Device Configuration Register, offset: 0xFC8 */ 13036 __I uint32_t DEVICETYPID; /**< Device Type Identifier Register, offset: 0xFCC */ 13037 __I uint32_t PERIPHID4; /**< Peripheral ID Register, offset: 0xFD0 */ 13038 __I uint32_t PERIPHID5; /**< Peripheral ID Register, offset: 0xFD4 */ 13039 __I uint32_t PERIPHID6; /**< Peripheral ID Register, offset: 0xFD8 */ 13040 __I uint32_t PERIPHID7; /**< Peripheral ID Register, offset: 0xFDC */ 13041 __I uint32_t PERIPHID0; /**< Peripheral ID Register, offset: 0xFE0 */ 13042 __I uint32_t PERIPHID1; /**< Peripheral ID Register, offset: 0xFE4 */ 13043 __I uint32_t PERIPHID2; /**< Peripheral ID Register, offset: 0xFE8 */ 13044 __I uint32_t PERIPHID3; /**< Peripheral ID Register, offset: 0xFEC */ 13045 __I uint32_t COMPID[4]; /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */ 13046 } MTB_Type; 13047 13048 /* ---------------------------------------------------------------------------- 13049 -- MTB Register Masks 13050 ---------------------------------------------------------------------------- */ 13051 13052 /*! 13053 * @addtogroup MTB_Register_Masks MTB Register Masks 13054 * @{ 13055 */ 13056 13057 /*! @name POSITION - MTB Position Register */ 13058 /*! @{ */ 13059 #define MTB_POSITION_WRAP_MASK (0x4U) 13060 #define MTB_POSITION_WRAP_SHIFT (2U) 13061 #define MTB_POSITION_WRAP(x) (((uint32_t)(((uint32_t)(x)) << MTB_POSITION_WRAP_SHIFT)) & MTB_POSITION_WRAP_MASK) 13062 #define MTB_POSITION_POINTER_MASK (0xFFF8U) 13063 #define MTB_POSITION_POINTER_SHIFT (3U) 13064 #define MTB_POSITION_POINTER(x) (((uint32_t)(((uint32_t)(x)) << MTB_POSITION_POINTER_SHIFT)) & MTB_POSITION_POINTER_MASK) 13065 /*! @} */ 13066 13067 /*! @name MASTER - MTB Master Register */ 13068 /*! @{ */ 13069 #define MTB_MASTER_MASK_MASK (0x1FU) 13070 #define MTB_MASTER_MASK_SHIFT (0U) 13071 #define MTB_MASTER_MASK(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_MASK_SHIFT)) & MTB_MASTER_MASK_MASK) 13072 #define MTB_MASTER_TSTARTEN_MASK (0x20U) 13073 #define MTB_MASTER_TSTARTEN_SHIFT (5U) 13074 #define MTB_MASTER_TSTARTEN(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_TSTARTEN_SHIFT)) & MTB_MASTER_TSTARTEN_MASK) 13075 #define MTB_MASTER_TSTOPEN_MASK (0x40U) 13076 #define MTB_MASTER_TSTOPEN_SHIFT (6U) 13077 #define MTB_MASTER_TSTOPEN(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_TSTOPEN_SHIFT)) & MTB_MASTER_TSTOPEN_MASK) 13078 #define MTB_MASTER_SFRWPRIV_MASK (0x80U) 13079 #define MTB_MASTER_SFRWPRIV_SHIFT (7U) 13080 #define MTB_MASTER_SFRWPRIV(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_SFRWPRIV_SHIFT)) & MTB_MASTER_SFRWPRIV_MASK) 13081 #define MTB_MASTER_RAMPRIV_MASK (0x100U) 13082 #define MTB_MASTER_RAMPRIV_SHIFT (8U) 13083 #define MTB_MASTER_RAMPRIV(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_RAMPRIV_SHIFT)) & MTB_MASTER_RAMPRIV_MASK) 13084 #define MTB_MASTER_HALTREQ_MASK (0x200U) 13085 #define MTB_MASTER_HALTREQ_SHIFT (9U) 13086 #define MTB_MASTER_HALTREQ(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_HALTREQ_SHIFT)) & MTB_MASTER_HALTREQ_MASK) 13087 #define MTB_MASTER_EN_MASK (0x80000000U) 13088 #define MTB_MASTER_EN_SHIFT (31U) 13089 #define MTB_MASTER_EN(x) (((uint32_t)(((uint32_t)(x)) << MTB_MASTER_EN_SHIFT)) & MTB_MASTER_EN_MASK) 13090 /*! @} */ 13091 13092 /*! @name FLOW - MTB Flow Register */ 13093 /*! @{ */ 13094 #define MTB_FLOW_AUTOSTOP_MASK (0x1U) 13095 #define MTB_FLOW_AUTOSTOP_SHIFT (0U) 13096 #define MTB_FLOW_AUTOSTOP(x) (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_AUTOSTOP_SHIFT)) & MTB_FLOW_AUTOSTOP_MASK) 13097 #define MTB_FLOW_AUTOHALT_MASK (0x2U) 13098 #define MTB_FLOW_AUTOHALT_SHIFT (1U) 13099 #define MTB_FLOW_AUTOHALT(x) (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_AUTOHALT_SHIFT)) & MTB_FLOW_AUTOHALT_MASK) 13100 #define MTB_FLOW_WATERMARK_MASK (0xFFFFFFF8U) 13101 #define MTB_FLOW_WATERMARK_SHIFT (3U) 13102 #define MTB_FLOW_WATERMARK(x) (((uint32_t)(((uint32_t)(x)) << MTB_FLOW_WATERMARK_SHIFT)) & MTB_FLOW_WATERMARK_MASK) 13103 /*! @} */ 13104 13105 /*! @name BASE - MTB Base Register */ 13106 /*! @{ */ 13107 #define MTB_BASE_BASEADDR_MASK (0xFFFFFFFFU) 13108 #define MTB_BASE_BASEADDR_SHIFT (0U) 13109 #define MTB_BASE_BASEADDR(x) (((uint32_t)(((uint32_t)(x)) << MTB_BASE_BASEADDR_SHIFT)) & MTB_BASE_BASEADDR_MASK) 13110 /*! @} */ 13111 13112 /*! @name MODECTRL - Integration Mode Control Register */ 13113 /*! @{ */ 13114 #define MTB_MODECTRL_MODECTRL_MASK (0xFFFFFFFFU) 13115 #define MTB_MODECTRL_MODECTRL_SHIFT (0U) 13116 #define MTB_MODECTRL_MODECTRL(x) (((uint32_t)(((uint32_t)(x)) << MTB_MODECTRL_MODECTRL_SHIFT)) & MTB_MODECTRL_MODECTRL_MASK) 13117 /*! @} */ 13118 13119 /*! @name TAGSET - Claim TAG Set Register */ 13120 /*! @{ */ 13121 #define MTB_TAGSET_TAGSET_MASK (0xFFFFFFFFU) 13122 #define MTB_TAGSET_TAGSET_SHIFT (0U) 13123 #define MTB_TAGSET_TAGSET(x) (((uint32_t)(((uint32_t)(x)) << MTB_TAGSET_TAGSET_SHIFT)) & MTB_TAGSET_TAGSET_MASK) 13124 /*! @} */ 13125 13126 /*! @name TAGCLEAR - Claim TAG Clear Register */ 13127 /*! @{ */ 13128 #define MTB_TAGCLEAR_TAGCLEAR_MASK (0xFFFFFFFFU) 13129 #define MTB_TAGCLEAR_TAGCLEAR_SHIFT (0U) 13130 #define MTB_TAGCLEAR_TAGCLEAR(x) (((uint32_t)(((uint32_t)(x)) << MTB_TAGCLEAR_TAGCLEAR_SHIFT)) & MTB_TAGCLEAR_TAGCLEAR_MASK) 13131 /*! @} */ 13132 13133 /*! @name LOCKACCESS - Lock Access Register */ 13134 /*! @{ */ 13135 #define MTB_LOCKACCESS_LOCKACCESS_MASK (0xFFFFFFFFU) 13136 #define MTB_LOCKACCESS_LOCKACCESS_SHIFT (0U) 13137 #define MTB_LOCKACCESS_LOCKACCESS(x) (((uint32_t)(((uint32_t)(x)) << MTB_LOCKACCESS_LOCKACCESS_SHIFT)) & MTB_LOCKACCESS_LOCKACCESS_MASK) 13138 /*! @} */ 13139 13140 /*! @name LOCKSTAT - Lock Status Register */ 13141 /*! @{ */ 13142 #define MTB_LOCKSTAT_LOCKSTAT_MASK (0xFFFFFFFFU) 13143 #define MTB_LOCKSTAT_LOCKSTAT_SHIFT (0U) 13144 #define MTB_LOCKSTAT_LOCKSTAT(x) (((uint32_t)(((uint32_t)(x)) << MTB_LOCKSTAT_LOCKSTAT_SHIFT)) & MTB_LOCKSTAT_LOCKSTAT_MASK) 13145 /*! @} */ 13146 13147 /*! @name AUTHSTAT - Authentication Status Register */ 13148 /*! @{ */ 13149 #define MTB_AUTHSTAT_BIT0_MASK (0x1U) 13150 #define MTB_AUTHSTAT_BIT0_SHIFT (0U) 13151 #define MTB_AUTHSTAT_BIT0(x) (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT0_SHIFT)) & MTB_AUTHSTAT_BIT0_MASK) 13152 #define MTB_AUTHSTAT_BIT1_MASK (0x2U) 13153 #define MTB_AUTHSTAT_BIT1_SHIFT (1U) 13154 #define MTB_AUTHSTAT_BIT1(x) (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT1_SHIFT)) & MTB_AUTHSTAT_BIT1_MASK) 13155 #define MTB_AUTHSTAT_BIT2_MASK (0x4U) 13156 #define MTB_AUTHSTAT_BIT2_SHIFT (2U) 13157 #define MTB_AUTHSTAT_BIT2(x) (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT2_SHIFT)) & MTB_AUTHSTAT_BIT2_MASK) 13158 #define MTB_AUTHSTAT_BIT3_MASK (0x8U) 13159 #define MTB_AUTHSTAT_BIT3_SHIFT (3U) 13160 #define MTB_AUTHSTAT_BIT3(x) (((uint32_t)(((uint32_t)(x)) << MTB_AUTHSTAT_BIT3_SHIFT)) & MTB_AUTHSTAT_BIT3_MASK) 13161 /*! @} */ 13162 13163 /*! @name DEVICEARCH - Device Architecture Register */ 13164 /*! @{ */ 13165 #define MTB_DEVICEARCH_DEVICEARCH_MASK (0xFFFFFFFFU) 13166 #define MTB_DEVICEARCH_DEVICEARCH_SHIFT (0U) 13167 #define MTB_DEVICEARCH_DEVICEARCH(x) (((uint32_t)(((uint32_t)(x)) << MTB_DEVICEARCH_DEVICEARCH_SHIFT)) & MTB_DEVICEARCH_DEVICEARCH_MASK) 13168 /*! @} */ 13169 13170 /*! @name DEVICECFG - Device Configuration Register */ 13171 /*! @{ */ 13172 #define MTB_DEVICECFG_DEVICECFG_MASK (0xFFFFFFFFU) 13173 #define MTB_DEVICECFG_DEVICECFG_SHIFT (0U) 13174 #define MTB_DEVICECFG_DEVICECFG(x) (((uint32_t)(((uint32_t)(x)) << MTB_DEVICECFG_DEVICECFG_SHIFT)) & MTB_DEVICECFG_DEVICECFG_MASK) 13175 /*! @} */ 13176 13177 /*! @name DEVICETYPID - Device Type Identifier Register */ 13178 /*! @{ */ 13179 #define MTB_DEVICETYPID_DEVICETYPID_MASK (0xFFFFFFFFU) 13180 #define MTB_DEVICETYPID_DEVICETYPID_SHIFT (0U) 13181 #define MTB_DEVICETYPID_DEVICETYPID(x) (((uint32_t)(((uint32_t)(x)) << MTB_DEVICETYPID_DEVICETYPID_SHIFT)) & MTB_DEVICETYPID_DEVICETYPID_MASK) 13182 /*! @} */ 13183 13184 /*! @name PERIPHID4 - Peripheral ID Register */ 13185 /*! @{ */ 13186 #define MTB_PERIPHID4_PERIPHID_MASK (0xFFFFFFFFU) 13187 #define MTB_PERIPHID4_PERIPHID_SHIFT (0U) 13188 #define MTB_PERIPHID4_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID4_PERIPHID_SHIFT)) & MTB_PERIPHID4_PERIPHID_MASK) 13189 /*! @} */ 13190 13191 /*! @name PERIPHID5 - Peripheral ID Register */ 13192 /*! @{ */ 13193 #define MTB_PERIPHID5_PERIPHID_MASK (0xFFFFFFFFU) 13194 #define MTB_PERIPHID5_PERIPHID_SHIFT (0U) 13195 #define MTB_PERIPHID5_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID5_PERIPHID_SHIFT)) & MTB_PERIPHID5_PERIPHID_MASK) 13196 /*! @} */ 13197 13198 /*! @name PERIPHID6 - Peripheral ID Register */ 13199 /*! @{ */ 13200 #define MTB_PERIPHID6_PERIPHID_MASK (0xFFFFFFFFU) 13201 #define MTB_PERIPHID6_PERIPHID_SHIFT (0U) 13202 #define MTB_PERIPHID6_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID6_PERIPHID_SHIFT)) & MTB_PERIPHID6_PERIPHID_MASK) 13203 /*! @} */ 13204 13205 /*! @name PERIPHID7 - Peripheral ID Register */ 13206 /*! @{ */ 13207 #define MTB_PERIPHID7_PERIPHID_MASK (0xFFFFFFFFU) 13208 #define MTB_PERIPHID7_PERIPHID_SHIFT (0U) 13209 #define MTB_PERIPHID7_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID7_PERIPHID_SHIFT)) & MTB_PERIPHID7_PERIPHID_MASK) 13210 /*! @} */ 13211 13212 /*! @name PERIPHID0 - Peripheral ID Register */ 13213 /*! @{ */ 13214 #define MTB_PERIPHID0_PERIPHID_MASK (0xFFFFFFFFU) 13215 #define MTB_PERIPHID0_PERIPHID_SHIFT (0U) 13216 #define MTB_PERIPHID0_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID0_PERIPHID_SHIFT)) & MTB_PERIPHID0_PERIPHID_MASK) 13217 /*! @} */ 13218 13219 /*! @name PERIPHID1 - Peripheral ID Register */ 13220 /*! @{ */ 13221 #define MTB_PERIPHID1_PERIPHID_MASK (0xFFFFFFFFU) 13222 #define MTB_PERIPHID1_PERIPHID_SHIFT (0U) 13223 #define MTB_PERIPHID1_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID1_PERIPHID_SHIFT)) & MTB_PERIPHID1_PERIPHID_MASK) 13224 /*! @} */ 13225 13226 /*! @name PERIPHID2 - Peripheral ID Register */ 13227 /*! @{ */ 13228 #define MTB_PERIPHID2_PERIPHID_MASK (0xFFFFFFFFU) 13229 #define MTB_PERIPHID2_PERIPHID_SHIFT (0U) 13230 #define MTB_PERIPHID2_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID2_PERIPHID_SHIFT)) & MTB_PERIPHID2_PERIPHID_MASK) 13231 /*! @} */ 13232 13233 /*! @name PERIPHID3 - Peripheral ID Register */ 13234 /*! @{ */ 13235 #define MTB_PERIPHID3_PERIPHID_MASK (0xFFFFFFFFU) 13236 #define MTB_PERIPHID3_PERIPHID_SHIFT (0U) 13237 #define MTB_PERIPHID3_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTB_PERIPHID3_PERIPHID_SHIFT)) & MTB_PERIPHID3_PERIPHID_MASK) 13238 /*! @} */ 13239 13240 /*! @name COMPID - Component ID Register */ 13241 /*! @{ */ 13242 #define MTB_COMPID_COMPID_MASK (0xFFFFFFFFU) 13243 #define MTB_COMPID_COMPID_SHIFT (0U) 13244 #define MTB_COMPID_COMPID(x) (((uint32_t)(((uint32_t)(x)) << MTB_COMPID_COMPID_SHIFT)) & MTB_COMPID_COMPID_MASK) 13245 /*! @} */ 13246 13247 /* The count of MTB_COMPID */ 13248 #define MTB_COMPID_COUNT (4U) 13249 13250 13251 /*! 13252 * @} 13253 */ /* end of group MTB_Register_Masks */ 13254 13255 13256 /* MTB - Peripheral instance base addresses */ 13257 /** Peripheral MTB base address */ 13258 #define MTB_BASE (0xF0000000u) 13259 /** Peripheral MTB base pointer */ 13260 #define MTB ((MTB_Type *)MTB_BASE) 13261 /** Array initializer of MTB peripheral base addresses */ 13262 #define MTB_BASE_ADDRS { MTB_BASE } 13263 /** Array initializer of MTB peripheral base pointers */ 13264 #define MTB_BASE_PTRS { MTB } 13265 13266 /*! 13267 * @} 13268 */ /* end of group MTB_Peripheral_Access_Layer */ 13269 13270 13271 /* ---------------------------------------------------------------------------- 13272 -- MTBDWT Peripheral Access Layer 13273 ---------------------------------------------------------------------------- */ 13274 13275 /*! 13276 * @addtogroup MTBDWT_Peripheral_Access_Layer MTBDWT Peripheral Access Layer 13277 * @{ 13278 */ 13279 13280 /** MTBDWT - Register Layout Typedef */ 13281 typedef struct { 13282 __I uint32_t CTRL; /**< DWT Control Register, offset: 0x0 */ 13283 uint8_t RESERVED_0[28]; 13284 struct { /* offset: 0x20, array step: 0x10 */ 13285 __IO uint32_t COMP; /**< DWT Comparator Register, array offset: 0x20, array step: 0x10 */ 13286 __IO uint32_t MASK; /**< DWT Comparator Mask Register, array offset: 0x24, array step: 0x10 */ 13287 __IO uint32_t FCT; /**< DWT Comparator Function Register 0..DWT Comparator Function Register 1, array offset: 0x28, array step: 0x10 */ 13288 uint8_t RESERVED_0[4]; 13289 } COMPARATOR[2]; 13290 uint8_t RESERVED_1[448]; 13291 __IO uint32_t TBCTRL; /**< DWT Trace Buffer Control Register, offset: 0x200 */ 13292 uint8_t RESERVED_2[3524]; 13293 __I uint32_t DEVICECFG; /**< Device Configuration Register, offset: 0xFC8 */ 13294 __I uint32_t DEVICETYPID; /**< Device Type Identifier Register, offset: 0xFCC */ 13295 __I uint32_t PERIPHID4; /**< Peripheral ID Register, offset: 0xFD0 */ 13296 __I uint32_t PERIPHID5; /**< Peripheral ID Register, offset: 0xFD4 */ 13297 __I uint32_t PERIPHID6; /**< Peripheral ID Register, offset: 0xFD8 */ 13298 __I uint32_t PERIPHID7; /**< Peripheral ID Register, offset: 0xFDC */ 13299 __I uint32_t PERIPHID0; /**< Peripheral ID Register, offset: 0xFE0 */ 13300 __I uint32_t PERIPHID1; /**< Peripheral ID Register, offset: 0xFE4 */ 13301 __I uint32_t PERIPHID2; /**< Peripheral ID Register, offset: 0xFE8 */ 13302 __I uint32_t PERIPHID3; /**< Peripheral ID Register, offset: 0xFEC */ 13303 __I uint32_t COMPID[4]; /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */ 13304 } MTBDWT_Type; 13305 13306 /* ---------------------------------------------------------------------------- 13307 -- MTBDWT Register Masks 13308 ---------------------------------------------------------------------------- */ 13309 13310 /*! 13311 * @addtogroup MTBDWT_Register_Masks MTBDWT Register Masks 13312 * @{ 13313 */ 13314 13315 /*! @name CTRL - DWT Control Register */ 13316 /*! @{ */ 13317 #define MTBDWT_CTRL_DWTCFGCTRL_MASK (0xFFFFFFFU) 13318 #define MTBDWT_CTRL_DWTCFGCTRL_SHIFT (0U) 13319 #define MTBDWT_CTRL_DWTCFGCTRL(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_CTRL_DWTCFGCTRL_SHIFT)) & MTBDWT_CTRL_DWTCFGCTRL_MASK) 13320 #define MTBDWT_CTRL_NUMCMP_MASK (0xF0000000U) 13321 #define MTBDWT_CTRL_NUMCMP_SHIFT (28U) 13322 #define MTBDWT_CTRL_NUMCMP(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_CTRL_NUMCMP_SHIFT)) & MTBDWT_CTRL_NUMCMP_MASK) 13323 /*! @} */ 13324 13325 /*! @name COMP - DWT Comparator Register */ 13326 /*! @{ */ 13327 #define MTBDWT_COMP_COMP_MASK (0xFFFFFFFFU) 13328 #define MTBDWT_COMP_COMP_SHIFT (0U) 13329 #define MTBDWT_COMP_COMP(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_COMP_COMP_SHIFT)) & MTBDWT_COMP_COMP_MASK) 13330 /*! @} */ 13331 13332 /* The count of MTBDWT_COMP */ 13333 #define MTBDWT_COMP_COUNT (2U) 13334 13335 /*! @name MASK - DWT Comparator Mask Register */ 13336 /*! @{ */ 13337 #define MTBDWT_MASK_MASK_MASK (0x1FU) 13338 #define MTBDWT_MASK_MASK_SHIFT (0U) 13339 #define MTBDWT_MASK_MASK(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_MASK_MASK_SHIFT)) & MTBDWT_MASK_MASK_MASK) 13340 /*! @} */ 13341 13342 /* The count of MTBDWT_MASK */ 13343 #define MTBDWT_MASK_COUNT (2U) 13344 13345 /*! @name FCT - DWT Comparator Function Register 0..DWT Comparator Function Register 1 */ 13346 /*! @{ */ 13347 #define MTBDWT_FCT_FUNCTION_MASK (0xFU) 13348 #define MTBDWT_FCT_FUNCTION_SHIFT (0U) 13349 /*! FUNCTION - Function 13350 * 0b0000..Disabled. 13351 * 0b0001-0b0011..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior. 13352 * 0b0100..Instruction fetch. 13353 * 0b0101..Data operand read. 13354 * 0b0110..Data operand write. 13355 * 0b0111..Data operand (read + write). 13356 * 0b1000-0b1111..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior. 13357 */ 13358 #define MTBDWT_FCT_FUNCTION(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_FUNCTION_SHIFT)) & MTBDWT_FCT_FUNCTION_MASK) 13359 #define MTBDWT_FCT_DATAVMATCH_MASK (0x100U) 13360 #define MTBDWT_FCT_DATAVMATCH_SHIFT (8U) 13361 /*! DATAVMATCH - Data Value Match 13362 * 0b0..Perform address comparison. 13363 * 0b1..Perform data value comparison. 13364 */ 13365 #define MTBDWT_FCT_DATAVMATCH(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVMATCH_SHIFT)) & MTBDWT_FCT_DATAVMATCH_MASK) 13366 #define MTBDWT_FCT_DATAVSIZE_MASK (0xC00U) 13367 #define MTBDWT_FCT_DATAVSIZE_SHIFT (10U) 13368 /*! DATAVSIZE - Data Value Size 13369 * 0b00..Byte. 13370 * 0b01..Halfword. 13371 * 0b10..Word. 13372 * 0b11..Reserved. Any attempts to use this value results in UNPREDICTABLE behavior. 13373 */ 13374 #define MTBDWT_FCT_DATAVSIZE(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVSIZE_SHIFT)) & MTBDWT_FCT_DATAVSIZE_MASK) 13375 #define MTBDWT_FCT_DATAVADDR0_MASK (0xF000U) 13376 #define MTBDWT_FCT_DATAVADDR0_SHIFT (12U) 13377 #define MTBDWT_FCT_DATAVADDR0(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_DATAVADDR0_SHIFT)) & MTBDWT_FCT_DATAVADDR0_MASK) 13378 #define MTBDWT_FCT_MATCHED_MASK (0x1000000U) 13379 #define MTBDWT_FCT_MATCHED_SHIFT (24U) 13380 /*! MATCHED - Comparator match 13381 * 0b0..No match. 13382 * 0b1..Match occurred. 13383 */ 13384 #define MTBDWT_FCT_MATCHED(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_FCT_MATCHED_SHIFT)) & MTBDWT_FCT_MATCHED_MASK) 13385 /*! @} */ 13386 13387 /* The count of MTBDWT_FCT */ 13388 #define MTBDWT_FCT_COUNT (2U) 13389 13390 /*! @name TBCTRL - DWT Trace Buffer Control Register */ 13391 /*! @{ */ 13392 #define MTBDWT_TBCTRL_ACOMP0_MASK (0x1U) 13393 #define MTBDWT_TBCTRL_ACOMP0_SHIFT (0U) 13394 /*! ACOMP0 - Action based on Comparator 0 match 13395 * 0b0..Trigger TSTOP based on the assertion of FCT0[MATCHED]. 13396 * 0b1..Trigger TSTART based on the assertion of FCT0[MATCHED]. 13397 */ 13398 #define MTBDWT_TBCTRL_ACOMP0(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_ACOMP0_SHIFT)) & MTBDWT_TBCTRL_ACOMP0_MASK) 13399 #define MTBDWT_TBCTRL_ACOMP1_MASK (0x2U) 13400 #define MTBDWT_TBCTRL_ACOMP1_SHIFT (1U) 13401 /*! ACOMP1 - Action based on Comparator 1 match 13402 * 0b0..Trigger TSTOP based on the assertion of FCT1[MATCHED]. 13403 * 0b1..Trigger TSTART based on the assertion of FCT1[MATCHED]. 13404 */ 13405 #define MTBDWT_TBCTRL_ACOMP1(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_ACOMP1_SHIFT)) & MTBDWT_TBCTRL_ACOMP1_MASK) 13406 #define MTBDWT_TBCTRL_NUMCOMP_MASK (0xF0000000U) 13407 #define MTBDWT_TBCTRL_NUMCOMP_SHIFT (28U) 13408 #define MTBDWT_TBCTRL_NUMCOMP(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_TBCTRL_NUMCOMP_SHIFT)) & MTBDWT_TBCTRL_NUMCOMP_MASK) 13409 /*! @} */ 13410 13411 /*! @name DEVICECFG - Device Configuration Register */ 13412 /*! @{ */ 13413 #define MTBDWT_DEVICECFG_DEVICECFG_MASK (0xFFFFFFFFU) 13414 #define MTBDWT_DEVICECFG_DEVICECFG_SHIFT (0U) 13415 #define MTBDWT_DEVICECFG_DEVICECFG(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_DEVICECFG_DEVICECFG_SHIFT)) & MTBDWT_DEVICECFG_DEVICECFG_MASK) 13416 /*! @} */ 13417 13418 /*! @name DEVICETYPID - Device Type Identifier Register */ 13419 /*! @{ */ 13420 #define MTBDWT_DEVICETYPID_DEVICETYPID_MASK (0xFFFFFFFFU) 13421 #define MTBDWT_DEVICETYPID_DEVICETYPID_SHIFT (0U) 13422 #define MTBDWT_DEVICETYPID_DEVICETYPID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_DEVICETYPID_DEVICETYPID_SHIFT)) & MTBDWT_DEVICETYPID_DEVICETYPID_MASK) 13423 /*! @} */ 13424 13425 /*! @name PERIPHID4 - Peripheral ID Register */ 13426 /*! @{ */ 13427 #define MTBDWT_PERIPHID4_PERIPHID_MASK (0xFFFFFFFFU) 13428 #define MTBDWT_PERIPHID4_PERIPHID_SHIFT (0U) 13429 #define MTBDWT_PERIPHID4_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID4_PERIPHID_SHIFT)) & MTBDWT_PERIPHID4_PERIPHID_MASK) 13430 /*! @} */ 13431 13432 /*! @name PERIPHID5 - Peripheral ID Register */ 13433 /*! @{ */ 13434 #define MTBDWT_PERIPHID5_PERIPHID_MASK (0xFFFFFFFFU) 13435 #define MTBDWT_PERIPHID5_PERIPHID_SHIFT (0U) 13436 #define MTBDWT_PERIPHID5_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID5_PERIPHID_SHIFT)) & MTBDWT_PERIPHID5_PERIPHID_MASK) 13437 /*! @} */ 13438 13439 /*! @name PERIPHID6 - Peripheral ID Register */ 13440 /*! @{ */ 13441 #define MTBDWT_PERIPHID6_PERIPHID_MASK (0xFFFFFFFFU) 13442 #define MTBDWT_PERIPHID6_PERIPHID_SHIFT (0U) 13443 #define MTBDWT_PERIPHID6_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID6_PERIPHID_SHIFT)) & MTBDWT_PERIPHID6_PERIPHID_MASK) 13444 /*! @} */ 13445 13446 /*! @name PERIPHID7 - Peripheral ID Register */ 13447 /*! @{ */ 13448 #define MTBDWT_PERIPHID7_PERIPHID_MASK (0xFFFFFFFFU) 13449 #define MTBDWT_PERIPHID7_PERIPHID_SHIFT (0U) 13450 #define MTBDWT_PERIPHID7_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID7_PERIPHID_SHIFT)) & MTBDWT_PERIPHID7_PERIPHID_MASK) 13451 /*! @} */ 13452 13453 /*! @name PERIPHID0 - Peripheral ID Register */ 13454 /*! @{ */ 13455 #define MTBDWT_PERIPHID0_PERIPHID_MASK (0xFFFFFFFFU) 13456 #define MTBDWT_PERIPHID0_PERIPHID_SHIFT (0U) 13457 #define MTBDWT_PERIPHID0_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID0_PERIPHID_SHIFT)) & MTBDWT_PERIPHID0_PERIPHID_MASK) 13458 /*! @} */ 13459 13460 /*! @name PERIPHID1 - Peripheral ID Register */ 13461 /*! @{ */ 13462 #define MTBDWT_PERIPHID1_PERIPHID_MASK (0xFFFFFFFFU) 13463 #define MTBDWT_PERIPHID1_PERIPHID_SHIFT (0U) 13464 #define MTBDWT_PERIPHID1_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID1_PERIPHID_SHIFT)) & MTBDWT_PERIPHID1_PERIPHID_MASK) 13465 /*! @} */ 13466 13467 /*! @name PERIPHID2 - Peripheral ID Register */ 13468 /*! @{ */ 13469 #define MTBDWT_PERIPHID2_PERIPHID_MASK (0xFFFFFFFFU) 13470 #define MTBDWT_PERIPHID2_PERIPHID_SHIFT (0U) 13471 #define MTBDWT_PERIPHID2_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID2_PERIPHID_SHIFT)) & MTBDWT_PERIPHID2_PERIPHID_MASK) 13472 /*! @} */ 13473 13474 /*! @name PERIPHID3 - Peripheral ID Register */ 13475 /*! @{ */ 13476 #define MTBDWT_PERIPHID3_PERIPHID_MASK (0xFFFFFFFFU) 13477 #define MTBDWT_PERIPHID3_PERIPHID_SHIFT (0U) 13478 #define MTBDWT_PERIPHID3_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_PERIPHID3_PERIPHID_SHIFT)) & MTBDWT_PERIPHID3_PERIPHID_MASK) 13479 /*! @} */ 13480 13481 /*! @name COMPID - Component ID Register */ 13482 /*! @{ */ 13483 #define MTBDWT_COMPID_COMPID_MASK (0xFFFFFFFFU) 13484 #define MTBDWT_COMPID_COMPID_SHIFT (0U) 13485 #define MTBDWT_COMPID_COMPID(x) (((uint32_t)(((uint32_t)(x)) << MTBDWT_COMPID_COMPID_SHIFT)) & MTBDWT_COMPID_COMPID_MASK) 13486 /*! @} */ 13487 13488 /* The count of MTBDWT_COMPID */ 13489 #define MTBDWT_COMPID_COUNT (4U) 13490 13491 13492 /*! 13493 * @} 13494 */ /* end of group MTBDWT_Register_Masks */ 13495 13496 13497 /* MTBDWT - Peripheral instance base addresses */ 13498 /** Peripheral MTBDWT base address */ 13499 #define MTBDWT_BASE (0xF0001000u) 13500 /** Peripheral MTBDWT base pointer */ 13501 #define MTBDWT ((MTBDWT_Type *)MTBDWT_BASE) 13502 /** Array initializer of MTBDWT peripheral base addresses */ 13503 #define MTBDWT_BASE_ADDRS { MTBDWT_BASE } 13504 /** Array initializer of MTBDWT peripheral base pointers */ 13505 #define MTBDWT_BASE_PTRS { MTBDWT } 13506 13507 /*! 13508 * @} 13509 */ /* end of group MTBDWT_Peripheral_Access_Layer */ 13510 13511 /*! 13512 * @brief Core boot mode. 13513 */ 13514 typedef enum _mu_core_boot_mode 13515 { 13516 kMU_CoreBootFromPflashBase = 0x00U, /*!< Boot from pflash base. */ 13517 kMU_CoreBootFromCM4RamBase = 0x02U, /*!< Boot from CM4 RAM base. */ 13518 } mu_core_boot_mode_t; 13519 /*! 13520 * @brief Power mode on the other side definition. 13521 */ 13522 typedef enum _mu_power_mode 13523 { 13524 kMU_PowerModeRun = 0x00U, /*!< Run mode. */ 13525 kMU_PowerModeCoo = 0x01U, /*!< COO mode. */ 13526 kMU_PowerModeWait = 0x02U, /*!< WAIT mode. */ 13527 kMU_PowerModeStop = 0x03U, /*!< STOP/VLPS mode. */ 13528 kMU_PowerModeDsm = 0x04U /*!< DSM: LLS/VLLS mode. */ 13529 } mu_power_mode_t; 13530 13531 13532 /* ---------------------------------------------------------------------------- 13533 -- MU Peripheral Access Layer 13534 ---------------------------------------------------------------------------- */ 13535 13536 /*! 13537 * @addtogroup MU_Peripheral_Access_Layer MU Peripheral Access Layer 13538 * @{ 13539 */ 13540 13541 /** MU - Register Layout Typedef */ 13542 typedef struct { 13543 __I uint32_t VER; /**< Version ID Register, offset: 0x0 */ 13544 __I uint32_t PAR; /**< Parameter Register, offset: 0x4 */ 13545 uint8_t RESERVED_0[24]; 13546 __IO uint32_t TR[4]; /**< Transmit Register, array offset: 0x20, array step: 0x4 */ 13547 uint8_t RESERVED_1[16]; 13548 __I uint32_t RR[4]; /**< Receive Register, array offset: 0x40, array step: 0x4 */ 13549 uint8_t RESERVED_2[16]; 13550 __IO uint32_t SR; /**< Status Register, offset: 0x60 */ 13551 __IO uint32_t CR; /**< Control Register, offset: 0x64 */ 13552 __IO uint32_t CCR; /**< Core Control Register, offset: 0x68 */ 13553 } MU_Type; 13554 13555 /* ---------------------------------------------------------------------------- 13556 -- MU Register Masks 13557 ---------------------------------------------------------------------------- */ 13558 13559 /*! 13560 * @addtogroup MU_Register_Masks MU Register Masks 13561 * @{ 13562 */ 13563 13564 /*! @name VER - Version ID Register */ 13565 /*! @{ */ 13566 #define MU_VER_FEATURE_MASK (0xFFFFU) 13567 #define MU_VER_FEATURE_SHIFT (0U) 13568 /*! FEATURE - Feature Specification Number 13569 * 0b000000000000x1xx..Core Control and Status Registers are implemented in both MUA and MUB. 13570 * 0b000000000000xx1x..RAIP/RAIE register bits are implemented. 13571 * 0b000000000000xxx0..Standard features implemented 13572 */ 13573 #define MU_VER_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << MU_VER_FEATURE_SHIFT)) & MU_VER_FEATURE_MASK) 13574 #define MU_VER_MINOR_MASK (0xFF0000U) 13575 #define MU_VER_MINOR_SHIFT (16U) 13576 #define MU_VER_MINOR(x) (((uint32_t)(((uint32_t)(x)) << MU_VER_MINOR_SHIFT)) & MU_VER_MINOR_MASK) 13577 #define MU_VER_MAJOR_MASK (0xFF000000U) 13578 #define MU_VER_MAJOR_SHIFT (24U) 13579 #define MU_VER_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << MU_VER_MAJOR_SHIFT)) & MU_VER_MAJOR_MASK) 13580 /*! @} */ 13581 13582 /*! @name PAR - Parameter Register */ 13583 /*! @{ */ 13584 #define MU_PAR_PARAMETER_MASK (0xFFFFFFFFU) 13585 #define MU_PAR_PARAMETER_SHIFT (0U) 13586 #define MU_PAR_PARAMETER(x) (((uint32_t)(((uint32_t)(x)) << MU_PAR_PARAMETER_SHIFT)) & MU_PAR_PARAMETER_MASK) 13587 /*! @} */ 13588 13589 /*! @name TR - Transmit Register */ 13590 /*! @{ */ 13591 #define MU_TR_DATA_MASK (0xFFFFFFFFU) 13592 #define MU_TR_DATA_SHIFT (0U) 13593 #define MU_TR_DATA(x) (((uint32_t)(((uint32_t)(x)) << MU_TR_DATA_SHIFT)) & MU_TR_DATA_MASK) 13594 /*! @} */ 13595 13596 /* The count of MU_TR */ 13597 #define MU_TR_COUNT (4U) 13598 13599 /*! @name RR - Receive Register */ 13600 /*! @{ */ 13601 #define MU_RR_DATA_MASK (0xFFFFFFFFU) 13602 #define MU_RR_DATA_SHIFT (0U) 13603 #define MU_RR_DATA(x) (((uint32_t)(((uint32_t)(x)) << MU_RR_DATA_SHIFT)) & MU_RR_DATA_MASK) 13604 /*! @} */ 13605 13606 /* The count of MU_RR */ 13607 #define MU_RR_COUNT (4U) 13608 13609 /*! @name SR - Status Register */ 13610 /*! @{ */ 13611 #define MU_SR_Fn_MASK (0x7U) 13612 #define MU_SR_Fn_SHIFT (0U) 13613 /*! Fn - Fn 13614 * 0b000..Fn bit in the MUA CR register is written 0 (default). 13615 * 0b001..Fn bit in the MUA CR register is written 1. 13616 */ 13617 #define MU_SR_Fn(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_Fn_SHIFT)) & MU_SR_Fn_MASK) 13618 #define MU_SR_NMIC_MASK (0x8U) 13619 #define MU_SR_NMIC_SHIFT (3U) 13620 /*! NMIC - NMIC 13621 * 0b0..Default 13622 * 0b1..Writing "1" clears the NMI bit in the MUA CR register. 13623 */ 13624 #define MU_SR_NMIC(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_NMIC_SHIFT)) & MU_SR_NMIC_MASK) 13625 #define MU_SR_EP_MASK (0x10U) 13626 #define MU_SR_EP_SHIFT (4U) 13627 /*! EP - EP 13628 * 0b0..The MUB side event is not pending (default). 13629 * 0b1..The MUB side event is pending. 13630 */ 13631 #define MU_SR_EP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_EP_SHIFT)) & MU_SR_EP_MASK) 13632 #define MU_SR_HRIP_MASK (0x80U) 13633 #define MU_SR_HRIP_SHIFT (7U) 13634 /*! HRIP - HRIP 13635 * 0b0..MUA didn't issue hardware reset to Processor B 13636 * 0b1..MUA had initiated a hardware reset to Processor B through HR bit. 13637 */ 13638 #define MU_SR_HRIP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_HRIP_SHIFT)) & MU_SR_HRIP_MASK) 13639 #define MU_SR_FUP_MASK (0x100U) 13640 #define MU_SR_FUP_SHIFT (8U) 13641 /*! FUP - FUP 13642 * 0b0..No flags updated, initiated by the MUB, in progress (default) 13643 * 0b1..MUB initiated flags update, processing 13644 */ 13645 #define MU_SR_FUP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_FUP_SHIFT)) & MU_SR_FUP_MASK) 13646 #define MU_SR_RDIP_MASK (0x200U) 13647 #define MU_SR_RDIP_SHIFT (9U) 13648 /*! RDIP - RDIP 13649 * 0b0..Processor A did not exit reset 13650 * 0b1..Processor A exited from reset 13651 */ 13652 #define MU_SR_RDIP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_RDIP_SHIFT)) & MU_SR_RDIP_MASK) 13653 #define MU_SR_RAIP_MASK (0x400U) 13654 #define MU_SR_RAIP_SHIFT (10U) 13655 /*! RAIP - RAIP 13656 * 0b0..Processor A did not enter reset 13657 * 0b1..Processor A entered reset 13658 */ 13659 #define MU_SR_RAIP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_RAIP_SHIFT)) & MU_SR_RAIP_MASK) 13660 #define MU_SR_MURIP_MASK (0x800U) 13661 #define MU_SR_MURIP_SHIFT (11U) 13662 /*! MURIP - MURIP 13663 * 0b0..Processor A did not issue MU reset 13664 * 0b1..Processor A issued MU reset 13665 */ 13666 #define MU_SR_MURIP(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_MURIP_SHIFT)) & MU_SR_MURIP_MASK) 13667 #define MU_SR_PM_MASK (0x7000U) 13668 #define MU_SR_PM_SHIFT (12U) 13669 /*! PM - PM 13670 * 0b000..The MUA processor is in Run Mode. 13671 * 0b001..The MUA processor is in COO Mode. 13672 * 0b010..The MUA processor is in WAIT Mode. 13673 * 0b011..The MUA processor is in STOP/VLPS Mode. 13674 * 0b100..The MUA processor is in LLS/VLLS Mode. 13675 */ 13676 #define MU_SR_PM(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_PM_SHIFT)) & MU_SR_PM_MASK) 13677 #define MU_SR_TEn_MASK (0xF00000U) 13678 #define MU_SR_TEn_SHIFT (20U) 13679 /*! TEn - TEn 13680 * 0b0000..MUB TRn register is not empty. 13681 * 0b0001..MUB TRn register is empty (default). 13682 */ 13683 #define MU_SR_TEn(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_TEn_SHIFT)) & MU_SR_TEn_MASK) 13684 #define MU_SR_RFn_MASK (0xF000000U) 13685 #define MU_SR_RFn_SHIFT (24U) 13686 /*! RFn - RFn 13687 * 0b0000..MUB RRn register is not full (default). 13688 * 0b0001..MUB RRn register has received data from MUA TRn register and is ready to be read by the MUB. 13689 */ 13690 #define MU_SR_RFn(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_RFn_SHIFT)) & MU_SR_RFn_MASK) 13691 #define MU_SR_GIPn_MASK (0xF0000000U) 13692 #define MU_SR_GIPn_SHIFT (28U) 13693 /*! GIPn - GIPn 13694 * 0b0000..MUB general purpose interrupt n is not pending. (default) 13695 * 0b0001..MUB general purpose interrupt n is pending. 13696 */ 13697 #define MU_SR_GIPn(x) (((uint32_t)(((uint32_t)(x)) << MU_SR_GIPn_SHIFT)) & MU_SR_GIPn_MASK) 13698 /*! @} */ 13699 13700 /*! @name CR - Control Register */ 13701 /*! @{ */ 13702 #define MU_CR_Fn_MASK (0x7U) 13703 #define MU_CR_Fn_SHIFT (0U) 13704 /*! Fn - Fn 13705 * 0b000..Clears the Fn bit in the SR register. 13706 * 0b001..Sets the Fn bit in the SR register. 13707 */ 13708 #define MU_CR_Fn(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_Fn_SHIFT)) & MU_CR_Fn_MASK) 13709 #define MU_CR_NMI_MASK (0x8U) 13710 #define MU_CR_NMI_SHIFT (3U) 13711 /*! NMI - NMI 13712 * 0b0..Non-maskable interrupt is not issued to the Processor A by the Processor B (default). 13713 * 0b1..Non-maskable interrupt is issued to the Processor A by the Processor B. 13714 */ 13715 #define MU_CR_NMI(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_NMI_SHIFT)) & MU_CR_NMI_MASK) 13716 #define MU_CR_MUR_MASK (0x20U) 13717 #define MU_CR_MUR_SHIFT (5U) 13718 /*! MUR - MUR 13719 * 0b0..N/A. Self clearing bit (default). 13720 * 0b1..Asserts the MU reset. 13721 */ 13722 #define MU_CR_MUR(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_MUR_SHIFT)) & MU_CR_MUR_MASK) 13723 #define MU_CR_RDIE_MASK (0x40U) 13724 #define MU_CR_RDIE_SHIFT (6U) 13725 /*! RDIE - RDIE 13726 * 0b0..Disables Processor B General Purpose Interrupt 3 request due to Processor A reset de-assertion. 13727 * 0b1..Enables Processor B General Purpose Interrupt 3 request due to Processor A reset de-assertion. 13728 */ 13729 #define MU_CR_RDIE(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_RDIE_SHIFT)) & MU_CR_RDIE_MASK) 13730 #define MU_CR_HRIE_MASK (0x80U) 13731 #define MU_CR_HRIE_SHIFT (7U) 13732 /*! HRIE - Processor B hardware reset interrupt enable 13733 * 0b0..Disables Processor B General Purpose Interrupt 3 request due to Processor A issued HR to Processor B. 13734 * 0b1..Enables Processor B General Purpose Interrupt 3 request due to Processor A issued HR to Processor B. 13735 */ 13736 #define MU_CR_HRIE(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_HRIE_SHIFT)) & MU_CR_HRIE_MASK) 13737 #define MU_CR_MURIE_MASK (0x800U) 13738 #define MU_CR_MURIE_SHIFT (11U) 13739 /*! MURIE - MURIE 13740 * 0b0..Disables Processor B-side General Purpose Interrupt 3 request due to MU reset issued by MUA. 13741 * 0b1..Enables Processor B-side General Purpose Interrupt 3 request due to MU reset issued by MUA. 13742 */ 13743 #define MU_CR_MURIE(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_MURIE_SHIFT)) & MU_CR_MURIE_MASK) 13744 #define MU_CR_RAIE_MASK (0x1000U) 13745 #define MU_CR_RAIE_SHIFT (12U) 13746 /*! RAIE - RAIE 13747 * 0b0..Disables Processor B-side General Purpose Interrupt 3 request due to Processor A reset assertion. 13748 * 0b1..Enables Processor B-side General Purpose Interrupt 3 request due to Processor A reset assertion. 13749 */ 13750 #define MU_CR_RAIE(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_RAIE_SHIFT)) & MU_CR_RAIE_MASK) 13751 #define MU_CR_GIRn_MASK (0xF0000U) 13752 #define MU_CR_GIRn_SHIFT (16U) 13753 /*! GIRn - GIRn 13754 * 0b0000..MUB General Interrupt n is not requested to the MUA (default). 13755 * 0b0001..MUB General Interrupt n is requested to the MUA. 13756 */ 13757 #define MU_CR_GIRn(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_GIRn_SHIFT)) & MU_CR_GIRn_MASK) 13758 #define MU_CR_TIEn_MASK (0xF00000U) 13759 #define MU_CR_TIEn_SHIFT (20U) 13760 /*! TIEn - TIEn 13761 * 0b0000..Disables MUB Transmit Interrupt n. (default) 13762 * 0b0001..Enables MUB Transmit Interrupt n. 13763 */ 13764 #define MU_CR_TIEn(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_TIEn_SHIFT)) & MU_CR_TIEn_MASK) 13765 #define MU_CR_RIEn_MASK (0xF000000U) 13766 #define MU_CR_RIEn_SHIFT (24U) 13767 /*! RIEn - RIEn 13768 * 0b0000..Disables MUB Receive Interrupt n. (default) 13769 * 0b0001..Enables MUB Receive Interrupt n. 13770 */ 13771 #define MU_CR_RIEn(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_RIEn_SHIFT)) & MU_CR_RIEn_MASK) 13772 #define MU_CR_GIEn_MASK (0xF0000000U) 13773 #define MU_CR_GIEn_SHIFT (28U) 13774 /*! GIEn - GIEn 13775 * 0b0000..Disables MUB General Interrupt n. (default) 13776 * 0b0001..Enables MUB General Interrupt n. 13777 */ 13778 #define MU_CR_GIEn(x) (((uint32_t)(((uint32_t)(x)) << MU_CR_GIEn_SHIFT)) & MU_CR_GIEn_MASK) 13779 /*! @} */ 13780 13781 /*! @name CCR - Core Control Register */ 13782 /*! @{ */ 13783 #define MU_CCR_HR_MASK (0x1U) 13784 #define MU_CCR_HR_SHIFT (0U) 13785 /*! HR - HR 13786 * 0b0..De-assert Hardware reset to the Processor A. (default) 13787 * 0b1..Assert Hardware reset to the Processor A. 13788 */ 13789 #define MU_CCR_HR(x) (((uint32_t)(((uint32_t)(x)) << MU_CCR_HR_SHIFT)) & MU_CCR_HR_MASK) 13790 #define MU_CCR_HRM_MASK (0x2U) 13791 #define MU_CCR_HRM_SHIFT (1U) 13792 /*! HRM - When set, HR bit in MUA CCR has no effect 13793 * 0b0..HR bit in MUA CCR is not masked, enables the hardware reset to the Processor B (default after hardware reset). 13794 * 0b1..HR bit in MUA CCR is masked, disables the hardware reset request to the Processor B. 13795 */ 13796 #define MU_CCR_HRM(x) (((uint32_t)(((uint32_t)(x)) << MU_CCR_HRM_SHIFT)) & MU_CCR_HRM_MASK) 13797 #define MU_CCR_RSTH_MASK (0x4U) 13798 #define MU_CCR_RSTH_SHIFT (2U) 13799 /*! RSTH - Processor A Reset Hold 13800 * 0b0..Release Processor A from reset 13801 * 0b1..Hold Processor A in reset 13802 */ 13803 #define MU_CCR_RSTH(x) (((uint32_t)(((uint32_t)(x)) << MU_CCR_RSTH_SHIFT)) & MU_CCR_RSTH_MASK) 13804 #define MU_CCR_CLKE_MASK (0x8U) 13805 #define MU_CCR_CLKE_SHIFT (3U) 13806 /*! CLKE - MUA clock enable 13807 * 0b0..MUA platform clock gated when MUA-side enters a stop mode. 13808 * 0b1..MUA platform clock kept running after MUA-side enters a stop mode, until MUB also enters a stop mode. 13809 */ 13810 #define MU_CCR_CLKE(x) (((uint32_t)(((uint32_t)(x)) << MU_CCR_CLKE_SHIFT)) & MU_CCR_CLKE_MASK) 13811 #define MU_CCR_BOOT_MASK (0x30U) 13812 #define MU_CCR_BOOT_SHIFT (4U) 13813 /*! BOOT - Slave Processor A Boot Config. 13814 * 0b00..Boot from Pflash base 13815 * 0b01..Reserved 13816 * 0b10..Boot from CM4 RAM base 13817 * 0b11..Reserved 13818 */ 13819 #define MU_CCR_BOOT(x) (((uint32_t)(((uint32_t)(x)) << MU_CCR_BOOT_SHIFT)) & MU_CCR_BOOT_MASK) 13820 /*! @} */ 13821 13822 13823 /*! 13824 * @} 13825 */ /* end of group MU_Register_Masks */ 13826 13827 13828 /* MU - Peripheral instance base addresses */ 13829 /** Peripheral MUB base address */ 13830 #define MUB_BASE (0x41024000u) 13831 /** Peripheral MUB base pointer */ 13832 #define MUB ((MU_Type *)MUB_BASE) 13833 /** Array initializer of MU peripheral base addresses */ 13834 #define MU_BASE_ADDRS { MUB_BASE } 13835 /** Array initializer of MU peripheral base pointers */ 13836 #define MU_BASE_PTRS { MUB } 13837 /** Interrupt vectors for the MU peripheral type */ 13838 #define MU_IRQS { MUB_IRQn } 13839 13840 /*! 13841 * @} 13842 */ /* end of group MU_Peripheral_Access_Layer */ 13843 13844 13845 /* ---------------------------------------------------------------------------- 13846 -- PCC Peripheral Access Layer 13847 ---------------------------------------------------------------------------- */ 13848 13849 /*! 13850 * @addtogroup PCC_Peripheral_Access_Layer PCC Peripheral Access Layer 13851 * @{ 13852 */ 13853 13854 /** PCC - Register Layout Typedef */ 13855 typedef struct { 13856 __IO uint32_t CLKCFG[130]; /**< PCC MSCM Register..PCC EXT_CLK Register, array offset: 0x0, array step: 0x4 */ 13857 } PCC_Type; 13858 13859 /* ---------------------------------------------------------------------------- 13860 -- PCC Register Masks 13861 ---------------------------------------------------------------------------- */ 13862 13863 /*! 13864 * @addtogroup PCC_Register_Masks PCC Register Masks 13865 * @{ 13866 */ 13867 13868 /*! @name CLKCFG - PCC MSCM Register..PCC EXT_CLK Register */ 13869 /*! @{ */ 13870 #define PCC_CLKCFG_PCD_MASK (0x7U) 13871 #define PCC_CLKCFG_PCD_SHIFT (0U) 13872 /*! PCD - Peripheral Clock Divider Select 13873 * 0b000..Divide by 1. 13874 * 0b001..Divide by 2. 13875 * 0b010..Divide by 3. 13876 * 0b011..Divide by 4. 13877 * 0b100..Divide by 5. 13878 * 0b101..Divide by 6. 13879 * 0b110..Divide by 7. 13880 * 0b111..Divide by 8. 13881 */ 13882 #define PCC_CLKCFG_PCD(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PCD_SHIFT)) & PCC_CLKCFG_PCD_MASK) 13883 #define PCC_CLKCFG_FRAC_MASK (0x8U) 13884 #define PCC_CLKCFG_FRAC_SHIFT (3U) 13885 /*! FRAC - Peripheral Clock Divider Fraction 13886 * 0b0..Fractional value is 0. 13887 * 0b1..Fractional value is 1. 13888 */ 13889 #define PCC_CLKCFG_FRAC(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_FRAC_SHIFT)) & PCC_CLKCFG_FRAC_MASK) 13890 #define PCC_CLKCFG_PCS_MASK (0x7000000U) 13891 #define PCC_CLKCFG_PCS_SHIFT (24U) 13892 /*! PCS - Peripheral Clock Source Select 13893 * 0b000..Clock is off. 13894 * 0b001..Clock option 1 13895 * 0b010..Clock option 2 13896 * 0b011..Clock option 3 13897 * 0b100..Clock option 4 13898 * 0b101..Clock option 5 13899 * 0b110..Clock option 6 13900 * 0b111..Clock option 7 13901 */ 13902 #define PCC_CLKCFG_PCS(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PCS_SHIFT)) & PCC_CLKCFG_PCS_MASK) 13903 #define PCC_CLKCFG_INUSE_MASK (0x20000000U) 13904 #define PCC_CLKCFG_INUSE_SHIFT (29U) 13905 /*! INUSE - In use flag 13906 * 0b0..Peripheral is not being used. 13907 * 0b1..Peripheral is being used. Software cannot modify the existing clocking configuration. 13908 */ 13909 #define PCC_CLKCFG_INUSE(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_INUSE_SHIFT)) & PCC_CLKCFG_INUSE_MASK) 13910 #define PCC_CLKCFG_CGC_MASK (0x40000000U) 13911 #define PCC_CLKCFG_CGC_SHIFT (30U) 13912 /*! CGC - Clock Gate Control 13913 * 0b0..Clock disabled 13914 * 0b1..Clock enabled. The current clock selection and divider options are locked. 13915 */ 13916 #define PCC_CLKCFG_CGC(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_CGC_SHIFT)) & PCC_CLKCFG_CGC_MASK) 13917 #define PCC_CLKCFG_PR_MASK (0x80000000U) 13918 #define PCC_CLKCFG_PR_SHIFT (31U) 13919 /*! PR - Present 13920 * 0b0..Peripheral is not present. 13921 * 0b1..Peripheral is present. 13922 */ 13923 #define PCC_CLKCFG_PR(x) (((uint32_t)(((uint32_t)(x)) << PCC_CLKCFG_PR_SHIFT)) & PCC_CLKCFG_PR_MASK) 13924 /*! @} */ 13925 13926 /* The count of PCC_CLKCFG */ 13927 #define PCC_CLKCFG_COUNT (130U) 13928 13929 13930 /*! 13931 * @} 13932 */ /* end of group PCC_Register_Masks */ 13933 13934 13935 /* PCC - Peripheral instance base addresses */ 13936 /** Peripheral PCC0 base address */ 13937 #define PCC0_BASE (0x4002B000u) 13938 /** Peripheral PCC0 base pointer */ 13939 #define PCC0 ((PCC_Type *)PCC0_BASE) 13940 /** Peripheral PCC1 base address */ 13941 #define PCC1_BASE (0x41027000u) 13942 /** Peripheral PCC1 base pointer */ 13943 #define PCC1 ((PCC_Type *)PCC1_BASE) 13944 /** Array initializer of PCC peripheral base addresses */ 13945 #define PCC_BASE_ADDRS { PCC0_BASE, PCC1_BASE } 13946 /** Array initializer of PCC peripheral base pointers */ 13947 #define PCC_BASE_PTRS { PCC0, PCC1 } 13948 13949 /*! 13950 * @} 13951 */ /* end of group PCC_Peripheral_Access_Layer */ 13952 13953 13954 /* ---------------------------------------------------------------------------- 13955 -- PORT Peripheral Access Layer 13956 ---------------------------------------------------------------------------- */ 13957 13958 /*! 13959 * @addtogroup PORT_Peripheral_Access_Layer PORT Peripheral Access Layer 13960 * @{ 13961 */ 13962 13963 /** PORT - Register Layout Typedef */ 13964 typedef struct { 13965 __IO uint32_t PCR[32]; /**< Pin Control Register 0..Pin Control Register 30, array offset: 0x0, array step: 0x4 */ 13966 __O uint32_t GPCLR; /**< Global Pin Control Low Register, offset: 0x80 */ 13967 __O uint32_t GPCHR; /**< Global Pin Control High Register, offset: 0x84 */ 13968 __O uint32_t GICLR; /**< Global Interrupt Control Low Register, offset: 0x88 */ 13969 __O uint32_t GICHR; /**< Global Interrupt Control High Register, offset: 0x8C */ 13970 uint8_t RESERVED_0[16]; 13971 __IO uint32_t ISFR; /**< Interrupt Status Flag Register, offset: 0xA0 */ 13972 uint8_t RESERVED_1[28]; 13973 __IO uint32_t DFER; /**< Digital Filter Enable Register, offset: 0xC0 */ 13974 __IO uint32_t DFCR; /**< Digital Filter Clock Register, offset: 0xC4 */ 13975 __IO uint32_t DFWR; /**< Digital Filter Width Register, offset: 0xC8 */ 13976 } PORT_Type; 13977 13978 /* ---------------------------------------------------------------------------- 13979 -- PORT Register Masks 13980 ---------------------------------------------------------------------------- */ 13981 13982 /*! 13983 * @addtogroup PORT_Register_Masks PORT Register Masks 13984 * @{ 13985 */ 13986 13987 /*! @name PCR - Pin Control Register 0..Pin Control Register 30 */ 13988 /*! @{ */ 13989 #define PORT_PCR_PS_MASK (0x1U) 13990 #define PORT_PCR_PS_SHIFT (0U) 13991 /*! PS - Pull Select 13992 * 0b0..Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set. 13993 * 0b1..Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set. 13994 */ 13995 #define PORT_PCR_PS(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PS_SHIFT)) & PORT_PCR_PS_MASK) 13996 #define PORT_PCR_PE_MASK (0x2U) 13997 #define PORT_PCR_PE_SHIFT (1U) 13998 /*! PE - Pull Enable 13999 * 0b0..Internal pull resistor is not enabled on the corresponding pin. 14000 * 0b1..Internal pull resistor is enabled on the corresponding pin, if the pin is configured as a digital input. 14001 */ 14002 #define PORT_PCR_PE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PE_SHIFT)) & PORT_PCR_PE_MASK) 14003 #define PORT_PCR_SRE_MASK (0x4U) 14004 #define PORT_PCR_SRE_SHIFT (2U) 14005 /*! SRE - Slew Rate Enable 14006 * 0b0..Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output. 14007 * 0b1..Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output. 14008 */ 14009 #define PORT_PCR_SRE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_SRE_SHIFT)) & PORT_PCR_SRE_MASK) 14010 #define PORT_PCR_PFE_MASK (0x10U) 14011 #define PORT_PCR_PFE_SHIFT (4U) 14012 /*! PFE - Passive Filter Enable 14013 * 0b0..Passive input filter is disabled on the corresponding pin. 14014 * 0b1..Passive input filter is enabled on the corresponding pin, if the pin is configured as a digital input. 14015 * Refer to the device data sheet for filter characteristics. 14016 */ 14017 #define PORT_PCR_PFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PFE_SHIFT)) & PORT_PCR_PFE_MASK) 14018 #define PORT_PCR_ODE_MASK (0x20U) 14019 #define PORT_PCR_ODE_SHIFT (5U) 14020 /*! ODE - Open Drain Enable 14021 * 0b0..Open drain output is disabled on the corresponding pin. 14022 * 0b1..Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output. 14023 */ 14024 #define PORT_PCR_ODE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ODE_SHIFT)) & PORT_PCR_ODE_MASK) 14025 #define PORT_PCR_DSE_MASK (0x40U) 14026 #define PORT_PCR_DSE_SHIFT (6U) 14027 /*! DSE - Drive Strength Enable 14028 * 0b0..Low drive strength is configured on the corresponding pin, if pin is configured as a digital output. 14029 * 0b1..High drive strength is configured on the corresponding pin, if pin is configured as a digital output. 14030 */ 14031 #define PORT_PCR_DSE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_DSE_SHIFT)) & PORT_PCR_DSE_MASK) 14032 #define PORT_PCR_MUX_MASK (0x700U) 14033 #define PORT_PCR_MUX_SHIFT (8U) 14034 /*! MUX - Pin Mux Control 14035 * 0b000..Pin disabled (Alternative 0) (analog). 14036 * 0b001..Alternative 1 (GPIO). 14037 * 0b010..Alternative 2 (chip-specific). 14038 * 0b011..Alternative 3 (chip-specific). 14039 * 0b100..Alternative 4 (chip-specific). 14040 * 0b101..Alternative 5 (chip-specific). 14041 * 0b110..Alternative 6 (chip-specific). 14042 * 0b111..Alternative 7 (chip-specific). 14043 */ 14044 #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_MUX_SHIFT)) & PORT_PCR_MUX_MASK) 14045 #define PORT_PCR_LK_MASK (0x8000U) 14046 #define PORT_PCR_LK_SHIFT (15U) 14047 /*! LK - Lock Register 14048 * 0b0..Pin Control Register is not locked. 14049 * 0b1..Pin Control Register is locked and cannot be updated until the next system reset. 14050 */ 14051 #define PORT_PCR_LK(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_LK_SHIFT)) & PORT_PCR_LK_MASK) 14052 #define PORT_PCR_IRQC_MASK (0xF0000U) 14053 #define PORT_PCR_IRQC_SHIFT (16U) 14054 /*! IRQC - Interrupt Configuration 14055 * 0b0000..Interrupt Status Flag (ISF) is disabled. 14056 * 0b0001..ISF flag and DMA request on rising edge. 14057 * 0b0010..ISF flag and DMA request on falling edge. 14058 * 0b0011..ISF flag and DMA request on either edge. 14059 * 0b0100..Reserved. 14060 * 0b0101..Flag sets on rising edge. 14061 * 0b0110..Flag sets on falling edge. 14062 * 0b0111..Flag sets on either edge. 14063 * 0b1000..ISF flag and Interrupt when logic 0. 14064 * 0b1001..ISF flag and Interrupt on rising-edge. 14065 * 0b1010..ISF flag and Interrupt on falling-edge. 14066 * 0b1011..ISF flag and Interrupt on either edge. 14067 * 0b1100..ISF flag and Interrupt when logic 1. 14068 * 0b1101..Enable active high trigger output, flag is disabled. [The trigger output goes to the trigger mux, 14069 * which allows pins to trigger other peripherals (configurable polarity; 1 pin per port; if multiple pins are 14070 * configured, then they are ORed together to create the trigger)] 14071 * 0b1110..Enable active low trigger output, flag is disabled. 14072 * 0b1111..Reserved. 14073 */ 14074 #define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK) 14075 #define PORT_PCR_ISF_MASK (0x1000000U) 14076 #define PORT_PCR_ISF_SHIFT (24U) 14077 /*! ISF - Interrupt Status Flag 14078 * 0b0..Configured interrupt is not detected. 14079 * 0b1..Configured interrupt is detected. If the pin is configured to generate a DMA request, then the 14080 * corresponding flag will be cleared automatically at the completion of the requested DMA transfer. Otherwise, the 14081 * flag remains set until a logic 1 is written to the flag. If the pin is configured for a level sensitive 14082 * interrupt and the pin remains asserted, then the flag is set again immediately after it is cleared. 14083 */ 14084 #define PORT_PCR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ISF_SHIFT)) & PORT_PCR_ISF_MASK) 14085 /*! @} */ 14086 14087 /* The count of PORT_PCR */ 14088 #define PORT_PCR_COUNT (32U) 14089 14090 /*! @name GPCLR - Global Pin Control Low Register */ 14091 /*! @{ */ 14092 #define PORT_GPCLR_GPWD_MASK (0xFFFFU) 14093 #define PORT_GPCLR_GPWD_SHIFT (0U) 14094 #define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWD_SHIFT)) & PORT_GPCLR_GPWD_MASK) 14095 #define PORT_GPCLR_GPWE_MASK (0xFFFF0000U) 14096 #define PORT_GPCLR_GPWE_SHIFT (16U) 14097 #define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWE_SHIFT)) & PORT_GPCLR_GPWE_MASK) 14098 /*! @} */ 14099 14100 /*! @name GPCHR - Global Pin Control High Register */ 14101 /*! @{ */ 14102 #define PORT_GPCHR_GPWD_MASK (0xFFFFU) 14103 #define PORT_GPCHR_GPWD_SHIFT (0U) 14104 #define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWD_SHIFT)) & PORT_GPCHR_GPWD_MASK) 14105 #define PORT_GPCHR_GPWE_MASK (0xFFFF0000U) 14106 #define PORT_GPCHR_GPWE_SHIFT (16U) 14107 #define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWE_SHIFT)) & PORT_GPCHR_GPWE_MASK) 14108 /*! @} */ 14109 14110 /*! @name GICLR - Global Interrupt Control Low Register */ 14111 /*! @{ */ 14112 #define PORT_GICLR_GIWE_MASK (0xFFFFU) 14113 #define PORT_GICLR_GIWE_SHIFT (0U) 14114 #define PORT_GICLR_GIWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GICLR_GIWE_SHIFT)) & PORT_GICLR_GIWE_MASK) 14115 #define PORT_GICLR_GIWD_MASK (0xFFFF0000U) 14116 #define PORT_GICLR_GIWD_SHIFT (16U) 14117 #define PORT_GICLR_GIWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GICLR_GIWD_SHIFT)) & PORT_GICLR_GIWD_MASK) 14118 /*! @} */ 14119 14120 /*! @name GICHR - Global Interrupt Control High Register */ 14121 /*! @{ */ 14122 #define PORT_GICHR_GIWE_MASK (0xFFFFU) 14123 #define PORT_GICHR_GIWE_SHIFT (0U) 14124 #define PORT_GICHR_GIWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GICHR_GIWE_SHIFT)) & PORT_GICHR_GIWE_MASK) 14125 #define PORT_GICHR_GIWD_MASK (0xFFFF0000U) 14126 #define PORT_GICHR_GIWD_SHIFT (16U) 14127 #define PORT_GICHR_GIWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GICHR_GIWD_SHIFT)) & PORT_GICHR_GIWD_MASK) 14128 /*! @} */ 14129 14130 /*! @name ISFR - Interrupt Status Flag Register */ 14131 /*! @{ */ 14132 #define PORT_ISFR_ISF_MASK (0xFFFFFFFFU) 14133 #define PORT_ISFR_ISF_SHIFT (0U) 14134 #define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_ISFR_ISF_SHIFT)) & PORT_ISFR_ISF_MASK) 14135 /*! @} */ 14136 14137 /*! @name DFER - Digital Filter Enable Register */ 14138 /*! @{ */ 14139 #define PORT_DFER_DFE_MASK (0xFFFFFFFFU) 14140 #define PORT_DFER_DFE_SHIFT (0U) 14141 #define PORT_DFER_DFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFER_DFE_SHIFT)) & PORT_DFER_DFE_MASK) 14142 /*! @} */ 14143 14144 /*! @name DFCR - Digital Filter Clock Register */ 14145 /*! @{ */ 14146 #define PORT_DFCR_CS_MASK (0x1U) 14147 #define PORT_DFCR_CS_SHIFT (0U) 14148 /*! CS - Clock Source 14149 * 0b0..Digital filters are clocked by the bus clock. 14150 * 0b1..Digital filters are clocked by the 8 clock. 14151 */ 14152 #define PORT_DFCR_CS(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFCR_CS_SHIFT)) & PORT_DFCR_CS_MASK) 14153 /*! @} */ 14154 14155 /*! @name DFWR - Digital Filter Width Register */ 14156 /*! @{ */ 14157 #define PORT_DFWR_FILT_MASK (0x1FU) 14158 #define PORT_DFWR_FILT_SHIFT (0U) 14159 #define PORT_DFWR_FILT(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFWR_FILT_SHIFT)) & PORT_DFWR_FILT_MASK) 14160 /*! @} */ 14161 14162 14163 /*! 14164 * @} 14165 */ /* end of group PORT_Register_Masks */ 14166 14167 14168 /* PORT - Peripheral instance base addresses */ 14169 /** Peripheral PORTA base address */ 14170 #define PORTA_BASE (0x40046000u) 14171 /** Peripheral PORTA base pointer */ 14172 #define PORTA ((PORT_Type *)PORTA_BASE) 14173 /** Peripheral PORTB base address */ 14174 #define PORTB_BASE (0x40047000u) 14175 /** Peripheral PORTB base pointer */ 14176 #define PORTB ((PORT_Type *)PORTB_BASE) 14177 /** Peripheral PORTC base address */ 14178 #define PORTC_BASE (0x40048000u) 14179 /** Peripheral PORTC base pointer */ 14180 #define PORTC ((PORT_Type *)PORTC_BASE) 14181 /** Peripheral PORTD base address */ 14182 #define PORTD_BASE (0x40049000u) 14183 /** Peripheral PORTD base pointer */ 14184 #define PORTD ((PORT_Type *)PORTD_BASE) 14185 /** Peripheral PORTE base address */ 14186 #define PORTE_BASE (0x41037000u) 14187 /** Peripheral PORTE base pointer */ 14188 #define PORTE ((PORT_Type *)PORTE_BASE) 14189 /** Array initializer of PORT peripheral base addresses */ 14190 #define PORT_BASE_ADDRS { PORTA_BASE, PORTB_BASE, PORTC_BASE, PORTD_BASE, PORTE_BASE } 14191 /** Array initializer of PORT peripheral base pointers */ 14192 #define PORT_BASE_PTRS { PORTA, PORTB, PORTC, PORTD, PORTE } 14193 /** Interrupt vectors for the PORT peripheral type */ 14194 #define PORT_IRQS { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn } 14195 14196 /*! 14197 * @} 14198 */ /* end of group PORT_Peripheral_Access_Layer */ 14199 14200 14201 /* ---------------------------------------------------------------------------- 14202 -- ROM Peripheral Access Layer 14203 ---------------------------------------------------------------------------- */ 14204 14205 /*! 14206 * @addtogroup ROM_Peripheral_Access_Layer ROM Peripheral Access Layer 14207 * @{ 14208 */ 14209 14210 /** ROM - Register Layout Typedef */ 14211 typedef struct { 14212 __I uint32_t ENTRY[4]; /**< Entry, array offset: 0x0, array step: 0x4 */ 14213 __I uint32_t TABLEMARK; /**< End of Table Marker Register, offset: 0x10 */ 14214 uint8_t RESERVED_0[4024]; 14215 __I uint32_t SYSACCESS; /**< System Access Register, offset: 0xFCC */ 14216 __I uint32_t PERIPHID4; /**< Peripheral ID Register, offset: 0xFD0 */ 14217 __I uint32_t PERIPHID5; /**< Peripheral ID Register, offset: 0xFD4 */ 14218 __I uint32_t PERIPHID6; /**< Peripheral ID Register, offset: 0xFD8 */ 14219 __I uint32_t PERIPHID7; /**< Peripheral ID Register, offset: 0xFDC */ 14220 __I uint32_t PERIPHID0; /**< Peripheral ID Register, offset: 0xFE0 */ 14221 __I uint32_t PERIPHID1; /**< Peripheral ID Register, offset: 0xFE4 */ 14222 __I uint32_t PERIPHID2; /**< Peripheral ID Register, offset: 0xFE8 */ 14223 __I uint32_t PERIPHID3; /**< Peripheral ID Register, offset: 0xFEC */ 14224 __I uint32_t COMPID[4]; /**< Component ID Register, array offset: 0xFF0, array step: 0x4 */ 14225 } ROM_Type; 14226 14227 /* ---------------------------------------------------------------------------- 14228 -- ROM Register Masks 14229 ---------------------------------------------------------------------------- */ 14230 14231 /*! 14232 * @addtogroup ROM_Register_Masks ROM Register Masks 14233 * @{ 14234 */ 14235 14236 /*! @name ENTRY - Entry */ 14237 /*! @{ */ 14238 #define ROM_ENTRY_ENTRY_MASK (0xFFFFFFFFU) 14239 #define ROM_ENTRY_ENTRY_SHIFT (0U) 14240 #define ROM_ENTRY_ENTRY(x) (((uint32_t)(((uint32_t)(x)) << ROM_ENTRY_ENTRY_SHIFT)) & ROM_ENTRY_ENTRY_MASK) 14241 /*! @} */ 14242 14243 /* The count of ROM_ENTRY */ 14244 #define ROM_ENTRY_COUNT (4U) 14245 14246 /*! @name TABLEMARK - End of Table Marker Register */ 14247 /*! @{ */ 14248 #define ROM_TABLEMARK_MARK_MASK (0xFFFFFFFFU) 14249 #define ROM_TABLEMARK_MARK_SHIFT (0U) 14250 #define ROM_TABLEMARK_MARK(x) (((uint32_t)(((uint32_t)(x)) << ROM_TABLEMARK_MARK_SHIFT)) & ROM_TABLEMARK_MARK_MASK) 14251 /*! @} */ 14252 14253 /*! @name SYSACCESS - System Access Register */ 14254 /*! @{ */ 14255 #define ROM_SYSACCESS_SYSACCESS_MASK (0xFFFFFFFFU) 14256 #define ROM_SYSACCESS_SYSACCESS_SHIFT (0U) 14257 #define ROM_SYSACCESS_SYSACCESS(x) (((uint32_t)(((uint32_t)(x)) << ROM_SYSACCESS_SYSACCESS_SHIFT)) & ROM_SYSACCESS_SYSACCESS_MASK) 14258 /*! @} */ 14259 14260 /*! @name PERIPHID4 - Peripheral ID Register */ 14261 /*! @{ */ 14262 #define ROM_PERIPHID4_PERIPHID_MASK (0xFFFFFFFFU) 14263 #define ROM_PERIPHID4_PERIPHID_SHIFT (0U) 14264 #define ROM_PERIPHID4_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID4_PERIPHID_SHIFT)) & ROM_PERIPHID4_PERIPHID_MASK) 14265 /*! @} */ 14266 14267 /*! @name PERIPHID5 - Peripheral ID Register */ 14268 /*! @{ */ 14269 #define ROM_PERIPHID5_PERIPHID_MASK (0xFFFFFFFFU) 14270 #define ROM_PERIPHID5_PERIPHID_SHIFT (0U) 14271 #define ROM_PERIPHID5_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID5_PERIPHID_SHIFT)) & ROM_PERIPHID5_PERIPHID_MASK) 14272 /*! @} */ 14273 14274 /*! @name PERIPHID6 - Peripheral ID Register */ 14275 /*! @{ */ 14276 #define ROM_PERIPHID6_PERIPHID_MASK (0xFFFFFFFFU) 14277 #define ROM_PERIPHID6_PERIPHID_SHIFT (0U) 14278 #define ROM_PERIPHID6_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID6_PERIPHID_SHIFT)) & ROM_PERIPHID6_PERIPHID_MASK) 14279 /*! @} */ 14280 14281 /*! @name PERIPHID7 - Peripheral ID Register */ 14282 /*! @{ */ 14283 #define ROM_PERIPHID7_PERIPHID_MASK (0xFFFFFFFFU) 14284 #define ROM_PERIPHID7_PERIPHID_SHIFT (0U) 14285 #define ROM_PERIPHID7_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID7_PERIPHID_SHIFT)) & ROM_PERIPHID7_PERIPHID_MASK) 14286 /*! @} */ 14287 14288 /*! @name PERIPHID0 - Peripheral ID Register */ 14289 /*! @{ */ 14290 #define ROM_PERIPHID0_PERIPHID_MASK (0xFFFFFFFFU) 14291 #define ROM_PERIPHID0_PERIPHID_SHIFT (0U) 14292 #define ROM_PERIPHID0_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID0_PERIPHID_SHIFT)) & ROM_PERIPHID0_PERIPHID_MASK) 14293 /*! @} */ 14294 14295 /*! @name PERIPHID1 - Peripheral ID Register */ 14296 /*! @{ */ 14297 #define ROM_PERIPHID1_PERIPHID_MASK (0xFFFFFFFFU) 14298 #define ROM_PERIPHID1_PERIPHID_SHIFT (0U) 14299 #define ROM_PERIPHID1_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID1_PERIPHID_SHIFT)) & ROM_PERIPHID1_PERIPHID_MASK) 14300 /*! @} */ 14301 14302 /*! @name PERIPHID2 - Peripheral ID Register */ 14303 /*! @{ */ 14304 #define ROM_PERIPHID2_PERIPHID_MASK (0xFFFFFFFFU) 14305 #define ROM_PERIPHID2_PERIPHID_SHIFT (0U) 14306 #define ROM_PERIPHID2_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID2_PERIPHID_SHIFT)) & ROM_PERIPHID2_PERIPHID_MASK) 14307 /*! @} */ 14308 14309 /*! @name PERIPHID3 - Peripheral ID Register */ 14310 /*! @{ */ 14311 #define ROM_PERIPHID3_PERIPHID_MASK (0xFFFFFFFFU) 14312 #define ROM_PERIPHID3_PERIPHID_SHIFT (0U) 14313 #define ROM_PERIPHID3_PERIPHID(x) (((uint32_t)(((uint32_t)(x)) << ROM_PERIPHID3_PERIPHID_SHIFT)) & ROM_PERIPHID3_PERIPHID_MASK) 14314 /*! @} */ 14315 14316 /*! @name COMPID - Component ID Register */ 14317 /*! @{ */ 14318 #define ROM_COMPID_COMPID_MASK (0xFFFFFFFFU) 14319 #define ROM_COMPID_COMPID_SHIFT (0U) 14320 #define ROM_COMPID_COMPID(x) (((uint32_t)(((uint32_t)(x)) << ROM_COMPID_COMPID_SHIFT)) & ROM_COMPID_COMPID_MASK) 14321 /*! @} */ 14322 14323 /* The count of ROM_COMPID */ 14324 #define ROM_COMPID_COUNT (4U) 14325 14326 14327 /*! 14328 * @} 14329 */ /* end of group ROM_Register_Masks */ 14330 14331 14332 /* ROM - Peripheral instance base addresses */ 14333 /** Peripheral ROM base address */ 14334 #define ROM_BASE (0xF0002000u) 14335 /** Peripheral ROM base pointer */ 14336 #define ROM ((ROM_Type *)ROM_BASE) 14337 /** Array initializer of ROM peripheral base addresses */ 14338 #define ROM_BASE_ADDRS { ROM_BASE } 14339 /** Array initializer of ROM peripheral base pointers */ 14340 #define ROM_BASE_PTRS { ROM } 14341 14342 /*! 14343 * @} 14344 */ /* end of group ROM_Peripheral_Access_Layer */ 14345 14346 14347 /* ---------------------------------------------------------------------------- 14348 -- RTC Peripheral Access Layer 14349 ---------------------------------------------------------------------------- */ 14350 14351 /*! 14352 * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer 14353 * @{ 14354 */ 14355 14356 /** RTC - Register Layout Typedef */ 14357 typedef struct { 14358 __IO uint32_t TSR; /**< RTC Time Seconds Register, offset: 0x0 */ 14359 __IO uint32_t TPR; /**< RTC Time Prescaler Register, offset: 0x4 */ 14360 __IO uint32_t TAR; /**< RTC Time Alarm Register, offset: 0x8 */ 14361 __IO uint32_t TCR; /**< RTC Time Compensation Register, offset: 0xC */ 14362 __IO uint32_t CR; /**< RTC Control Register, offset: 0x10 */ 14363 __IO uint32_t SR; /**< RTC Status Register, offset: 0x14 */ 14364 __IO uint32_t LR; /**< RTC Lock Register, offset: 0x18 */ 14365 __IO uint32_t IER; /**< RTC Interrupt Enable Register, offset: 0x1C */ 14366 __I uint32_t TTSR; /**< RTC Tamper Time Seconds Register, offset: 0x20 */ 14367 __IO uint32_t MER; /**< RTC Monotonic Enable Register, offset: 0x24 */ 14368 __IO uint32_t MCLR; /**< RTC Monotonic Counter Low Register, offset: 0x28 */ 14369 __IO uint32_t MCHR; /**< RTC Monotonic Counter High Register, offset: 0x2C */ 14370 uint8_t RESERVED_0[4]; 14371 __IO uint32_t TDR; /**< RTC Tamper Detect Register, offset: 0x34 */ 14372 uint8_t RESERVED_1[4]; 14373 __IO uint32_t TIR; /**< RTC Tamper Interrupt Register, offset: 0x3C */ 14374 __IO uint32_t PCR[4]; /**< RTC Pin Configuration Register, array offset: 0x40, array step: 0x4 */ 14375 uint8_t RESERVED_2[1968]; 14376 __IO uint32_t WAR; /**< RTC Write Access Register, offset: 0x800 */ 14377 __IO uint32_t RAR; /**< RTC Read Access Register, offset: 0x804 */ 14378 } RTC_Type; 14379 14380 /* ---------------------------------------------------------------------------- 14381 -- RTC Register Masks 14382 ---------------------------------------------------------------------------- */ 14383 14384 /*! 14385 * @addtogroup RTC_Register_Masks RTC Register Masks 14386 * @{ 14387 */ 14388 14389 /*! @name TSR - RTC Time Seconds Register */ 14390 /*! @{ */ 14391 #define RTC_TSR_TSR_MASK (0xFFFFFFFFU) 14392 #define RTC_TSR_TSR_SHIFT (0U) 14393 #define RTC_TSR_TSR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TSR_TSR_SHIFT)) & RTC_TSR_TSR_MASK) 14394 /*! @} */ 14395 14396 /*! @name TPR - RTC Time Prescaler Register */ 14397 /*! @{ */ 14398 #define RTC_TPR_TPR_MASK (0xFFFFU) 14399 #define RTC_TPR_TPR_SHIFT (0U) 14400 #define RTC_TPR_TPR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TPR_TPR_SHIFT)) & RTC_TPR_TPR_MASK) 14401 /*! @} */ 14402 14403 /*! @name TAR - RTC Time Alarm Register */ 14404 /*! @{ */ 14405 #define RTC_TAR_TAR_MASK (0xFFFFFFFFU) 14406 #define RTC_TAR_TAR_SHIFT (0U) 14407 #define RTC_TAR_TAR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TAR_TAR_SHIFT)) & RTC_TAR_TAR_MASK) 14408 /*! @} */ 14409 14410 /*! @name TCR - RTC Time Compensation Register */ 14411 /*! @{ */ 14412 #define RTC_TCR_TCR_MASK (0xFFU) 14413 #define RTC_TCR_TCR_SHIFT (0U) 14414 /*! TCR - Time Compensation Register 14415 * 0b10000000..Time Prescaler Register overflows every 32896 clock cycles. 14416 * 0b10000001..Time Prescaler Register overflows every 32895 clock cycles. 14417 * 0b11111111..Time Prescaler Register overflows every 32769 clock cycles. 14418 * 0b00000000..Time Prescaler Register overflows every 32768 clock cycles. 14419 * 0b00000001..Time Prescaler Register overflows every 32767 clock cycles. 14420 * 0b01111110..Time Prescaler Register overflows every 32642 clock cycles. 14421 * 0b01111111..Time Prescaler Register overflows every 32641 clock cycles. 14422 */ 14423 #define RTC_TCR_TCR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCR_SHIFT)) & RTC_TCR_TCR_MASK) 14424 #define RTC_TCR_CIR_MASK (0xFF00U) 14425 #define RTC_TCR_CIR_SHIFT (8U) 14426 #define RTC_TCR_CIR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIR_SHIFT)) & RTC_TCR_CIR_MASK) 14427 #define RTC_TCR_TCV_MASK (0xFF0000U) 14428 #define RTC_TCR_TCV_SHIFT (16U) 14429 #define RTC_TCR_TCV(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCV_SHIFT)) & RTC_TCR_TCV_MASK) 14430 #define RTC_TCR_CIC_MASK (0xFF000000U) 14431 #define RTC_TCR_CIC_SHIFT (24U) 14432 #define RTC_TCR_CIC(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIC_SHIFT)) & RTC_TCR_CIC_MASK) 14433 /*! @} */ 14434 14435 /*! @name CR - RTC Control Register */ 14436 /*! @{ */ 14437 #define RTC_CR_SWR_MASK (0x1U) 14438 #define RTC_CR_SWR_SHIFT (0U) 14439 /*! SWR - Software Reset 14440 * 0b0..No effect. 14441 * 0b1..Resets all RTC registers except for the SWR bit and the RTC_WAR and RTC_RAR registers . The SWR bit is 14442 * cleared by VBAT POR and by software explicitly clearing it. 14443 */ 14444 #define RTC_CR_SWR(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SWR_SHIFT)) & RTC_CR_SWR_MASK) 14445 #define RTC_CR_WPE_MASK (0x2U) 14446 #define RTC_CR_WPE_SHIFT (1U) 14447 /*! WPE - Wakeup Pin Enable 14448 * 0b0..RTC_WAKEUP pin is disabled. 14449 * 0b1..RTC_WAKEUP pin is enabled and asserts if the RTC interrupt asserts or if the wakeup pin is forced on. 14450 */ 14451 #define RTC_CR_WPE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPE_SHIFT)) & RTC_CR_WPE_MASK) 14452 #define RTC_CR_SUP_MASK (0x4U) 14453 #define RTC_CR_SUP_SHIFT (2U) 14454 /*! SUP - Supervisor Access 14455 * 0b0..Non-supervisor mode write accesses are not supported and generate a bus error. 14456 * 0b1..Non-supervisor mode write accesses are supported. 14457 */ 14458 #define RTC_CR_SUP(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SUP_SHIFT)) & RTC_CR_SUP_MASK) 14459 #define RTC_CR_UM_MASK (0x8U) 14460 #define RTC_CR_UM_SHIFT (3U) 14461 /*! UM - Update Mode 14462 * 0b0..Registers cannot be written when locked. 14463 * 0b1..Registers can be written when locked under limited conditions. 14464 */ 14465 #define RTC_CR_UM(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_UM_SHIFT)) & RTC_CR_UM_MASK) 14466 #define RTC_CR_WPS_MASK (0x10U) 14467 #define RTC_CR_WPS_SHIFT (4U) 14468 /*! WPS - Wakeup Pin Select 14469 * 0b0..RTC_WAKEUP pin asserts (active low, open drain) if the RTC interrupt asserts or the wakeup pin is turned on. 14470 * 0b1..RTC_WAKEUP pin outputs the RTC 32kHz clock, provided the wakeup pin is turned on and the 32kHz clock is output to other peripherals. 14471 */ 14472 #define RTC_CR_WPS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPS_SHIFT)) & RTC_CR_WPS_MASK) 14473 #define RTC_CR_CPS_MASK (0x20U) 14474 #define RTC_CR_CPS_SHIFT (5U) 14475 /*! CPS - Clock Pin Select 14476 * 0b0..The prescaler output clock (as configured by TSIC) is output on RTC_CLKOUT. 14477 * 0b1..The RTC 32.768 kHz clock is output on RTC_CLKOUT, provided it is output to other peripherals. 14478 */ 14479 #define RTC_CR_CPS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_CPS_SHIFT)) & RTC_CR_CPS_MASK) 14480 #define RTC_CR_LPOS_MASK (0x80U) 14481 #define RTC_CR_LPOS_SHIFT (7U) 14482 /*! LPOS - LPO Select 14483 * 0b0..RTC prescaler increments using 32.768 kHz clock. 14484 * 0b1..RTC prescaler increments using 1 kHz LPO, bits [4:0] of the prescaler are ignored. 14485 */ 14486 #define RTC_CR_LPOS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_LPOS_SHIFT)) & RTC_CR_LPOS_MASK) 14487 #define RTC_CR_OSCE_MASK (0x100U) 14488 #define RTC_CR_OSCE_SHIFT (8U) 14489 /*! OSCE - Oscillator Enable 14490 * 0b0..32.768 kHz oscillator is disabled. 14491 * 0b1..32.768 kHz oscillator is enabled. After setting this bit, wait the oscillator startup time before 14492 * enabling the time counter to allow the 32.768 kHz clock time to stabilize. 14493 */ 14494 #define RTC_CR_OSCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCE_SHIFT)) & RTC_CR_OSCE_MASK) 14495 #define RTC_CR_CLKO_MASK (0x200U) 14496 #define RTC_CR_CLKO_SHIFT (9U) 14497 /*! CLKO - Clock Output 14498 * 0b0..The 32 kHz clock is output to other peripherals. 14499 * 0b1..The 32 kHz clock is not output to other peripherals. 14500 */ 14501 #define RTC_CR_CLKO(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_CLKO_SHIFT)) & RTC_CR_CLKO_MASK) 14502 #define RTC_CR_SC16P_MASK (0x400U) 14503 #define RTC_CR_SC16P_SHIFT (10U) 14504 /*! SC16P - Oscillator 16pF Load Configure 14505 * 0b0..Disable the load. 14506 * 0b1..Enable the additional load. 14507 */ 14508 #define RTC_CR_SC16P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC16P_SHIFT)) & RTC_CR_SC16P_MASK) 14509 #define RTC_CR_SC8P_MASK (0x800U) 14510 #define RTC_CR_SC8P_SHIFT (11U) 14511 /*! SC8P - Oscillator 8pF Load Configure 14512 * 0b0..Disable the load. 14513 * 0b1..Enable the additional load. 14514 */ 14515 #define RTC_CR_SC8P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC8P_SHIFT)) & RTC_CR_SC8P_MASK) 14516 #define RTC_CR_SC4P_MASK (0x1000U) 14517 #define RTC_CR_SC4P_SHIFT (12U) 14518 /*! SC4P - Oscillator 4pF Load Configure 14519 * 0b0..Disable the load. 14520 * 0b1..Enable the additional load. 14521 */ 14522 #define RTC_CR_SC4P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC4P_SHIFT)) & RTC_CR_SC4P_MASK) 14523 #define RTC_CR_SC2P_MASK (0x2000U) 14524 #define RTC_CR_SC2P_SHIFT (13U) 14525 /*! SC2P - Oscillator 2pF Load Configure 14526 * 0b0..Disable the load. 14527 * 0b1..Enable the additional load. 14528 */ 14529 #define RTC_CR_SC2P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC2P_SHIFT)) & RTC_CR_SC2P_MASK) 14530 #define RTC_CR_OSCM_MASK (0x8000U) 14531 #define RTC_CR_OSCM_SHIFT (15U) 14532 /*! OSCM - Oscillator Mode Select 14533 * 0b0..Configures the 32.768kHz crystal oscillator for robust operation supporting a wide range of crystals. 14534 * 0b1..Configures the 32.768kHz crystal oscillator for low power operation supporting a more limited range of crystals. 14535 */ 14536 #define RTC_CR_OSCM(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCM_SHIFT)) & RTC_CR_OSCM_MASK) 14537 #define RTC_CR_PORS_MASK (0x30000U) 14538 #define RTC_CR_PORS_SHIFT (16U) 14539 /*! PORS - POR Select 14540 * 0b00..POR brownout enabled for 120us every 128ms. 14541 * 0b01..POR brownout enabled for 120us every 64ms. 14542 * 0b10..POR brownout enabled for 120us every 32ms. 14543 * 0b11..POR brownout always enabled. 14544 */ 14545 #define RTC_CR_PORS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_PORS_SHIFT)) & RTC_CR_PORS_MASK) 14546 #define RTC_CR_CPE_MASK (0x3000000U) 14547 #define RTC_CR_CPE_SHIFT (24U) 14548 /*! CPE - Clock Pin Enable 14549 * 0b00..The RTC_CLKOUT function is disabled. 14550 * 0b01..Enable RTC_CLKOUT pin on pin 1. 14551 * 0b10..Enable RTC_CLKOUT pin on pin 2. 14552 * 0b11..Enable RTC_CLKOUT pin on pin 3. 14553 */ 14554 #define RTC_CR_CPE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_CPE_SHIFT)) & RTC_CR_CPE_MASK) 14555 /*! @} */ 14556 14557 /*! @name SR - RTC Status Register */ 14558 /*! @{ */ 14559 #define RTC_SR_TIF_MASK (0x1U) 14560 #define RTC_SR_TIF_SHIFT (0U) 14561 /*! TIF - Time Invalid Flag 14562 * 0b0..Time is valid. 14563 * 0b1..Time is invalid and time counter is read as zero. 14564 */ 14565 #define RTC_SR_TIF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIF_SHIFT)) & RTC_SR_TIF_MASK) 14566 #define RTC_SR_TOF_MASK (0x2U) 14567 #define RTC_SR_TOF_SHIFT (1U) 14568 /*! TOF - Time Overflow Flag 14569 * 0b0..Time overflow has not occurred. 14570 * 0b1..Time overflow has occurred and time counter is read as zero. 14571 */ 14572 #define RTC_SR_TOF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TOF_SHIFT)) & RTC_SR_TOF_MASK) 14573 #define RTC_SR_TAF_MASK (0x4U) 14574 #define RTC_SR_TAF_SHIFT (2U) 14575 /*! TAF - Time Alarm Flag 14576 * 0b0..Time alarm has not occurred. 14577 * 0b1..Time alarm has occurred. 14578 */ 14579 #define RTC_SR_TAF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TAF_SHIFT)) & RTC_SR_TAF_MASK) 14580 #define RTC_SR_MOF_MASK (0x8U) 14581 #define RTC_SR_MOF_SHIFT (3U) 14582 /*! MOF - Monotonic Overflow Flag 14583 * 0b0..Monotonic counter overflow has not occurred. 14584 * 0b1..Monotonic counter overflow has occurred and monotonic counter is read as zero. 14585 */ 14586 #define RTC_SR_MOF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_MOF_SHIFT)) & RTC_SR_MOF_MASK) 14587 #define RTC_SR_TCE_MASK (0x10U) 14588 #define RTC_SR_TCE_SHIFT (4U) 14589 /*! TCE - Time Counter Enable 14590 * 0b0..Time counter is disabled. 14591 * 0b1..Time counter is enabled. 14592 */ 14593 #define RTC_SR_TCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TCE_SHIFT)) & RTC_SR_TCE_MASK) 14594 #define RTC_SR_TIDF_MASK (0x80U) 14595 #define RTC_SR_TIDF_SHIFT (7U) 14596 /*! TIDF - Tamper Interrupt Detect Flag 14597 * 0b0..Tamper interrupt has not asserted. 14598 * 0b1..Tamper interrupt has asserted. 14599 */ 14600 #define RTC_SR_TIDF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIDF_SHIFT)) & RTC_SR_TIDF_MASK) 14601 /*! @} */ 14602 14603 /*! @name LR - RTC Lock Register */ 14604 /*! @{ */ 14605 #define RTC_LR_TCL_MASK (0x8U) 14606 #define RTC_LR_TCL_SHIFT (3U) 14607 /*! TCL - Time Compensation Lock 14608 * 0b0..Time Compensation Register is locked and writes are ignored. 14609 * 0b1..Time Compensation Register is not locked and writes complete as normal. 14610 */ 14611 #define RTC_LR_TCL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TCL_SHIFT)) & RTC_LR_TCL_MASK) 14612 #define RTC_LR_CRL_MASK (0x10U) 14613 #define RTC_LR_CRL_SHIFT (4U) 14614 /*! CRL - Control Register Lock 14615 * 0b0..Control Register is locked and writes are ignored. 14616 * 0b1..Control Register is not locked and writes complete as normal. 14617 */ 14618 #define RTC_LR_CRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_CRL_SHIFT)) & RTC_LR_CRL_MASK) 14619 #define RTC_LR_SRL_MASK (0x20U) 14620 #define RTC_LR_SRL_SHIFT (5U) 14621 /*! SRL - Status Register Lock 14622 * 0b0..Status Register is locked and writes are ignored. 14623 * 0b1..Status Register is not locked and writes complete as normal. 14624 */ 14625 #define RTC_LR_SRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_SRL_SHIFT)) & RTC_LR_SRL_MASK) 14626 #define RTC_LR_LRL_MASK (0x40U) 14627 #define RTC_LR_LRL_SHIFT (6U) 14628 /*! LRL - Lock Register Lock 14629 * 0b0..Lock Register is locked and writes are ignored. 14630 * 0b1..Lock Register is not locked and writes complete as normal. 14631 */ 14632 #define RTC_LR_LRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_LRL_SHIFT)) & RTC_LR_LRL_MASK) 14633 #define RTC_LR_TTSL_MASK (0x100U) 14634 #define RTC_LR_TTSL_SHIFT (8U) 14635 /*! TTSL - Tamper Time Seconds Lock 14636 * 0b0..Tamper Time Seconds Register is locked and writes are ignored. 14637 * 0b1..Tamper Time Seconds Register is not locked and writes complete as normal. 14638 */ 14639 #define RTC_LR_TTSL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TTSL_SHIFT)) & RTC_LR_TTSL_MASK) 14640 #define RTC_LR_MEL_MASK (0x200U) 14641 #define RTC_LR_MEL_SHIFT (9U) 14642 /*! MEL - Monotonic Enable Lock 14643 * 0b0..Monotonic Enable Register is locked and writes are ignored. 14644 * 0b1..Monotonic Enable Register is not locked and writes complete as normal. 14645 */ 14646 #define RTC_LR_MEL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_MEL_SHIFT)) & RTC_LR_MEL_MASK) 14647 #define RTC_LR_MCLL_MASK (0x400U) 14648 #define RTC_LR_MCLL_SHIFT (10U) 14649 /*! MCLL - Monotonic Counter Low Lock 14650 * 0b0..Monotonic Counter Low Register is locked and writes are ignored. 14651 * 0b1..Monotonic Counter Low Register is not locked and writes complete as normal. 14652 */ 14653 #define RTC_LR_MCLL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_MCLL_SHIFT)) & RTC_LR_MCLL_MASK) 14654 #define RTC_LR_MCHL_MASK (0x800U) 14655 #define RTC_LR_MCHL_SHIFT (11U) 14656 /*! MCHL - Monotonic Counter High Lock 14657 * 0b0..Monotonic Counter High Register is locked and writes are ignored. 14658 * 0b1..Monotonic Counter High Register is not locked and writes complete as normal. 14659 */ 14660 #define RTC_LR_MCHL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_MCHL_SHIFT)) & RTC_LR_MCHL_MASK) 14661 #define RTC_LR_TDL_MASK (0x2000U) 14662 #define RTC_LR_TDL_SHIFT (13U) 14663 /*! TDL - Tamper Detect Lock 14664 * 0b0..Tamper Detect Register is locked and writes are ignored. 14665 * 0b1..Tamper Detect Register is not locked and writes complete as normal. 14666 */ 14667 #define RTC_LR_TDL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TDL_SHIFT)) & RTC_LR_TDL_MASK) 14668 #define RTC_LR_TIL_MASK (0x8000U) 14669 #define RTC_LR_TIL_SHIFT (15U) 14670 /*! TIL - Tamper Interrupt Lock 14671 * 0b0..Tamper Interrupt Register is locked and writes are ignored. 14672 * 0b1..Tamper Interrupt Register is not locked and writes complete as normal. 14673 */ 14674 #define RTC_LR_TIL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TIL_SHIFT)) & RTC_LR_TIL_MASK) 14675 #define RTC_LR_PCL_MASK (0xF0000U) 14676 #define RTC_LR_PCL_SHIFT (16U) 14677 #define RTC_LR_PCL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_PCL_SHIFT)) & RTC_LR_PCL_MASK) 14678 /*! @} */ 14679 14680 /*! @name IER - RTC Interrupt Enable Register */ 14681 /*! @{ */ 14682 #define RTC_IER_TIIE_MASK (0x1U) 14683 #define RTC_IER_TIIE_SHIFT (0U) 14684 /*! TIIE - Time Invalid Interrupt Enable 14685 * 0b0..Time invalid flag does not generate an interrupt. 14686 * 0b1..Time invalid flag does generate an interrupt. 14687 */ 14688 #define RTC_IER_TIIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TIIE_SHIFT)) & RTC_IER_TIIE_MASK) 14689 #define RTC_IER_TOIE_MASK (0x2U) 14690 #define RTC_IER_TOIE_SHIFT (1U) 14691 /*! TOIE - Time Overflow Interrupt Enable 14692 * 0b0..Time overflow flag does not generate an interrupt. 14693 * 0b1..Time overflow flag does generate an interrupt. 14694 */ 14695 #define RTC_IER_TOIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TOIE_SHIFT)) & RTC_IER_TOIE_MASK) 14696 #define RTC_IER_TAIE_MASK (0x4U) 14697 #define RTC_IER_TAIE_SHIFT (2U) 14698 /*! TAIE - Time Alarm Interrupt Enable 14699 * 0b0..Time alarm flag does not generate an interrupt. 14700 * 0b1..Time alarm flag does generate an interrupt. 14701 */ 14702 #define RTC_IER_TAIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TAIE_SHIFT)) & RTC_IER_TAIE_MASK) 14703 #define RTC_IER_MOIE_MASK (0x8U) 14704 #define RTC_IER_MOIE_SHIFT (3U) 14705 /*! MOIE - Monotonic Overflow Interrupt Enable 14706 * 0b0..Monotonic overflow flag does not generate an interrupt. 14707 * 0b1..Monotonic overflow flag does generate an interrupt. 14708 */ 14709 #define RTC_IER_MOIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_MOIE_SHIFT)) & RTC_IER_MOIE_MASK) 14710 #define RTC_IER_TSIE_MASK (0x10U) 14711 #define RTC_IER_TSIE_SHIFT (4U) 14712 /*! TSIE - Time Seconds Interrupt Enable 14713 * 0b0..Seconds interrupt is disabled. 14714 * 0b1..Seconds interrupt is enabled. 14715 */ 14716 #define RTC_IER_TSIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIE_SHIFT)) & RTC_IER_TSIE_MASK) 14717 #define RTC_IER_WPON_MASK (0x80U) 14718 #define RTC_IER_WPON_SHIFT (7U) 14719 /*! WPON - Wakeup Pin On 14720 * 0b0..No effect. 14721 * 0b1..If the RTC_WAKEUP pin is enabled, then the pin will assert. 14722 */ 14723 #define RTC_IER_WPON(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_WPON_SHIFT)) & RTC_IER_WPON_MASK) 14724 #define RTC_IER_TSIC_MASK (0x70000U) 14725 #define RTC_IER_TSIC_SHIFT (16U) 14726 /*! TSIC - Timer Seconds Interrupt Configuration 14727 * 0b000..1 Hz. 14728 * 0b001..2 Hz. 14729 * 0b010..4 Hz. 14730 * 0b011..8 Hz. 14731 * 0b100..16 Hz. 14732 * 0b101..32 Hz. 14733 * 0b110..64 Hz. 14734 * 0b111..128 Hz. 14735 */ 14736 #define RTC_IER_TSIC(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIC_SHIFT)) & RTC_IER_TSIC_MASK) 14737 /*! @} */ 14738 14739 /*! @name TTSR - RTC Tamper Time Seconds Register */ 14740 /*! @{ */ 14741 #define RTC_TTSR_TTS_MASK (0xFFFFFFFFU) 14742 #define RTC_TTSR_TTS_SHIFT (0U) 14743 #define RTC_TTSR_TTS(x) (((uint32_t)(((uint32_t)(x)) << RTC_TTSR_TTS_SHIFT)) & RTC_TTSR_TTS_MASK) 14744 /*! @} */ 14745 14746 /*! @name MER - RTC Monotonic Enable Register */ 14747 /*! @{ */ 14748 #define RTC_MER_MCE_MASK (0x10U) 14749 #define RTC_MER_MCE_SHIFT (4U) 14750 /*! MCE - Monotonic Counter Enable 14751 * 0b0..Writes to the monotonic counter load the counter with the value written. 14752 * 0b1..Writes to the monotonic counter increment the counter. 14753 */ 14754 #define RTC_MER_MCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_MER_MCE_SHIFT)) & RTC_MER_MCE_MASK) 14755 /*! @} */ 14756 14757 /*! @name MCLR - RTC Monotonic Counter Low Register */ 14758 /*! @{ */ 14759 #define RTC_MCLR_MCL_MASK (0xFFFFFFFFU) 14760 #define RTC_MCLR_MCL_SHIFT (0U) 14761 #define RTC_MCLR_MCL(x) (((uint32_t)(((uint32_t)(x)) << RTC_MCLR_MCL_SHIFT)) & RTC_MCLR_MCL_MASK) 14762 /*! @} */ 14763 14764 /*! @name MCHR - RTC Monotonic Counter High Register */ 14765 /*! @{ */ 14766 #define RTC_MCHR_MCH_MASK (0xFFFFFFFFU) 14767 #define RTC_MCHR_MCH_SHIFT (0U) 14768 #define RTC_MCHR_MCH(x) (((uint32_t)(((uint32_t)(x)) << RTC_MCHR_MCH_SHIFT)) & RTC_MCHR_MCH_MASK) 14769 /*! @} */ 14770 14771 /*! @name TDR - RTC Tamper Detect Register */ 14772 /*! @{ */ 14773 #define RTC_TDR_LCTF_MASK (0x10U) 14774 #define RTC_TDR_LCTF_SHIFT (4U) 14775 /*! LCTF - Loss of Clock Tamper Flag 14776 * 0b0..Tamper not detected. 14777 * 0b1..Loss of Clock tamper detected. 14778 */ 14779 #define RTC_TDR_LCTF(x) (((uint32_t)(((uint32_t)(x)) << RTC_TDR_LCTF_SHIFT)) & RTC_TDR_LCTF_MASK) 14780 #define RTC_TDR_STF_MASK (0x20U) 14781 #define RTC_TDR_STF_SHIFT (5U) 14782 /*! STF - Security Tamper Flag 14783 * 0b0..Tamper not detected. 14784 * 0b1..Security module tamper detected. 14785 */ 14786 #define RTC_TDR_STF(x) (((uint32_t)(((uint32_t)(x)) << RTC_TDR_STF_SHIFT)) & RTC_TDR_STF_MASK) 14787 #define RTC_TDR_FSF_MASK (0x40U) 14788 #define RTC_TDR_FSF_SHIFT (6U) 14789 /*! FSF - Flash Security Flag 14790 * 0b0..Tamper not detected. 14791 * 0b1..Flash security tamper detected. 14792 */ 14793 #define RTC_TDR_FSF(x) (((uint32_t)(((uint32_t)(x)) << RTC_TDR_FSF_SHIFT)) & RTC_TDR_FSF_MASK) 14794 #define RTC_TDR_TMF_MASK (0x80U) 14795 #define RTC_TDR_TMF_SHIFT (7U) 14796 /*! TMF - Test Mode Flag 14797 * 0b0..Tamper not detected. 14798 * 0b1..Test mode tamper detected. 14799 */ 14800 #define RTC_TDR_TMF(x) (((uint32_t)(((uint32_t)(x)) << RTC_TDR_TMF_SHIFT)) & RTC_TDR_TMF_MASK) 14801 #define RTC_TDR_TPF_MASK (0xF0000U) 14802 #define RTC_TDR_TPF_SHIFT (16U) 14803 #define RTC_TDR_TPF(x) (((uint32_t)(((uint32_t)(x)) << RTC_TDR_TPF_SHIFT)) & RTC_TDR_TPF_MASK) 14804 /*! @} */ 14805 14806 /*! @name TIR - RTC Tamper Interrupt Register */ 14807 /*! @{ */ 14808 #define RTC_TIR_LCIE_MASK (0x10U) 14809 #define RTC_TIR_LCIE_SHIFT (4U) 14810 /*! LCIE - Loss of Clock Interrupt Enable 14811 * 0b0..Interupt disabled. 14812 * 0b1..An interrupt is generated when the loss of clock flag is set. 14813 */ 14814 #define RTC_TIR_LCIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_TIR_LCIE_SHIFT)) & RTC_TIR_LCIE_MASK) 14815 #define RTC_TIR_SIE_MASK (0x20U) 14816 #define RTC_TIR_SIE_SHIFT (5U) 14817 /*! SIE - Security Module Interrupt Enable 14818 * 0b0..Interupt disabled. 14819 * 0b1..An interrupt is generated when the security module flag is set. 14820 */ 14821 #define RTC_TIR_SIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_TIR_SIE_SHIFT)) & RTC_TIR_SIE_MASK) 14822 #define RTC_TIR_FSIE_MASK (0x40U) 14823 #define RTC_TIR_FSIE_SHIFT (6U) 14824 /*! FSIE - Flash Security Interrupt Enable 14825 * 0b0..Interupt disabled. 14826 * 0b1..An interrupt is generated when the flash security flag is set. 14827 */ 14828 #define RTC_TIR_FSIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_TIR_FSIE_SHIFT)) & RTC_TIR_FSIE_MASK) 14829 #define RTC_TIR_TMIE_MASK (0x80U) 14830 #define RTC_TIR_TMIE_SHIFT (7U) 14831 /*! TMIE - Test Mode Interrupt Enable 14832 * 0b0..Interupt disabled. 14833 * 0b1..An interrupt is generated when the test mode flag is set. 14834 */ 14835 #define RTC_TIR_TMIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_TIR_TMIE_SHIFT)) & RTC_TIR_TMIE_MASK) 14836 #define RTC_TIR_TPIE_MASK (0xF0000U) 14837 #define RTC_TIR_TPIE_SHIFT (16U) 14838 #define RTC_TIR_TPIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_TIR_TPIE_SHIFT)) & RTC_TIR_TPIE_MASK) 14839 /*! @} */ 14840 14841 /*! @name PCR - RTC Pin Configuration Register */ 14842 /*! @{ */ 14843 #define RTC_PCR_TPE_MASK (0x1000000U) 14844 #define RTC_PCR_TPE_SHIFT (24U) 14845 /*! TPE - Tamper Pull Enable 14846 * 0b0..Pull resistor is disabled on tamper pin. 14847 * 0b1..Pull resistor is enabled on tamper pin. 14848 */ 14849 #define RTC_PCR_TPE(x) (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPE_SHIFT)) & RTC_PCR_TPE_MASK) 14850 #define RTC_PCR_TPS_MASK (0x2000000U) 14851 #define RTC_PCR_TPS_SHIFT (25U) 14852 /*! TPS - Tamper Pull Select 14853 * 0b0..Tamper pin pull resistor direction will assert the tamper pin. 14854 * 0b1..Tamper pin pull resistor direction will negate the tamper pin. 14855 */ 14856 #define RTC_PCR_TPS(x) (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPS_SHIFT)) & RTC_PCR_TPS_MASK) 14857 #define RTC_PCR_TFE_MASK (0x4000000U) 14858 #define RTC_PCR_TFE_SHIFT (26U) 14859 /*! TFE - Tamper Filter Enable 14860 * 0b0..Input filter is disabled on the tamper pin. 14861 * 0b1..Input filter is enabled on the tamper pin. 14862 */ 14863 #define RTC_PCR_TFE(x) (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TFE_SHIFT)) & RTC_PCR_TFE_MASK) 14864 #define RTC_PCR_TPP_MASK (0x8000000U) 14865 #define RTC_PCR_TPP_SHIFT (27U) 14866 /*! TPP - Tamper Pin Polarity 14867 * 0b0..Tamper pin is active high. 14868 * 0b1..Tamper pin is active low. 14869 */ 14870 #define RTC_PCR_TPP(x) (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPP_SHIFT)) & RTC_PCR_TPP_MASK) 14871 #define RTC_PCR_TPID_MASK (0x80000000U) 14872 #define RTC_PCR_TPID_SHIFT (31U) 14873 /*! TPID - Tamper Pin Input Data 14874 * 0b0..Tamper pin input data is logic zero. 14875 * 0b1..Tamper pin input data is logic one. 14876 */ 14877 #define RTC_PCR_TPID(x) (((uint32_t)(((uint32_t)(x)) << RTC_PCR_TPID_SHIFT)) & RTC_PCR_TPID_MASK) 14878 /*! @} */ 14879 14880 /* The count of RTC_PCR */ 14881 #define RTC_PCR_COUNT (4U) 14882 14883 /*! @name WAR - RTC Write Access Register */ 14884 /*! @{ */ 14885 #define RTC_WAR_TSRW_MASK (0x1U) 14886 #define RTC_WAR_TSRW_SHIFT (0U) 14887 /*! TSRW - Time Seconds Register Write 14888 * 0b0..Writes to the Time Seconds Register are ignored. 14889 * 0b1..Writes to the Time Seconds Register complete as normal. 14890 */ 14891 #define RTC_WAR_TSRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TSRW_SHIFT)) & RTC_WAR_TSRW_MASK) 14892 #define RTC_WAR_TPRW_MASK (0x2U) 14893 #define RTC_WAR_TPRW_SHIFT (1U) 14894 /*! TPRW - Time Prescaler Register Write 14895 * 0b0..Writes to the Time Prescaler Register are ignored. 14896 * 0b1..Writes to the Time Prescaler Register complete as normal. 14897 */ 14898 #define RTC_WAR_TPRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TPRW_SHIFT)) & RTC_WAR_TPRW_MASK) 14899 #define RTC_WAR_TARW_MASK (0x4U) 14900 #define RTC_WAR_TARW_SHIFT (2U) 14901 /*! TARW - Time Alarm Register Write 14902 * 0b0..Writes to the Time Alarm Register are ignored. 14903 * 0b1..Writes to the Time Alarm Register complete as normal. 14904 */ 14905 #define RTC_WAR_TARW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TARW_SHIFT)) & RTC_WAR_TARW_MASK) 14906 #define RTC_WAR_TCRW_MASK (0x8U) 14907 #define RTC_WAR_TCRW_SHIFT (3U) 14908 /*! TCRW - Time Compensation Register Write 14909 * 0b0..Writes to the Time Compensation Register are ignored. 14910 * 0b1..Writes to the Time Compensation Register complete as normal. 14911 */ 14912 #define RTC_WAR_TCRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TCRW_SHIFT)) & RTC_WAR_TCRW_MASK) 14913 #define RTC_WAR_CRW_MASK (0x10U) 14914 #define RTC_WAR_CRW_SHIFT (4U) 14915 /*! CRW - Control Register Write 14916 * 0b0..Writes to the Control Register are ignored. 14917 * 0b1..Writes to the Control Register complete as normal. 14918 */ 14919 #define RTC_WAR_CRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_CRW_SHIFT)) & RTC_WAR_CRW_MASK) 14920 #define RTC_WAR_SRW_MASK (0x20U) 14921 #define RTC_WAR_SRW_SHIFT (5U) 14922 /*! SRW - Status Register Write 14923 * 0b0..Writes to the Status Register are ignored. 14924 * 0b1..Writes to the Status Register complete as normal. 14925 */ 14926 #define RTC_WAR_SRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_SRW_SHIFT)) & RTC_WAR_SRW_MASK) 14927 #define RTC_WAR_LRW_MASK (0x40U) 14928 #define RTC_WAR_LRW_SHIFT (6U) 14929 /*! LRW - Lock Register Write 14930 * 0b0..Writes to the Lock Register are ignored. 14931 * 0b1..Writes to the Lock Register complete as normal. 14932 */ 14933 #define RTC_WAR_LRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_LRW_SHIFT)) & RTC_WAR_LRW_MASK) 14934 #define RTC_WAR_IERW_MASK (0x80U) 14935 #define RTC_WAR_IERW_SHIFT (7U) 14936 /*! IERW - Interrupt Enable Register Write 14937 * 0b0..Writes to the Interupt Enable Register are ignored. 14938 * 0b1..Writes to the Interrupt Enable Register complete as normal. 14939 */ 14940 #define RTC_WAR_IERW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_IERW_SHIFT)) & RTC_WAR_IERW_MASK) 14941 #define RTC_WAR_TTSW_MASK (0x100U) 14942 #define RTC_WAR_TTSW_SHIFT (8U) 14943 /*! TTSW - Tamper Time Seconds Write 14944 * 0b0..Writes to the Tamper Time Seconds Register are ignored. 14945 * 0b1..Writes to the Tamper Time Seconds Register complete as normal. 14946 */ 14947 #define RTC_WAR_TTSW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TTSW_SHIFT)) & RTC_WAR_TTSW_MASK) 14948 #define RTC_WAR_MERW_MASK (0x200U) 14949 #define RTC_WAR_MERW_SHIFT (9U) 14950 /*! MERW - Monotonic Enable Register Write 14951 * 0b0..Writes to the Monotonic Enable Register are ignored. 14952 * 0b1..Writes to the Monotonic Enable Register complete as normal. 14953 */ 14954 #define RTC_WAR_MERW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MERW_SHIFT)) & RTC_WAR_MERW_MASK) 14955 #define RTC_WAR_MCLW_MASK (0x400U) 14956 #define RTC_WAR_MCLW_SHIFT (10U) 14957 /*! MCLW - Monotonic Counter Low Write 14958 * 0b0..Writes to the Monotonic Counter Low Register are ignored. 14959 * 0b1..Writes to the Monotonic Counter Low Register complete as normal. 14960 */ 14961 #define RTC_WAR_MCLW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MCLW_SHIFT)) & RTC_WAR_MCLW_MASK) 14962 #define RTC_WAR_MCHW_MASK (0x800U) 14963 #define RTC_WAR_MCHW_SHIFT (11U) 14964 /*! MCHW - Monotonic Counter High Write 14965 * 0b0..Writes to the Monotonic Counter High Register are ignored. 14966 * 0b1..Writes to the Monotonic Counter High Register complete as normal. 14967 */ 14968 #define RTC_WAR_MCHW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_MCHW_SHIFT)) & RTC_WAR_MCHW_MASK) 14969 #define RTC_WAR_TDRW_MASK (0x2000U) 14970 #define RTC_WAR_TDRW_SHIFT (13U) 14971 /*! TDRW - Tamper Detect Register Write 14972 * 0b0..Writes to the Tamper Detect Register are ignored. 14973 * 0b1..Writes to the Tamper Detect Register complete as normal. 14974 */ 14975 #define RTC_WAR_TDRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TDRW_SHIFT)) & RTC_WAR_TDRW_MASK) 14976 #define RTC_WAR_TIRW_MASK (0x8000U) 14977 #define RTC_WAR_TIRW_SHIFT (15U) 14978 /*! TIRW - Tamper Interrupt Register Write 14979 * 0b0..Writes to the Tamper Interrupt Register are ignored. 14980 * 0b1..Writes to the Tamper Interrupt Register complete as normal. 14981 */ 14982 #define RTC_WAR_TIRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TIRW_SHIFT)) & RTC_WAR_TIRW_MASK) 14983 #define RTC_WAR_PCRW_MASK (0xF0000U) 14984 #define RTC_WAR_PCRW_SHIFT (16U) 14985 #define RTC_WAR_PCRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_PCRW_SHIFT)) & RTC_WAR_PCRW_MASK) 14986 /*! @} */ 14987 14988 /*! @name RAR - RTC Read Access Register */ 14989 /*! @{ */ 14990 #define RTC_RAR_TSRR_MASK (0x1U) 14991 #define RTC_RAR_TSRR_SHIFT (0U) 14992 /*! TSRR - Time Seconds Register Read 14993 * 0b0..Reads to the Time Seconds Register are ignored. 14994 * 0b1..Reads to the Time Seconds Register complete as normal. 14995 */ 14996 #define RTC_RAR_TSRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TSRR_SHIFT)) & RTC_RAR_TSRR_MASK) 14997 #define RTC_RAR_TPRR_MASK (0x2U) 14998 #define RTC_RAR_TPRR_SHIFT (1U) 14999 /*! TPRR - Time Prescaler Register Read 15000 * 0b0..Reads to the Time Pprescaler Register are ignored. 15001 * 0b1..Reads to the Time Prescaler Register complete as normal. 15002 */ 15003 #define RTC_RAR_TPRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TPRR_SHIFT)) & RTC_RAR_TPRR_MASK) 15004 #define RTC_RAR_TARR_MASK (0x4U) 15005 #define RTC_RAR_TARR_SHIFT (2U) 15006 /*! TARR - Time Alarm Register Read 15007 * 0b0..Reads to the Time Alarm Register are ignored. 15008 * 0b1..Reads to the Time Alarm Register complete as normal. 15009 */ 15010 #define RTC_RAR_TARR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TARR_SHIFT)) & RTC_RAR_TARR_MASK) 15011 #define RTC_RAR_TCRR_MASK (0x8U) 15012 #define RTC_RAR_TCRR_SHIFT (3U) 15013 /*! TCRR - Time Compensation Register Read 15014 * 0b0..Reads to the Time Compensation Register are ignored. 15015 * 0b1..Reads to the Time Compensation Register complete as normal. 15016 */ 15017 #define RTC_RAR_TCRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TCRR_SHIFT)) & RTC_RAR_TCRR_MASK) 15018 #define RTC_RAR_CRR_MASK (0x10U) 15019 #define RTC_RAR_CRR_SHIFT (4U) 15020 /*! CRR - Control Register Read 15021 * 0b0..Reads to the Control Register are ignored. 15022 * 0b1..Reads to the Control Register complete as normal. 15023 */ 15024 #define RTC_RAR_CRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_CRR_SHIFT)) & RTC_RAR_CRR_MASK) 15025 #define RTC_RAR_SRR_MASK (0x20U) 15026 #define RTC_RAR_SRR_SHIFT (5U) 15027 /*! SRR - Status Register Read 15028 * 0b0..Reads to the Status Register are ignored. 15029 * 0b1..Reads to the Status Register complete as normal. 15030 */ 15031 #define RTC_RAR_SRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_SRR_SHIFT)) & RTC_RAR_SRR_MASK) 15032 #define RTC_RAR_LRR_MASK (0x40U) 15033 #define RTC_RAR_LRR_SHIFT (6U) 15034 /*! LRR - Lock Register Read 15035 * 0b0..Reads to the Lock Register are ignored. 15036 * 0b1..Reads to the Lock Register complete as normal. 15037 */ 15038 #define RTC_RAR_LRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_LRR_SHIFT)) & RTC_RAR_LRR_MASK) 15039 #define RTC_RAR_IERR_MASK (0x80U) 15040 #define RTC_RAR_IERR_SHIFT (7U) 15041 /*! IERR - Interrupt Enable Register Read 15042 * 0b0..Reads to the Interrupt Enable Register are ignored. 15043 * 0b1..Reads to the Interrupt Enable Register complete as normal. 15044 */ 15045 #define RTC_RAR_IERR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_IERR_SHIFT)) & RTC_RAR_IERR_MASK) 15046 #define RTC_RAR_TTSR_MASK (0x100U) 15047 #define RTC_RAR_TTSR_SHIFT (8U) 15048 /*! TTSR - Tamper Time Seconds Read 15049 * 0b0..Reads to the Tamper Time Seconds Register are ignored. 15050 * 0b1..Reads to the Tamper Time Seconds Register complete as normal. 15051 */ 15052 #define RTC_RAR_TTSR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TTSR_SHIFT)) & RTC_RAR_TTSR_MASK) 15053 #define RTC_RAR_MERR_MASK (0x200U) 15054 #define RTC_RAR_MERR_SHIFT (9U) 15055 /*! MERR - Monotonic Enable Register Read 15056 * 0b0..Reads to the Monotonic Enable Register are ignored. 15057 * 0b1..Reads to the Monotonic Enable Register complete as normal. 15058 */ 15059 #define RTC_RAR_MERR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MERR_SHIFT)) & RTC_RAR_MERR_MASK) 15060 #define RTC_RAR_MCLR_MASK (0x400U) 15061 #define RTC_RAR_MCLR_SHIFT (10U) 15062 /*! MCLR - Monotonic Counter Low Read 15063 * 0b0..Reads to the Monotonic Counter Low Register are ignored. 15064 * 0b1..Reads to the Monotonic Counter Low Register complete as normal. 15065 */ 15066 #define RTC_RAR_MCLR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MCLR_SHIFT)) & RTC_RAR_MCLR_MASK) 15067 #define RTC_RAR_MCHR_MASK (0x800U) 15068 #define RTC_RAR_MCHR_SHIFT (11U) 15069 /*! MCHR - Monotonic Counter High Read 15070 * 0b0..Reads to the Monotonic Counter High Register are ignored. 15071 * 0b1..Reads to the Monotonic Counter High Register complete as normal. 15072 */ 15073 #define RTC_RAR_MCHR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_MCHR_SHIFT)) & RTC_RAR_MCHR_MASK) 15074 #define RTC_RAR_TDRR_MASK (0x2000U) 15075 #define RTC_RAR_TDRR_SHIFT (13U) 15076 /*! TDRR - Tamper Detect Register Read 15077 * 0b0..Reads to the Tamper Detect Register are ignored. 15078 * 0b1..Reads to the Tamper Detect Register complete as normal. 15079 */ 15080 #define RTC_RAR_TDRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TDRR_SHIFT)) & RTC_RAR_TDRR_MASK) 15081 #define RTC_RAR_TIRR_MASK (0x8000U) 15082 #define RTC_RAR_TIRR_SHIFT (15U) 15083 /*! TIRR - Tamper Interrupt Register Read 15084 * 0b0..Reads to the Tamper Interrupt Register are ignored. 15085 * 0b1..Reads to the Tamper Interrupt Register complete as normal. 15086 */ 15087 #define RTC_RAR_TIRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TIRR_SHIFT)) & RTC_RAR_TIRR_MASK) 15088 #define RTC_RAR_PCRR_MASK (0xF0000U) 15089 #define RTC_RAR_PCRR_SHIFT (16U) 15090 #define RTC_RAR_PCRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_PCRR_SHIFT)) & RTC_RAR_PCRR_MASK) 15091 /*! @} */ 15092 15093 15094 /*! 15095 * @} 15096 */ /* end of group RTC_Register_Masks */ 15097 15098 15099 /* RTC - Peripheral instance base addresses */ 15100 /** Peripheral RTC base address */ 15101 #define RTC_BASE (0x40031000u) 15102 /** Peripheral RTC base pointer */ 15103 #define RTC ((RTC_Type *)RTC_BASE) 15104 /** Array initializer of RTC peripheral base addresses */ 15105 #define RTC_BASE_ADDRS { RTC_BASE } 15106 /** Array initializer of RTC peripheral base pointers */ 15107 #define RTC_BASE_PTRS { RTC } 15108 /** Interrupt vectors for the RTC peripheral type */ 15109 #define RTC_IRQS { RTC_IRQn } 15110 15111 /*! 15112 * @} 15113 */ /* end of group RTC_Peripheral_Access_Layer */ 15114 15115 15116 /* ---------------------------------------------------------------------------- 15117 -- SCG Peripheral Access Layer 15118 ---------------------------------------------------------------------------- */ 15119 15120 /*! 15121 * @addtogroup SCG_Peripheral_Access_Layer SCG Peripheral Access Layer 15122 * @{ 15123 */ 15124 15125 /** SCG - Register Layout Typedef */ 15126 typedef struct { 15127 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 15128 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 15129 uint8_t RESERVED_0[8]; 15130 __I uint32_t CSR; /**< Clock Status Register, offset: 0x10 */ 15131 __IO uint32_t RCCR; /**< Run Clock Control Register, offset: 0x14 */ 15132 __IO uint32_t VCCR; /**< VLPR Clock Control Register, offset: 0x18 */ 15133 __IO uint32_t HCCR; /**< HSRUN Clock Control Register, offset: 0x1C */ 15134 __IO uint32_t CLKOUTCNFG; /**< SCG CLKOUT Configuration Register, offset: 0x20 */ 15135 uint8_t RESERVED_1[476]; 15136 __IO uint32_t SIRCCSR; /**< Slow IRC Control Status Register, offset: 0x200 */ 15137 __IO uint32_t SIRCDIV; /**< Slow IRC Divide Register, offset: 0x204 */ 15138 __IO uint32_t SIRCCFG; /**< Slow IRC Configuration Register, offset: 0x208 */ 15139 uint8_t RESERVED_2[244]; 15140 __IO uint32_t FIRCCSR; /**< Fast IRC Control Status Register, offset: 0x300 */ 15141 __IO uint32_t FIRCDIV; /**< Fast IRC Divide Register, offset: 0x304 */ 15142 __IO uint32_t FIRCCFG; /**< Fast IRC Configuration Register, offset: 0x308 */ 15143 __IO uint32_t FIRCTCFG; /**< Fast IRC Trim Configuration Register, offset: 0x30C */ 15144 uint8_t RESERVED_3[8]; 15145 __IO uint32_t FIRCSTAT; /**< Fast IRC Status Register, offset: 0x318 */ 15146 uint8_t RESERVED_4[228]; 15147 __IO uint32_t ROSCCSR; /**< RTC OSC Control Status Register, offset: 0x400 */ 15148 uint8_t RESERVED_5[252]; 15149 __IO uint32_t LPFLLCSR; /**< Low Power FLL Control Status Register, offset: 0x500 */ 15150 __IO uint32_t LPFLLDIV; /**< Low Power FLL Divide Register, offset: 0x504 */ 15151 __IO uint32_t LPFLLCFG; /**< Low Power FLL Configuration Register, offset: 0x508 */ 15152 __IO uint32_t LPFLLTCFG; /**< Low Power FLL Trim Configuration Register, offset: 0x50C */ 15153 uint8_t RESERVED_6[4]; 15154 __IO uint32_t LPFLLSTAT; /**< Low Power FLL Status Register, offset: 0x514 */ 15155 } SCG_Type; 15156 15157 /* ---------------------------------------------------------------------------- 15158 -- SCG Register Masks 15159 ---------------------------------------------------------------------------- */ 15160 15161 /*! 15162 * @addtogroup SCG_Register_Masks SCG Register Masks 15163 * @{ 15164 */ 15165 15166 /*! @name VERID - Version ID Register */ 15167 /*! @{ */ 15168 #define SCG_VERID_VERSION_MASK (0xFFFFFFFFU) 15169 #define SCG_VERID_VERSION_SHIFT (0U) 15170 #define SCG_VERID_VERSION(x) (((uint32_t)(((uint32_t)(x)) << SCG_VERID_VERSION_SHIFT)) & SCG_VERID_VERSION_MASK) 15171 /*! @} */ 15172 15173 /*! @name PARAM - Parameter Register */ 15174 /*! @{ */ 15175 #define SCG_PARAM_CLKPRES_MASK (0xFFU) 15176 #define SCG_PARAM_CLKPRES_SHIFT (0U) 15177 /*! CLKPRES - Clock Present 15178 * 0b00000000-0b00000001..Reserved 15179 * 0bxxxxxx1x..Reserved. 15180 * 0bxxxxx1xx..Slow IRC (SIRC) is present. 15181 * 0bxxxx1xxx..Fast IRC (FIRC) is present. 15182 * 0bxxx1xxxx..RTC OSC (ROSC) is present. 15183 * 0bxx1xxxxx..Low Power FLL (LPFLL) is present. 15184 */ 15185 #define SCG_PARAM_CLKPRES(x) (((uint32_t)(((uint32_t)(x)) << SCG_PARAM_CLKPRES_SHIFT)) & SCG_PARAM_CLKPRES_MASK) 15186 #define SCG_PARAM_DIVPRES_MASK (0xF8000000U) 15187 #define SCG_PARAM_DIVPRES_SHIFT (27U) 15188 /*! DIVPRES - Divider Present 15189 * 0bxxxx1..System DIVSLOW is present. 15190 * 0bxxx1x..System DIVBUS is present. 15191 * 0bxx1xx..System DIVEXT is present. 15192 * 0b1xxxx..System DIVCORE is present. 15193 */ 15194 #define SCG_PARAM_DIVPRES(x) (((uint32_t)(((uint32_t)(x)) << SCG_PARAM_DIVPRES_SHIFT)) & SCG_PARAM_DIVPRES_MASK) 15195 /*! @} */ 15196 15197 /*! @name CSR - Clock Status Register */ 15198 /*! @{ */ 15199 #define SCG_CSR_DIVSLOW_MASK (0xFU) 15200 #define SCG_CSR_DIVSLOW_SHIFT (0U) 15201 /*! DIVSLOW - Slow Clock Divide Ratio 15202 * 0b0000..Reserved 15203 * 0b0001..Divide-by-2 15204 * 0b0010..Divide-by-3 15205 * 0b0011..Divide-by-4 15206 * 0b0100..Divide-by-5 15207 * 0b0101..Divide-by-6 15208 * 0b0110..Divide-by-7 15209 * 0b0111..Divide-by-8 15210 * 0b1000..Divide-by-9 15211 * 0b1001..Divide-by-10 15212 * 0b1010..Divide-by-11 15213 * 0b1011..Divide-by-12 15214 * 0b1100..Divide-by-13 15215 * 0b1101..Divide-by-14 15216 * 0b1110..Divide-by-15 15217 * 0b1111..Divide-by-16 15218 */ 15219 #define SCG_CSR_DIVSLOW(x) (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVSLOW_SHIFT)) & SCG_CSR_DIVSLOW_MASK) 15220 #define SCG_CSR_DIVBUS_MASK (0xF0U) 15221 #define SCG_CSR_DIVBUS_SHIFT (4U) 15222 /*! DIVBUS - Bus Clock Divide Ratio 15223 * 0b0000..Divide-by-1 15224 * 0b0001..Divide-by-2 15225 * 0b0010..Divide-by-3 15226 * 0b0011..Divide-by-4 15227 * 0b0100..Divide-by-5 15228 * 0b0101..Divide-by-6 15229 * 0b0110..Divide-by-7 15230 * 0b0111..Divide-by-8 15231 * 0b1000..Divide-by-9 15232 * 0b1001..Divide-by-10 15233 * 0b1010..Divide-by-11 15234 * 0b1011..Divide-by-12 15235 * 0b1100..Divide-by-13 15236 * 0b1101..Divide-by-14 15237 * 0b1110..Divide-by-15 15238 * 0b1111..Divide-by-16 15239 */ 15240 #define SCG_CSR_DIVBUS(x) (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVBUS_SHIFT)) & SCG_CSR_DIVBUS_MASK) 15241 #define SCG_CSR_DIVEXT_MASK (0xF00U) 15242 #define SCG_CSR_DIVEXT_SHIFT (8U) 15243 /*! DIVEXT - External Clock Divide Ratio 15244 * 0b0000..Divide-by-1 15245 * 0b0001..Divide-by-2 15246 * 0b0010..Divide-by-3 15247 * 0b0011..Divide-by-4 15248 * 0b0100..Divide-by-5 15249 * 0b0101..Divide-by-6 15250 * 0b0110..Divide-by-7 15251 * 0b0111..Divide-by-8 15252 * 0b1000..Divide-by-9 15253 * 0b1001..Divide-by-10 15254 * 0b1010..Divide-by-11 15255 * 0b1011..Divide-by-12 15256 * 0b1100..Divide-by-13 15257 * 0b1101..Divide-by-14 15258 * 0b1110..Divide-by-15 15259 * 0b1111..Divide-by-16 15260 */ 15261 #define SCG_CSR_DIVEXT(x) (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVEXT_SHIFT)) & SCG_CSR_DIVEXT_MASK) 15262 #define SCG_CSR_DIVCORE_MASK (0xF0000U) 15263 #define SCG_CSR_DIVCORE_SHIFT (16U) 15264 /*! DIVCORE - Core Clock Divide Ratio 15265 * 0b0000..Divide-by-1 15266 * 0b0001..Divide-by-2 15267 * 0b0010..Divide-by-3 15268 * 0b0011..Divide-by-4 15269 * 0b0100..Divide-by-5 15270 * 0b0101..Divide-by-6 15271 * 0b0110..Divide-by-7 15272 * 0b0111..Divide-by-8 15273 * 0b1000..Divide-by-9 15274 * 0b1001..Divide-by-10 15275 * 0b1010..Divide-by-11 15276 * 0b1011..Divide-by-12 15277 * 0b1100..Divide-by-13 15278 * 0b1101..Divide-by-14 15279 * 0b1110..Divide-by-15 15280 * 0b1111..Divide-by-16 15281 */ 15282 #define SCG_CSR_DIVCORE(x) (((uint32_t)(((uint32_t)(x)) << SCG_CSR_DIVCORE_SHIFT)) & SCG_CSR_DIVCORE_MASK) 15283 #define SCG_CSR_SCS_MASK (0xF000000U) 15284 #define SCG_CSR_SCS_SHIFT (24U) 15285 /*! SCS - System Clock Source 15286 * 0b0000..Reserved 15287 * 0b0001..Reserved 15288 * 0b0010..Slow IRC (SIRC_CLK) 15289 * 0b0011..Fast IRC (FIRC_CLK) 15290 * 0b0100..RTC OSC (ROSC_CLK) 15291 * 0b0101..Low Power FLL (LPFLL_CLK) 15292 * 0b0110..Reserved 15293 * 0b0111..Reserved 15294 */ 15295 #define SCG_CSR_SCS(x) (((uint32_t)(((uint32_t)(x)) << SCG_CSR_SCS_SHIFT)) & SCG_CSR_SCS_MASK) 15296 /*! @} */ 15297 15298 /*! @name RCCR - Run Clock Control Register */ 15299 /*! @{ */ 15300 #define SCG_RCCR_DIVSLOW_MASK (0xFU) 15301 #define SCG_RCCR_DIVSLOW_SHIFT (0U) 15302 /*! DIVSLOW - Slow Clock Divide Ratio 15303 * 0b0000..Reserved 15304 * 0b0001..Divide-by-2 15305 * 0b0010..Divide-by-3 15306 * 0b0011..Divide-by-4 15307 * 0b0100..Divide-by-5 15308 * 0b0101..Divide-by-6 15309 * 0b0110..Divide-by-7 15310 * 0b0111..Divide-by-8 15311 * 0b1000..Divide-by-9 15312 * 0b1001..Divide-by-10 15313 * 0b1010..Divide-by-11 15314 * 0b1011..Divide-by-12 15315 * 0b1100..Divide-by-13 15316 * 0b1101..Divide-by-14 15317 * 0b1110..Divide-by-15 15318 * 0b1111..Divide-by-16 15319 */ 15320 #define SCG_RCCR_DIVSLOW(x) (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVSLOW_SHIFT)) & SCG_RCCR_DIVSLOW_MASK) 15321 #define SCG_RCCR_DIVBUS_MASK (0xF0U) 15322 #define SCG_RCCR_DIVBUS_SHIFT (4U) 15323 /*! DIVBUS - Bus Clock Divide Ratio 15324 * 0b0000..Divide-by-1 15325 * 0b0001..Divide-by-2 15326 * 0b0010..Divide-by-3 15327 * 0b0011..Divide-by-4 15328 * 0b0100..Divide-by-5 15329 * 0b0101..Divide-by-6 15330 * 0b0110..Divide-by-7 15331 * 0b0111..Divide-by-8 15332 * 0b1000..Divide-by-9 15333 * 0b1001..Divide-by-10 15334 * 0b1010..Divide-by-11 15335 * 0b1011..Divide-by-12 15336 * 0b1100..Divide-by-13 15337 * 0b1101..Divide-by-14 15338 * 0b1110..Divide-by-15 15339 * 0b1111..Divide-by-16 15340 */ 15341 #define SCG_RCCR_DIVBUS(x) (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVBUS_SHIFT)) & SCG_RCCR_DIVBUS_MASK) 15342 #define SCG_RCCR_DIVEXT_MASK (0xF00U) 15343 #define SCG_RCCR_DIVEXT_SHIFT (8U) 15344 /*! DIVEXT - External Clock Divide Ratio 15345 * 0b0000..Divide-by-1 15346 * 0b0001..Divide-by-2 15347 * 0b0010..Divide-by-3 15348 * 0b0011..Divide-by-4 15349 * 0b0100..Divide-by-5 15350 * 0b0101..Divide-by-6 15351 * 0b0110..Divide-by-7 15352 * 0b0111..Divide-by-8 15353 * 0b1000..Divide-by-9 15354 * 0b1001..Divide-by-10 15355 * 0b1010..Divide-by-11 15356 * 0b1011..Divide-by-12 15357 * 0b1100..Divide-by-13 15358 * 0b1101..Divide-by-14 15359 * 0b1110..Divide-by-15 15360 * 0b1111..Divide-by-16 15361 */ 15362 #define SCG_RCCR_DIVEXT(x) (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVEXT_SHIFT)) & SCG_RCCR_DIVEXT_MASK) 15363 #define SCG_RCCR_DIVCORE_MASK (0xF0000U) 15364 #define SCG_RCCR_DIVCORE_SHIFT (16U) 15365 /*! DIVCORE - Core Clock Divide Ratio 15366 * 0b0000..Divide-by-1 15367 * 0b0001..Divide-by-2 15368 * 0b0010..Divide-by-3 15369 * 0b0011..Divide-by-4 15370 * 0b0100..Divide-by-5 15371 * 0b0101..Divide-by-6 15372 * 0b0110..Divide-by-7 15373 * 0b0111..Divide-by-8 15374 * 0b1000..Divide-by-9 15375 * 0b1001..Divide-by-10 15376 * 0b1010..Divide-by-11 15377 * 0b1011..Divide-by-12 15378 * 0b1100..Divide-by-13 15379 * 0b1101..Divide-by-14 15380 * 0b1110..Divide-by-15 15381 * 0b1111..Divide-by-16 15382 */ 15383 #define SCG_RCCR_DIVCORE(x) (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_DIVCORE_SHIFT)) & SCG_RCCR_DIVCORE_MASK) 15384 #define SCG_RCCR_SCS_MASK (0x7000000U) 15385 #define SCG_RCCR_SCS_SHIFT (24U) 15386 /*! SCS - System Clock Source 15387 * 0b000..Reserved 15388 * 0b001..Reserved 15389 * 0b010..Slow IRC (SIRC_CLK) 15390 * 0b011..Fast IRC (FIRC_CLK) 15391 * 0b100..RTC OSC (ROSC_CLK) 15392 * 0b101..Low Power FLL (LPFLL_CLK) 15393 * 0b110..Reserved 15394 * 0b111..Reserved 15395 */ 15396 #define SCG_RCCR_SCS(x) (((uint32_t)(((uint32_t)(x)) << SCG_RCCR_SCS_SHIFT)) & SCG_RCCR_SCS_MASK) 15397 /*! @} */ 15398 15399 /*! @name VCCR - VLPR Clock Control Register */ 15400 /*! @{ */ 15401 #define SCG_VCCR_DIVSLOW_MASK (0xFU) 15402 #define SCG_VCCR_DIVSLOW_SHIFT (0U) 15403 /*! DIVSLOW - Slow Clock Divide Ratio 15404 * 0b0000..Reserved 15405 * 0b0001..Divide-by-2 15406 * 0b0010..Divide-by-3 15407 * 0b0011..Divide-by-4 15408 * 0b0100..Divide-by-5 15409 * 0b0101..Divide-by-6 15410 * 0b0110..Divide-by-7 15411 * 0b0111..Divide-by-8 15412 * 0b1000..Divide-by-9 15413 * 0b1001..Divide-by-10 15414 * 0b1010..Divide-by-11 15415 * 0b1011..Divide-by-12 15416 * 0b1100..Divide-by-13 15417 * 0b1101..Divide-by-14 15418 * 0b1110..Divide-by-15 15419 * 0b1111..Divide-by-16 15420 */ 15421 #define SCG_VCCR_DIVSLOW(x) (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVSLOW_SHIFT)) & SCG_VCCR_DIVSLOW_MASK) 15422 #define SCG_VCCR_DIVBUS_MASK (0xF0U) 15423 #define SCG_VCCR_DIVBUS_SHIFT (4U) 15424 /*! DIVBUS - Bus Clock Divide Ratio 15425 * 0b0000..Divide-by-1 15426 * 0b0001..Divide-by-2 15427 * 0b0010..Divide-by-3 15428 * 0b0011..Divide-by-4 15429 * 0b0100..Divide-by-5 15430 * 0b0101..Divide-by-6 15431 * 0b0110..Divide-by-7 15432 * 0b0111..Divide-by-8 15433 * 0b1000..Divide-by-9 15434 * 0b1001..Divide-by-10 15435 * 0b1010..Divide-by-11 15436 * 0b1011..Divide-by-12 15437 * 0b1100..Divide-by-13 15438 * 0b1101..Divide-by-14 15439 * 0b1110..Divide-by-15 15440 * 0b1111..Divide-by-16 15441 */ 15442 #define SCG_VCCR_DIVBUS(x) (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVBUS_SHIFT)) & SCG_VCCR_DIVBUS_MASK) 15443 #define SCG_VCCR_DIVEXT_MASK (0xF00U) 15444 #define SCG_VCCR_DIVEXT_SHIFT (8U) 15445 /*! DIVEXT - External Clock Divide Ratio 15446 * 0b0000..Divide-by-1 15447 * 0b0001..Divide-by-2 15448 * 0b0010..Divide-by-3 15449 * 0b0011..Divide-by-4 15450 * 0b0100..Divide-by-5 15451 * 0b0101..Divide-by-6 15452 * 0b0110..Divide-by-7 15453 * 0b0111..Divide-by-8 15454 * 0b1000..Divide-by-9 15455 * 0b1001..Divide-by-10 15456 * 0b1010..Divide-by-11 15457 * 0b1011..Divide-by-12 15458 * 0b1100..Divide-by-13 15459 * 0b1101..Divide-by-14 15460 * 0b1110..Divide-by-15 15461 * 0b1111..Divide-by-16 15462 */ 15463 #define SCG_VCCR_DIVEXT(x) (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVEXT_SHIFT)) & SCG_VCCR_DIVEXT_MASK) 15464 #define SCG_VCCR_DIVCORE_MASK (0xF0000U) 15465 #define SCG_VCCR_DIVCORE_SHIFT (16U) 15466 /*! DIVCORE - Core Clock Divide Ratio 15467 * 0b0000..Divide-by-1 15468 * 0b0001..Divide-by-2 15469 * 0b0010..Divide-by-3 15470 * 0b0011..Divide-by-4 15471 * 0b0100..Divide-by-5 15472 * 0b0101..Divide-by-6 15473 * 0b0110..Divide-by-7 15474 * 0b0111..Divide-by-8 15475 * 0b1000..Divide-by-9 15476 * 0b1001..Divide-by-10 15477 * 0b1010..Divide-by-11 15478 * 0b1011..Divide-by-12 15479 * 0b1100..Divide-by-13 15480 * 0b1101..Divide-by-14 15481 * 0b1110..Divide-by-15 15482 * 0b1111..Divide-by-16 15483 */ 15484 #define SCG_VCCR_DIVCORE(x) (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_DIVCORE_SHIFT)) & SCG_VCCR_DIVCORE_MASK) 15485 #define SCG_VCCR_SCS_MASK (0xF000000U) 15486 #define SCG_VCCR_SCS_SHIFT (24U) 15487 /*! SCS - System Clock Source 15488 * 0b0000..Reserved 15489 * 0b0001..Reserved 15490 * 0b0010..Slow IRC (SIRC_CLK) 15491 * 0b0011..Reserved 15492 * 0b0100..RTC OSC (ROSC_CLK) 15493 * 0b0101..Reserved 15494 * 0b0110..Reserved 15495 * 0b0111..Reserved 15496 */ 15497 #define SCG_VCCR_SCS(x) (((uint32_t)(((uint32_t)(x)) << SCG_VCCR_SCS_SHIFT)) & SCG_VCCR_SCS_MASK) 15498 /*! @} */ 15499 15500 /*! @name HCCR - HSRUN Clock Control Register */ 15501 /*! @{ */ 15502 #define SCG_HCCR_DIVSLOW_MASK (0xFU) 15503 #define SCG_HCCR_DIVSLOW_SHIFT (0U) 15504 /*! DIVSLOW - Slow Clock Divide Ratio 15505 * 0b0000..Reserved 15506 * 0b0001..Divide-by-2 15507 * 0b0010..Divide-by-3 15508 * 0b0011..Divide-by-4 15509 * 0b0100..Divide-by-5 15510 * 0b0101..Divide-by-6 15511 * 0b0110..Divide-by-7 15512 * 0b0111..Divide-by-8 15513 * 0b1000..Divide-by-9 15514 * 0b1001..Divide-by-10 15515 * 0b1010..Divide-by-11 15516 * 0b1011..Divide-by-12 15517 * 0b1100..Divide-by-13 15518 * 0b1101..Divide-by-14 15519 * 0b1110..Divide-by-15 15520 * 0b1111..Divide-by-16 15521 */ 15522 #define SCG_HCCR_DIVSLOW(x) (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVSLOW_SHIFT)) & SCG_HCCR_DIVSLOW_MASK) 15523 #define SCG_HCCR_DIVBUS_MASK (0xF0U) 15524 #define SCG_HCCR_DIVBUS_SHIFT (4U) 15525 /*! DIVBUS - Bus Clock Divide Ratio 15526 * 0b0000..Divide-by-1 15527 * 0b0001..Divide-by-2 15528 * 0b0010..Divide-by-3 15529 * 0b0011..Divide-by-4 15530 * 0b0100..Divide-by-5 15531 * 0b0101..Divide-by-6 15532 * 0b0110..Divide-by-7 15533 * 0b0111..Divide-by-8 15534 * 0b1000..Divide-by-9 15535 * 0b1001..Divide-by-10 15536 * 0b1010..Divide-by-11 15537 * 0b1011..Divide-by-12 15538 * 0b1100..Divide-by-13 15539 * 0b1101..Divide-by-14 15540 * 0b1110..Divide-by-15 15541 * 0b1111..Divide-by-16 15542 */ 15543 #define SCG_HCCR_DIVBUS(x) (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVBUS_SHIFT)) & SCG_HCCR_DIVBUS_MASK) 15544 #define SCG_HCCR_DIVEXT_MASK (0xF00U) 15545 #define SCG_HCCR_DIVEXT_SHIFT (8U) 15546 /*! DIVEXT - External Clock Divide Ratio 15547 * 0b0000..Divide-by-1 15548 * 0b0001..Divide-by-2 15549 * 0b0010..Divide-by-3 15550 * 0b0011..Divide-by-4 15551 * 0b0100..Divide-by-5 15552 * 0b0101..Divide-by-6 15553 * 0b0110..Divide-by-7 15554 * 0b0111..Divide-by-8 15555 * 0b1000..Divide-by-9 15556 * 0b1001..Divide-by-10 15557 * 0b1010..Divide-by-11 15558 * 0b1011..Divide-by-12 15559 * 0b1100..Divide-by-13 15560 * 0b1101..Divide-by-14 15561 * 0b1110..Divide-by-15 15562 * 0b1111..Divide-by-16 15563 */ 15564 #define SCG_HCCR_DIVEXT(x) (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVEXT_SHIFT)) & SCG_HCCR_DIVEXT_MASK) 15565 #define SCG_HCCR_DIVCORE_MASK (0xF0000U) 15566 #define SCG_HCCR_DIVCORE_SHIFT (16U) 15567 /*! DIVCORE - Core Clock Divide Ratio 15568 * 0b0000..Divide-by-1 15569 * 0b0001..Divide-by-2 15570 * 0b0010..Divide-by-3 15571 * 0b0011..Divide-by-4 15572 * 0b0100..Divide-by-5 15573 * 0b0101..Divide-by-6 15574 * 0b0110..Divide-by-7 15575 * 0b0111..Divide-by-8 15576 * 0b1000..Divide-by-9 15577 * 0b1001..Divide-by-10 15578 * 0b1010..Divide-by-11 15579 * 0b1011..Divide-by-12 15580 * 0b1100..Divide-by-13 15581 * 0b1101..Divide-by-14 15582 * 0b1110..Divide-by-15 15583 * 0b1111..Divide-by-16 15584 */ 15585 #define SCG_HCCR_DIVCORE(x) (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_DIVCORE_SHIFT)) & SCG_HCCR_DIVCORE_MASK) 15586 #define SCG_HCCR_SCS_MASK (0xF000000U) 15587 #define SCG_HCCR_SCS_SHIFT (24U) 15588 /*! SCS - System Clock Source 15589 * 0b0000..Reserved 15590 * 0b0001..Reserved 15591 * 0b0010..Slow IRC (SIRC_CLK) 15592 * 0b0011..Fast IRC (FIRC_CLK) 15593 * 0b0100..RTC OSC (ROSC_CLK) 15594 * 0b0101..Low Power FLL (LPFLL_CLK) 15595 * 0b0110..Reserved 15596 * 0b0111..Reserved 15597 */ 15598 #define SCG_HCCR_SCS(x) (((uint32_t)(((uint32_t)(x)) << SCG_HCCR_SCS_SHIFT)) & SCG_HCCR_SCS_MASK) 15599 /*! @} */ 15600 15601 /*! @name CLKOUTCNFG - SCG CLKOUT Configuration Register */ 15602 /*! @{ */ 15603 #define SCG_CLKOUTCNFG_CLKOUTSEL_MASK (0xF000000U) 15604 #define SCG_CLKOUTCNFG_CLKOUTSEL_SHIFT (24U) 15605 /*! CLKOUTSEL - SCG Clkout Select 15606 * 0b0000..SCG EXTERNAL Clock 15607 * 0b0001..Reserved 15608 * 0b0010..Slow IRC (SIRC_CLK) 15609 * 0b0011..Fast IRC (FIRC_CLK) 15610 * 0b0100..RTC OSC (ROSC_CLK) 15611 * 0b0101..Low Power FLL (LPFLL_CLK) 15612 * 0b0110..Reserved 15613 * 0b0111..Reserved 15614 * 0b1111..Reserved 15615 */ 15616 #define SCG_CLKOUTCNFG_CLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_CLKOUTCNFG_CLKOUTSEL_SHIFT)) & SCG_CLKOUTCNFG_CLKOUTSEL_MASK) 15617 /*! @} */ 15618 15619 /*! @name SIRCCSR - Slow IRC Control Status Register */ 15620 /*! @{ */ 15621 #define SCG_SIRCCSR_SIRCEN_MASK (0x1U) 15622 #define SCG_SIRCCSR_SIRCEN_SHIFT (0U) 15623 /*! SIRCEN - Slow IRC Enable 15624 * 0b0..Slow IRC is disabled 15625 * 0b1..Slow IRC is enabled 15626 */ 15627 #define SCG_SIRCCSR_SIRCEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCEN_SHIFT)) & SCG_SIRCCSR_SIRCEN_MASK) 15628 #define SCG_SIRCCSR_SIRCSTEN_MASK (0x2U) 15629 #define SCG_SIRCCSR_SIRCSTEN_SHIFT (1U) 15630 /*! SIRCSTEN - Slow IRC Stop Enable 15631 * 0b0..Slow IRC is disabled in Stop modes 15632 * 0b1..Slow IRC is enabled in Stop modes 15633 */ 15634 #define SCG_SIRCCSR_SIRCSTEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCSTEN_SHIFT)) & SCG_SIRCCSR_SIRCSTEN_MASK) 15635 #define SCG_SIRCCSR_SIRCLPEN_MASK (0x4U) 15636 #define SCG_SIRCCSR_SIRCLPEN_SHIFT (2U) 15637 /*! SIRCLPEN - Slow IRC Low Power Enable 15638 * 0b0..Slow IRC is disabled in VLP modes 15639 * 0b1..Slow IRC is enabled in VLP modes 15640 */ 15641 #define SCG_SIRCCSR_SIRCLPEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCLPEN_SHIFT)) & SCG_SIRCCSR_SIRCLPEN_MASK) 15642 #define SCG_SIRCCSR_LK_MASK (0x800000U) 15643 #define SCG_SIRCCSR_LK_SHIFT (23U) 15644 /*! LK - Lock Register 15645 * 0b0..Control Status Register can be written. 15646 * 0b1..Control Status Register cannot be written. 15647 */ 15648 #define SCG_SIRCCSR_LK(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_LK_SHIFT)) & SCG_SIRCCSR_LK_MASK) 15649 #define SCG_SIRCCSR_SIRCVLD_MASK (0x1000000U) 15650 #define SCG_SIRCCSR_SIRCVLD_SHIFT (24U) 15651 /*! SIRCVLD - Slow IRC Valid 15652 * 0b0..Slow IRC is not enabled or clock is not valid 15653 * 0b1..Slow IRC is enabled and output clock is valid 15654 */ 15655 #define SCG_SIRCCSR_SIRCVLD(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCVLD_SHIFT)) & SCG_SIRCCSR_SIRCVLD_MASK) 15656 #define SCG_SIRCCSR_SIRCSEL_MASK (0x2000000U) 15657 #define SCG_SIRCCSR_SIRCSEL_SHIFT (25U) 15658 /*! SIRCSEL - Slow IRC Selected 15659 * 0b0..Slow IRC is not the system clock source 15660 * 0b1..Slow IRC is the system clock source 15661 */ 15662 #define SCG_SIRCCSR_SIRCSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCSR_SIRCSEL_SHIFT)) & SCG_SIRCCSR_SIRCSEL_MASK) 15663 /*! @} */ 15664 15665 /*! @name SIRCDIV - Slow IRC Divide Register */ 15666 /*! @{ */ 15667 #define SCG_SIRCDIV_SIRCDIV1_MASK (0x7U) 15668 #define SCG_SIRCDIV_SIRCDIV1_SHIFT (0U) 15669 /*! SIRCDIV1 - Slow IRC Clock Divide 1 15670 * 0b000..Output disabled 15671 * 0b001..Divide by 1 15672 * 0b010..Divide by 2 15673 * 0b011..Divide by 4 15674 * 0b100..Divide by 8 15675 * 0b101..Divide by 16 15676 * 0b110..Divide by 32 15677 * 0b111..Divide by 64 15678 */ 15679 #define SCG_SIRCDIV_SIRCDIV1(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV1_SHIFT)) & SCG_SIRCDIV_SIRCDIV1_MASK) 15680 #define SCG_SIRCDIV_SIRCDIV2_MASK (0x700U) 15681 #define SCG_SIRCDIV_SIRCDIV2_SHIFT (8U) 15682 /*! SIRCDIV2 - Slow IRC Clock Divide 2 15683 * 0b000..Output disabled 15684 * 0b001..Divide by 1 15685 * 0b010..Divide by 2 15686 * 0b011..Divide by 4 15687 * 0b100..Divide by 8 15688 * 0b101..Divide by 16 15689 * 0b110..Divide by 32 15690 * 0b111..Divide by 64 15691 */ 15692 #define SCG_SIRCDIV_SIRCDIV2(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV2_SHIFT)) & SCG_SIRCDIV_SIRCDIV2_MASK) 15693 #define SCG_SIRCDIV_SIRCDIV3_MASK (0x70000U) 15694 #define SCG_SIRCDIV_SIRCDIV3_SHIFT (16U) 15695 /*! SIRCDIV3 - Slow IRC Clock Divider 3 15696 * 0b000..Output disabled 15697 * 0b001..Divide by 1 15698 * 0b010..Divide by 2 15699 * 0b011..Divide by 4 15700 * 0b100..Divide by 8 15701 * 0b101..Divide by 16 15702 * 0b110..Divide by 32 15703 * 0b111..Divide by 64 15704 */ 15705 #define SCG_SIRCDIV_SIRCDIV3(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCDIV_SIRCDIV3_SHIFT)) & SCG_SIRCDIV_SIRCDIV3_MASK) 15706 /*! @} */ 15707 15708 /*! @name SIRCCFG - Slow IRC Configuration Register */ 15709 /*! @{ */ 15710 #define SCG_SIRCCFG_RANGE_MASK (0x1U) 15711 #define SCG_SIRCCFG_RANGE_SHIFT (0U) 15712 /*! RANGE - Frequency Range 15713 * 0b0..Slow IRC low range clock (2 MHz) 15714 * 0b1..Slow IRC high range clock (8 MHz ) 15715 */ 15716 #define SCG_SIRCCFG_RANGE(x) (((uint32_t)(((uint32_t)(x)) << SCG_SIRCCFG_RANGE_SHIFT)) & SCG_SIRCCFG_RANGE_MASK) 15717 /*! @} */ 15718 15719 /*! @name FIRCCSR - Fast IRC Control Status Register */ 15720 /*! @{ */ 15721 #define SCG_FIRCCSR_FIRCEN_MASK (0x1U) 15722 #define SCG_FIRCCSR_FIRCEN_SHIFT (0U) 15723 /*! FIRCEN - Fast IRC Enable 15724 * 0b0..Fast IRC is disabled 15725 * 0b1..Fast IRC is enabled 15726 */ 15727 #define SCG_FIRCCSR_FIRCEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCEN_SHIFT)) & SCG_FIRCCSR_FIRCEN_MASK) 15728 #define SCG_FIRCCSR_FIRCSTEN_MASK (0x2U) 15729 #define SCG_FIRCCSR_FIRCSTEN_SHIFT (1U) 15730 /*! FIRCSTEN - Fast IRC Stop Enable 15731 * 0b0..Fast IRC is disabled in Stop modes. 15732 * 0b1..Fast IRC is enabled in Stop modes 15733 */ 15734 #define SCG_FIRCCSR_FIRCSTEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCSTEN_SHIFT)) & SCG_FIRCCSR_FIRCSTEN_MASK) 15735 #define SCG_FIRCCSR_FIRCLPEN_MASK (0x4U) 15736 #define SCG_FIRCCSR_FIRCLPEN_SHIFT (2U) 15737 /*! FIRCLPEN - Fast IRC Low Power Enable 15738 * 0b0..Fast IRC is disabled in VLP modes 15739 * 0b1..Fast IRC is enabled in VLP modes 15740 */ 15741 #define SCG_FIRCCSR_FIRCLPEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCLPEN_SHIFT)) & SCG_FIRCCSR_FIRCLPEN_MASK) 15742 #define SCG_FIRCCSR_FIRCREGOFF_MASK (0x8U) 15743 #define SCG_FIRCCSR_FIRCREGOFF_SHIFT (3U) 15744 /*! FIRCREGOFF - Fast IRC Regulator Enable 15745 * 0b0..Fast IRC Regulator is enabled. 15746 * 0b1..Fast IRC Regulator is disabled. 15747 */ 15748 #define SCG_FIRCCSR_FIRCREGOFF(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCREGOFF_SHIFT)) & SCG_FIRCCSR_FIRCREGOFF_MASK) 15749 #define SCG_FIRCCSR_FIRCTREN_MASK (0x100U) 15750 #define SCG_FIRCCSR_FIRCTREN_SHIFT (8U) 15751 /*! FIRCTREN - Fast IRC Trim Enable 15752 * 0b0..Disable trimming Fast IRC to an external clock source 15753 * 0b1..Enable trimming Fast IRC to an external clock source 15754 */ 15755 #define SCG_FIRCCSR_FIRCTREN(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCTREN_SHIFT)) & SCG_FIRCCSR_FIRCTREN_MASK) 15756 #define SCG_FIRCCSR_FIRCTRUP_MASK (0x200U) 15757 #define SCG_FIRCCSR_FIRCTRUP_SHIFT (9U) 15758 /*! FIRCTRUP - Fast IRC Trim Update 15759 * 0b0..Disable Fast IRC trimming updates 15760 * 0b1..Enable Fast IRC trimming updates 15761 */ 15762 #define SCG_FIRCCSR_FIRCTRUP(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCTRUP_SHIFT)) & SCG_FIRCCSR_FIRCTRUP_MASK) 15763 #define SCG_FIRCCSR_LK_MASK (0x800000U) 15764 #define SCG_FIRCCSR_LK_SHIFT (23U) 15765 /*! LK - Lock Register 15766 * 0b0..Control Status Register can be written. 15767 * 0b1..Control Status Register cannot be written. 15768 */ 15769 #define SCG_FIRCCSR_LK(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_LK_SHIFT)) & SCG_FIRCCSR_LK_MASK) 15770 #define SCG_FIRCCSR_FIRCVLD_MASK (0x1000000U) 15771 #define SCG_FIRCCSR_FIRCVLD_SHIFT (24U) 15772 /*! FIRCVLD - Fast IRC Valid status 15773 * 0b0..Fast IRC is not enabled or clock is not valid. 15774 * 0b1..Fast IRC is enabled and output clock is valid. The clock is valid after there is an output clock from the FIRC analog. 15775 */ 15776 #define SCG_FIRCCSR_FIRCVLD(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCVLD_SHIFT)) & SCG_FIRCCSR_FIRCVLD_MASK) 15777 #define SCG_FIRCCSR_FIRCSEL_MASK (0x2000000U) 15778 #define SCG_FIRCCSR_FIRCSEL_SHIFT (25U) 15779 /*! FIRCSEL - Fast IRC Selected status 15780 * 0b0..Fast IRC is not the system clock source 15781 * 0b1..Fast IRC is the system clock source 15782 */ 15783 #define SCG_FIRCCSR_FIRCSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCSEL_SHIFT)) & SCG_FIRCCSR_FIRCSEL_MASK) 15784 #define SCG_FIRCCSR_FIRCERR_MASK (0x4000000U) 15785 #define SCG_FIRCCSR_FIRCERR_SHIFT (26U) 15786 /*! FIRCERR - Fast IRC Clock Error 15787 * 0b0..Error not detected with the Fast IRC trimming. 15788 * 0b1..Error detected with the Fast IRC trimming. 15789 */ 15790 #define SCG_FIRCCSR_FIRCERR(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCSR_FIRCERR_SHIFT)) & SCG_FIRCCSR_FIRCERR_MASK) 15791 /*! @} */ 15792 15793 /*! @name FIRCDIV - Fast IRC Divide Register */ 15794 /*! @{ */ 15795 #define SCG_FIRCDIV_FIRCDIV1_MASK (0x7U) 15796 #define SCG_FIRCDIV_FIRCDIV1_SHIFT (0U) 15797 /*! FIRCDIV1 - Fast IRC Clock Divide 1 15798 * 0b000..Output disabled 15799 * 0b001..Divide by 1 15800 * 0b010..Divide by 2 15801 * 0b011..Divide by 4 15802 * 0b100..Divide by 8 15803 * 0b101..Divide by 16 15804 * 0b110..Divide by 32 15805 * 0b111..Divide by 64 15806 */ 15807 #define SCG_FIRCDIV_FIRCDIV1(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV1_SHIFT)) & SCG_FIRCDIV_FIRCDIV1_MASK) 15808 #define SCG_FIRCDIV_FIRCDIV2_MASK (0x700U) 15809 #define SCG_FIRCDIV_FIRCDIV2_SHIFT (8U) 15810 /*! FIRCDIV2 - Fast IRC Clock Divide 2 15811 * 0b000..Output disabled 15812 * 0b001..Divide by 1 15813 * 0b010..Divide by 2 15814 * 0b011..Divide by 4 15815 * 0b100..Divide by 8 15816 * 0b101..Divide by 16 15817 * 0b110..Divide by 32 15818 * 0b111..Divide by 64 15819 */ 15820 #define SCG_FIRCDIV_FIRCDIV2(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV2_SHIFT)) & SCG_FIRCDIV_FIRCDIV2_MASK) 15821 #define SCG_FIRCDIV_FIRCDIV3_MASK (0x70000U) 15822 #define SCG_FIRCDIV_FIRCDIV3_SHIFT (16U) 15823 /*! FIRCDIV3 - Fast IRC Clock Divider 3 15824 * 0b000..Clock disabled 15825 * 0b001..Divide by 1 15826 * 0b010..Divide by 2 15827 * 0b011..Divide by 4 15828 * 0b100..Divide by 8 15829 * 0b101..Divide by 16 15830 * 0b110..Divide by 32 15831 * 0b111..Divide by 64 15832 */ 15833 #define SCG_FIRCDIV_FIRCDIV3(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCDIV_FIRCDIV3_SHIFT)) & SCG_FIRCDIV_FIRCDIV3_MASK) 15834 /*! @} */ 15835 15836 /*! @name FIRCCFG - Fast IRC Configuration Register */ 15837 /*! @{ */ 15838 #define SCG_FIRCCFG_RANGE_MASK (0x3U) 15839 #define SCG_FIRCCFG_RANGE_SHIFT (0U) 15840 /*! RANGE - Frequency Range 15841 * 0b00..Fast IRC is trimmed to 48 MHz 15842 * 0b01..Fast IRC is trimmed to 52 MHz 15843 * 0b10..Fast IRC is trimmed to 56 MHz 15844 * 0b11..Fast IRC is trimmed to 60 MHz 15845 */ 15846 #define SCG_FIRCCFG_RANGE(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCCFG_RANGE_SHIFT)) & SCG_FIRCCFG_RANGE_MASK) 15847 /*! @} */ 15848 15849 /*! @name FIRCTCFG - Fast IRC Trim Configuration Register */ 15850 /*! @{ */ 15851 #define SCG_FIRCTCFG_TRIMSRC_MASK (0x3U) 15852 #define SCG_FIRCTCFG_TRIMSRC_SHIFT (0U) 15853 /*! TRIMSRC - Trim Source 15854 * 0b00..Reserved 15855 * 0b01..Reserved 15856 * 0b10..Reserved 15857 * 0b11..RTC OSC (32.768 kHz) 15858 */ 15859 #define SCG_FIRCTCFG_TRIMSRC(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCTCFG_TRIMSRC_SHIFT)) & SCG_FIRCTCFG_TRIMSRC_MASK) 15860 /*! @} */ 15861 15862 /*! @name FIRCSTAT - Fast IRC Status Register */ 15863 /*! @{ */ 15864 #define SCG_FIRCSTAT_TRIMFINE_MASK (0x7FU) 15865 #define SCG_FIRCSTAT_TRIMFINE_SHIFT (0U) 15866 #define SCG_FIRCSTAT_TRIMFINE(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCSTAT_TRIMFINE_SHIFT)) & SCG_FIRCSTAT_TRIMFINE_MASK) 15867 #define SCG_FIRCSTAT_TRIMCOAR_MASK (0x3F00U) 15868 #define SCG_FIRCSTAT_TRIMCOAR_SHIFT (8U) 15869 #define SCG_FIRCSTAT_TRIMCOAR(x) (((uint32_t)(((uint32_t)(x)) << SCG_FIRCSTAT_TRIMCOAR_SHIFT)) & SCG_FIRCSTAT_TRIMCOAR_MASK) 15870 /*! @} */ 15871 15872 /*! @name ROSCCSR - RTC OSC Control Status Register */ 15873 /*! @{ */ 15874 #define SCG_ROSCCSR_ROSCCM_MASK (0x10000U) 15875 #define SCG_ROSCCSR_ROSCCM_SHIFT (16U) 15876 /*! ROSCCM - RTC OSC Clock Monitor 15877 * 0b0..RTC OSC Clock Monitor is disabled 15878 * 0b1..RTC OSC Clock Monitor is enabled 15879 */ 15880 #define SCG_ROSCCSR_ROSCCM(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCCM_SHIFT)) & SCG_ROSCCSR_ROSCCM_MASK) 15881 #define SCG_ROSCCSR_ROSCCMRE_MASK (0x20000U) 15882 #define SCG_ROSCCSR_ROSCCMRE_SHIFT (17U) 15883 /*! ROSCCMRE - RTC OSC Clock Monitor Reset Enable 15884 * 0b0..Clock Monitor generates interrupt when error detected 15885 * 0b1..Clock Monitor generates reset when error detected 15886 */ 15887 #define SCG_ROSCCSR_ROSCCMRE(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCCMRE_SHIFT)) & SCG_ROSCCSR_ROSCCMRE_MASK) 15888 #define SCG_ROSCCSR_LK_MASK (0x800000U) 15889 #define SCG_ROSCCSR_LK_SHIFT (23U) 15890 /*! LK - Lock Register 15891 * 0b0..Control Status Register can be written. 15892 * 0b1..Control Status Register cannot be written. 15893 */ 15894 #define SCG_ROSCCSR_LK(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_LK_SHIFT)) & SCG_ROSCCSR_LK_MASK) 15895 #define SCG_ROSCCSR_ROSCVLD_MASK (0x1000000U) 15896 #define SCG_ROSCCSR_ROSCVLD_SHIFT (24U) 15897 /*! ROSCVLD - RTC OSC Valid 15898 * 0b0..RTC OSC is not enabled or clock is not valid 15899 * 0b1..RTC OSC is enabled and output clock is valid 15900 */ 15901 #define SCG_ROSCCSR_ROSCVLD(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCVLD_SHIFT)) & SCG_ROSCCSR_ROSCVLD_MASK) 15902 #define SCG_ROSCCSR_ROSCSEL_MASK (0x2000000U) 15903 #define SCG_ROSCCSR_ROSCSEL_SHIFT (25U) 15904 /*! ROSCSEL - RTC OSC Selected 15905 * 0b0..RTC OSC is not the system clock source 15906 * 0b1..RTC OSC is the system clock source 15907 */ 15908 #define SCG_ROSCCSR_ROSCSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCSEL_SHIFT)) & SCG_ROSCCSR_ROSCSEL_MASK) 15909 #define SCG_ROSCCSR_ROSCERR_MASK (0x4000000U) 15910 #define SCG_ROSCCSR_ROSCERR_SHIFT (26U) 15911 /*! ROSCERR - RTC OSC Clock Error 15912 * 0b0..RTC OSC Clock Monitor is disabled or has not detected an error 15913 * 0b1..RTC OSC Clock Monitor is enabled and detected an RTC loss of clock error 15914 */ 15915 #define SCG_ROSCCSR_ROSCERR(x) (((uint32_t)(((uint32_t)(x)) << SCG_ROSCCSR_ROSCERR_SHIFT)) & SCG_ROSCCSR_ROSCERR_MASK) 15916 /*! @} */ 15917 15918 /*! @name LPFLLCSR - Low Power FLL Control Status Register */ 15919 /*! @{ */ 15920 #define SCG_LPFLLCSR_LPFLLEN_MASK (0x1U) 15921 #define SCG_LPFLLCSR_LPFLLEN_SHIFT (0U) 15922 /*! LPFLLEN - LPFLL Enable 15923 * 0b0..LPFLL is disabled 15924 * 0b1..LPFLL is enabled 15925 */ 15926 #define SCG_LPFLLCSR_LPFLLEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLEN_SHIFT)) & SCG_LPFLLCSR_LPFLLEN_MASK) 15927 #define SCG_LPFLLCSR_LPFLLSTEN_MASK (0x2U) 15928 #define SCG_LPFLLCSR_LPFLLSTEN_SHIFT (1U) 15929 /*! LPFLLSTEN - LPFLL Stop Enable 15930 * 0b0..LPFLL is disabled in Stop modes. 15931 * 0b1..LPFLL is enabled in Stop modes 15932 */ 15933 #define SCG_LPFLLCSR_LPFLLSTEN(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLSTEN_SHIFT)) & SCG_LPFLLCSR_LPFLLSTEN_MASK) 15934 #define SCG_LPFLLCSR_LPFLLTREN_MASK (0x100U) 15935 #define SCG_LPFLLCSR_LPFLLTREN_SHIFT (8U) 15936 /*! LPFLLTREN - LPFLL Trim Enable 15937 * 0b0..Disable trimming LPFLL to an reference clock source 15938 * 0b1..Enable trimming LPFLL to an reference clock source 15939 */ 15940 #define SCG_LPFLLCSR_LPFLLTREN(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTREN_SHIFT)) & SCG_LPFLLCSR_LPFLLTREN_MASK) 15941 #define SCG_LPFLLCSR_LPFLLTRUP_MASK (0x200U) 15942 #define SCG_LPFLLCSR_LPFLLTRUP_SHIFT (9U) 15943 /*! LPFLLTRUP - LPFLL Trim Update 15944 * 0b0..Disable LPFLL trimming updates. LPFLL frequency determined by AUTOTRIM written value. 15945 * 0b1..Enable LPFLL trimming updates. LPFLL frequency determined by reference clock multiplication 15946 */ 15947 #define SCG_LPFLLCSR_LPFLLTRUP(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTRUP_SHIFT)) & SCG_LPFLLCSR_LPFLLTRUP_MASK) 15948 #define SCG_LPFLLCSR_LPFLLTRMLOCK_MASK (0x400U) 15949 #define SCG_LPFLLCSR_LPFLLTRMLOCK_SHIFT (10U) 15950 /*! LPFLLTRMLOCK - LPFLL Trim LOCK 15951 * 0b0..LPFLL not locked 15952 * 0b1..LPFLL trimmed and locked 15953 */ 15954 #define SCG_LPFLLCSR_LPFLLTRMLOCK(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLTRMLOCK_SHIFT)) & SCG_LPFLLCSR_LPFLLTRMLOCK_MASK) 15955 #define SCG_LPFLLCSR_LPFLLCM_MASK (0x10000U) 15956 #define SCG_LPFLLCSR_LPFLLCM_SHIFT (16U) 15957 /*! LPFLLCM - LPFLL Clock Monitor 15958 * 0b0..LPFLL Clock Monitor is disabled 15959 * 0b1..LPFLL Clock Monitor is enabled 15960 */ 15961 #define SCG_LPFLLCSR_LPFLLCM(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLCM_SHIFT)) & SCG_LPFLLCSR_LPFLLCM_MASK) 15962 #define SCG_LPFLLCSR_LPFLLCMRE_MASK (0x20000U) 15963 #define SCG_LPFLLCSR_LPFLLCMRE_SHIFT (17U) 15964 /*! LPFLLCMRE - LPFLL Clock Monitor Reset Enable 15965 * 0b0..Clock Monitor generates interrupt when error detected 15966 * 0b1..Clock Monitor generates reset when error detected 15967 */ 15968 #define SCG_LPFLLCSR_LPFLLCMRE(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLCMRE_SHIFT)) & SCG_LPFLLCSR_LPFLLCMRE_MASK) 15969 #define SCG_LPFLLCSR_LK_MASK (0x800000U) 15970 #define SCG_LPFLLCSR_LK_SHIFT (23U) 15971 /*! LK - Lock Register 15972 * 0b0..Control Status Register can be written. 15973 * 0b1..Control Status Register cannot be written. 15974 */ 15975 #define SCG_LPFLLCSR_LK(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LK_SHIFT)) & SCG_LPFLLCSR_LK_MASK) 15976 #define SCG_LPFLLCSR_LPFLLVLD_MASK (0x1000000U) 15977 #define SCG_LPFLLCSR_LPFLLVLD_SHIFT (24U) 15978 /*! LPFLLVLD - LPFLL Valid 15979 * 0b0..LPFLL is not enabled or clock is not valid. 15980 * 0b1..LPFLL is enabled and output clock is valid. 15981 */ 15982 #define SCG_LPFLLCSR_LPFLLVLD(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLVLD_SHIFT)) & SCG_LPFLLCSR_LPFLLVLD_MASK) 15983 #define SCG_LPFLLCSR_LPFLLSEL_MASK (0x2000000U) 15984 #define SCG_LPFLLCSR_LPFLLSEL_SHIFT (25U) 15985 /*! LPFLLSEL - LPFLL Selected 15986 * 0b0..LPFLL is not the system clock source 15987 * 0b1..LPFLL is the system clock source 15988 */ 15989 #define SCG_LPFLLCSR_LPFLLSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLSEL_SHIFT)) & SCG_LPFLLCSR_LPFLLSEL_MASK) 15990 #define SCG_LPFLLCSR_LPFLLERR_MASK (0x4000000U) 15991 #define SCG_LPFLLCSR_LPFLLERR_SHIFT (26U) 15992 /*! LPFLLERR - LPFLL Clock Error 15993 * 0b0..Error not detected with the LPFLL trimming. 15994 * 0b1..Error detected with the LPFLL trimming. 15995 */ 15996 #define SCG_LPFLLCSR_LPFLLERR(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCSR_LPFLLERR_SHIFT)) & SCG_LPFLLCSR_LPFLLERR_MASK) 15997 /*! @} */ 15998 15999 /*! @name LPFLLDIV - Low Power FLL Divide Register */ 16000 /*! @{ */ 16001 #define SCG_LPFLLDIV_LPFLLDIV1_MASK (0x7U) 16002 #define SCG_LPFLLDIV_LPFLLDIV1_SHIFT (0U) 16003 /*! LPFLLDIV1 - LPFLL Clock Divide 1 16004 * 0b000..Output disabled 16005 * 0b001..Divide by 1 16006 * 0b010..Divide by 2 16007 * 0b011..Divide by 4 16008 * 0b100..Divide by 8 16009 * 0b101..Divide by 16 16010 * 0b110..Divide by 32 16011 * 0b111..Divide by 64 16012 */ 16013 #define SCG_LPFLLDIV_LPFLLDIV1(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV1_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV1_MASK) 16014 #define SCG_LPFLLDIV_LPFLLDIV2_MASK (0x700U) 16015 #define SCG_LPFLLDIV_LPFLLDIV2_SHIFT (8U) 16016 /*! LPFLLDIV2 - LPFLL Clock Divide 2 16017 * 0b000..Output disabled 16018 * 0b001..Divide by 1 16019 * 0b010..Divide by 2 16020 * 0b011..Divide by 4 16021 * 0b100..Divide by 8 16022 * 0b101..Divide by 16 16023 * 0b110..Divide by 32 16024 * 0b111..Divide by 64 16025 */ 16026 #define SCG_LPFLLDIV_LPFLLDIV2(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV2_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV2_MASK) 16027 #define SCG_LPFLLDIV_LPFLLDIV3_MASK (0x70000U) 16028 #define SCG_LPFLLDIV_LPFLLDIV3_SHIFT (16U) 16029 /*! LPFLLDIV3 - LPFLL Clock Divide 3 16030 * 0b000..Clock disabled 16031 * 0b001..Divide by 1 16032 * 0b010..Divide by 2 16033 * 0b011..Divide by 4 16034 * 0b100..Divide by 8 16035 * 0b101..Divide by 16 16036 * 0b110..Divide by 32 16037 * 0b111..Divide by 64 16038 */ 16039 #define SCG_LPFLLDIV_LPFLLDIV3(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLDIV_LPFLLDIV3_SHIFT)) & SCG_LPFLLDIV_LPFLLDIV3_MASK) 16040 /*! @} */ 16041 16042 /*! @name LPFLLCFG - Low Power FLL Configuration Register */ 16043 /*! @{ */ 16044 #define SCG_LPFLLCFG_FSEL_MASK (0x3U) 16045 #define SCG_LPFLLCFG_FSEL_SHIFT (0U) 16046 /*! FSEL - Frequency Select 16047 * 0b00..LPFLL is trimmed to 48 MHz. 16048 * 0b01..LPFLL is trimmed to 72 MHz. 16049 * 0b10..Reserved 16050 * 0b11..Reserved 16051 */ 16052 #define SCG_LPFLLCFG_FSEL(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLCFG_FSEL_SHIFT)) & SCG_LPFLLCFG_FSEL_MASK) 16053 /*! @} */ 16054 16055 /*! @name LPFLLTCFG - Low Power FLL Trim Configuration Register */ 16056 /*! @{ */ 16057 #define SCG_LPFLLTCFG_TRIMSRC_MASK (0x3U) 16058 #define SCG_LPFLLTCFG_TRIMSRC_SHIFT (0U) 16059 /*! TRIMSRC - Trim Source 16060 * 0b00..SIRC 16061 * 0b01..FIRC 16062 * 0b10..Reserved 16063 * 0b11..RTC OSC 16064 */ 16065 #define SCG_LPFLLTCFG_TRIMSRC(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_TRIMSRC_SHIFT)) & SCG_LPFLLTCFG_TRIMSRC_MASK) 16066 #define SCG_LPFLLTCFG_TRIMDIV_MASK (0x1F00U) 16067 #define SCG_LPFLLTCFG_TRIMDIV_SHIFT (8U) 16068 #define SCG_LPFLLTCFG_TRIMDIV(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_TRIMDIV_SHIFT)) & SCG_LPFLLTCFG_TRIMDIV_MASK) 16069 #define SCG_LPFLLTCFG_LOCKW2LSB_MASK (0x10000U) 16070 #define SCG_LPFLLTCFG_LOCKW2LSB_SHIFT (16U) 16071 /*! LOCKW2LSB - Lock LPFLL with 2 LSBS 16072 * 0b0..LPFLL locks within 1LSB (0.4%) 16073 * 0b1..LPFLL locks within 2LSB (0.8%) 16074 */ 16075 #define SCG_LPFLLTCFG_LOCKW2LSB(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLTCFG_LOCKW2LSB_SHIFT)) & SCG_LPFLLTCFG_LOCKW2LSB_MASK) 16076 /*! @} */ 16077 16078 /*! @name LPFLLSTAT - Low Power FLL Status Register */ 16079 /*! @{ */ 16080 #define SCG_LPFLLSTAT_AUTOTRIM_MASK (0xFFU) 16081 #define SCG_LPFLLSTAT_AUTOTRIM_SHIFT (0U) 16082 #define SCG_LPFLLSTAT_AUTOTRIM(x) (((uint32_t)(((uint32_t)(x)) << SCG_LPFLLSTAT_AUTOTRIM_SHIFT)) & SCG_LPFLLSTAT_AUTOTRIM_MASK) 16083 /*! @} */ 16084 16085 16086 /*! 16087 * @} 16088 */ /* end of group SCG_Register_Masks */ 16089 16090 16091 /* SCG - Peripheral instance base addresses */ 16092 /** Peripheral SCG base address */ 16093 #define SCG_BASE (0x4002C000u) 16094 /** Peripheral SCG base pointer */ 16095 #define SCG ((SCG_Type *)SCG_BASE) 16096 /** Array initializer of SCG peripheral base addresses */ 16097 #define SCG_BASE_ADDRS { SCG_BASE } 16098 /** Array initializer of SCG peripheral base pointers */ 16099 #define SCG_BASE_PTRS { SCG } 16100 /** Interrupt vectors for the SCG peripheral type */ 16101 #define SCG_IRQS { SCG_IRQn } 16102 16103 /*! 16104 * @} 16105 */ /* end of group SCG_Peripheral_Access_Layer */ 16106 16107 16108 /* ---------------------------------------------------------------------------- 16109 -- SEMA42 Peripheral Access Layer 16110 ---------------------------------------------------------------------------- */ 16111 16112 /*! 16113 * @addtogroup SEMA42_Peripheral_Access_Layer SEMA42 Peripheral Access Layer 16114 * @{ 16115 */ 16116 16117 /** SEMA42 - Register Layout Typedef */ 16118 typedef struct { 16119 __IO uint8_t GATE3; /**< Gate Register, offset: 0x0 */ 16120 __IO uint8_t GATE2; /**< Gate Register, offset: 0x1 */ 16121 __IO uint8_t GATE1; /**< Gate Register, offset: 0x2 */ 16122 __IO uint8_t GATE0; /**< Gate Register, offset: 0x3 */ 16123 __IO uint8_t GATE7; /**< Gate Register, offset: 0x4 */ 16124 __IO uint8_t GATE6; /**< Gate Register, offset: 0x5 */ 16125 __IO uint8_t GATE5; /**< Gate Register, offset: 0x6 */ 16126 __IO uint8_t GATE4; /**< Gate Register, offset: 0x7 */ 16127 __IO uint8_t GATE11; /**< Gate Register, offset: 0x8 */ 16128 __IO uint8_t GATE10; /**< Gate Register, offset: 0x9 */ 16129 __IO uint8_t GATE9; /**< Gate Register, offset: 0xA */ 16130 __IO uint8_t GATE8; /**< Gate Register, offset: 0xB */ 16131 __IO uint8_t GATE15; /**< Gate Register, offset: 0xC */ 16132 __IO uint8_t GATE14; /**< Gate Register, offset: 0xD */ 16133 __IO uint8_t GATE13; /**< Gate Register, offset: 0xE */ 16134 __IO uint8_t GATE12; /**< Gate Register, offset: 0xF */ 16135 uint8_t RESERVED_0[50]; 16136 union { /* offset: 0x42 */ 16137 __I uint16_t RSTGT_R; /**< Reset Gate Read, offset: 0x42 */ 16138 __O uint16_t RSTGT_W; /**< Reset Gate Write, offset: 0x42 */ 16139 }; 16140 } SEMA42_Type; 16141 16142 /* ---------------------------------------------------------------------------- 16143 -- SEMA42 Register Masks 16144 ---------------------------------------------------------------------------- */ 16145 16146 /*! 16147 * @addtogroup SEMA42_Register_Masks SEMA42 Register Masks 16148 * @{ 16149 */ 16150 16151 /*! @name GATE3 - Gate Register */ 16152 /*! @{ */ 16153 #define SEMA42_GATE3_GTFSM_MASK (0xFU) 16154 #define SEMA42_GATE3_GTFSM_SHIFT (0U) 16155 /*! GTFSM - GTFSM 16156 * 0b0000..The gate is unlocked (free). 16157 * 0b0001..The gate has been locked by processor 0. 16158 * 0b0010..The gate has been locked by processor 1. 16159 * 0b0011..The gate has been locked by processor 2. 16160 * 0b0100..The gate has been locked by processor 3. 16161 * 0b0101..The gate has been locked by processor 4. 16162 * 0b0110..The gate has been locked by processor 5. 16163 * 0b0111..The gate has been locked by processor 6. 16164 * 0b1000..The gate has been locked by processor 7. 16165 * 0b1001..The gate has been locked by processor 8. 16166 * 0b1010..The gate has been locked by processor 9. 16167 * 0b1011..The gate has been locked by processor 10. 16168 * 0b1100..The gate has been locked by processor 11. 16169 * 0b1101..The gate has been locked by processor 12. 16170 * 0b1110..The gate has been locked by processor 13. 16171 * 0b1111..The gate has been locked by processor 14. 16172 */ 16173 #define SEMA42_GATE3_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE3_GTFSM_SHIFT)) & SEMA42_GATE3_GTFSM_MASK) 16174 /*! @} */ 16175 16176 /*! @name GATE2 - Gate Register */ 16177 /*! @{ */ 16178 #define SEMA42_GATE2_GTFSM_MASK (0xFU) 16179 #define SEMA42_GATE2_GTFSM_SHIFT (0U) 16180 /*! GTFSM - GTFSM 16181 * 0b0000..The gate is unlocked (free). 16182 * 0b0001..The gate has been locked by processor 0. 16183 * 0b0010..The gate has been locked by processor 1. 16184 * 0b0011..The gate has been locked by processor 2. 16185 * 0b0100..The gate has been locked by processor 3. 16186 * 0b0101..The gate has been locked by processor 4. 16187 * 0b0110..The gate has been locked by processor 5. 16188 * 0b0111..The gate has been locked by processor 6. 16189 * 0b1000..The gate has been locked by processor 7. 16190 * 0b1001..The gate has been locked by processor 8. 16191 * 0b1010..The gate has been locked by processor 9. 16192 * 0b1011..The gate has been locked by processor 10. 16193 * 0b1100..The gate has been locked by processor 11. 16194 * 0b1101..The gate has been locked by processor 12. 16195 * 0b1110..The gate has been locked by processor 13. 16196 * 0b1111..The gate has been locked by processor 14. 16197 */ 16198 #define SEMA42_GATE2_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE2_GTFSM_SHIFT)) & SEMA42_GATE2_GTFSM_MASK) 16199 /*! @} */ 16200 16201 /*! @name GATE1 - Gate Register */ 16202 /*! @{ */ 16203 #define SEMA42_GATE1_GTFSM_MASK (0xFU) 16204 #define SEMA42_GATE1_GTFSM_SHIFT (0U) 16205 /*! GTFSM - GTFSM 16206 * 0b0000..The gate is unlocked (free). 16207 * 0b0001..The gate has been locked by processor 0. 16208 * 0b0010..The gate has been locked by processor 1. 16209 * 0b0011..The gate has been locked by processor 2. 16210 * 0b0100..The gate has been locked by processor 3. 16211 * 0b0101..The gate has been locked by processor 4. 16212 * 0b0110..The gate has been locked by processor 5. 16213 * 0b0111..The gate has been locked by processor 6. 16214 * 0b1000..The gate has been locked by processor 7. 16215 * 0b1001..The gate has been locked by processor 8. 16216 * 0b1010..The gate has been locked by processor 9. 16217 * 0b1011..The gate has been locked by processor 10. 16218 * 0b1100..The gate has been locked by processor 11. 16219 * 0b1101..The gate has been locked by processor 12. 16220 * 0b1110..The gate has been locked by processor 13. 16221 * 0b1111..The gate has been locked by processor 14. 16222 */ 16223 #define SEMA42_GATE1_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE1_GTFSM_SHIFT)) & SEMA42_GATE1_GTFSM_MASK) 16224 /*! @} */ 16225 16226 /*! @name GATE0 - Gate Register */ 16227 /*! @{ */ 16228 #define SEMA42_GATE0_GTFSM_MASK (0xFU) 16229 #define SEMA42_GATE0_GTFSM_SHIFT (0U) 16230 /*! GTFSM - GTFSM 16231 * 0b0000..The gate is unlocked (free). 16232 * 0b0001..The gate has been locked by processor 0. 16233 * 0b0010..The gate has been locked by processor 1. 16234 * 0b0011..The gate has been locked by processor 2. 16235 * 0b0100..The gate has been locked by processor 3. 16236 * 0b0101..The gate has been locked by processor 4. 16237 * 0b0110..The gate has been locked by processor 5. 16238 * 0b0111..The gate has been locked by processor 6. 16239 * 0b1000..The gate has been locked by processor 7. 16240 * 0b1001..The gate has been locked by processor 8. 16241 * 0b1010..The gate has been locked by processor 9. 16242 * 0b1011..The gate has been locked by processor 10. 16243 * 0b1100..The gate has been locked by processor 11. 16244 * 0b1101..The gate has been locked by processor 12. 16245 * 0b1110..The gate has been locked by processor 13. 16246 * 0b1111..The gate has been locked by processor 14. 16247 */ 16248 #define SEMA42_GATE0_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE0_GTFSM_SHIFT)) & SEMA42_GATE0_GTFSM_MASK) 16249 /*! @} */ 16250 16251 /*! @name GATE7 - Gate Register */ 16252 /*! @{ */ 16253 #define SEMA42_GATE7_GTFSM_MASK (0xFU) 16254 #define SEMA42_GATE7_GTFSM_SHIFT (0U) 16255 /*! GTFSM - GTFSM 16256 * 0b0000..The gate is unlocked (free). 16257 * 0b0001..The gate has been locked by processor 0. 16258 * 0b0010..The gate has been locked by processor 1. 16259 * 0b0011..The gate has been locked by processor 2. 16260 * 0b0100..The gate has been locked by processor 3. 16261 * 0b0101..The gate has been locked by processor 4. 16262 * 0b0110..The gate has been locked by processor 5. 16263 * 0b0111..The gate has been locked by processor 6. 16264 * 0b1000..The gate has been locked by processor 7. 16265 * 0b1001..The gate has been locked by processor 8. 16266 * 0b1010..The gate has been locked by processor 9. 16267 * 0b1011..The gate has been locked by processor 10. 16268 * 0b1100..The gate has been locked by processor 11. 16269 * 0b1101..The gate has been locked by processor 12. 16270 * 0b1110..The gate has been locked by processor 13. 16271 * 0b1111..The gate has been locked by processor 14. 16272 */ 16273 #define SEMA42_GATE7_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE7_GTFSM_SHIFT)) & SEMA42_GATE7_GTFSM_MASK) 16274 /*! @} */ 16275 16276 /*! @name GATE6 - Gate Register */ 16277 /*! @{ */ 16278 #define SEMA42_GATE6_GTFSM_MASK (0xFU) 16279 #define SEMA42_GATE6_GTFSM_SHIFT (0U) 16280 /*! GTFSM - GTFSM 16281 * 0b0000..The gate is unlocked (free). 16282 * 0b0001..The gate has been locked by processor 0. 16283 * 0b0010..The gate has been locked by processor 1. 16284 * 0b0011..The gate has been locked by processor 2. 16285 * 0b0100..The gate has been locked by processor 3. 16286 * 0b0101..The gate has been locked by processor 4. 16287 * 0b0110..The gate has been locked by processor 5. 16288 * 0b0111..The gate has been locked by processor 6. 16289 * 0b1000..The gate has been locked by processor 7. 16290 * 0b1001..The gate has been locked by processor 8. 16291 * 0b1010..The gate has been locked by processor 9. 16292 * 0b1011..The gate has been locked by processor 10. 16293 * 0b1100..The gate has been locked by processor 11. 16294 * 0b1101..The gate has been locked by processor 12. 16295 * 0b1110..The gate has been locked by processor 13. 16296 * 0b1111..The gate has been locked by processor 14. 16297 */ 16298 #define SEMA42_GATE6_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE6_GTFSM_SHIFT)) & SEMA42_GATE6_GTFSM_MASK) 16299 /*! @} */ 16300 16301 /*! @name GATE5 - Gate Register */ 16302 /*! @{ */ 16303 #define SEMA42_GATE5_GTFSM_MASK (0xFU) 16304 #define SEMA42_GATE5_GTFSM_SHIFT (0U) 16305 /*! GTFSM - GTFSM 16306 * 0b0000..The gate is unlocked (free). 16307 * 0b0001..The gate has been locked by processor 0. 16308 * 0b0010..The gate has been locked by processor 1. 16309 * 0b0011..The gate has been locked by processor 2. 16310 * 0b0100..The gate has been locked by processor 3. 16311 * 0b0101..The gate has been locked by processor 4. 16312 * 0b0110..The gate has been locked by processor 5. 16313 * 0b0111..The gate has been locked by processor 6. 16314 * 0b1000..The gate has been locked by processor 7. 16315 * 0b1001..The gate has been locked by processor 8. 16316 * 0b1010..The gate has been locked by processor 9. 16317 * 0b1011..The gate has been locked by processor 10. 16318 * 0b1100..The gate has been locked by processor 11. 16319 * 0b1101..The gate has been locked by processor 12. 16320 * 0b1110..The gate has been locked by processor 13. 16321 * 0b1111..The gate has been locked by processor 14. 16322 */ 16323 #define SEMA42_GATE5_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE5_GTFSM_SHIFT)) & SEMA42_GATE5_GTFSM_MASK) 16324 /*! @} */ 16325 16326 /*! @name GATE4 - Gate Register */ 16327 /*! @{ */ 16328 #define SEMA42_GATE4_GTFSM_MASK (0xFU) 16329 #define SEMA42_GATE4_GTFSM_SHIFT (0U) 16330 /*! GTFSM - GTFSM 16331 * 0b0000..The gate is unlocked (free). 16332 * 0b0001..The gate has been locked by processor 0. 16333 * 0b0010..The gate has been locked by processor 1. 16334 * 0b0011..The gate has been locked by processor 2. 16335 * 0b0100..The gate has been locked by processor 3. 16336 * 0b0101..The gate has been locked by processor 4. 16337 * 0b0110..The gate has been locked by processor 5. 16338 * 0b0111..The gate has been locked by processor 6. 16339 * 0b1000..The gate has been locked by processor 7. 16340 * 0b1001..The gate has been locked by processor 8. 16341 * 0b1010..The gate has been locked by processor 9. 16342 * 0b1011..The gate has been locked by processor 10. 16343 * 0b1100..The gate has been locked by processor 11. 16344 * 0b1101..The gate has been locked by processor 12. 16345 * 0b1110..The gate has been locked by processor 13. 16346 * 0b1111..The gate has been locked by processor 14. 16347 */ 16348 #define SEMA42_GATE4_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE4_GTFSM_SHIFT)) & SEMA42_GATE4_GTFSM_MASK) 16349 /*! @} */ 16350 16351 /*! @name GATE11 - Gate Register */ 16352 /*! @{ */ 16353 #define SEMA42_GATE11_GTFSM_MASK (0xFU) 16354 #define SEMA42_GATE11_GTFSM_SHIFT (0U) 16355 /*! GTFSM - GTFSM 16356 * 0b0000..The gate is unlocked (free). 16357 * 0b0001..The gate has been locked by processor 0. 16358 * 0b0010..The gate has been locked by processor 1. 16359 * 0b0011..The gate has been locked by processor 2. 16360 * 0b0100..The gate has been locked by processor 3. 16361 * 0b0101..The gate has been locked by processor 4. 16362 * 0b0110..The gate has been locked by processor 5. 16363 * 0b0111..The gate has been locked by processor 6. 16364 * 0b1000..The gate has been locked by processor 7. 16365 * 0b1001..The gate has been locked by processor 8. 16366 * 0b1010..The gate has been locked by processor 9. 16367 * 0b1011..The gate has been locked by processor 10. 16368 * 0b1100..The gate has been locked by processor 11. 16369 * 0b1101..The gate has been locked by processor 12. 16370 * 0b1110..The gate has been locked by processor 13. 16371 * 0b1111..The gate has been locked by processor 14. 16372 */ 16373 #define SEMA42_GATE11_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE11_GTFSM_SHIFT)) & SEMA42_GATE11_GTFSM_MASK) 16374 /*! @} */ 16375 16376 /*! @name GATE10 - Gate Register */ 16377 /*! @{ */ 16378 #define SEMA42_GATE10_GTFSM_MASK (0xFU) 16379 #define SEMA42_GATE10_GTFSM_SHIFT (0U) 16380 /*! GTFSM - GTFSM 16381 * 0b0000..The gate is unlocked (free). 16382 * 0b0001..The gate has been locked by processor 0. 16383 * 0b0010..The gate has been locked by processor 1. 16384 * 0b0011..The gate has been locked by processor 2. 16385 * 0b0100..The gate has been locked by processor 3. 16386 * 0b0101..The gate has been locked by processor 4. 16387 * 0b0110..The gate has been locked by processor 5. 16388 * 0b0111..The gate has been locked by processor 6. 16389 * 0b1000..The gate has been locked by processor 7. 16390 * 0b1001..The gate has been locked by processor 8. 16391 * 0b1010..The gate has been locked by processor 9. 16392 * 0b1011..The gate has been locked by processor 10. 16393 * 0b1100..The gate has been locked by processor 11. 16394 * 0b1101..The gate has been locked by processor 12. 16395 * 0b1110..The gate has been locked by processor 13. 16396 * 0b1111..The gate has been locked by processor 14. 16397 */ 16398 #define SEMA42_GATE10_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE10_GTFSM_SHIFT)) & SEMA42_GATE10_GTFSM_MASK) 16399 /*! @} */ 16400 16401 /*! @name GATE9 - Gate Register */ 16402 /*! @{ */ 16403 #define SEMA42_GATE9_GTFSM_MASK (0xFU) 16404 #define SEMA42_GATE9_GTFSM_SHIFT (0U) 16405 /*! GTFSM - GTFSM 16406 * 0b0000..The gate is unlocked (free). 16407 * 0b0001..The gate has been locked by processor 0. 16408 * 0b0010..The gate has been locked by processor 1. 16409 * 0b0011..The gate has been locked by processor 2. 16410 * 0b0100..The gate has been locked by processor 3. 16411 * 0b0101..The gate has been locked by processor 4. 16412 * 0b0110..The gate has been locked by processor 5. 16413 * 0b0111..The gate has been locked by processor 6. 16414 * 0b1000..The gate has been locked by processor 7. 16415 * 0b1001..The gate has been locked by processor 8. 16416 * 0b1010..The gate has been locked by processor 9. 16417 * 0b1011..The gate has been locked by processor 10. 16418 * 0b1100..The gate has been locked by processor 11. 16419 * 0b1101..The gate has been locked by processor 12. 16420 * 0b1110..The gate has been locked by processor 13. 16421 * 0b1111..The gate has been locked by processor 14. 16422 */ 16423 #define SEMA42_GATE9_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE9_GTFSM_SHIFT)) & SEMA42_GATE9_GTFSM_MASK) 16424 /*! @} */ 16425 16426 /*! @name GATE8 - Gate Register */ 16427 /*! @{ */ 16428 #define SEMA42_GATE8_GTFSM_MASK (0xFU) 16429 #define SEMA42_GATE8_GTFSM_SHIFT (0U) 16430 /*! GTFSM - GTFSM 16431 * 0b0000..The gate is unlocked (free). 16432 * 0b0001..The gate has been locked by processor 0. 16433 * 0b0010..The gate has been locked by processor 1. 16434 * 0b0011..The gate has been locked by processor 2. 16435 * 0b0100..The gate has been locked by processor 3. 16436 * 0b0101..The gate has been locked by processor 4. 16437 * 0b0110..The gate has been locked by processor 5. 16438 * 0b0111..The gate has been locked by processor 6. 16439 * 0b1000..The gate has been locked by processor 7. 16440 * 0b1001..The gate has been locked by processor 8. 16441 * 0b1010..The gate has been locked by processor 9. 16442 * 0b1011..The gate has been locked by processor 10. 16443 * 0b1100..The gate has been locked by processor 11. 16444 * 0b1101..The gate has been locked by processor 12. 16445 * 0b1110..The gate has been locked by processor 13. 16446 * 0b1111..The gate has been locked by processor 14. 16447 */ 16448 #define SEMA42_GATE8_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE8_GTFSM_SHIFT)) & SEMA42_GATE8_GTFSM_MASK) 16449 /*! @} */ 16450 16451 /*! @name GATE15 - Gate Register */ 16452 /*! @{ */ 16453 #define SEMA42_GATE15_GTFSM_MASK (0xFU) 16454 #define SEMA42_GATE15_GTFSM_SHIFT (0U) 16455 /*! GTFSM - GTFSM 16456 * 0b0000..The gate is unlocked (free). 16457 * 0b0001..The gate has been locked by processor 0. 16458 * 0b0010..The gate has been locked by processor 1. 16459 * 0b0011..The gate has been locked by processor 2. 16460 * 0b0100..The gate has been locked by processor 3. 16461 * 0b0101..The gate has been locked by processor 4. 16462 * 0b0110..The gate has been locked by processor 5. 16463 * 0b0111..The gate has been locked by processor 6. 16464 * 0b1000..The gate has been locked by processor 7. 16465 * 0b1001..The gate has been locked by processor 8. 16466 * 0b1010..The gate has been locked by processor 9. 16467 * 0b1011..The gate has been locked by processor 10. 16468 * 0b1100..The gate has been locked by processor 11. 16469 * 0b1101..The gate has been locked by processor 12. 16470 * 0b1110..The gate has been locked by processor 13. 16471 * 0b1111..The gate has been locked by processor 14. 16472 */ 16473 #define SEMA42_GATE15_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE15_GTFSM_SHIFT)) & SEMA42_GATE15_GTFSM_MASK) 16474 /*! @} */ 16475 16476 /*! @name GATE14 - Gate Register */ 16477 /*! @{ */ 16478 #define SEMA42_GATE14_GTFSM_MASK (0xFU) 16479 #define SEMA42_GATE14_GTFSM_SHIFT (0U) 16480 /*! GTFSM - GTFSM 16481 * 0b0000..The gate is unlocked (free). 16482 * 0b0001..The gate has been locked by processor 0. 16483 * 0b0010..The gate has been locked by processor 1. 16484 * 0b0011..The gate has been locked by processor 2. 16485 * 0b0100..The gate has been locked by processor 3. 16486 * 0b0101..The gate has been locked by processor 4. 16487 * 0b0110..The gate has been locked by processor 5. 16488 * 0b0111..The gate has been locked by processor 6. 16489 * 0b1000..The gate has been locked by processor 7. 16490 * 0b1001..The gate has been locked by processor 8. 16491 * 0b1010..The gate has been locked by processor 9. 16492 * 0b1011..The gate has been locked by processor 10. 16493 * 0b1100..The gate has been locked by processor 11. 16494 * 0b1101..The gate has been locked by processor 12. 16495 * 0b1110..The gate has been locked by processor 13. 16496 * 0b1111..The gate has been locked by processor 14. 16497 */ 16498 #define SEMA42_GATE14_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE14_GTFSM_SHIFT)) & SEMA42_GATE14_GTFSM_MASK) 16499 /*! @} */ 16500 16501 /*! @name GATE13 - Gate Register */ 16502 /*! @{ */ 16503 #define SEMA42_GATE13_GTFSM_MASK (0xFU) 16504 #define SEMA42_GATE13_GTFSM_SHIFT (0U) 16505 /*! GTFSM - GTFSM 16506 * 0b0000..The gate is unlocked (free). 16507 * 0b0001..The gate has been locked by processor 0. 16508 * 0b0010..The gate has been locked by processor 1. 16509 * 0b0011..The gate has been locked by processor 2. 16510 * 0b0100..The gate has been locked by processor 3. 16511 * 0b0101..The gate has been locked by processor 4. 16512 * 0b0110..The gate has been locked by processor 5. 16513 * 0b0111..The gate has been locked by processor 6. 16514 * 0b1000..The gate has been locked by processor 7. 16515 * 0b1001..The gate has been locked by processor 8. 16516 * 0b1010..The gate has been locked by processor 9. 16517 * 0b1011..The gate has been locked by processor 10. 16518 * 0b1100..The gate has been locked by processor 11. 16519 * 0b1101..The gate has been locked by processor 12. 16520 * 0b1110..The gate has been locked by processor 13. 16521 * 0b1111..The gate has been locked by processor 14. 16522 */ 16523 #define SEMA42_GATE13_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE13_GTFSM_SHIFT)) & SEMA42_GATE13_GTFSM_MASK) 16524 /*! @} */ 16525 16526 /*! @name GATE12 - Gate Register */ 16527 /*! @{ */ 16528 #define SEMA42_GATE12_GTFSM_MASK (0xFU) 16529 #define SEMA42_GATE12_GTFSM_SHIFT (0U) 16530 /*! GTFSM - GTFSM 16531 * 0b0000..The gate is unlocked (free). 16532 * 0b0001..The gate has been locked by processor 0. 16533 * 0b0010..The gate has been locked by processor 1. 16534 * 0b0011..The gate has been locked by processor 2. 16535 * 0b0100..The gate has been locked by processor 3. 16536 * 0b0101..The gate has been locked by processor 4. 16537 * 0b0110..The gate has been locked by processor 5. 16538 * 0b0111..The gate has been locked by processor 6. 16539 * 0b1000..The gate has been locked by processor 7. 16540 * 0b1001..The gate has been locked by processor 8. 16541 * 0b1010..The gate has been locked by processor 9. 16542 * 0b1011..The gate has been locked by processor 10. 16543 * 0b1100..The gate has been locked by processor 11. 16544 * 0b1101..The gate has been locked by processor 12. 16545 * 0b1110..The gate has been locked by processor 13. 16546 * 0b1111..The gate has been locked by processor 14. 16547 */ 16548 #define SEMA42_GATE12_GTFSM(x) (((uint8_t)(((uint8_t)(x)) << SEMA42_GATE12_GTFSM_SHIFT)) & SEMA42_GATE12_GTFSM_MASK) 16549 /*! @} */ 16550 16551 /*! @name RSTGT_R - Reset Gate Read */ 16552 /*! @{ */ 16553 #define SEMA42_RSTGT_R_RSTGTN_MASK (0xFFU) 16554 #define SEMA42_RSTGT_R_RSTGTN_SHIFT (0U) 16555 #define SEMA42_RSTGT_R_RSTGTN(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGTN_SHIFT)) & SEMA42_RSTGT_R_RSTGTN_MASK) 16556 #define SEMA42_RSTGT_R_RSTGMS_MASK (0xF00U) 16557 #define SEMA42_RSTGT_R_RSTGMS_SHIFT (8U) 16558 #define SEMA42_RSTGT_R_RSTGMS(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGMS_SHIFT)) & SEMA42_RSTGT_R_RSTGMS_MASK) 16559 #define SEMA42_RSTGT_R_RSTGSM_MASK (0x3000U) 16560 #define SEMA42_RSTGT_R_RSTGSM_SHIFT (12U) 16561 /*! RSTGSM - RSTGSM 16562 * 0b00..Idle, waiting for the first data pattern write. 16563 * 0b01..Waiting for the second data pattern write. 16564 * 0b10..The 2-write sequence has completed. Generate the specified gate reset(s). After the reset is performed, 16565 * this machine returns to the idle (waiting for first data pattern write) state. The "01" state persists 16566 * for only one clock cycle. Software cannot observe this state. 16567 * 0b11..This state encoding is never used and therefore reserved. 16568 */ 16569 #define SEMA42_RSTGT_R_RSTGSM(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_RSTGSM_SHIFT)) & SEMA42_RSTGT_R_RSTGSM_MASK) 16570 #define SEMA42_RSTGT_R_ROZ_MASK (0xC000U) 16571 #define SEMA42_RSTGT_R_ROZ_SHIFT (14U) 16572 #define SEMA42_RSTGT_R_ROZ(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_R_ROZ_SHIFT)) & SEMA42_RSTGT_R_ROZ_MASK) 16573 /*! @} */ 16574 16575 /*! @name RSTGT_W - Reset Gate Write */ 16576 /*! @{ */ 16577 #define SEMA42_RSTGT_W_RSTGTN_MASK (0xFFU) 16578 #define SEMA42_RSTGT_W_RSTGTN_SHIFT (0U) 16579 #define SEMA42_RSTGT_W_RSTGTN(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_W_RSTGTN_SHIFT)) & SEMA42_RSTGT_W_RSTGTN_MASK) 16580 #define SEMA42_RSTGT_W_RSTGDP_MASK (0xFF00U) 16581 #define SEMA42_RSTGT_W_RSTGDP_SHIFT (8U) 16582 #define SEMA42_RSTGT_W_RSTGDP(x) (((uint16_t)(((uint16_t)(x)) << SEMA42_RSTGT_W_RSTGDP_SHIFT)) & SEMA42_RSTGT_W_RSTGDP_MASK) 16583 /*! @} */ 16584 16585 16586 /*! 16587 * @} 16588 */ /* end of group SEMA42_Register_Masks */ 16589 16590 16591 /* SEMA42 - Peripheral instance base addresses */ 16592 /** Peripheral SEMA420 base address */ 16593 #define SEMA420_BASE (0x4001B000u) 16594 /** Peripheral SEMA420 base pointer */ 16595 #define SEMA420 ((SEMA42_Type *)SEMA420_BASE) 16596 /** Peripheral SEMA421 base address */ 16597 #define SEMA421_BASE (0x4101B000u) 16598 /** Peripheral SEMA421 base pointer */ 16599 #define SEMA421 ((SEMA42_Type *)SEMA421_BASE) 16600 /** Array initializer of SEMA42 peripheral base addresses */ 16601 #define SEMA42_BASE_ADDRS { SEMA420_BASE, SEMA421_BASE } 16602 /** Array initializer of SEMA42 peripheral base pointers */ 16603 #define SEMA42_BASE_PTRS { SEMA420, SEMA421 } 16604 16605 /*! 16606 * @} 16607 */ /* end of group SEMA42_Peripheral_Access_Layer */ 16608 16609 16610 /* ---------------------------------------------------------------------------- 16611 -- SIM Peripheral Access Layer 16612 ---------------------------------------------------------------------------- */ 16613 16614 /*! 16615 * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer 16616 * @{ 16617 */ 16618 16619 /** SIM - Register Layout Typedef */ 16620 typedef struct { 16621 uint8_t RESERVED_0[4]; 16622 __IO uint32_t CHIPCTRL; /**< Chip Control Register, offset: 0x4 */ 16623 uint8_t RESERVED_1[28]; 16624 __IO uint32_t SDID; /**< System Device Identification Register, offset: 0x24 */ 16625 uint8_t RESERVED_2[36]; 16626 __IO uint32_t FCFG1; /**< Flash Configuration Register 1, offset: 0x4C */ 16627 __I uint32_t FCFG2; /**< Flash Configuration Register 2, offset: 0x50 */ 16628 uint8_t RESERVED_3[4]; 16629 __I uint32_t UIDH; /**< Unique Identification Register High, offset: 0x58 */ 16630 __I uint32_t UIDM; /**< Unique Identification Register Mid Middle, offset: 0x5C */ 16631 __I uint32_t UIDL; /**< Unique Identification Register Mid Low, offset: 0x60 */ 16632 uint8_t RESERVED_4[12]; 16633 __IO uint32_t MISC2; /**< MISC2 Register, offset: 0x70 */ 16634 } SIM_Type; 16635 16636 /* ---------------------------------------------------------------------------- 16637 -- SIM Register Masks 16638 ---------------------------------------------------------------------------- */ 16639 16640 /*! 16641 * @addtogroup SIM_Register_Masks SIM Register Masks 16642 * @{ 16643 */ 16644 16645 /*! @name CHIPCTRL - Chip Control Register */ 16646 /*! @{ */ 16647 #define SIM_CHIPCTRL_FBSL_MASK (0x300U) 16648 #define SIM_CHIPCTRL_FBSL_SHIFT (8U) 16649 /*! FBSL - FLEXBUS security level 16650 * 0b00..All off-chip access(instruction and data) via the Flexbus or sdram are disallowed 16651 * 0b01..All off-chip access(instruction and data) via the Flexbus or sdram are disallowed 16652 * 0b10..off-chip instruction access are disallowed, data access are allowed 16653 * 0b11..off-chip instruction access and data access are allowed 16654 */ 16655 #define SIM_CHIPCTRL_FBSL(x) (((uint32_t)(((uint32_t)(x)) << SIM_CHIPCTRL_FBSL_SHIFT)) & SIM_CHIPCTRL_FBSL_MASK) 16656 /*! @} */ 16657 16658 /*! @name SDID - System Device Identification Register */ 16659 /*! @{ */ 16660 #define SIM_SDID_PINID_MASK (0xFU) 16661 #define SIM_SDID_PINID_SHIFT (0U) 16662 /*! PINID - PINID 16663 * 0b1000..176-pin 16664 */ 16665 #define SIM_SDID_PINID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PINID_SHIFT)) & SIM_SDID_PINID_MASK) 16666 #define SIM_SDID_DIEID_MASK (0xF80U) 16667 #define SIM_SDID_DIEID_SHIFT (7U) 16668 #define SIM_SDID_DIEID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DIEID_SHIFT)) & SIM_SDID_DIEID_MASK) 16669 #define SIM_SDID_REVID_MASK (0xF000U) 16670 #define SIM_SDID_REVID_SHIFT (12U) 16671 #define SIM_SDID_REVID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK) 16672 #define SIM_SDID_SERIESID_MASK (0xF00000U) 16673 #define SIM_SDID_SERIESID_SHIFT (20U) 16674 #define SIM_SDID_SERIESID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SERIESID_SHIFT)) & SIM_SDID_SERIESID_MASK) 16675 #define SIM_SDID_SUBFAMID_MASK (0xF000000U) 16676 #define SIM_SDID_SUBFAMID_SHIFT (24U) 16677 /*! SUBFAMID - SUBFAMID 16678 * 0b0000..L3A 16679 */ 16680 #define SIM_SDID_SUBFAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBFAMID_SHIFT)) & SIM_SDID_SUBFAMID_MASK) 16681 #define SIM_SDID_FAMID_MASK (0xF0000000U) 16682 #define SIM_SDID_FAMID_SHIFT (28U) 16683 /*! FAMID - FAMID 16684 * 0b0000..K32 16685 */ 16686 #define SIM_SDID_FAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMID_SHIFT)) & SIM_SDID_FAMID_MASK) 16687 /*! @} */ 16688 16689 /*! @name FCFG1 - Flash Configuration Register 1 */ 16690 /*! @{ */ 16691 #define SIM_FCFG1_FLASHDIS_MASK (0x1U) 16692 #define SIM_FCFG1_FLASHDIS_SHIFT (0U) 16693 /*! FLASHDIS - Flash disable 16694 * 0b0..Flash is enabled 16695 * 0b1..Flash is disabled 16696 */ 16697 #define SIM_FCFG1_FLASHDIS(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDIS_SHIFT)) & SIM_FCFG1_FLASHDIS_MASK) 16698 #define SIM_FCFG1_FLASHDOZE_MASK (0x2U) 16699 #define SIM_FCFG1_FLASHDOZE_SHIFT (1U) 16700 /*! FLASHDOZE - Flash Doze 16701 * 0b0..Flash remains enabled during Doze mode 16702 * 0b1..Flash is disabled for the duration of Doze mode 16703 */ 16704 #define SIM_FCFG1_FLASHDOZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDOZE_SHIFT)) & SIM_FCFG1_FLASHDOZE_MASK) 16705 #define SIM_FCFG1_FLSAUTODISEN_MASK (0x4U) 16706 #define SIM_FCFG1_FLSAUTODISEN_SHIFT (2U) 16707 /*! FLSAUTODISEN - Flash auto disable enabled. 16708 * 0b0..Disable flash auto disable function 16709 * 0b1..Enable flash auto disable function 16710 */ 16711 #define SIM_FCFG1_FLSAUTODISEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLSAUTODISEN_SHIFT)) & SIM_FCFG1_FLSAUTODISEN_MASK) 16712 #define SIM_FCFG1_FLSAUTODISWD_MASK (0x3FF8U) 16713 #define SIM_FCFG1_FLSAUTODISWD_SHIFT (3U) 16714 #define SIM_FCFG1_FLSAUTODISWD(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLSAUTODISWD_SHIFT)) & SIM_FCFG1_FLSAUTODISWD_MASK) 16715 #define SIM_FCFG1_CORE1_SRAMSIZE_MASK (0xF0000U) 16716 #define SIM_FCFG1_CORE1_SRAMSIZE_SHIFT (16U) 16717 /*! CORE1_SRAMSIZE 16718 * 0b1001..CM0+ has 128 KB SRAM 16719 */ 16720 #define SIM_FCFG1_CORE1_SRAMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE1_SRAMSIZE_SHIFT)) & SIM_FCFG1_CORE1_SRAMSIZE_MASK) 16721 #define SIM_FCFG1_CORE0_SRAMSIZE_MASK (0xF00000U) 16722 #define SIM_FCFG1_CORE0_SRAMSIZE_SHIFT (20U) 16723 /*! CORE0_SRAMSIZE 16724 * 0b1010..CM4 has 256 KB SRAM 16725 */ 16726 #define SIM_FCFG1_CORE0_SRAMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE0_SRAMSIZE_SHIFT)) & SIM_FCFG1_CORE0_SRAMSIZE_MASK) 16727 #define SIM_FCFG1_CORE1_PFSIZE_MASK (0xF000000U) 16728 #define SIM_FCFG1_CORE1_PFSIZE_SHIFT (24U) 16729 /*! CORE1_PFSIZE 16730 * 0b1010..CM0+ has 256 KB flash size. 16731 */ 16732 #define SIM_FCFG1_CORE1_PFSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE1_PFSIZE_SHIFT)) & SIM_FCFG1_CORE1_PFSIZE_MASK) 16733 #define SIM_FCFG1_CORE0_PFSIZE_MASK (0xF0000000U) 16734 #define SIM_FCFG1_CORE0_PFSIZE_SHIFT (28U) 16735 /*! CORE0_PFSIZE 16736 * 0b1100..CM4 has 1 MB flash size. 16737 */ 16738 #define SIM_FCFG1_CORE0_PFSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_CORE0_PFSIZE_SHIFT)) & SIM_FCFG1_CORE0_PFSIZE_MASK) 16739 /*! @} */ 16740 16741 /*! @name FCFG2 - Flash Configuration Register 2 */ 16742 /*! @{ */ 16743 #define SIM_FCFG2_MAXADDR2_MASK (0x3F0000U) 16744 #define SIM_FCFG2_MAXADDR2_SHIFT (16U) 16745 #define SIM_FCFG2_MAXADDR2(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR2_SHIFT)) & SIM_FCFG2_MAXADDR2_MASK) 16746 #define SIM_FCFG2_MAXADDR01_MASK (0x7F000000U) 16747 #define SIM_FCFG2_MAXADDR01_SHIFT (24U) 16748 #define SIM_FCFG2_MAXADDR01(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR01_SHIFT)) & SIM_FCFG2_MAXADDR01_MASK) 16749 #define SIM_FCFG2_SWAP_MASK (0x80000000U) 16750 #define SIM_FCFG2_SWAP_SHIFT (31U) 16751 /*! SWAP - SWAP 16752 * 0b0..Logical P-flash Block 0 is located at relative address 0x0000 16753 * 0b1..Logical P-flash Block 1 is located at relative address 0x0000 16754 */ 16755 #define SIM_FCFG2_SWAP(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_SWAP_SHIFT)) & SIM_FCFG2_SWAP_MASK) 16756 /*! @} */ 16757 16758 /*! @name UIDH - Unique Identification Register High */ 16759 /*! @{ */ 16760 #define SIM_UIDH_UID_MASK (0xFFFFU) 16761 #define SIM_UIDH_UID_SHIFT (0U) 16762 #define SIM_UIDH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID_SHIFT)) & SIM_UIDH_UID_MASK) 16763 /*! @} */ 16764 16765 /*! @name UIDM - Unique Identification Register Mid Middle */ 16766 /*! @{ */ 16767 #define SIM_UIDM_UID_MASK (0xFFFFFFFFU) 16768 #define SIM_UIDM_UID_SHIFT (0U) 16769 #define SIM_UIDM_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDM_UID_SHIFT)) & SIM_UIDM_UID_MASK) 16770 /*! @} */ 16771 16772 /*! @name UIDL - Unique Identification Register Mid Low */ 16773 /*! @{ */ 16774 #define SIM_UIDL_UID_MASK (0xFFFFFFFFU) 16775 #define SIM_UIDL_UID_SHIFT (0U) 16776 #define SIM_UIDL_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID_SHIFT)) & SIM_UIDL_UID_MASK) 16777 /*! @} */ 16778 16779 /*! @name MISC2 - MISC2 Register */ 16780 /*! @{ */ 16781 #define SIM_MISC2_SYSTICK_CLK_EN_MASK (0x1U) 16782 #define SIM_MISC2_SYSTICK_CLK_EN_SHIFT (0U) 16783 /*! systick_clk_en - Systick clock enable 16784 * 0b0..Systick clock is disabled 16785 * 0b1..Systick clock is enabled 16786 */ 16787 #define SIM_MISC2_SYSTICK_CLK_EN(x) (((uint32_t)(((uint32_t)(x)) << SIM_MISC2_SYSTICK_CLK_EN_SHIFT)) & SIM_MISC2_SYSTICK_CLK_EN_MASK) 16788 /*! @} */ 16789 16790 16791 /*! 16792 * @} 16793 */ /* end of group SIM_Register_Masks */ 16794 16795 16796 /* SIM - Peripheral instance base addresses */ 16797 /** Peripheral SIM base address */ 16798 #define SIM_BASE (0x40026000u) 16799 /** Peripheral SIM base pointer */ 16800 #define SIM ((SIM_Type *)SIM_BASE) 16801 /** Array initializer of SIM peripheral base addresses */ 16802 #define SIM_BASE_ADDRS { SIM_BASE } 16803 /** Array initializer of SIM peripheral base pointers */ 16804 #define SIM_BASE_PTRS { SIM } 16805 16806 /*! 16807 * @} 16808 */ /* end of group SIM_Peripheral_Access_Layer */ 16809 16810 16811 /* ---------------------------------------------------------------------------- 16812 -- SMC Peripheral Access Layer 16813 ---------------------------------------------------------------------------- */ 16814 16815 /*! 16816 * @addtogroup SMC_Peripheral_Access_Layer SMC Peripheral Access Layer 16817 * @{ 16818 */ 16819 16820 /** SMC - Register Layout Typedef */ 16821 typedef struct { 16822 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 16823 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 16824 __IO uint32_t PMPROT; /**< Power Mode Protection register, offset: 0x8 */ 16825 uint8_t RESERVED_0[4]; 16826 __IO uint32_t PMCTRL; /**< Power Mode Control register, offset: 0x10 */ 16827 uint8_t RESERVED_1[4]; 16828 __IO uint32_t PMSTAT; /**< Power Mode Status register, offset: 0x18 */ 16829 uint8_t RESERVED_2[4]; 16830 __I uint32_t SRS; /**< System Reset Status, offset: 0x20 */ 16831 __IO uint32_t RPC; /**< Reset Pin Control, offset: 0x24 */ 16832 __IO uint32_t SSRS; /**< Sticky System Reset Status, offset: 0x28 */ 16833 __IO uint32_t SRIE; /**< System Reset Interrupt Enable, offset: 0x2C */ 16834 __IO uint32_t SRIF; /**< System Reset Interrupt Flag, offset: 0x30 */ 16835 uint8_t RESERVED_3[12]; 16836 __IO uint32_t MR; /**< Mode Register, offset: 0x40 */ 16837 uint8_t RESERVED_4[12]; 16838 __IO uint32_t FM; /**< Force Mode Register, offset: 0x50 */ 16839 uint8_t RESERVED_5[12]; 16840 __IO uint32_t SRAMLPR; /**< SRAM Low Power Register, offset: 0x60 */ 16841 __IO uint32_t SRAMDSR; /**< SRAM Deep Sleep Register, offset: 0x64 */ 16842 } SMC_Type; 16843 16844 /* ---------------------------------------------------------------------------- 16845 -- SMC Register Masks 16846 ---------------------------------------------------------------------------- */ 16847 16848 /*! 16849 * @addtogroup SMC_Register_Masks SMC Register Masks 16850 * @{ 16851 */ 16852 16853 /*! @name VERID - Version ID Register */ 16854 /*! @{ */ 16855 #define SMC_VERID_FEATURE_MASK (0xFFFFU) 16856 #define SMC_VERID_FEATURE_SHIFT (0U) 16857 /*! FEATURE - Feature Specification Number 16858 * 0b0000000010101011..Default features supported 16859 */ 16860 #define SMC_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << SMC_VERID_FEATURE_SHIFT)) & SMC_VERID_FEATURE_MASK) 16861 #define SMC_VERID_MINOR_MASK (0xFF0000U) 16862 #define SMC_VERID_MINOR_SHIFT (16U) 16863 #define SMC_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << SMC_VERID_MINOR_SHIFT)) & SMC_VERID_MINOR_MASK) 16864 #define SMC_VERID_MAJOR_MASK (0xFF000000U) 16865 #define SMC_VERID_MAJOR_SHIFT (24U) 16866 #define SMC_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << SMC_VERID_MAJOR_SHIFT)) & SMC_VERID_MAJOR_MASK) 16867 /*! @} */ 16868 16869 /*! @name PARAM - Parameter Register */ 16870 /*! @{ */ 16871 #define SMC_PARAM_PWRD_INDPT_MASK (0x1U) 16872 #define SMC_PARAM_PWRD_INDPT_SHIFT (0U) 16873 #define SMC_PARAM_PWRD_INDPT(x) (((uint32_t)(((uint32_t)(x)) << SMC_PARAM_PWRD_INDPT_SHIFT)) & SMC_PARAM_PWRD_INDPT_MASK) 16874 /*! @} */ 16875 16876 /*! @name PMPROT - Power Mode Protection register */ 16877 /*! @{ */ 16878 #define SMC_PMPROT_AVLLS_MASK (0x3U) 16879 #define SMC_PMPROT_AVLLS_SHIFT (0U) 16880 /*! AVLLS - Allow Very-Low-Leakage Stop Mode 16881 * 0b00..VLLS mode is not allowed 16882 * 0b01..VLLS0/1 mode is allowed 16883 * 0b10..VLLS2/3 mode is allowed 16884 * 0b11..VLLS0/1/2/3 mode is allowed 16885 */ 16886 #define SMC_PMPROT_AVLLS(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AVLLS_SHIFT)) & SMC_PMPROT_AVLLS_MASK) 16887 #define SMC_PMPROT_ALLS_MASK (0x8U) 16888 #define SMC_PMPROT_ALLS_SHIFT (3U) 16889 /*! ALLS - Allow Low-Leakage Stop Mode 16890 * 0b0..LLS is not allowed 16891 * 0b1..LLS is allowed 16892 */ 16893 #define SMC_PMPROT_ALLS(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_ALLS_SHIFT)) & SMC_PMPROT_ALLS_MASK) 16894 #define SMC_PMPROT_AVLP_MASK (0x20U) 16895 #define SMC_PMPROT_AVLP_SHIFT (5U) 16896 /*! AVLP - Allow Very-Low-Power Modes 16897 * 0b0..VLPR, VLPW, and VLPS are not allowed. 16898 * 0b1..VLPR, VLPW, and VLPS are allowed. 16899 */ 16900 #define SMC_PMPROT_AVLP(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AVLP_SHIFT)) & SMC_PMPROT_AVLP_MASK) 16901 #define SMC_PMPROT_AHSRUN_MASK (0x80U) 16902 #define SMC_PMPROT_AHSRUN_SHIFT (7U) 16903 /*! AHSRUN - Allow High Speed Run mode 16904 * 0b0..HSRUN is not allowed 16905 * 0b1..HSRUN is allowed 16906 */ 16907 #define SMC_PMPROT_AHSRUN(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMPROT_AHSRUN_SHIFT)) & SMC_PMPROT_AHSRUN_MASK) 16908 /*! @} */ 16909 16910 /*! @name PMCTRL - Power Mode Control register */ 16911 /*! @{ */ 16912 #define SMC_PMCTRL_STOPM_MASK (0x7U) 16913 #define SMC_PMCTRL_STOPM_SHIFT (0U) 16914 /*! STOPM - Stop Mode Control 16915 * 0b000..Normal Stop (STOP) 16916 * 0b001..Reserved 16917 * 0b010..Very-Low-Power Stop (VLPS) 16918 * 0b011..Low-Leakage Stop (LLS) 16919 * 0b100..Very-Low-Leakage Stop with SRAM retention(VLLS2/3) 16920 * 0b101..Reserved 16921 * 0b110..Very-Low-Leakage Stop without SRAM retention (VLLS0/1) 16922 * 0b111..Reserved 16923 */ 16924 #define SMC_PMCTRL_STOPM(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_STOPM_SHIFT)) & SMC_PMCTRL_STOPM_MASK) 16925 #define SMC_PMCTRL_RUNM_MASK (0x300U) 16926 #define SMC_PMCTRL_RUNM_SHIFT (8U) 16927 /*! RUNM - Run Mode Control 16928 * 0b00..Normal Run mode (RUN) 16929 * 0b01..Reserved 16930 * 0b10..Very-Low-Power Run mode (VLPR) 16931 * 0b11..High Speed Run mode (HSRUN) 16932 */ 16933 #define SMC_PMCTRL_RUNM(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_RUNM_SHIFT)) & SMC_PMCTRL_RUNM_MASK) 16934 #define SMC_PMCTRL_PSTOPO_MASK (0x30000U) 16935 #define SMC_PMCTRL_PSTOPO_SHIFT (16U) 16936 /*! PSTOPO - Partial Stop Option 16937 * 0b00..STOP - Normal Stop mode 16938 * 0b01..PSTOP1 - Partial Stop with system and bus clock disabled 16939 * 0b10..PSTOP2 - Partial Stop with system clock disabled and bus clock enabled 16940 * 0b11..PSTOP3 - Partial Stop with system clock enabled and bus clock enabled 16941 */ 16942 #define SMC_PMCTRL_PSTOPO(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMCTRL_PSTOPO_SHIFT)) & SMC_PMCTRL_PSTOPO_MASK) 16943 /*! @} */ 16944 16945 /*! @name PMSTAT - Power Mode Status register */ 16946 /*! @{ */ 16947 #define SMC_PMSTAT_PMSTAT_MASK (0xFFU) 16948 #define SMC_PMSTAT_PMSTAT_SHIFT (0U) 16949 /*! PMSTAT - Power Mode Status 16950 * 0b00000001..Current power mode is RUN. 16951 * 0b00000010..Current power mode is any STOP mode. 16952 * 0b00000100..Current power mode is VLPR. 16953 * 0b10000000..Current power mode is HSRUN 16954 */ 16955 #define SMC_PMSTAT_PMSTAT(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMSTAT_PMSTAT_SHIFT)) & SMC_PMSTAT_PMSTAT_MASK) 16956 #define SMC_PMSTAT_STOPSTAT_MASK (0xFF000000U) 16957 #define SMC_PMSTAT_STOPSTAT_SHIFT (24U) 16958 #define SMC_PMSTAT_STOPSTAT(x) (((uint32_t)(((uint32_t)(x)) << SMC_PMSTAT_STOPSTAT_SHIFT)) & SMC_PMSTAT_STOPSTAT_MASK) 16959 /*! @} */ 16960 16961 /*! @name SRS - System Reset Status */ 16962 /*! @{ */ 16963 #define SMC_SRS_WAKEUP_MASK (0x1U) 16964 #define SMC_SRS_WAKEUP_SHIFT (0U) 16965 /*! WAKEUP - Wakeup Reset 16966 * 0b0..Reset not generated by wakeup from VLLS mode. 16967 * 0b1..Reset generated by wakeup from VLLS mode. 16968 */ 16969 #define SMC_SRS_WAKEUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WAKEUP_SHIFT)) & SMC_SRS_WAKEUP_MASK) 16970 #define SMC_SRS_POR_MASK (0x2U) 16971 #define SMC_SRS_POR_SHIFT (1U) 16972 /*! POR - POR Reset 16973 * 0b0..Reset not generated by POR. 16974 * 0b1..Reset generated by POR. 16975 */ 16976 #define SMC_SRS_POR(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_POR_SHIFT)) & SMC_SRS_POR_MASK) 16977 #define SMC_SRS_LVD_MASK (0x4U) 16978 #define SMC_SRS_LVD_SHIFT (2U) 16979 /*! LVD - LVD Reset 16980 * 0b0..Reset not generated by LVD. 16981 * 0b1..Reset generated by LVD. 16982 */ 16983 #define SMC_SRS_LVD(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_LVD_SHIFT)) & SMC_SRS_LVD_MASK) 16984 #define SMC_SRS_HVD_MASK (0x8U) 16985 #define SMC_SRS_HVD_SHIFT (3U) 16986 /*! HVD - HVD Reset 16987 * 0b0..Reset not generated by HVD. 16988 * 0b1..Reset generated by HVD. 16989 */ 16990 #define SMC_SRS_HVD(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_HVD_SHIFT)) & SMC_SRS_HVD_MASK) 16991 #define SMC_SRS_WARM_MASK (0x10U) 16992 #define SMC_SRS_WARM_SHIFT (4U) 16993 /*! WARM - Warm Reset 16994 * 0b0..Reset not generated by Warm Reset source. 16995 * 0b1..Reset generated by Warm Reset source. 16996 */ 16997 #define SMC_SRS_WARM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WARM_SHIFT)) & SMC_SRS_WARM_MASK) 16998 #define SMC_SRS_FATAL_MASK (0x20U) 16999 #define SMC_SRS_FATAL_SHIFT (5U) 17000 /*! FATAL - Fatal Reset 17001 * 0b0..Reset was not generated by a fatal reset source. 17002 * 0b1..Reset was generated by a fatal reset source. 17003 */ 17004 #define SMC_SRS_FATAL(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_FATAL_SHIFT)) & SMC_SRS_FATAL_MASK) 17005 #define SMC_SRS_CORE_MASK (0x80U) 17006 #define SMC_SRS_CORE_SHIFT (7U) 17007 /*! CORE - Core Reset 17008 * 0b0..Reset source was not core only reset. 17009 * 0b1..Reset source was core reset and reset the core only. 17010 */ 17011 #define SMC_SRS_CORE(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE_SHIFT)) & SMC_SRS_CORE_MASK) 17012 #define SMC_SRS_PIN_MASK (0x100U) 17013 #define SMC_SRS_PIN_SHIFT (8U) 17014 /*! PIN - Pin Reset 17015 * 0b0..Reset was not generated from the assertion of RESET_B pin. 17016 * 0b1..Reset was generated from the assertion of RESET_B pin. 17017 */ 17018 #define SMC_SRS_PIN(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_PIN_SHIFT)) & SMC_SRS_PIN_MASK) 17019 #define SMC_SRS_MDM_MASK (0x200U) 17020 #define SMC_SRS_MDM_SHIFT (9U) 17021 /*! MDM - MDM Reset 17022 * 0b0..Reset was not generated from the MDM reset request. 17023 * 0b1..Reset was generated from the MDM reset request. 17024 */ 17025 #define SMC_SRS_MDM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_MDM_SHIFT)) & SMC_SRS_MDM_MASK) 17026 #define SMC_SRS_RSTACK_MASK (0x400U) 17027 #define SMC_SRS_RSTACK_SHIFT (10U) 17028 /*! RSTACK - Reset Timeout 17029 * 0b0..Reset not generated from Reset Controller Timeout. 17030 * 0b1..Reset generated from Reset Controller Timeout. 17031 */ 17032 #define SMC_SRS_RSTACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_RSTACK_SHIFT)) & SMC_SRS_RSTACK_MASK) 17033 #define SMC_SRS_STOPACK_MASK (0x800U) 17034 #define SMC_SRS_STOPACK_SHIFT (11U) 17035 /*! STOPACK - Stop Timeout Reset 17036 * 0b0..Reset not generated by Stop Controller Timeout. 17037 * 0b1..Reset generated by Stop Controller Timeout. 17038 */ 17039 #define SMC_SRS_STOPACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_STOPACK_SHIFT)) & SMC_SRS_STOPACK_MASK) 17040 #define SMC_SRS_SCG_MASK (0x1000U) 17041 #define SMC_SRS_SCG_SHIFT (12U) 17042 /*! SCG - SCG Reset 17043 * 0b0..Reset is not generated from an SCG loss of lock or loss of clock. 17044 * 0b1..Reset is generated from an SCG loss of lock or loss of clock. 17045 */ 17046 #define SMC_SRS_SCG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_SCG_SHIFT)) & SMC_SRS_SCG_MASK) 17047 #define SMC_SRS_WDOG_MASK (0x2000U) 17048 #define SMC_SRS_WDOG_SHIFT (13U) 17049 /*! WDOG - Watchdog Reset 17050 * 0b0..Reset is not generated from the WatchDog timeout. 17051 * 0b1..Reset is generated from the WatchDog timeout. 17052 */ 17053 #define SMC_SRS_WDOG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_WDOG_SHIFT)) & SMC_SRS_WDOG_MASK) 17054 #define SMC_SRS_SW_MASK (0x4000U) 17055 #define SMC_SRS_SW_SHIFT (14U) 17056 /*! SW - Software Reset 17057 * 0b0..Reset not generated by software request from core. 17058 * 0b1..Reset generated by software request from core. 17059 */ 17060 #define SMC_SRS_SW(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_SW_SHIFT)) & SMC_SRS_SW_MASK) 17061 #define SMC_SRS_LOCKUP_MASK (0x8000U) 17062 #define SMC_SRS_LOCKUP_SHIFT (15U) 17063 /*! LOCKUP - Lockup Reset 17064 * 0b0..Reset not generated by core lockup or exception. 17065 * 0b1..Reset generated by core lockup or exception. 17066 */ 17067 #define SMC_SRS_LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_LOCKUP_SHIFT)) & SMC_SRS_LOCKUP_MASK) 17068 #define SMC_SRS_CORE0_MASK (0x10000U) 17069 #define SMC_SRS_CORE0_SHIFT (16U) 17070 /*! CORE0 - Core0 System Reset 17071 * 0b0..Reset not generated from Core0 system reset source. 17072 * 0b1..Reset generated from Core0 system reset source. 17073 */ 17074 #define SMC_SRS_CORE0(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE0_SHIFT)) & SMC_SRS_CORE0_MASK) 17075 #define SMC_SRS_CORE1_MASK (0x20000U) 17076 #define SMC_SRS_CORE1_SHIFT (17U) 17077 /*! CORE1 - Core1 System Reset 17078 * 0b0..Reset not generated from Core1 system reset source. 17079 * 0b1..Reset generated from Core1 system reset source. 17080 */ 17081 #define SMC_SRS_CORE1(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_CORE1_SHIFT)) & SMC_SRS_CORE1_MASK) 17082 #define SMC_SRS_JTAG_MASK (0x10000000U) 17083 #define SMC_SRS_JTAG_SHIFT (28U) 17084 /*! JTAG - JTAG System Reset 17085 * 0b0..Reset not generated by JTAG system reset. 17086 * 0b1..Reset generated by JTAG system reset. 17087 */ 17088 #define SMC_SRS_JTAG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRS_JTAG_SHIFT)) & SMC_SRS_JTAG_MASK) 17089 /*! @} */ 17090 17091 /*! @name RPC - Reset Pin Control */ 17092 /*! @{ */ 17093 #define SMC_RPC_FILTCFG_MASK (0x1FU) 17094 #define SMC_RPC_FILTCFG_SHIFT (0U) 17095 #define SMC_RPC_FILTCFG(x) (((uint32_t)(((uint32_t)(x)) << SMC_RPC_FILTCFG_SHIFT)) & SMC_RPC_FILTCFG_MASK) 17096 #define SMC_RPC_FILTEN_MASK (0x100U) 17097 #define SMC_RPC_FILTEN_SHIFT (8U) 17098 /*! FILTEN - Filter Enable 17099 * 0b0..Slow clock reset pin filter disabled. 17100 * 0b1..Slow clock reset pin filter enabled in Run modes. 17101 */ 17102 #define SMC_RPC_FILTEN(x) (((uint32_t)(((uint32_t)(x)) << SMC_RPC_FILTEN_SHIFT)) & SMC_RPC_FILTEN_MASK) 17103 #define SMC_RPC_LPOFEN_MASK (0x200U) 17104 #define SMC_RPC_LPOFEN_SHIFT (9U) 17105 /*! LPOFEN - LPO Filter Enable 17106 * 0b0..LPO clock reset pin filter disabled. 17107 * 0b1..LPO clock reset pin filter enabled in all modes. 17108 */ 17109 #define SMC_RPC_LPOFEN(x) (((uint32_t)(((uint32_t)(x)) << SMC_RPC_LPOFEN_SHIFT)) & SMC_RPC_LPOFEN_MASK) 17110 /*! @} */ 17111 17112 /*! @name SSRS - Sticky System Reset Status */ 17113 /*! @{ */ 17114 #define SMC_SSRS_WAKEUP_MASK (0x1U) 17115 #define SMC_SSRS_WAKEUP_SHIFT (0U) 17116 /*! WAKEUP - Wakeup Reset 17117 * 0b0..Reset not generated by wakeup from VLLS mode. 17118 * 0b1..Reset generated by wakeup from VLLS mode. 17119 */ 17120 #define SMC_SSRS_WAKEUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WAKEUP_SHIFT)) & SMC_SSRS_WAKEUP_MASK) 17121 #define SMC_SSRS_POR_MASK (0x2U) 17122 #define SMC_SSRS_POR_SHIFT (1U) 17123 /*! POR - POR Reset 17124 * 0b0..Reset not generated by POR. 17125 * 0b1..Reset generated by POR. 17126 */ 17127 #define SMC_SSRS_POR(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_POR_SHIFT)) & SMC_SSRS_POR_MASK) 17128 #define SMC_SSRS_LVD_MASK (0x4U) 17129 #define SMC_SSRS_LVD_SHIFT (2U) 17130 /*! LVD - LVD Reset 17131 * 0b0..Reset not generated by LVD. 17132 * 0b1..Reset generated by LVD. 17133 */ 17134 #define SMC_SSRS_LVD(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_LVD_SHIFT)) & SMC_SSRS_LVD_MASK) 17135 #define SMC_SSRS_HVD_MASK (0x8U) 17136 #define SMC_SSRS_HVD_SHIFT (3U) 17137 /*! HVD - HVD Reset 17138 * 0b0..Reset not generated by HVD. 17139 * 0b1..Reset generated by HVD. 17140 */ 17141 #define SMC_SSRS_HVD(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_HVD_SHIFT)) & SMC_SSRS_HVD_MASK) 17142 #define SMC_SSRS_WARM_MASK (0x10U) 17143 #define SMC_SSRS_WARM_SHIFT (4U) 17144 /*! WARM - Warm Reset 17145 * 0b0..Reset not generated by system reset source. 17146 * 0b1..Reset generated by system reset source. 17147 */ 17148 #define SMC_SSRS_WARM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WARM_SHIFT)) & SMC_SSRS_WARM_MASK) 17149 #define SMC_SSRS_FATAL_MASK (0x20U) 17150 #define SMC_SSRS_FATAL_SHIFT (5U) 17151 /*! FATAL - Fatal Reset 17152 * 0b0..Reset was not generated by a fatal reset source. 17153 * 0b1..Reset was generated by a fatal reset source. 17154 */ 17155 #define SMC_SSRS_FATAL(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_FATAL_SHIFT)) & SMC_SSRS_FATAL_MASK) 17156 #define SMC_SSRS_PIN_MASK (0x100U) 17157 #define SMC_SSRS_PIN_SHIFT (8U) 17158 /*! PIN - Pin Reset 17159 * 0b0..Reset was not generated from the RESET_B pin. 17160 * 0b1..Reset was generated from the RESET_B pin. 17161 */ 17162 #define SMC_SSRS_PIN(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_PIN_SHIFT)) & SMC_SSRS_PIN_MASK) 17163 #define SMC_SSRS_MDM_MASK (0x200U) 17164 #define SMC_SSRS_MDM_SHIFT (9U) 17165 /*! MDM - MDM Reset 17166 * 0b0..Reset was not generated from the MDM reset request. 17167 * 0b1..Reset was generated from the MDM reset request. 17168 */ 17169 #define SMC_SSRS_MDM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_MDM_SHIFT)) & SMC_SSRS_MDM_MASK) 17170 #define SMC_SSRS_RSTACK_MASK (0x400U) 17171 #define SMC_SSRS_RSTACK_SHIFT (10U) 17172 /*! RSTACK - Reset Timeout 17173 * 0b0..Reset not generated from Reset Controller Timeout. 17174 * 0b1..Reset generated from Reset Controller Timeout. 17175 */ 17176 #define SMC_SSRS_RSTACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_RSTACK_SHIFT)) & SMC_SSRS_RSTACK_MASK) 17177 #define SMC_SSRS_STOPACK_MASK (0x800U) 17178 #define SMC_SSRS_STOPACK_SHIFT (11U) 17179 /*! STOPACK - Stop Timeout Reset 17180 * 0b0..Reset not generated by Stop Controller Timeout. 17181 * 0b1..Reset generated by Stop Controller Timeout. 17182 */ 17183 #define SMC_SSRS_STOPACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_STOPACK_SHIFT)) & SMC_SSRS_STOPACK_MASK) 17184 #define SMC_SSRS_SCG_MASK (0x1000U) 17185 #define SMC_SSRS_SCG_SHIFT (12U) 17186 /*! SCG - SCG Reset 17187 * 0b0..Reset is not generated from an SCG loss of lock or loss of clock. 17188 * 0b1..Reset is generated from an SCG loss of lock or loss of clock. 17189 */ 17190 #define SMC_SSRS_SCG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_SCG_SHIFT)) & SMC_SSRS_SCG_MASK) 17191 #define SMC_SSRS_WDOG_MASK (0x2000U) 17192 #define SMC_SSRS_WDOG_SHIFT (13U) 17193 /*! WDOG - Watchdog Reset 17194 * 0b0..Reset is not generated from the WatchDog timeout. 17195 * 0b1..Reset is generated from the WatchDog timeout. 17196 */ 17197 #define SMC_SSRS_WDOG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_WDOG_SHIFT)) & SMC_SSRS_WDOG_MASK) 17198 #define SMC_SSRS_SW_MASK (0x4000U) 17199 #define SMC_SSRS_SW_SHIFT (14U) 17200 /*! SW - Software Reset 17201 * 0b0..Reset not generated by software request from core. 17202 * 0b1..Reset generated by software request from core. 17203 */ 17204 #define SMC_SSRS_SW(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_SW_SHIFT)) & SMC_SSRS_SW_MASK) 17205 #define SMC_SSRS_LOCKUP_MASK (0x8000U) 17206 #define SMC_SSRS_LOCKUP_SHIFT (15U) 17207 /*! LOCKUP - Lockup Reset 17208 * 0b0..Reset not generated by core lockup. 17209 * 0b1..Reset generated by core lockup. 17210 */ 17211 #define SMC_SSRS_LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_LOCKUP_SHIFT)) & SMC_SSRS_LOCKUP_MASK) 17212 #define SMC_SSRS_CORE0_MASK (0x10000U) 17213 #define SMC_SSRS_CORE0_SHIFT (16U) 17214 /*! CORE0 - Core0 Reset 17215 * 0b0..Reset not generated from Core0 reset source. 17216 * 0b1..Reset generated from Core0 reset source. 17217 */ 17218 #define SMC_SSRS_CORE0(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_CORE0_SHIFT)) & SMC_SSRS_CORE0_MASK) 17219 #define SMC_SSRS_CORE1_MASK (0x20000U) 17220 #define SMC_SSRS_CORE1_SHIFT (17U) 17221 /*! CORE1 - Core1 Reset 17222 * 0b0..Reset not generated from Core1 reset source. 17223 * 0b1..Reset generated from Core1 reset source. 17224 */ 17225 #define SMC_SSRS_CORE1(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_CORE1_SHIFT)) & SMC_SSRS_CORE1_MASK) 17226 #define SMC_SSRS_JTAG_MASK (0x10000000U) 17227 #define SMC_SSRS_JTAG_SHIFT (28U) 17228 /*! JTAG - JTAG System Reset 17229 * 0b0..Reset not generated by JTAG system reset. 17230 * 0b1..Reset generated by JTAG system reset. 17231 */ 17232 #define SMC_SSRS_JTAG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SSRS_JTAG_SHIFT)) & SMC_SSRS_JTAG_MASK) 17233 /*! @} */ 17234 17235 /*! @name SRIE - System Reset Interrupt Enable */ 17236 /*! @{ */ 17237 #define SMC_SRIE_PIN_MASK (0x100U) 17238 #define SMC_SRIE_PIN_SHIFT (8U) 17239 /*! PIN - Pin Reset 17240 * 0b0..Interrupt disabled. 17241 * 0b1..Interrupt enabled. 17242 */ 17243 #define SMC_SRIE_PIN(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_PIN_SHIFT)) & SMC_SRIE_PIN_MASK) 17244 #define SMC_SRIE_MDM_MASK (0x200U) 17245 #define SMC_SRIE_MDM_SHIFT (9U) 17246 /*! MDM - MDM Reset 17247 * 0b0..Interrupt disabled. 17248 * 0b1..Interrupt enabled. 17249 */ 17250 #define SMC_SRIE_MDM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_MDM_SHIFT)) & SMC_SRIE_MDM_MASK) 17251 #define SMC_SRIE_STOPACK_MASK (0x800U) 17252 #define SMC_SRIE_STOPACK_SHIFT (11U) 17253 /*! STOPACK - Stop Timeout Reset 17254 * 0b0..Interrupt disabled. 17255 * 0b1..Interrupt enabled. 17256 */ 17257 #define SMC_SRIE_STOPACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_STOPACK_SHIFT)) & SMC_SRIE_STOPACK_MASK) 17258 #define SMC_SRIE_WDOG_MASK (0x2000U) 17259 #define SMC_SRIE_WDOG_SHIFT (13U) 17260 /*! WDOG - Watchdog Reset 17261 * 0b0..Interrupt disabled. 17262 * 0b1..Interrupt enabled. 17263 */ 17264 #define SMC_SRIE_WDOG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_WDOG_SHIFT)) & SMC_SRIE_WDOG_MASK) 17265 #define SMC_SRIE_SW_MASK (0x4000U) 17266 #define SMC_SRIE_SW_SHIFT (14U) 17267 /*! SW - Software Reset 17268 * 0b0..Interrupt disabled. 17269 * 0b1..Interrupt enabled. 17270 */ 17271 #define SMC_SRIE_SW(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_SW_SHIFT)) & SMC_SRIE_SW_MASK) 17272 #define SMC_SRIE_LOCKUP_MASK (0x8000U) 17273 #define SMC_SRIE_LOCKUP_SHIFT (15U) 17274 /*! LOCKUP - Lockup Reset 17275 * 0b0..Interrupt disabled. 17276 * 0b1..Interrupt enabled. 17277 */ 17278 #define SMC_SRIE_LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_LOCKUP_SHIFT)) & SMC_SRIE_LOCKUP_MASK) 17279 #define SMC_SRIE_CORE0_MASK (0x10000U) 17280 #define SMC_SRIE_CORE0_SHIFT (16U) 17281 /*! CORE0 - Core0 Reset 17282 * 0b0..Interrupt disabled. 17283 * 0b1..Interrupt enabled. 17284 */ 17285 #define SMC_SRIE_CORE0(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_CORE0_SHIFT)) & SMC_SRIE_CORE0_MASK) 17286 #define SMC_SRIE_CORE1_MASK (0x20000U) 17287 #define SMC_SRIE_CORE1_SHIFT (17U) 17288 /*! CORE1 - Core1 Reset 17289 * 0b0..Interrupt disabled. 17290 * 0b1..Interrupt enabled. 17291 */ 17292 #define SMC_SRIE_CORE1(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIE_CORE1_SHIFT)) & SMC_SRIE_CORE1_MASK) 17293 /*! @} */ 17294 17295 /*! @name SRIF - System Reset Interrupt Flag */ 17296 /*! @{ */ 17297 #define SMC_SRIF_PIN_MASK (0x100U) 17298 #define SMC_SRIF_PIN_SHIFT (8U) 17299 /*! PIN - Pin Reset 17300 * 0b0..Reset source not pending. 17301 * 0b1..Reset source pending. 17302 */ 17303 #define SMC_SRIF_PIN(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_PIN_SHIFT)) & SMC_SRIF_PIN_MASK) 17304 #define SMC_SRIF_MDM_MASK (0x200U) 17305 #define SMC_SRIF_MDM_SHIFT (9U) 17306 /*! MDM - MDM Reset 17307 * 0b0..Reset source not pending. 17308 * 0b1..Reset source pending. 17309 */ 17310 #define SMC_SRIF_MDM(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_MDM_SHIFT)) & SMC_SRIF_MDM_MASK) 17311 #define SMC_SRIF_STOPACK_MASK (0x800U) 17312 #define SMC_SRIF_STOPACK_SHIFT (11U) 17313 /*! STOPACK - Stop Timeout Reset 17314 * 0b0..Reset source not pending. 17315 * 0b1..Reset source pending. 17316 */ 17317 #define SMC_SRIF_STOPACK(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_STOPACK_SHIFT)) & SMC_SRIF_STOPACK_MASK) 17318 #define SMC_SRIF_WDOG_MASK (0x2000U) 17319 #define SMC_SRIF_WDOG_SHIFT (13U) 17320 /*! WDOG - Watchdog Reset 17321 * 0b0..Reset source not pending. 17322 * 0b1..Reset source pending. 17323 */ 17324 #define SMC_SRIF_WDOG(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_WDOG_SHIFT)) & SMC_SRIF_WDOG_MASK) 17325 #define SMC_SRIF_SW_MASK (0x4000U) 17326 #define SMC_SRIF_SW_SHIFT (14U) 17327 /*! SW - Software Reset 17328 * 0b0..Reset source not pending. 17329 * 0b1..Reset source pending. 17330 */ 17331 #define SMC_SRIF_SW(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_SW_SHIFT)) & SMC_SRIF_SW_MASK) 17332 #define SMC_SRIF_LOCKUP_MASK (0x8000U) 17333 #define SMC_SRIF_LOCKUP_SHIFT (15U) 17334 /*! LOCKUP - Lockup Reset 17335 * 0b0..Reset source not pending. 17336 * 0b1..Reset source pending. 17337 */ 17338 #define SMC_SRIF_LOCKUP(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_LOCKUP_SHIFT)) & SMC_SRIF_LOCKUP_MASK) 17339 #define SMC_SRIF_CORE0_MASK (0x10000U) 17340 #define SMC_SRIF_CORE0_SHIFT (16U) 17341 /*! CORE0 - Core0 Reset 17342 * 0b0..Reset source not pending. 17343 * 0b1..Reset source pending. 17344 */ 17345 #define SMC_SRIF_CORE0(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_CORE0_SHIFT)) & SMC_SRIF_CORE0_MASK) 17346 #define SMC_SRIF_CORE1_MASK (0x20000U) 17347 #define SMC_SRIF_CORE1_SHIFT (17U) 17348 /*! CORE1 - Core1 Reset 17349 * 0b0..Reset source not pending. 17350 * 0b1..Reset source pending. 17351 */ 17352 #define SMC_SRIF_CORE1(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRIF_CORE1_SHIFT)) & SMC_SRIF_CORE1_MASK) 17353 /*! @} */ 17354 17355 /*! @name MR - Mode Register */ 17356 /*! @{ */ 17357 #define SMC_MR_BOOTCFG_MASK (0x3U) 17358 #define SMC_MR_BOOTCFG_SHIFT (0U) 17359 /*! BOOTCFG - Boot Configuration 17360 * 0b00..Boot from Flash. 17361 * 0b01..Boot from ROM due to BOOTCFG0 pin assertion. 17362 * 0b10..Boot from ROM due to FOPT configuration. 17363 * 0b11..Boot from ROM due to both BOOTCFG0 pin assertion and FOPT configuration. 17364 */ 17365 #define SMC_MR_BOOTCFG(x) (((uint32_t)(((uint32_t)(x)) << SMC_MR_BOOTCFG_SHIFT)) & SMC_MR_BOOTCFG_MASK) 17366 /*! @} */ 17367 17368 /*! @name FM - Force Mode Register */ 17369 /*! @{ */ 17370 #define SMC_FM_FORCECFG_MASK (0x3U) 17371 #define SMC_FM_FORCECFG_SHIFT (0U) 17372 /*! FORCECFG - Boot Configuration 17373 * 0b00..No effect. 17374 * 0b01..Assert corresponding bit in Mode Register on next system reset. 17375 */ 17376 #define SMC_FM_FORCECFG(x) (((uint32_t)(((uint32_t)(x)) << SMC_FM_FORCECFG_SHIFT)) & SMC_FM_FORCECFG_MASK) 17377 /*! @} */ 17378 17379 /*! @name SRAMLPR - SRAM Low Power Register */ 17380 /*! @{ */ 17381 #define SMC_SRAMLPR_LPE_MASK (0xFFFFFFFFU) 17382 #define SMC_SRAMLPR_LPE_SHIFT (0U) 17383 #define SMC_SRAMLPR_LPE(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRAMLPR_LPE_SHIFT)) & SMC_SRAMLPR_LPE_MASK) 17384 /*! @} */ 17385 17386 /*! @name SRAMDSR - SRAM Deep Sleep Register */ 17387 /*! @{ */ 17388 #define SMC_SRAMDSR_DSE_MASK (0xFFFFFFFFU) 17389 #define SMC_SRAMDSR_DSE_SHIFT (0U) 17390 #define SMC_SRAMDSR_DSE(x) (((uint32_t)(((uint32_t)(x)) << SMC_SRAMDSR_DSE_SHIFT)) & SMC_SRAMDSR_DSE_MASK) 17391 /*! @} */ 17392 17393 17394 /*! 17395 * @} 17396 */ /* end of group SMC_Register_Masks */ 17397 17398 17399 /* SMC - Peripheral instance base addresses */ 17400 /** Peripheral SMC0 base address */ 17401 #define SMC0_BASE (0x40020000u) 17402 /** Peripheral SMC0 base pointer */ 17403 #define SMC0 ((SMC_Type *)SMC0_BASE) 17404 /** Peripheral SMC1 base address */ 17405 #define SMC1_BASE (0x41020000u) 17406 /** Peripheral SMC1 base pointer */ 17407 #define SMC1 ((SMC_Type *)SMC1_BASE) 17408 /** Array initializer of SMC peripheral base addresses */ 17409 #define SMC_BASE_ADDRS { SMC0_BASE, SMC1_BASE } 17410 /** Array initializer of SMC peripheral base pointers */ 17411 #define SMC_BASE_PTRS { SMC0, SMC1 } 17412 /** Interrupt vectors for the SMC peripheral type */ 17413 #define SMC_IRQS { NotAvail_IRQn, MSMC_IRQn } 17414 17415 /*! 17416 * @} 17417 */ /* end of group SMC_Peripheral_Access_Layer */ 17418 17419 17420 /* ---------------------------------------------------------------------------- 17421 -- SPM Peripheral Access Layer 17422 ---------------------------------------------------------------------------- */ 17423 17424 /*! 17425 * @addtogroup SPM_Peripheral_Access_Layer SPM Peripheral Access Layer 17426 * @{ 17427 */ 17428 17429 /** SPM - Register Layout Typedef */ 17430 typedef struct { 17431 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 17432 uint8_t RESERVED_0[4]; 17433 __I uint32_t RSR; /**< Regulator Status Register, offset: 0x8 */ 17434 uint8_t RESERVED_1[4]; 17435 __IO uint32_t RCTRL; /**< Run Control Register, offset: 0x10 */ 17436 __IO uint32_t LPCTRL; /**< Low Power Control Register, offset: 0x14 */ 17437 uint8_t RESERVED_2[232]; 17438 __IO uint32_t CORERCNFG; /**< CORE LDO RUN Configuration Register, offset: 0x100 */ 17439 __IO uint32_t CORELPCNFG; /**< CORE LDO Low Power Configuration register, offset: 0x104 */ 17440 __IO uint32_t CORESC; /**< Core LDO Status And Control register, offset: 0x108 */ 17441 __IO uint32_t LVDSC1; /**< Low Voltage Detect Status and Control 1 register, offset: 0x10C */ 17442 __IO uint32_t LVDSC2; /**< Low Voltage Detect Status and Control 2 register, offset: 0x110 */ 17443 __IO uint32_t HVDSC1; /**< High Voltage Detect Status And Control 1 register, offset: 0x114 */ 17444 uint8_t RESERVED_3[232]; 17445 __IO uint32_t AUXLDOLPCNFG; /**< AUX LDO Low Power Configuration register, offset: 0x200 */ 17446 __IO uint32_t AUXLDOSC; /**< AUX LDO Status And Control register, offset: 0x204 */ 17447 uint8_t RESERVED_4[252]; 17448 __IO uint32_t DCDCSC; /**< DCDC Status Control Register, offset: 0x304 */ 17449 uint8_t RESERVED_5[4]; 17450 __IO uint32_t DCDCC1; /**< DCDC Control Register 1, offset: 0x30C */ 17451 __IO uint32_t DCDCC2; /**< DCDC Control Register 2, offset: 0x310 */ 17452 __IO uint32_t DCDCC3; /**< DCDC Control Register 3, offset: 0x314 */ 17453 __IO uint32_t DCDCC4; /**< DCDC Control Register 4, offset: 0x318 */ 17454 uint8_t RESERVED_6[4]; 17455 __IO uint32_t DCDCC6; /**< DCDC Control Register 6, offset: 0x320 */ 17456 uint8_t RESERVED_7[232]; 17457 __IO uint32_t LPREQPINCNTRL; /**< LP Request Pin Control Register, offset: 0x40C */ 17458 } SPM_Type; 17459 17460 /* ---------------------------------------------------------------------------- 17461 -- SPM Register Masks 17462 ---------------------------------------------------------------------------- */ 17463 17464 /*! 17465 * @addtogroup SPM_Register_Masks SPM Register Masks 17466 * @{ 17467 */ 17468 17469 /*! @name VERID - Version ID Register */ 17470 /*! @{ */ 17471 #define SPM_VERID_FEATURE_MASK (0xFFFFU) 17472 #define SPM_VERID_FEATURE_SHIFT (0U) 17473 /*! FEATURE - Feature Specification Number 17474 * 0b0000000000000000..Standard features implemented. 17475 */ 17476 #define SPM_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << SPM_VERID_FEATURE_SHIFT)) & SPM_VERID_FEATURE_MASK) 17477 #define SPM_VERID_MINOR_MASK (0xFF0000U) 17478 #define SPM_VERID_MINOR_SHIFT (16U) 17479 #define SPM_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << SPM_VERID_MINOR_SHIFT)) & SPM_VERID_MINOR_MASK) 17480 #define SPM_VERID_MAJOR_MASK (0xFF000000U) 17481 #define SPM_VERID_MAJOR_SHIFT (24U) 17482 #define SPM_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << SPM_VERID_MAJOR_SHIFT)) & SPM_VERID_MAJOR_MASK) 17483 /*! @} */ 17484 17485 /*! @name RSR - Regulator Status Register */ 17486 /*! @{ */ 17487 #define SPM_RSR_REGSEL_MASK (0x7U) 17488 #define SPM_RSR_REGSEL_SHIFT (0U) 17489 #define SPM_RSR_REGSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_RSR_REGSEL_SHIFT)) & SPM_RSR_REGSEL_MASK) 17490 #define SPM_RSR_MCUPMSTAT_MASK (0x1F0000U) 17491 #define SPM_RSR_MCUPMSTAT_SHIFT (16U) 17492 /*! MCUPMSTAT - MCU Power Mode Status 17493 * 0b00000..Reserved 17494 * 0b00001..Last Low Power mode is STOP. 17495 * 0b00010..Last Low Power mode is VLPS. 17496 * 0b00100..Last Low Power mode is LLS. 17497 * 0b01000..Last Low Power mode is VLLS23. 17498 * 0b10000..Last Low Power mode is VLLS01. 17499 */ 17500 #define SPM_RSR_MCUPMSTAT(x) (((uint32_t)(((uint32_t)(x)) << SPM_RSR_MCUPMSTAT_SHIFT)) & SPM_RSR_MCUPMSTAT_MASK) 17501 /*! @} */ 17502 17503 /*! @name RCTRL - Run Control Register */ 17504 /*! @{ */ 17505 #define SPM_RCTRL_REGSEL_MASK (0x7U) 17506 #define SPM_RCTRL_REGSEL_SHIFT (0U) 17507 #define SPM_RCTRL_REGSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_RCTRL_REGSEL_SHIFT)) & SPM_RCTRL_REGSEL_MASK) 17508 /*! @} */ 17509 17510 /*! @name LPCTRL - Low Power Control Register */ 17511 /*! @{ */ 17512 #define SPM_LPCTRL_REGSEL_MASK (0x7U) 17513 #define SPM_LPCTRL_REGSEL_SHIFT (0U) 17514 #define SPM_LPCTRL_REGSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_LPCTRL_REGSEL_SHIFT)) & SPM_LPCTRL_REGSEL_MASK) 17515 /*! @} */ 17516 17517 /*! @name CORERCNFG - CORE LDO RUN Configuration Register */ 17518 /*! @{ */ 17519 #define SPM_CORERCNFG_VDDIOVDDMEN_MASK (0x10000U) 17520 #define SPM_CORERCNFG_VDDIOVDDMEN_SHIFT (16U) 17521 /*! VDDIOVDDMEN - VDDIOVDDMEN 17522 * 0b0..VDDIO voltage monitor disabled in run modes. 17523 * 0b1..VDDIO voltage monitor enabled in run modes. 17524 */ 17525 #define SPM_CORERCNFG_VDDIOVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_VDDIOVDDMEN_SHIFT)) & SPM_CORERCNFG_VDDIOVDDMEN_MASK) 17526 #define SPM_CORERCNFG_USBVDDMEN_MASK (0x20000U) 17527 #define SPM_CORERCNFG_USBVDDMEN_SHIFT (17U) 17528 /*! USBVDDMEN - USBVDDMEN 17529 * 0b0..USB voltage monitor disabled in run modes. 17530 * 0b1..USB voltage monitor enabled in run modes. 17531 */ 17532 #define SPM_CORERCNFG_USBVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_USBVDDMEN_SHIFT)) & SPM_CORERCNFG_USBVDDMEN_MASK) 17533 #define SPM_CORERCNFG_RTCVDDMEN_MASK (0x40000U) 17534 #define SPM_CORERCNFG_RTCVDDMEN_SHIFT (18U) 17535 /*! RTCVDDMEN - RTCVDDMEN 17536 * 0b0..RTC voltage monitor disabled in run modes. 17537 * 0b1..RTC voltage monitor enabled in run modes. 17538 */ 17539 #define SPM_CORERCNFG_RTCVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORERCNFG_RTCVDDMEN_SHIFT)) & SPM_CORERCNFG_RTCVDDMEN_MASK) 17540 /*! @} */ 17541 17542 /*! @name CORELPCNFG - CORE LDO Low Power Configuration register */ 17543 /*! @{ */ 17544 #define SPM_CORELPCNFG_LPSEL_MASK (0x2U) 17545 #define SPM_CORELPCNFG_LPSEL_SHIFT (1U) 17546 /*! LPSEL - LPSEL 17547 * 0b0..Core LDO enters low power state in VLP/Stop modes. 17548 * 0b1..Core LDO remains in high power state in VLP/Stop modes. If LPSEL = 1 in a low power mode then BGEN must also be set to 1. 17549 */ 17550 #define SPM_CORELPCNFG_LPSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPSEL_SHIFT)) & SPM_CORELPCNFG_LPSEL_MASK) 17551 #define SPM_CORELPCNFG_BGEN_MASK (0x4U) 17552 #define SPM_CORELPCNFG_BGEN_SHIFT (2U) 17553 /*! BGEN - Bandgap Enable In Low Power Mode Operation 17554 * 0b0..Bandgap is disabled in STOP/VLP/LLS and VLLS modes. 17555 * 0b1..Bandgap remains enabled in STOP/VLP/LLS and VLLS modes. 17556 */ 17557 #define SPM_CORELPCNFG_BGEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGEN_SHIFT)) & SPM_CORELPCNFG_BGEN_MASK) 17558 #define SPM_CORELPCNFG_BGBEN_MASK (0x8U) 17559 #define SPM_CORELPCNFG_BGBEN_SHIFT (3U) 17560 /*! BGBEN - Bandgap Buffer Enable 17561 * 0b0..Bandgap buffer not enabled 17562 * 0b1..Bandgap buffer enabled BGEN must be set when this bit is also set. 17563 */ 17564 #define SPM_CORELPCNFG_BGBEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGBEN_SHIFT)) & SPM_CORELPCNFG_BGBEN_MASK) 17565 #define SPM_CORELPCNFG_BGBDS_MASK (0x10U) 17566 #define SPM_CORELPCNFG_BGBDS_SHIFT (4U) 17567 /*! BGBDS - Bandgap Buffer Drive Select 17568 * 0b0..Low Drive 17569 * 0b1..High Drive 17570 */ 17571 #define SPM_CORELPCNFG_BGBDS(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_BGBDS_SHIFT)) & SPM_CORELPCNFG_BGBDS_MASK) 17572 #define SPM_CORELPCNFG_LPOEN_MASK (0x80U) 17573 #define SPM_CORELPCNFG_LPOEN_SHIFT (7U) 17574 /*! LPOEN - LPO Enabled 17575 * 0b0..LPO is disabled in VLLS0/1 modes. 17576 * 0b1..LPO remains enabled in VLLS0/1 modes. 17577 */ 17578 #define SPM_CORELPCNFG_LPOEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPOEN_SHIFT)) & SPM_CORELPCNFG_LPOEN_MASK) 17579 #define SPM_CORELPCNFG_POREN_MASK (0x100U) 17580 #define SPM_CORELPCNFG_POREN_SHIFT (8U) 17581 /*! POREN - POR Enabled 17582 * 0b0..POR brownout is disabled in VLLS0/1 mode. 17583 * 0b1..POR brownout remains enabled in VLLS0/1 mode. 17584 */ 17585 #define SPM_CORELPCNFG_POREN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_POREN_SHIFT)) & SPM_CORELPCNFG_POREN_MASK) 17586 #define SPM_CORELPCNFG_LVDEN_MASK (0x200U) 17587 #define SPM_CORELPCNFG_LVDEN_SHIFT (9U) 17588 /*! LVDEN - LVD Enabled 17589 * 0b0..LVD/HVD is disabled in low power modes. 17590 * 0b1..LVD/HVD remains enabled in low power modes. BGEN must be set when this bit is also set. 17591 */ 17592 #define SPM_CORELPCNFG_LVDEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LVDEN_SHIFT)) & SPM_CORELPCNFG_LVDEN_MASK) 17593 #define SPM_CORELPCNFG_LPHIDRIVE_MASK (0x4000U) 17594 #define SPM_CORELPCNFG_LPHIDRIVE_SHIFT (14U) 17595 /*! LPHIDRIVE - LPHIDRIVE 17596 * 0b0..High Drive disabled. 17597 * 0b1..High Drive enabled. 17598 */ 17599 #define SPM_CORELPCNFG_LPHIDRIVE(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_LPHIDRIVE_SHIFT)) & SPM_CORELPCNFG_LPHIDRIVE_MASK) 17600 #define SPM_CORELPCNFG_ALLREFEN_MASK (0x8000U) 17601 #define SPM_CORELPCNFG_ALLREFEN_SHIFT (15U) 17602 /*! ALLREFEN - All Reference Enable. This bit only has an affect in VLLS0/1. 17603 * 0b0..All references are disabled in VLLS0/1. 17604 * 0b1..All references are enabled in VLLS0/1. 17605 */ 17606 #define SPM_CORELPCNFG_ALLREFEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_ALLREFEN_SHIFT)) & SPM_CORELPCNFG_ALLREFEN_MASK) 17607 #define SPM_CORELPCNFG_VDDIOVDDMEN_MASK (0x10000U) 17608 #define SPM_CORELPCNFG_VDDIOVDDMEN_SHIFT (16U) 17609 /*! VDDIOVDDMEN - VDDIOVDDMEN 17610 * 0b0..VDDIO voltage monitor disabled in lp modes. 17611 * 0b1..VDDIO voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes. 17612 */ 17613 #define SPM_CORELPCNFG_VDDIOVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_VDDIOVDDMEN_SHIFT)) & SPM_CORELPCNFG_VDDIOVDDMEN_MASK) 17614 #define SPM_CORELPCNFG_USBVDDMEN_MASK (0x20000U) 17615 #define SPM_CORELPCNFG_USBVDDMEN_SHIFT (17U) 17616 /*! USBVDDMEN - USBVDDMEN 17617 * 0b0..USB voltage monitor disabled in lp modes. 17618 * 0b1..USB voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes. 17619 */ 17620 #define SPM_CORELPCNFG_USBVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_USBVDDMEN_SHIFT)) & SPM_CORELPCNFG_USBVDDMEN_MASK) 17621 #define SPM_CORELPCNFG_RTCVDDMEN_MASK (0x40000U) 17622 #define SPM_CORELPCNFG_RTCVDDMEN_SHIFT (18U) 17623 /*! RTCVDDMEN - RTCVDDMEN 17624 * 0b0..RTC voltage monitor disabled in lp modes. 17625 * 0b1..RTC voltage monitor enabled in lp modes. Note: voltage monitor is always disabled in VLLS0/1 modes. 17626 */ 17627 #define SPM_CORELPCNFG_RTCVDDMEN(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORELPCNFG_RTCVDDMEN_SHIFT)) & SPM_CORELPCNFG_RTCVDDMEN_MASK) 17628 /*! @} */ 17629 17630 /*! @name CORESC - Core LDO Status And Control register */ 17631 /*! @{ */ 17632 #define SPM_CORESC_VSEL_OFFSET_MASK (0x2U) 17633 #define SPM_CORESC_VSEL_OFFSET_SHIFT (1U) 17634 /*! VSEL_OFFSET - Voltage Offset Select 17635 * 0b0..Core LDO offset not applied. 17636 * 0b1..Core LDO offset is applied. 17637 */ 17638 #define SPM_CORESC_VSEL_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VSEL_OFFSET_SHIFT)) & SPM_CORESC_VSEL_OFFSET_MASK) 17639 #define SPM_CORESC_REGONS_MASK (0x4U) 17640 #define SPM_CORESC_REGONS_SHIFT (2U) 17641 /*! REGONS - CORE LDO Regulator in Run Regulation Status 17642 * 0b0..Regulator is in low power state or in transition to/from it. 17643 * 0b1..Regulator is in high power state. 17644 */ 17645 #define SPM_CORESC_REGONS(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_REGONS_SHIFT)) & SPM_CORESC_REGONS_MASK) 17646 #define SPM_CORESC_ACKISO_MASK (0x8U) 17647 #define SPM_CORESC_ACKISO_SHIFT (3U) 17648 /*! ACKISO - Acknowledge Isolation 17649 * 0b0..Peripherals and I/O pads are in normal run state. 17650 * 0b1..Certain peripherals and I/O pads are in a isolated and latched state. 17651 */ 17652 #define SPM_CORESC_ACKISO(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_ACKISO_SHIFT)) & SPM_CORESC_ACKISO_MASK) 17653 #define SPM_CORESC_TRIM_MASK (0x3F00U) 17654 #define SPM_CORESC_TRIM_SHIFT (8U) 17655 #define SPM_CORESC_TRIM(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_TRIM_SHIFT)) & SPM_CORESC_TRIM_MASK) 17656 #define SPM_CORESC_VDDIOOVRIDE_MASK (0x10000U) 17657 #define SPM_CORESC_VDDIOOVRIDE_SHIFT (16U) 17658 /*! VDDIOOVRIDE - VDDIOOVRIDE 17659 * 0b0..VDDIOOK status set to 1'b0. 17660 * 0b1..VDDIOOK status set to 1'b1. 17661 */ 17662 #define SPM_CORESC_VDDIOOVRIDE(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VDDIOOVRIDE_SHIFT)) & SPM_CORESC_VDDIOOVRIDE_MASK) 17663 #define SPM_CORESC_USBOVRIDE_MASK (0x20000U) 17664 #define SPM_CORESC_USBOVRIDE_SHIFT (17U) 17665 /*! USBOVRIDE - USBOVRIDE 17666 * 0b0..USBVDDOK status set to 1'b0. 17667 * 0b1..USBVDDOK status set to 1'b1. 17668 */ 17669 #define SPM_CORESC_USBOVRIDE(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_USBOVRIDE_SHIFT)) & SPM_CORESC_USBOVRIDE_MASK) 17670 #define SPM_CORESC_RTCOVRIDE_MASK (0x40000U) 17671 #define SPM_CORESC_RTCOVRIDE_SHIFT (18U) 17672 /*! RTCOVRIDE - RTCOVRIDE 17673 * 0b0..RTCVDDOK status set to 1'b0. 17674 * 0b1..RTCVDDOK status set to 1'b1. 17675 */ 17676 #define SPM_CORESC_RTCOVRIDE(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_RTCOVRIDE_SHIFT)) & SPM_CORESC_RTCOVRIDE_MASK) 17677 #define SPM_CORESC_VDDIOOK_MASK (0x1000000U) 17678 #define SPM_CORESC_VDDIOOK_SHIFT (24U) 17679 #define SPM_CORESC_VDDIOOK(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_VDDIOOK_SHIFT)) & SPM_CORESC_VDDIOOK_MASK) 17680 #define SPM_CORESC_USBVDDOK_MASK (0x2000000U) 17681 #define SPM_CORESC_USBVDDOK_SHIFT (25U) 17682 #define SPM_CORESC_USBVDDOK(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_USBVDDOK_SHIFT)) & SPM_CORESC_USBVDDOK_MASK) 17683 #define SPM_CORESC_RTCVDDOK_MASK (0x4000000U) 17684 #define SPM_CORESC_RTCVDDOK_SHIFT (26U) 17685 #define SPM_CORESC_RTCVDDOK(x) (((uint32_t)(((uint32_t)(x)) << SPM_CORESC_RTCVDDOK_SHIFT)) & SPM_CORESC_RTCVDDOK_MASK) 17686 /*! @} */ 17687 17688 /*! @name LVDSC1 - Low Voltage Detect Status and Control 1 register */ 17689 /*! @{ */ 17690 #define SPM_LVDSC1_COREVDD_LVDRE_MASK (0x10U) 17691 #define SPM_LVDSC1_COREVDD_LVDRE_SHIFT (4U) 17692 /*! COREVDD_LVDRE - Core Low-Voltage Detect Reset Enable 17693 * 0b0..COREVDD_LVDF does not generate hardware resets 17694 * 0b1..Force an MCU reset when CORE_LVDF = 1 17695 */ 17696 #define SPM_LVDSC1_COREVDD_LVDRE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDRE_SHIFT)) & SPM_LVDSC1_COREVDD_LVDRE_MASK) 17697 #define SPM_LVDSC1_COREVDD_LVDIE_MASK (0x20U) 17698 #define SPM_LVDSC1_COREVDD_LVDIE_SHIFT (5U) 17699 /*! COREVDD_LVDIE - Low-Voltage Detect Interrupt Enable 17700 * 0b0..Hardware interrupt disabled (use polling) 17701 * 0b1..Request a hardware interrupt when LVDF = 1 17702 */ 17703 #define SPM_LVDSC1_COREVDD_LVDIE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDIE_SHIFT)) & SPM_LVDSC1_COREVDD_LVDIE_MASK) 17704 #define SPM_LVDSC1_COREVDD_LVDACK_MASK (0x40U) 17705 #define SPM_LVDSC1_COREVDD_LVDACK_SHIFT (6U) 17706 #define SPM_LVDSC1_COREVDD_LVDACK(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDACK_SHIFT)) & SPM_LVDSC1_COREVDD_LVDACK_MASK) 17707 #define SPM_LVDSC1_COREVDD_LVDF_MASK (0x80U) 17708 #define SPM_LVDSC1_COREVDD_LVDF_SHIFT (7U) 17709 /*! COREVDD_LVDF - Low-Voltage Detect Flag 17710 * 0b0..Low-voltage event not detected 17711 * 0b1..Low-voltage event detected 17712 */ 17713 #define SPM_LVDSC1_COREVDD_LVDF(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_COREVDD_LVDF_SHIFT)) & SPM_LVDSC1_COREVDD_LVDF_MASK) 17714 #define SPM_LVDSC1_VDD_LVDV_MASK (0x30000U) 17715 #define SPM_LVDSC1_VDD_LVDV_SHIFT (16U) 17716 /*! VDD_LVDV - VDD Low-Voltage Detect Voltage Select 17717 * 0b00..Low trip point selected (V LVD = V LVDL ) 17718 * 0b01..High trip point selected (V LVD = V LVDH ) 17719 * 0b10..Reserved 17720 * 0b11..Reserved 17721 */ 17722 #define SPM_LVDSC1_VDD_LVDV(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDV_SHIFT)) & SPM_LVDSC1_VDD_LVDV_MASK) 17723 #define SPM_LVDSC1_VDD_LVDRE_MASK (0x100000U) 17724 #define SPM_LVDSC1_VDD_LVDRE_SHIFT (20U) 17725 /*! VDD_LVDRE - VDD Low-Voltage Detect Reset Enable 17726 * 0b0..VDD_LVDF does not generate hardware resets 17727 * 0b1..Force an MCU reset when VDD_LVDF = 1 17728 */ 17729 #define SPM_LVDSC1_VDD_LVDRE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDRE_SHIFT)) & SPM_LVDSC1_VDD_LVDRE_MASK) 17730 #define SPM_LVDSC1_VDD_LVDIE_MASK (0x200000U) 17731 #define SPM_LVDSC1_VDD_LVDIE_SHIFT (21U) 17732 /*! VDD_LVDIE - VDD Low-Voltage Detect Interrupt Enable 17733 * 0b0..Hardware interrupt disabled (use polling) 17734 * 0b1..Request a hardware interrupt when VDD_LVDF = 1 17735 */ 17736 #define SPM_LVDSC1_VDD_LVDIE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDIE_SHIFT)) & SPM_LVDSC1_VDD_LVDIE_MASK) 17737 #define SPM_LVDSC1_VDD_LVDACK_MASK (0x400000U) 17738 #define SPM_LVDSC1_VDD_LVDACK_SHIFT (22U) 17739 #define SPM_LVDSC1_VDD_LVDACK(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDACK_SHIFT)) & SPM_LVDSC1_VDD_LVDACK_MASK) 17740 #define SPM_LVDSC1_VDD_LVDF_MASK (0x800000U) 17741 #define SPM_LVDSC1_VDD_LVDF_SHIFT (23U) 17742 /*! VDD_LVDF - VDD Low-Voltage Detect Flag 17743 * 0b0..Low-voltage event not detected 17744 * 0b1..Low-voltage event detected 17745 */ 17746 #define SPM_LVDSC1_VDD_LVDF(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC1_VDD_LVDF_SHIFT)) & SPM_LVDSC1_VDD_LVDF_MASK) 17747 /*! @} */ 17748 17749 /*! @name LVDSC2 - Low Voltage Detect Status and Control 2 register */ 17750 /*! @{ */ 17751 #define SPM_LVDSC2_VDD_LVWV_MASK (0x30000U) 17752 #define SPM_LVDSC2_VDD_LVWV_SHIFT (16U) 17753 /*! VDD_LVWV - VDD Low-Voltage Warning Voltage Select 17754 * 0b00..Low trip point selected (V LVW = VLVW1) 17755 * 0b01..Mid 1 trip point selected (V LVW = VLVW2) 17756 * 0b10..Mid 2 trip point selected (V LVW = VLVW3) 17757 * 0b11..High trip point selected (V LVW = VLVW4) 17758 */ 17759 #define SPM_LVDSC2_VDD_LVWV(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWV_SHIFT)) & SPM_LVDSC2_VDD_LVWV_MASK) 17760 #define SPM_LVDSC2_VDD_LVWIE_MASK (0x200000U) 17761 #define SPM_LVDSC2_VDD_LVWIE_SHIFT (21U) 17762 /*! VDD_LVWIE - VDD Low-Voltage Warning Interrupt Enable 17763 * 0b0..Hardware interrupt disabled (use polling) 17764 * 0b1..Request a hardware interrupt when VDD_LVWF = 1 17765 */ 17766 #define SPM_LVDSC2_VDD_LVWIE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWIE_SHIFT)) & SPM_LVDSC2_VDD_LVWIE_MASK) 17767 #define SPM_LVDSC2_VDD_LVWACK_MASK (0x400000U) 17768 #define SPM_LVDSC2_VDD_LVWACK_SHIFT (22U) 17769 #define SPM_LVDSC2_VDD_LVWACK(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWACK_SHIFT)) & SPM_LVDSC2_VDD_LVWACK_MASK) 17770 #define SPM_LVDSC2_VDD_LVWF_MASK (0x800000U) 17771 #define SPM_LVDSC2_VDD_LVWF_SHIFT (23U) 17772 /*! VDD_LVWF - VDD Low-Voltage Warning Flag 17773 * 0b0..Low-voltage warning event not detected 17774 * 0b1..Low-voltage warning event detected 17775 */ 17776 #define SPM_LVDSC2_VDD_LVWF(x) (((uint32_t)(((uint32_t)(x)) << SPM_LVDSC2_VDD_LVWF_SHIFT)) & SPM_LVDSC2_VDD_LVWF_MASK) 17777 /*! @} */ 17778 17779 /*! @name HVDSC1 - High Voltage Detect Status And Control 1 register */ 17780 /*! @{ */ 17781 #define SPM_HVDSC1_VDD_HVDV_MASK (0x10000U) 17782 #define SPM_HVDSC1_VDD_HVDV_SHIFT (16U) 17783 /*! VDD_HVDV - VDD High-Voltage Detect Voltage Select 17784 * 0b0..Low trip point selected (V VDD = V VDD_HVDL ) 17785 * 0b1..High trip point selected (V VDD = V VDD_HVDH ) 17786 */ 17787 #define SPM_HVDSC1_VDD_HVDV(x) (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDV_SHIFT)) & SPM_HVDSC1_VDD_HVDV_MASK) 17788 #define SPM_HVDSC1_VDD_HVDRE_MASK (0x100000U) 17789 #define SPM_HVDSC1_VDD_HVDRE_SHIFT (20U) 17790 /*! VDD_HVDRE - VDD High-Voltage Detect Reset Enable 17791 * 0b0..VDD HVDF does not generate hardware resets 17792 * 0b1..Force an MCU reset when VDD_HVDF = 1 17793 */ 17794 #define SPM_HVDSC1_VDD_HVDRE(x) (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDRE_SHIFT)) & SPM_HVDSC1_VDD_HVDRE_MASK) 17795 #define SPM_HVDSC1_VDD_HVDIE_MASK (0x200000U) 17796 #define SPM_HVDSC1_VDD_HVDIE_SHIFT (21U) 17797 /*! VDD_HVDIE - VDD High-Voltage Detect Interrupt Enable 17798 * 0b0..Hardware interrupt disabled (use polling) 17799 * 0b1..Request a hardware interrupt when HVDF = 1 17800 */ 17801 #define SPM_HVDSC1_VDD_HVDIE(x) (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDIE_SHIFT)) & SPM_HVDSC1_VDD_HVDIE_MASK) 17802 #define SPM_HVDSC1_VDD_HVDACK_MASK (0x400000U) 17803 #define SPM_HVDSC1_VDD_HVDACK_SHIFT (22U) 17804 #define SPM_HVDSC1_VDD_HVDACK(x) (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDACK_SHIFT)) & SPM_HVDSC1_VDD_HVDACK_MASK) 17805 #define SPM_HVDSC1_VDD_HVDF_MASK (0x800000U) 17806 #define SPM_HVDSC1_VDD_HVDF_SHIFT (23U) 17807 /*! VDD_HVDF - VDD High-Voltage Detect Flag 17808 * 0b0..Vdd High-voltage event not detected 17809 * 0b1..Vdd High-voltage event detected 17810 */ 17811 #define SPM_HVDSC1_VDD_HVDF(x) (((uint32_t)(((uint32_t)(x)) << SPM_HVDSC1_VDD_HVDF_SHIFT)) & SPM_HVDSC1_VDD_HVDF_MASK) 17812 /*! @} */ 17813 17814 /*! @name AUXLDOLPCNFG - AUX LDO Low Power Configuration register */ 17815 /*! @{ */ 17816 #define SPM_AUXLDOLPCNFG_LPSEL_MASK (0x2U) 17817 #define SPM_AUXLDOLPCNFG_LPSEL_SHIFT (1U) 17818 /*! LPSEL - LPSEL 17819 * 0b0..AUX LDO regulator enters low power state in VLP/Stop modes. 17820 * 0b1..AUX LDO regulator remains in high power state in VLP/Stop modes. 17821 */ 17822 #define SPM_AUXLDOLPCNFG_LPSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOLPCNFG_LPSEL_SHIFT)) & SPM_AUXLDOLPCNFG_LPSEL_MASK) 17823 /*! @} */ 17824 17825 /*! @name AUXLDOSC - AUX LDO Status And Control register */ 17826 /*! @{ */ 17827 #define SPM_AUXLDOSC_AUXREGVSEL_MASK (0x1U) 17828 #define SPM_AUXLDOSC_AUXREGVSEL_SHIFT (0U) 17829 /*! AUXREGVSEL - Auxiliary Regulator Voltage Select 17830 * 0b0..Regulate to 1.8V. 17831 * 0b1..Regulate to 1.5V. 17832 */ 17833 #define SPM_AUXLDOSC_AUXREGVSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXREGVSEL_SHIFT)) & SPM_AUXLDOSC_AUXREGVSEL_MASK) 17834 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET_MASK (0x2U) 17835 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET_SHIFT (1U) 17836 /*! AUXREGVSEL_OFFSET - Auxiliary Regulator Offset Voltage Select 17837 * 0b0..The AUXREG offset is not applied. 17838 * 0b1..The AUXREG offset is applied. 17839 */ 17840 #define SPM_AUXLDOSC_AUXREGVSEL_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXREGVSEL_OFFSET_SHIFT)) & SPM_AUXLDOSC_AUXREGVSEL_OFFSET_MASK) 17841 #define SPM_AUXLDOSC_AUXTRIM_MASK (0x1F00U) 17842 #define SPM_AUXLDOSC_AUXTRIM_SHIFT (8U) 17843 #define SPM_AUXLDOSC_AUXTRIM(x) (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_AUXTRIM_SHIFT)) & SPM_AUXLDOSC_AUXTRIM_MASK) 17844 #define SPM_AUXLDOSC_IOSSSEL_MASK (0x70000U) 17845 #define SPM_AUXLDOSC_IOSSSEL_SHIFT (16U) 17846 /*! IOSSSEL - IO 1.8 Reg Soft Start Select 17847 * 0b000..Soft Start duration set to 110us. 17848 * 0b001..Soft Start duration set to 95us. 17849 * 0b010..Soft Start duration set to 60us. 17850 * 0b011..Soft Start duration set to 48us. 17851 * 0b100..Soft Start duration set to 38us. 17852 * 0b101..Soft Start duration set to 30us. 17853 * 0b110..Soft Start duration set to 24us. 17854 * 0b111..Soft Start duration set to 17us. 17855 */ 17856 #define SPM_AUXLDOSC_IOSSSEL(x) (((uint32_t)(((uint32_t)(x)) << SPM_AUXLDOSC_IOSSSEL_SHIFT)) & SPM_AUXLDOSC_IOSSSEL_MASK) 17857 /*! @} */ 17858 17859 /*! @name DCDCSC - DCDC Status Control Register */ 17860 /*! @{ */ 17861 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_MASK (0x2U) 17862 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_SHIFT (1U) 17863 #define SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_SHIFT)) & SPM_DCDCSC_DCDC_DISABLE_AUTO_CLK_SWITCH_MASK) 17864 #define SPM_DCDCSC_DCDC_SEL_CLK_MASK (0x4U) 17865 #define SPM_DCDCSC_DCDC_SEL_CLK_SHIFT (2U) 17866 #define SPM_DCDCSC_DCDC_SEL_CLK(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_SEL_CLK_SHIFT)) & SPM_DCDCSC_DCDC_SEL_CLK_MASK) 17867 #define SPM_DCDCSC_DCDC_PWD_OSC_INT_MASK (0x8U) 17868 #define SPM_DCDCSC_DCDC_PWD_OSC_INT_SHIFT (3U) 17869 #define SPM_DCDCSC_DCDC_PWD_OSC_INT(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_PWD_OSC_INT_SHIFT)) & SPM_DCDCSC_DCDC_PWD_OSC_INT_MASK) 17870 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_MASK (0xC00U) 17871 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_SHIFT (10U) 17872 /*! DCDC_VBAT_DIV_CTRL - DCDC_VBAT_DIV_CTRL 17873 * 0b00..OFF 17874 * 0b01..VBAT 17875 * 0b10..VBAT / 2 17876 * 0b11..VBAT / 4 17877 */ 17878 #define SPM_DCDCSC_DCDC_VBAT_DIV_CTRL(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_SHIFT)) & SPM_DCDCSC_DCDC_VBAT_DIV_CTRL_MASK) 17879 #define SPM_DCDCSC_DCDC_LESS_I_MASK (0x2000000U) 17880 #define SPM_DCDCSC_DCDC_LESS_I_SHIFT (25U) 17881 #define SPM_DCDCSC_DCDC_LESS_I(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_LESS_I_SHIFT)) & SPM_DCDCSC_DCDC_LESS_I_MASK) 17882 #define SPM_DCDCSC_PWD_CMP_OFFSET_MASK (0x4000000U) 17883 #define SPM_DCDCSC_PWD_CMP_OFFSET_SHIFT (26U) 17884 #define SPM_DCDCSC_PWD_CMP_OFFSET(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_PWD_CMP_OFFSET_SHIFT)) & SPM_DCDCSC_PWD_CMP_OFFSET_MASK) 17885 #define SPM_DCDCSC_CLKFLT_FAULT_MASK (0x40000000U) 17886 #define SPM_DCDCSC_CLKFLT_FAULT_SHIFT (30U) 17887 #define SPM_DCDCSC_CLKFLT_FAULT(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_CLKFLT_FAULT_SHIFT)) & SPM_DCDCSC_CLKFLT_FAULT_MASK) 17888 #define SPM_DCDCSC_DCDC_STS_DC_OK_MASK (0x80000000U) 17889 #define SPM_DCDCSC_DCDC_STS_DC_OK_SHIFT (31U) 17890 #define SPM_DCDCSC_DCDC_STS_DC_OK(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCSC_DCDC_STS_DC_OK_SHIFT)) & SPM_DCDCSC_DCDC_STS_DC_OK_MASK) 17891 /*! @} */ 17892 17893 /*! @name DCDCC1 - DCDC Control Register 1 */ 17894 /*! @{ */ 17895 #define SPM_DCDCC1_POSLIMIT_BUCK_IN_MASK (0x7FU) 17896 #define SPM_DCDCC1_POSLIMIT_BUCK_IN_SHIFT (0U) 17897 #define SPM_DCDCC1_POSLIMIT_BUCK_IN(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_POSLIMIT_BUCK_IN_SHIFT)) & SPM_DCDCC1_POSLIMIT_BUCK_IN_MASK) 17898 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_MASK (0x4000000U) 17899 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_SHIFT (26U) 17900 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_SHIFT)) & SPM_DCDCC1_DCDC_LOOPCTRL_EN_CM_HYST_MASK) 17901 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_MASK (0x8000000U) 17902 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_SHIFT (27U) 17903 #define SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_SHIFT)) & SPM_DCDCC1_DCDC_LOOPCTRL_EN_DF_HYST_MASK) 17904 /*! @} */ 17905 17906 /*! @name DCDCC2 - DCDC Control Register 2 */ 17907 /*! @{ */ 17908 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_MASK (0x2000U) 17909 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_SHIFT (13U) 17910 #define SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_SHIFT)) & SPM_DCDCC2_DCDC_LOOPCTRL_HYST_SIGN_MASK) 17911 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_MASK (0x8000U) 17912 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_SHIFT (15U) 17913 #define SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_SHIFT)) & SPM_DCDCC2_DCDC_BATTMONITOR_EN_BATADJ_MASK) 17914 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_MASK (0x3FF0000U) 17915 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_SHIFT (16U) 17916 #define SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_SHIFT)) & SPM_DCDCC2_DCDC_BATTMONITOR_BATT_VAL_MASK) 17917 /*! @} */ 17918 17919 /*! @name DCDCC3 - DCDC Control Register 3 */ 17920 /*! @{ */ 17921 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_MASK (0x1U) 17922 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_SHIFT (0U) 17923 #define SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_SHIFT)) & SPM_DCDCC3_DCDC_BYPASS_ADC_MEAS_MASK) 17924 #define SPM_DCDCC3_DCDC_VBAT_VALUE_MASK (0x1CU) 17925 #define SPM_DCDCC3_DCDC_VBAT_VALUE_SHIFT (2U) 17926 #define SPM_DCDCC3_DCDC_VBAT_VALUE(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VBAT_VALUE_SHIFT)) & SPM_DCDCC3_DCDC_VBAT_VALUE_MASK) 17927 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_MASK (0xF0000U) 17928 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_SHIFT (16U) 17929 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P2CTRL_ADJTN_MASK) 17930 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_MASK (0x1000000U) 17931 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_SHIFT (24U) 17932 #define SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_DC_HALFCLK_MASK) 17933 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_MASK (0x2000000U) 17934 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_SHIFT (25U) 17935 #define SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_EXTRA_DOUBLE_FETS_MASK) 17936 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_MASK (0x4000000U) 17937 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_SHIFT (26U) 17938 #define SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_DOUBLE_FETS_MASK) 17939 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_MASK (0x8000000U) 17940 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_SHIFT (27U) 17941 #define SPM_DCDCC3_DCDC_MINPWR_HALF_FETS(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_SHIFT)) & SPM_DCDCC3_DCDC_MINPWR_HALF_FETS_MASK) 17942 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_MASK (0x40000000U) 17943 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_SHIFT (30U) 17944 #define SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P2CTRL_DISABLE_STEP_MASK) 17945 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_MASK (0x80000000U) 17946 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_SHIFT (31U) 17947 #define SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_SHIFT)) & SPM_DCDCC3_DCDC_VDD1P8CTRL_DISABLE_STEP_MASK) 17948 /*! @} */ 17949 17950 /*! @name DCDCC4 - DCDC Control Register 4 */ 17951 /*! @{ */ 17952 #define SPM_DCDCC4_INTEGRATOR_VALUE_MASK (0x7FFFFU) 17953 #define SPM_DCDCC4_INTEGRATOR_VALUE_SHIFT (0U) 17954 #define SPM_DCDCC4_INTEGRATOR_VALUE(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_INTEGRATOR_VALUE_SHIFT)) & SPM_DCDCC4_INTEGRATOR_VALUE_MASK) 17955 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_MASK (0x80000U) 17956 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_SHIFT (19U) 17957 /*! INTEGRATOR_VALUE_SELECT - INTEGRATOR VALUE SELECT 17958 * 0b0..Select the saved value in hardware 17959 * 0b1..Select the integrator value in this register 17960 */ 17961 #define SPM_DCDCC4_INTEGRATOR_VALUE_SELECT(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_SHIFT)) & SPM_DCDCC4_INTEGRATOR_VALUE_SELECT_MASK) 17962 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP_MASK (0x100000U) 17963 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP_SHIFT (20U) 17964 #define SPM_DCDCC4_PULSE_RUN_SPEEDUP(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC4_PULSE_RUN_SPEEDUP_SHIFT)) & SPM_DCDCC4_PULSE_RUN_SPEEDUP_MASK) 17965 /*! @} */ 17966 17967 /*! @name DCDCC6 - DCDC Control Register 6 */ 17968 /*! @{ */ 17969 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_MASK (0x1FU) 17970 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_SHIFT (0U) 17971 #define SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_SHIFT)) & SPM_DCDCC6_DCDC_VDD1P8CTRL_TRG_MASK) 17972 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_MASK (0xF00U) 17973 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_SHIFT (8U) 17974 #define SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_SHIFT)) & SPM_DCDCC6_DCDC_VDD1P2CTRL_TRG_BUCK_MASK) 17975 #define SPM_DCDCC6_DCDC_HSVDD_TRIM_MASK (0xF000000U) 17976 #define SPM_DCDCC6_DCDC_HSVDD_TRIM_SHIFT (24U) 17977 #define SPM_DCDCC6_DCDC_HSVDD_TRIM(x) (((uint32_t)(((uint32_t)(x)) << SPM_DCDCC6_DCDC_HSVDD_TRIM_SHIFT)) & SPM_DCDCC6_DCDC_HSVDD_TRIM_MASK) 17978 /*! @} */ 17979 17980 /*! @name LPREQPINCNTRL - LP Request Pin Control Register */ 17981 /*! @{ */ 17982 #define SPM_LPREQPINCNTRL_LPREQOE_MASK (0x1U) 17983 #define SPM_LPREQPINCNTRL_LPREQOE_SHIFT (0U) 17984 /*! LPREQOE - Low Power Request Output Enable Register 17985 * 0b0..Low Power request output pin not enabled. 17986 * 0b1..Low Power request output pin enabled. 17987 */ 17988 #define SPM_LPREQPINCNTRL_LPREQOE(x) (((uint32_t)(((uint32_t)(x)) << SPM_LPREQPINCNTRL_LPREQOE_SHIFT)) & SPM_LPREQPINCNTRL_LPREQOE_MASK) 17989 #define SPM_LPREQPINCNTRL_POLARITY_MASK (0x2U) 17990 #define SPM_LPREQPINCNTRL_POLARITY_SHIFT (1U) 17991 /*! POLARITY - Low Power Request Output Pin Polarity Control Register 17992 * 0b0..High true polarity. 17993 * 0b1..Low true polarity. 17994 */ 17995 #define SPM_LPREQPINCNTRL_POLARITY(x) (((uint32_t)(((uint32_t)(x)) << SPM_LPREQPINCNTRL_POLARITY_SHIFT)) & SPM_LPREQPINCNTRL_POLARITY_MASK) 17996 /*! @} */ 17997 17998 17999 /*! 18000 * @} 18001 */ /* end of group SPM_Register_Masks */ 18002 18003 18004 /* SPM - Peripheral instance base addresses */ 18005 /** Peripheral SPM base address */ 18006 #define SPM_BASE (0x40028000u) 18007 /** Peripheral SPM base pointer */ 18008 #define SPM ((SPM_Type *)SPM_BASE) 18009 /** Array initializer of SPM peripheral base addresses */ 18010 #define SPM_BASE_ADDRS { SPM_BASE } 18011 /** Array initializer of SPM peripheral base pointers */ 18012 #define SPM_BASE_PTRS { SPM } 18013 /** Interrupt vectors for the SPM peripheral type */ 18014 #define SPM_IRQS { SPM_IRQn } 18015 18016 /*! 18017 * @} 18018 */ /* end of group SPM_Peripheral_Access_Layer */ 18019 18020 18021 /* ---------------------------------------------------------------------------- 18022 -- TPM Peripheral Access Layer 18023 ---------------------------------------------------------------------------- */ 18024 18025 /*! 18026 * @addtogroup TPM_Peripheral_Access_Layer TPM Peripheral Access Layer 18027 * @{ 18028 */ 18029 18030 /** TPM - Register Layout Typedef */ 18031 typedef struct { 18032 __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */ 18033 __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */ 18034 __IO uint32_t GLOBAL; /**< TPM Global Register, offset: 0x8 */ 18035 uint8_t RESERVED_0[4]; 18036 __IO uint32_t SC; /**< Status and Control, offset: 0x10 */ 18037 __IO uint32_t CNT; /**< Counter, offset: 0x14 */ 18038 __IO uint32_t MOD; /**< Modulo, offset: 0x18 */ 18039 __IO uint32_t STATUS; /**< Capture and Compare Status, offset: 0x1C */ 18040 struct { /* offset: 0x20, array step: 0x8 */ 18041 __IO uint32_t CnSC; /**< Channel (n) Status and Control, array offset: 0x20, array step: 0x8 */ 18042 __IO uint32_t CnV; /**< Channel (n) Value, array offset: 0x24, array step: 0x8 */ 18043 } CONTROLS[6]; 18044 uint8_t RESERVED_1[20]; 18045 __IO uint32_t COMBINE; /**< Combine Channel Register, offset: 0x64 */ 18046 uint8_t RESERVED_2[4]; 18047 __IO uint32_t TRIG; /**< Channel Trigger, offset: 0x6C */ 18048 __IO uint32_t POL; /**< Channel Polarity, offset: 0x70 */ 18049 uint8_t RESERVED_3[4]; 18050 __IO uint32_t FILTER; /**< Filter Control, offset: 0x78 */ 18051 uint8_t RESERVED_4[4]; 18052 __IO uint32_t QDCTRL; /**< Quadrature Decoder Control and Status, offset: 0x80 */ 18053 __IO uint32_t CONF; /**< Configuration, offset: 0x84 */ 18054 } TPM_Type; 18055 18056 /* ---------------------------------------------------------------------------- 18057 -- TPM Register Masks 18058 ---------------------------------------------------------------------------- */ 18059 18060 /*! 18061 * @addtogroup TPM_Register_Masks TPM Register Masks 18062 * @{ 18063 */ 18064 18065 /*! @name VERID - Version ID Register */ 18066 /*! @{ */ 18067 #define TPM_VERID_FEATURE_MASK (0xFFFFU) 18068 #define TPM_VERID_FEATURE_SHIFT (0U) 18069 /*! FEATURE - Feature Identification Number 18070 * 0b0000000000000001..Standard feature set. 18071 * 0b0000000000000011..Standard feature set with Filter and Combine registers implemented. 18072 * 0b0000000000000111..Standard feature set with Filter, Combine and Quadrature registers implemented. 18073 */ 18074 #define TPM_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << TPM_VERID_FEATURE_SHIFT)) & TPM_VERID_FEATURE_MASK) 18075 #define TPM_VERID_MINOR_MASK (0xFF0000U) 18076 #define TPM_VERID_MINOR_SHIFT (16U) 18077 #define TPM_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << TPM_VERID_MINOR_SHIFT)) & TPM_VERID_MINOR_MASK) 18078 #define TPM_VERID_MAJOR_MASK (0xFF000000U) 18079 #define TPM_VERID_MAJOR_SHIFT (24U) 18080 #define TPM_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << TPM_VERID_MAJOR_SHIFT)) & TPM_VERID_MAJOR_MASK) 18081 /*! @} */ 18082 18083 /*! @name PARAM - Parameter Register */ 18084 /*! @{ */ 18085 #define TPM_PARAM_CHAN_MASK (0xFFU) 18086 #define TPM_PARAM_CHAN_SHIFT (0U) 18087 #define TPM_PARAM_CHAN(x) (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_CHAN_SHIFT)) & TPM_PARAM_CHAN_MASK) 18088 #define TPM_PARAM_TRIG_MASK (0xFF00U) 18089 #define TPM_PARAM_TRIG_SHIFT (8U) 18090 #define TPM_PARAM_TRIG(x) (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_TRIG_SHIFT)) & TPM_PARAM_TRIG_MASK) 18091 #define TPM_PARAM_WIDTH_MASK (0xFF0000U) 18092 #define TPM_PARAM_WIDTH_SHIFT (16U) 18093 #define TPM_PARAM_WIDTH(x) (((uint32_t)(((uint32_t)(x)) << TPM_PARAM_WIDTH_SHIFT)) & TPM_PARAM_WIDTH_MASK) 18094 /*! @} */ 18095 18096 /*! @name GLOBAL - TPM Global Register */ 18097 /*! @{ */ 18098 #define TPM_GLOBAL_NOUPDATE_MASK (0x1U) 18099 #define TPM_GLOBAL_NOUPDATE_SHIFT (0U) 18100 /*! NOUPDATE - No Update 18101 * 0b0..Internal double buffered registers update as normal. 18102 * 0b1..Internal double buffered registers do not update. 18103 */ 18104 #define TPM_GLOBAL_NOUPDATE(x) (((uint32_t)(((uint32_t)(x)) << TPM_GLOBAL_NOUPDATE_SHIFT)) & TPM_GLOBAL_NOUPDATE_MASK) 18105 #define TPM_GLOBAL_RST_MASK (0x2U) 18106 #define TPM_GLOBAL_RST_SHIFT (1U) 18107 /*! RST - Software Reset 18108 * 0b0..Module is not reset. 18109 * 0b1..Module is reset. 18110 */ 18111 #define TPM_GLOBAL_RST(x) (((uint32_t)(((uint32_t)(x)) << TPM_GLOBAL_RST_SHIFT)) & TPM_GLOBAL_RST_MASK) 18112 /*! @} */ 18113 18114 /*! @name SC - Status and Control */ 18115 /*! @{ */ 18116 #define TPM_SC_PS_MASK (0x7U) 18117 #define TPM_SC_PS_SHIFT (0U) 18118 /*! PS - Prescale Factor Selection 18119 * 0b000..Divide by 1 18120 * 0b001..Divide by 2 18121 * 0b010..Divide by 4 18122 * 0b011..Divide by 8 18123 * 0b100..Divide by 16 18124 * 0b101..Divide by 32 18125 * 0b110..Divide by 64 18126 * 0b111..Divide by 128 18127 */ 18128 #define TPM_SC_PS(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_PS_SHIFT)) & TPM_SC_PS_MASK) 18129 #define TPM_SC_CMOD_MASK (0x18U) 18130 #define TPM_SC_CMOD_SHIFT (3U) 18131 /*! CMOD - Clock Mode Selection 18132 * 0b00..TPM counter is disabled 18133 * 0b01..TPM counter increments on every TPM counter clock 18134 * 0b10..TPM counter increments on rising edge of TPM_EXTCLK synchronized to the TPM counter clock 18135 * 0b11..TPM counter increments on rising edge of the selected external input trigger. 18136 */ 18137 #define TPM_SC_CMOD(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_CMOD_SHIFT)) & TPM_SC_CMOD_MASK) 18138 #define TPM_SC_CPWMS_MASK (0x20U) 18139 #define TPM_SC_CPWMS_SHIFT (5U) 18140 /*! CPWMS - Center-Aligned PWM Select 18141 * 0b0..TPM counter operates in up counting mode. 18142 * 0b1..TPM counter operates in up-down counting mode. 18143 */ 18144 #define TPM_SC_CPWMS(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_CPWMS_SHIFT)) & TPM_SC_CPWMS_MASK) 18145 #define TPM_SC_TOIE_MASK (0x40U) 18146 #define TPM_SC_TOIE_SHIFT (6U) 18147 /*! TOIE - Timer Overflow Interrupt Enable 18148 * 0b0..Disable TOF interrupts. Use software polling or DMA request. 18149 * 0b1..Enable TOF interrupts. An interrupt is generated when TOF equals one. 18150 */ 18151 #define TPM_SC_TOIE(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOIE_SHIFT)) & TPM_SC_TOIE_MASK) 18152 #define TPM_SC_TOF_MASK (0x80U) 18153 #define TPM_SC_TOF_SHIFT (7U) 18154 /*! TOF - Timer Overflow Flag 18155 * 0b0..TPM counter has not overflowed. 18156 * 0b1..TPM counter has overflowed. 18157 */ 18158 #define TPM_SC_TOF(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOF_SHIFT)) & TPM_SC_TOF_MASK) 18159 #define TPM_SC_DMA_MASK (0x100U) 18160 #define TPM_SC_DMA_SHIFT (8U) 18161 /*! DMA - DMA Enable 18162 * 0b0..Disables DMA transfers. 18163 * 0b1..Enables DMA transfers. 18164 */ 18165 #define TPM_SC_DMA(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_DMA_SHIFT)) & TPM_SC_DMA_MASK) 18166 /*! @} */ 18167 18168 /*! @name CNT - Counter */ 18169 /*! @{ */ 18170 #define TPM_CNT_COUNT_MASK (0xFFFFU) 18171 #define TPM_CNT_COUNT_SHIFT (0U) 18172 #define TPM_CNT_COUNT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CNT_COUNT_SHIFT)) & TPM_CNT_COUNT_MASK) 18173 /*! @} */ 18174 18175 /*! @name MOD - Modulo */ 18176 /*! @{ */ 18177 #define TPM_MOD_MOD_MASK (0xFFFFU) 18178 #define TPM_MOD_MOD_SHIFT (0U) 18179 #define TPM_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << TPM_MOD_MOD_SHIFT)) & TPM_MOD_MOD_MASK) 18180 /*! @} */ 18181 18182 /*! @name STATUS - Capture and Compare Status */ 18183 /*! @{ */ 18184 #define TPM_STATUS_CH0F_MASK (0x1U) 18185 #define TPM_STATUS_CH0F_SHIFT (0U) 18186 /*! CH0F - Channel 0 Flag 18187 * 0b0..No channel event has occurred. 18188 * 0b1..A channel event has occurred. 18189 */ 18190 #define TPM_STATUS_CH0F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH0F_SHIFT)) & TPM_STATUS_CH0F_MASK) 18191 #define TPM_STATUS_CH1F_MASK (0x2U) 18192 #define TPM_STATUS_CH1F_SHIFT (1U) 18193 /*! CH1F - Channel 1 Flag 18194 * 0b0..No channel event has occurred. 18195 * 0b1..A channel event has occurred. 18196 */ 18197 #define TPM_STATUS_CH1F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH1F_SHIFT)) & TPM_STATUS_CH1F_MASK) 18198 #define TPM_STATUS_CH2F_MASK (0x4U) 18199 #define TPM_STATUS_CH2F_SHIFT (2U) 18200 /*! CH2F - Channel 2 Flag 18201 * 0b0..No channel event has occurred. 18202 * 0b1..A channel event has occurred. 18203 */ 18204 #define TPM_STATUS_CH2F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH2F_SHIFT)) & TPM_STATUS_CH2F_MASK) 18205 #define TPM_STATUS_CH3F_MASK (0x8U) 18206 #define TPM_STATUS_CH3F_SHIFT (3U) 18207 /*! CH3F - Channel 3 Flag 18208 * 0b0..No channel event has occurred. 18209 * 0b1..A channel event has occurred. 18210 */ 18211 #define TPM_STATUS_CH3F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH3F_SHIFT)) & TPM_STATUS_CH3F_MASK) 18212 #define TPM_STATUS_CH4F_MASK (0x10U) 18213 #define TPM_STATUS_CH4F_SHIFT (4U) 18214 /*! CH4F - Channel 4 Flag 18215 * 0b0..No channel event has occurred. 18216 * 0b1..A channel event has occurred. 18217 */ 18218 #define TPM_STATUS_CH4F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH4F_SHIFT)) & TPM_STATUS_CH4F_MASK) 18219 #define TPM_STATUS_CH5F_MASK (0x20U) 18220 #define TPM_STATUS_CH5F_SHIFT (5U) 18221 /*! CH5F - Channel 5 Flag 18222 * 0b0..No channel event has occurred. 18223 * 0b1..A channel event has occurred. 18224 */ 18225 #define TPM_STATUS_CH5F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH5F_SHIFT)) & TPM_STATUS_CH5F_MASK) 18226 #define TPM_STATUS_TOF_MASK (0x100U) 18227 #define TPM_STATUS_TOF_SHIFT (8U) 18228 /*! TOF - Timer Overflow Flag 18229 * 0b0..TPM counter has not overflowed. 18230 * 0b1..TPM counter has overflowed. 18231 */ 18232 #define TPM_STATUS_TOF(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_TOF_SHIFT)) & TPM_STATUS_TOF_MASK) 18233 /*! @} */ 18234 18235 /*! @name CnSC - Channel (n) Status and Control */ 18236 /*! @{ */ 18237 #define TPM_CnSC_DMA_MASK (0x1U) 18238 #define TPM_CnSC_DMA_SHIFT (0U) 18239 /*! DMA - DMA Enable 18240 * 0b0..Disable DMA transfers. 18241 * 0b1..Enable DMA transfers. 18242 */ 18243 #define TPM_CnSC_DMA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_DMA_SHIFT)) & TPM_CnSC_DMA_MASK) 18244 #define TPM_CnSC_ELSA_MASK (0x4U) 18245 #define TPM_CnSC_ELSA_SHIFT (2U) 18246 #define TPM_CnSC_ELSA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSA_SHIFT)) & TPM_CnSC_ELSA_MASK) 18247 #define TPM_CnSC_ELSB_MASK (0x8U) 18248 #define TPM_CnSC_ELSB_SHIFT (3U) 18249 #define TPM_CnSC_ELSB(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSB_SHIFT)) & TPM_CnSC_ELSB_MASK) 18250 #define TPM_CnSC_MSA_MASK (0x10U) 18251 #define TPM_CnSC_MSA_SHIFT (4U) 18252 #define TPM_CnSC_MSA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSA_SHIFT)) & TPM_CnSC_MSA_MASK) 18253 #define TPM_CnSC_MSB_MASK (0x20U) 18254 #define TPM_CnSC_MSB_SHIFT (5U) 18255 #define TPM_CnSC_MSB(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSB_SHIFT)) & TPM_CnSC_MSB_MASK) 18256 #define TPM_CnSC_CHIE_MASK (0x40U) 18257 #define TPM_CnSC_CHIE_SHIFT (6U) 18258 /*! CHIE - Channel Interrupt Enable 18259 * 0b0..Disable channel interrupts. 18260 * 0b1..Enable channel interrupts. 18261 */ 18262 #define TPM_CnSC_CHIE(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHIE_SHIFT)) & TPM_CnSC_CHIE_MASK) 18263 #define TPM_CnSC_CHF_MASK (0x80U) 18264 #define TPM_CnSC_CHF_SHIFT (7U) 18265 /*! CHF - Channel Flag 18266 * 0b0..No channel event has occurred. 18267 * 0b1..A channel event has occurred. 18268 */ 18269 #define TPM_CnSC_CHF(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHF_SHIFT)) & TPM_CnSC_CHF_MASK) 18270 /*! @} */ 18271 18272 /* The count of TPM_CnSC */ 18273 #define TPM_CnSC_COUNT (6U) 18274 18275 /*! @name CnV - Channel (n) Value */ 18276 /*! @{ */ 18277 #define TPM_CnV_VAL_MASK (0xFFFFU) 18278 #define TPM_CnV_VAL_SHIFT (0U) 18279 #define TPM_CnV_VAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnV_VAL_SHIFT)) & TPM_CnV_VAL_MASK) 18280 /*! @} */ 18281 18282 /* The count of TPM_CnV */ 18283 #define TPM_CnV_COUNT (6U) 18284 18285 /*! @name COMBINE - Combine Channel Register */ 18286 /*! @{ */ 18287 #define TPM_COMBINE_COMBINE0_MASK (0x1U) 18288 #define TPM_COMBINE_COMBINE0_SHIFT (0U) 18289 /*! COMBINE0 - Combine Channels 0 and 1 18290 * 0b0..Channels 0 and 1 are independent. 18291 * 0b1..Channels 0 and 1 are combined. 18292 */ 18293 #define TPM_COMBINE_COMBINE0(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE0_SHIFT)) & TPM_COMBINE_COMBINE0_MASK) 18294 #define TPM_COMBINE_COMSWAP0_MASK (0x2U) 18295 #define TPM_COMBINE_COMSWAP0_SHIFT (1U) 18296 /*! COMSWAP0 - Combine Channel 0 and 1 Swap 18297 * 0b0..Even channel is used for input capture and 1st compare. 18298 * 0b1..Odd channel is used for input capture and 1st compare. 18299 */ 18300 #define TPM_COMBINE_COMSWAP0(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP0_SHIFT)) & TPM_COMBINE_COMSWAP0_MASK) 18301 #define TPM_COMBINE_COMBINE1_MASK (0x100U) 18302 #define TPM_COMBINE_COMBINE1_SHIFT (8U) 18303 /*! COMBINE1 - Combine Channels 2 and 3 18304 * 0b0..Channels 2 and 3 are independent. 18305 * 0b1..Channels 2 and 3 are combined. 18306 */ 18307 #define TPM_COMBINE_COMBINE1(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE1_SHIFT)) & TPM_COMBINE_COMBINE1_MASK) 18308 #define TPM_COMBINE_COMSWAP1_MASK (0x200U) 18309 #define TPM_COMBINE_COMSWAP1_SHIFT (9U) 18310 /*! COMSWAP1 - Combine Channels 2 and 3 Swap 18311 * 0b0..Even channel is used for input capture and 1st compare. 18312 * 0b1..Odd channel is used for input capture and 1st compare. 18313 */ 18314 #define TPM_COMBINE_COMSWAP1(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP1_SHIFT)) & TPM_COMBINE_COMSWAP1_MASK) 18315 #define TPM_COMBINE_COMBINE2_MASK (0x10000U) 18316 #define TPM_COMBINE_COMBINE2_SHIFT (16U) 18317 /*! COMBINE2 - Combine Channels 4 and 5 18318 * 0b0..Channels 4 and 5 are independent. 18319 * 0b1..Channels 4 and 5 are combined. 18320 */ 18321 #define TPM_COMBINE_COMBINE2(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE2_SHIFT)) & TPM_COMBINE_COMBINE2_MASK) 18322 #define TPM_COMBINE_COMSWAP2_MASK (0x20000U) 18323 #define TPM_COMBINE_COMSWAP2_SHIFT (17U) 18324 /*! COMSWAP2 - Combine Channels 4 and 5 Swap 18325 * 0b0..Even channel is used for input capture and 1st compare. 18326 * 0b1..Odd channel is used for input capture and 1st compare. 18327 */ 18328 #define TPM_COMBINE_COMSWAP2(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP2_SHIFT)) & TPM_COMBINE_COMSWAP2_MASK) 18329 /*! @} */ 18330 18331 /*! @name TRIG - Channel Trigger */ 18332 /*! @{ */ 18333 #define TPM_TRIG_TRIG0_MASK (0x1U) 18334 #define TPM_TRIG_TRIG0_SHIFT (0U) 18335 /*! TRIG0 - Channel 0 Trigger 18336 * 0b0..No effect. 18337 * 0b1..Configures trigger input 0 to be used by channel 0. 18338 */ 18339 #define TPM_TRIG_TRIG0(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG0_SHIFT)) & TPM_TRIG_TRIG0_MASK) 18340 #define TPM_TRIG_TRIG1_MASK (0x2U) 18341 #define TPM_TRIG_TRIG1_SHIFT (1U) 18342 /*! TRIG1 - Channel 1 Trigger 18343 * 0b0..No effect. 18344 * 0b1..Configures trigger input 1 to be used by channel 1. 18345 */ 18346 #define TPM_TRIG_TRIG1(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG1_SHIFT)) & TPM_TRIG_TRIG1_MASK) 18347 #define TPM_TRIG_TRIG2_MASK (0x4U) 18348 #define TPM_TRIG_TRIG2_SHIFT (2U) 18349 /*! TRIG2 - Channel 2 Trigger 18350 * 0b0..No effect. 18351 * 0b1..Configures trigger input 0 to be used by channel 2. 18352 */ 18353 #define TPM_TRIG_TRIG2(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG2_SHIFT)) & TPM_TRIG_TRIG2_MASK) 18354 #define TPM_TRIG_TRIG3_MASK (0x8U) 18355 #define TPM_TRIG_TRIG3_SHIFT (3U) 18356 /*! TRIG3 - Channel 3 Trigger 18357 * 0b0..No effect. 18358 * 0b1..Configures trigger input 1 to be used by channel 3. 18359 */ 18360 #define TPM_TRIG_TRIG3(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG3_SHIFT)) & TPM_TRIG_TRIG3_MASK) 18361 #define TPM_TRIG_TRIG4_MASK (0x10U) 18362 #define TPM_TRIG_TRIG4_SHIFT (4U) 18363 /*! TRIG4 - Channel 4 Trigger 18364 * 0b0..No effect. 18365 * 0b1..Configures trigger input 0 to be used by channel 4. 18366 */ 18367 #define TPM_TRIG_TRIG4(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG4_SHIFT)) & TPM_TRIG_TRIG4_MASK) 18368 #define TPM_TRIG_TRIG5_MASK (0x20U) 18369 #define TPM_TRIG_TRIG5_SHIFT (5U) 18370 /*! TRIG5 - Channel 5 Trigger 18371 * 0b0..No effect. 18372 * 0b1..Configures trigger input 1 to be used by channel 5. 18373 */ 18374 #define TPM_TRIG_TRIG5(x) (((uint32_t)(((uint32_t)(x)) << TPM_TRIG_TRIG5_SHIFT)) & TPM_TRIG_TRIG5_MASK) 18375 /*! @} */ 18376 18377 /*! @name POL - Channel Polarity */ 18378 /*! @{ */ 18379 #define TPM_POL_POL0_MASK (0x1U) 18380 #define TPM_POL_POL0_SHIFT (0U) 18381 /*! POL0 - Channel 0 Polarity 18382 * 0b0..The channel polarity is active high. 18383 * 0b1..The channel polarity is active low. 18384 */ 18385 #define TPM_POL_POL0(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL0_SHIFT)) & TPM_POL_POL0_MASK) 18386 #define TPM_POL_POL1_MASK (0x2U) 18387 #define TPM_POL_POL1_SHIFT (1U) 18388 /*! POL1 - Channel 1 Polarity 18389 * 0b0..The channel polarity is active high. 18390 * 0b1..The channel polarity is active low. 18391 */ 18392 #define TPM_POL_POL1(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL1_SHIFT)) & TPM_POL_POL1_MASK) 18393 #define TPM_POL_POL2_MASK (0x4U) 18394 #define TPM_POL_POL2_SHIFT (2U) 18395 /*! POL2 - Channel 2 Polarity 18396 * 0b0..The channel polarity is active high. 18397 * 0b1..The channel polarity is active low. 18398 */ 18399 #define TPM_POL_POL2(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL2_SHIFT)) & TPM_POL_POL2_MASK) 18400 #define TPM_POL_POL3_MASK (0x8U) 18401 #define TPM_POL_POL3_SHIFT (3U) 18402 /*! POL3 - Channel 3 Polarity 18403 * 0b0..The channel polarity is active high. 18404 * 0b1..The channel polarity is active low. 18405 */ 18406 #define TPM_POL_POL3(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL3_SHIFT)) & TPM_POL_POL3_MASK) 18407 #define TPM_POL_POL4_MASK (0x10U) 18408 #define TPM_POL_POL4_SHIFT (4U) 18409 /*! POL4 - Channel 4 Polarity 18410 * 0b0..The channel polarity is active high 18411 * 0b1..The channel polarity is active low. 18412 */ 18413 #define TPM_POL_POL4(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL4_SHIFT)) & TPM_POL_POL4_MASK) 18414 #define TPM_POL_POL5_MASK (0x20U) 18415 #define TPM_POL_POL5_SHIFT (5U) 18416 /*! POL5 - Channel 5 Polarity 18417 * 0b0..The channel polarity is active high. 18418 * 0b1..The channel polarity is active low. 18419 */ 18420 #define TPM_POL_POL5(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL5_SHIFT)) & TPM_POL_POL5_MASK) 18421 /*! @} */ 18422 18423 /*! @name FILTER - Filter Control */ 18424 /*! @{ */ 18425 #define TPM_FILTER_CH0FVAL_MASK (0xFU) 18426 #define TPM_FILTER_CH0FVAL_SHIFT (0U) 18427 #define TPM_FILTER_CH0FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH0FVAL_SHIFT)) & TPM_FILTER_CH0FVAL_MASK) 18428 #define TPM_FILTER_CH1FVAL_MASK (0xF0U) 18429 #define TPM_FILTER_CH1FVAL_SHIFT (4U) 18430 #define TPM_FILTER_CH1FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH1FVAL_SHIFT)) & TPM_FILTER_CH1FVAL_MASK) 18431 #define TPM_FILTER_CH2FVAL_MASK (0xF00U) 18432 #define TPM_FILTER_CH2FVAL_SHIFT (8U) 18433 #define TPM_FILTER_CH2FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH2FVAL_SHIFT)) & TPM_FILTER_CH2FVAL_MASK) 18434 #define TPM_FILTER_CH3FVAL_MASK (0xF000U) 18435 #define TPM_FILTER_CH3FVAL_SHIFT (12U) 18436 #define TPM_FILTER_CH3FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH3FVAL_SHIFT)) & TPM_FILTER_CH3FVAL_MASK) 18437 #define TPM_FILTER_CH4FVAL_MASK (0xF0000U) 18438 #define TPM_FILTER_CH4FVAL_SHIFT (16U) 18439 #define TPM_FILTER_CH4FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH4FVAL_SHIFT)) & TPM_FILTER_CH4FVAL_MASK) 18440 #define TPM_FILTER_CH5FVAL_MASK (0xF00000U) 18441 #define TPM_FILTER_CH5FVAL_SHIFT (20U) 18442 #define TPM_FILTER_CH5FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH5FVAL_SHIFT)) & TPM_FILTER_CH5FVAL_MASK) 18443 /*! @} */ 18444 18445 /*! @name QDCTRL - Quadrature Decoder Control and Status */ 18446 /*! @{ */ 18447 #define TPM_QDCTRL_QUADEN_MASK (0x1U) 18448 #define TPM_QDCTRL_QUADEN_SHIFT (0U) 18449 /*! QUADEN - QUADEN 18450 * 0b0..Quadrature decoder mode is disabled. 18451 * 0b1..Quadrature decoder mode is enabled. 18452 */ 18453 #define TPM_QDCTRL_QUADEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADEN_SHIFT)) & TPM_QDCTRL_QUADEN_MASK) 18454 #define TPM_QDCTRL_TOFDIR_MASK (0x2U) 18455 #define TPM_QDCTRL_TOFDIR_SHIFT (1U) 18456 /*! TOFDIR - TOFDIR 18457 * 0b0..TOF bit was set on the bottom of counting. There was an FTM counter decrement and FTM counter changes 18458 * from its minimum value (zero) to its maximum value (MOD register). 18459 * 0b1..TOF bit was set on the top of counting. There was an FTM counter increment and FTM counter changes from 18460 * its maximum value (MOD register) to its minimum value (zero). 18461 */ 18462 #define TPM_QDCTRL_TOFDIR(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_TOFDIR_SHIFT)) & TPM_QDCTRL_TOFDIR_MASK) 18463 #define TPM_QDCTRL_QUADIR_MASK (0x4U) 18464 #define TPM_QDCTRL_QUADIR_SHIFT (2U) 18465 /*! QUADIR - Counter Direction in Quadrature Decode Mode 18466 * 0b0..Counter direction is decreasing (counter decrement). 18467 * 0b1..Counter direction is increasing (counter increment). 18468 */ 18469 #define TPM_QDCTRL_QUADIR(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADIR_SHIFT)) & TPM_QDCTRL_QUADIR_MASK) 18470 #define TPM_QDCTRL_QUADMODE_MASK (0x8U) 18471 #define TPM_QDCTRL_QUADMODE_SHIFT (3U) 18472 /*! QUADMODE - Quadrature Decoder Mode 18473 * 0b0..Phase encoding mode. 18474 * 0b1..Count and direction encoding mode. 18475 */ 18476 #define TPM_QDCTRL_QUADMODE(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADMODE_SHIFT)) & TPM_QDCTRL_QUADMODE_MASK) 18477 /*! @} */ 18478 18479 /*! @name CONF - Configuration */ 18480 /*! @{ */ 18481 #define TPM_CONF_DOZEEN_MASK (0x20U) 18482 #define TPM_CONF_DOZEEN_SHIFT (5U) 18483 /*! DOZEEN - Doze Enable 18484 * 0b0..Internal TPM counter continues in Doze mode. 18485 * 0b1..Internal TPM counter is paused and does not increment during Doze mode. Trigger inputs and input capture 18486 * events are ignored, and PWM outputs are forced to their default state. 18487 */ 18488 #define TPM_CONF_DOZEEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DOZEEN_SHIFT)) & TPM_CONF_DOZEEN_MASK) 18489 #define TPM_CONF_DBGMODE_MASK (0xC0U) 18490 #define TPM_CONF_DBGMODE_SHIFT (6U) 18491 /*! DBGMODE - Debug Mode 18492 * 0b00..TPM counter is paused and does not increment during debug mode. Trigger inputs and input capture events 18493 * are ignored, and PWM outputs are forced to their default state. 18494 * 0b11..TPM counter continues in debug mode. 18495 */ 18496 #define TPM_CONF_DBGMODE(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DBGMODE_SHIFT)) & TPM_CONF_DBGMODE_MASK) 18497 #define TPM_CONF_GTBSYNC_MASK (0x100U) 18498 #define TPM_CONF_GTBSYNC_SHIFT (8U) 18499 /*! GTBSYNC - Global Time Base Synchronization 18500 * 0b0..Global timebase synchronization disabled. 18501 * 0b1..Global timebase synchronization enabled. 18502 */ 18503 #define TPM_CONF_GTBSYNC(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBSYNC_SHIFT)) & TPM_CONF_GTBSYNC_MASK) 18504 #define TPM_CONF_GTBEEN_MASK (0x200U) 18505 #define TPM_CONF_GTBEEN_SHIFT (9U) 18506 /*! GTBEEN - Global time base enable 18507 * 0b0..All channels use the internally generated TPM counter as their timebase 18508 * 0b1..All channels use an externally generated global timebase as their timebase 18509 */ 18510 #define TPM_CONF_GTBEEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBEEN_SHIFT)) & TPM_CONF_GTBEEN_MASK) 18511 #define TPM_CONF_CSOT_MASK (0x10000U) 18512 #define TPM_CONF_CSOT_SHIFT (16U) 18513 /*! CSOT - Counter Start on Trigger 18514 * 0b0..TPM counter starts to increment immediately, once it is enabled. 18515 * 0b1..TPM counter only starts to increment when it a rising edge on the selected input trigger is detected, 18516 * after it has been enabled or after it has stopped due to overflow. 18517 */ 18518 #define TPM_CONF_CSOT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOT_SHIFT)) & TPM_CONF_CSOT_MASK) 18519 #define TPM_CONF_CSOO_MASK (0x20000U) 18520 #define TPM_CONF_CSOO_SHIFT (17U) 18521 /*! CSOO - Counter Stop On Overflow 18522 * 0b0..TPM counter continues incrementing or decrementing after overflow 18523 * 0b1..TPM counter stops incrementing or decrementing after overflow. 18524 */ 18525 #define TPM_CONF_CSOO(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOO_SHIFT)) & TPM_CONF_CSOO_MASK) 18526 #define TPM_CONF_CROT_MASK (0x40000U) 18527 #define TPM_CONF_CROT_SHIFT (18U) 18528 /*! CROT - Counter Reload On Trigger 18529 * 0b0..Counter is not reloaded due to a rising edge on the selected input trigger 18530 * 0b1..Counter is reloaded when a rising edge is detected on the selected input trigger 18531 */ 18532 #define TPM_CONF_CROT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CROT_SHIFT)) & TPM_CONF_CROT_MASK) 18533 #define TPM_CONF_CPOT_MASK (0x80000U) 18534 #define TPM_CONF_CPOT_SHIFT (19U) 18535 #define TPM_CONF_CPOT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CPOT_SHIFT)) & TPM_CONF_CPOT_MASK) 18536 #define TPM_CONF_TRGPOL_MASK (0x400000U) 18537 #define TPM_CONF_TRGPOL_SHIFT (22U) 18538 /*! TRGPOL - Trigger Polarity 18539 * 0b0..Trigger is active high. 18540 * 0b1..Trigger is active low. 18541 */ 18542 #define TPM_CONF_TRGPOL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGPOL_SHIFT)) & TPM_CONF_TRGPOL_MASK) 18543 #define TPM_CONF_TRGSRC_MASK (0x800000U) 18544 #define TPM_CONF_TRGSRC_SHIFT (23U) 18545 /*! TRGSRC - Trigger Source 18546 * 0b0..Trigger source selected by TRGSEL is external. 18547 * 0b1..Trigger source selected by TRGSEL is internal (channel pin input capture). 18548 */ 18549 #define TPM_CONF_TRGSRC(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSRC_SHIFT)) & TPM_CONF_TRGSRC_MASK) 18550 #define TPM_CONF_TRGSEL_MASK (0x3000000U) 18551 #define TPM_CONF_TRGSEL_SHIFT (24U) 18552 /*! TRGSEL - Trigger Select 18553 * 0b01..Channel 0 pin input capture 18554 * 0b10..Channel 1 pin input capture 18555 * 0b11..Channel 0 or Channel 1 pin input capture 18556 */ 18557 #define TPM_CONF_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSEL_SHIFT)) & TPM_CONF_TRGSEL_MASK) 18558 /*! @} */ 18559 18560 18561 /*! 18562 * @} 18563 */ /* end of group TPM_Register_Masks */ 18564 18565 18566 /* TPM - Peripheral instance base addresses */ 18567 /** Peripheral TPM0 base address */ 18568 #define TPM0_BASE (0x40035000u) 18569 /** Peripheral TPM0 base pointer */ 18570 #define TPM0 ((TPM_Type *)TPM0_BASE) 18571 /** Peripheral TPM1 base address */ 18572 #define TPM1_BASE (0x40036000u) 18573 /** Peripheral TPM1 base pointer */ 18574 #define TPM1 ((TPM_Type *)TPM1_BASE) 18575 /** Peripheral TPM2 base address */ 18576 #define TPM2_BASE (0x40037000u) 18577 /** Peripheral TPM2 base pointer */ 18578 #define TPM2 ((TPM_Type *)TPM2_BASE) 18579 /** Peripheral TPM3 base address */ 18580 #define TPM3_BASE (0x4102D000u) 18581 /** Peripheral TPM3 base pointer */ 18582 #define TPM3 ((TPM_Type *)TPM3_BASE) 18583 /** Array initializer of TPM peripheral base addresses */ 18584 #define TPM_BASE_ADDRS { TPM0_BASE, TPM1_BASE, TPM2_BASE, TPM3_BASE } 18585 /** Array initializer of TPM peripheral base pointers */ 18586 #define TPM_BASE_PTRS { TPM0, TPM1, TPM2, TPM3 } 18587 /** Interrupt vectors for the TPM peripheral type */ 18588 #define TPM_IRQS { TPM0_IRQn, TPM1_IRQn, TPM2_IRQn, TPM3_IRQn } 18589 18590 /*! 18591 * @} 18592 */ /* end of group TPM_Peripheral_Access_Layer */ 18593 18594 18595 /* ---------------------------------------------------------------------------- 18596 -- TRGMUX Peripheral Access Layer 18597 ---------------------------------------------------------------------------- */ 18598 18599 /*! 18600 * @addtogroup TRGMUX_Peripheral_Access_Layer TRGMUX Peripheral Access Layer 18601 * @{ 18602 */ 18603 18604 /** TRGMUX - Register Layout Typedef */ 18605 typedef struct { 18606 __IO uint32_t TRGCFG[25]; /**< TRGMUX TRGMUX_DMAMUX0 Register..TRGMUX TRGMUX_LPDAC0 Register, array offset: 0x0, array step: 0x4 */ 18607 } TRGMUX_Type; 18608 18609 /* ---------------------------------------------------------------------------- 18610 -- TRGMUX Register Masks 18611 ---------------------------------------------------------------------------- */ 18612 18613 /*! 18614 * @addtogroup TRGMUX_Register_Masks TRGMUX Register Masks 18615 * @{ 18616 */ 18617 18618 /*! @name TRGCFG - TRGMUX TRGMUX_DMAMUX0 Register..TRGMUX TRGMUX_LPDAC0 Register */ 18619 /*! @{ */ 18620 #define TRGMUX_TRGCFG_SEL0_MASK (0x3FU) 18621 #define TRGMUX_TRGCFG_SEL0_SHIFT (0U) 18622 #define TRGMUX_TRGCFG_SEL0(x) (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL0_SHIFT)) & TRGMUX_TRGCFG_SEL0_MASK) 18623 #define TRGMUX_TRGCFG_SEL1_MASK (0x3F00U) 18624 #define TRGMUX_TRGCFG_SEL1_SHIFT (8U) 18625 #define TRGMUX_TRGCFG_SEL1(x) (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL1_SHIFT)) & TRGMUX_TRGCFG_SEL1_MASK) 18626 #define TRGMUX_TRGCFG_SEL2_MASK (0x3F0000U) 18627 #define TRGMUX_TRGCFG_SEL2_SHIFT (16U) 18628 #define TRGMUX_TRGCFG_SEL2(x) (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL2_SHIFT)) & TRGMUX_TRGCFG_SEL2_MASK) 18629 #define TRGMUX_TRGCFG_SEL3_MASK (0x3F000000U) 18630 #define TRGMUX_TRGCFG_SEL3_SHIFT (24U) 18631 #define TRGMUX_TRGCFG_SEL3(x) (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_SEL3_SHIFT)) & TRGMUX_TRGCFG_SEL3_MASK) 18632 #define TRGMUX_TRGCFG_LK_MASK (0x80000000U) 18633 #define TRGMUX_TRGCFG_LK_SHIFT (31U) 18634 /*! LK - TRGMUX register lock. 18635 * 0b0..Register can be written. 18636 * 0b1..Register cannot be written until the next system Reset. 18637 */ 18638 #define TRGMUX_TRGCFG_LK(x) (((uint32_t)(((uint32_t)(x)) << TRGMUX_TRGCFG_LK_SHIFT)) & TRGMUX_TRGCFG_LK_MASK) 18639 /*! @} */ 18640 18641 /* The count of TRGMUX_TRGCFG */ 18642 #define TRGMUX_TRGCFG_COUNT (25U) 18643 18644 18645 /*! 18646 * @} 18647 */ /* end of group TRGMUX_Register_Masks */ 18648 18649 18650 /* TRGMUX - Peripheral instance base addresses */ 18651 /** Peripheral TRGMUX0 base address */ 18652 #define TRGMUX0_BASE (0x40029000u) 18653 /** Peripheral TRGMUX0 base pointer */ 18654 #define TRGMUX0 ((TRGMUX_Type *)TRGMUX0_BASE) 18655 /** Peripheral TRGMUX1 base address */ 18656 #define TRGMUX1_BASE (0x41025000u) 18657 /** Peripheral TRGMUX1 base pointer */ 18658 #define TRGMUX1 ((TRGMUX_Type *)TRGMUX1_BASE) 18659 /** Array initializer of TRGMUX peripheral base addresses */ 18660 #define TRGMUX_BASE_ADDRS { TRGMUX0_BASE, TRGMUX1_BASE } 18661 /** Array initializer of TRGMUX peripheral base pointers */ 18662 #define TRGMUX_BASE_PTRS { TRGMUX0, TRGMUX1 } 18663 18664 /*! 18665 * @} 18666 */ /* end of group TRGMUX_Peripheral_Access_Layer */ 18667 18668 18669 /* ---------------------------------------------------------------------------- 18670 -- TRNG Peripheral Access Layer 18671 ---------------------------------------------------------------------------- */ 18672 18673 /*! 18674 * @addtogroup TRNG_Peripheral_Access_Layer TRNG Peripheral Access Layer 18675 * @{ 18676 */ 18677 18678 /** TRNG - Register Layout Typedef */ 18679 typedef struct { 18680 __IO uint32_t MCTL; /**< Miscellaneous Control Register, offset: 0x0 */ 18681 __IO uint32_t SCMISC; /**< Statistical Check Miscellaneous Register, offset: 0x4 */ 18682 __IO uint32_t PKRRNG; /**< Poker Range Register, offset: 0x8 */ 18683 union { /* offset: 0xC */ 18684 __IO uint32_t PKRMAX; /**< Poker Maximum Limit Register, offset: 0xC */ 18685 __I uint32_t PKRSQ; /**< Poker Square Calculation Result Register, offset: 0xC */ 18686 }; 18687 __IO uint32_t SDCTL; /**< Seed Control Register, offset: 0x10 */ 18688 union { /* offset: 0x14 */ 18689 __IO uint32_t SBLIM; /**< Sparse Bit Limit Register, offset: 0x14 */ 18690 __I uint32_t TOTSAM; /**< Total Samples Register, offset: 0x14 */ 18691 }; 18692 __IO uint32_t FRQMIN; /**< Frequency Count Minimum Limit Register, offset: 0x18 */ 18693 union { /* offset: 0x1C */ 18694 __I uint32_t FRQCNT; /**< Frequency Count Register, offset: 0x1C */ 18695 __IO uint32_t FRQMAX; /**< Frequency Count Maximum Limit Register, offset: 0x1C */ 18696 }; 18697 union { /* offset: 0x20 */ 18698 __I uint32_t SCMC; /**< Statistical Check Monobit Count Register, offset: 0x20 */ 18699 __IO uint32_t SCML; /**< Statistical Check Monobit Limit Register, offset: 0x20 */ 18700 }; 18701 union { /* offset: 0x24 */ 18702 __I uint32_t SCR1C; /**< Statistical Check Run Length 1 Count Register, offset: 0x24 */ 18703 __IO uint32_t SCR1L; /**< Statistical Check Run Length 1 Limit Register, offset: 0x24 */ 18704 }; 18705 union { /* offset: 0x28 */ 18706 __I uint32_t SCR2C; /**< Statistical Check Run Length 2 Count Register, offset: 0x28 */ 18707 __IO uint32_t SCR2L; /**< Statistical Check Run Length 2 Limit Register, offset: 0x28 */ 18708 }; 18709 union { /* offset: 0x2C */ 18710 __I uint32_t SCR3C; /**< Statistical Check Run Length 3 Count Register, offset: 0x2C */ 18711 __IO uint32_t SCR3L; /**< Statistical Check Run Length 3 Limit Register, offset: 0x2C */ 18712 }; 18713 union { /* offset: 0x30 */ 18714 __I uint32_t SCR4C; /**< Statistical Check Run Length 4 Count Register, offset: 0x30 */ 18715 __IO uint32_t SCR4L; /**< Statistical Check Run Length 4 Limit Register, offset: 0x30 */ 18716 }; 18717 union { /* offset: 0x34 */ 18718 __I uint32_t SCR5C; /**< Statistical Check Run Length 5 Count Register, offset: 0x34 */ 18719 __IO uint32_t SCR5L; /**< Statistical Check Run Length 5 Limit Register, offset: 0x34 */ 18720 }; 18721 union { /* offset: 0x38 */ 18722 __I uint32_t SCR6PC; /**< Statistical Check Run Length 6+ Count Register, offset: 0x38 */ 18723 __IO uint32_t SCR6PL; /**< Statistical Check Run Length 6+ Limit Register, offset: 0x38 */ 18724 }; 18725 __I uint32_t STATUS; /**< Status Register, offset: 0x3C */ 18726 __I uint32_t ENT[16]; /**< Entropy Read Register, array offset: 0x40, array step: 0x4 */ 18727 __I uint32_t PKRCNT10; /**< Statistical Check Poker Count 1 and 0 Register, offset: 0x80 */ 18728 __I uint32_t PKRCNT32; /**< Statistical Check Poker Count 3 and 2 Register, offset: 0x84 */ 18729 __I uint32_t PKRCNT54; /**< Statistical Check Poker Count 5 and 4 Register, offset: 0x88 */ 18730 __I uint32_t PKRCNT76; /**< Statistical Check Poker Count 7 and 6 Register, offset: 0x8C */ 18731 __I uint32_t PKRCNT98; /**< Statistical Check Poker Count 9 and 8 Register, offset: 0x90 */ 18732 __I uint32_t PKRCNTBA; /**< Statistical Check Poker Count B and A Register, offset: 0x94 */ 18733 __I uint32_t PKRCNTDC; /**< Statistical Check Poker Count D and C Register, offset: 0x98 */ 18734 __I uint32_t PKRCNTFE; /**< Statistical Check Poker Count F and E Register, offset: 0x9C */ 18735 __IO uint32_t SEC_CFG; /**< Security Configuration Register, offset: 0xA0 */ 18736 __IO uint32_t INT_CTRL; /**< Interrupt Control Register, offset: 0xA4 */ 18737 __IO uint32_t INT_MASK; /**< Mask Register, offset: 0xA8 */ 18738 __I uint32_t INT_STATUS; /**< Interrupt Status Register, offset: 0xAC */ 18739 uint8_t RESERVED_0[64]; 18740 __I uint32_t VID1; /**< Version ID Register (MS), offset: 0xF0 */ 18741 __I uint32_t VID2; /**< Version ID Register (LS), offset: 0xF4 */ 18742 } TRNG_Type; 18743 18744 /* ---------------------------------------------------------------------------- 18745 -- TRNG Register Masks 18746 ---------------------------------------------------------------------------- */ 18747 18748 /*! 18749 * @addtogroup TRNG_Register_Masks TRNG Register Masks 18750 * @{ 18751 */ 18752 18753 /*! @name MCTL - Miscellaneous Control Register */ 18754 /*! @{ */ 18755 #define TRNG_MCTL_SAMP_MODE_MASK (0x3U) 18756 #define TRNG_MCTL_SAMP_MODE_SHIFT (0U) 18757 /*! SAMP_MODE 18758 * 0b00..use Von Neumann data into both Entropy shifter and Statistical Checker 18759 * 0b01..use raw data into both Entropy shifter and Statistical Checker 18760 * 0b10..use Von Neumann data into Entropy shifter. Use raw data into Statistical Checker 18761 * 0b11..undefined/reserved. 18762 */ 18763 #define TRNG_MCTL_SAMP_MODE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_SAMP_MODE_SHIFT)) & TRNG_MCTL_SAMP_MODE_MASK) 18764 #define TRNG_MCTL_OSC_DIV_MASK (0xCU) 18765 #define TRNG_MCTL_OSC_DIV_SHIFT (2U) 18766 /*! OSC_DIV 18767 * 0b00..use ring oscillator with no divide 18768 * 0b01..use ring oscillator divided-by-2 18769 * 0b10..use ring oscillator divided-by-4 18770 * 0b11..use ring oscillator divided-by-8 18771 */ 18772 #define TRNG_MCTL_OSC_DIV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_OSC_DIV_SHIFT)) & TRNG_MCTL_OSC_DIV_MASK) 18773 #define TRNG_MCTL_UNUSED4_MASK (0x10U) 18774 #define TRNG_MCTL_UNUSED4_SHIFT (4U) 18775 #define TRNG_MCTL_UNUSED4(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_UNUSED4_SHIFT)) & TRNG_MCTL_UNUSED4_MASK) 18776 #define TRNG_MCTL_TRNG_ACC_MASK (0x20U) 18777 #define TRNG_MCTL_TRNG_ACC_SHIFT (5U) 18778 #define TRNG_MCTL_TRNG_ACC(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TRNG_ACC_SHIFT)) & TRNG_MCTL_TRNG_ACC_MASK) 18779 #define TRNG_MCTL_RST_DEF_MASK (0x40U) 18780 #define TRNG_MCTL_RST_DEF_SHIFT (6U) 18781 #define TRNG_MCTL_RST_DEF(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_RST_DEF_SHIFT)) & TRNG_MCTL_RST_DEF_MASK) 18782 #define TRNG_MCTL_FOR_SCLK_MASK (0x80U) 18783 #define TRNG_MCTL_FOR_SCLK_SHIFT (7U) 18784 #define TRNG_MCTL_FOR_SCLK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FOR_SCLK_SHIFT)) & TRNG_MCTL_FOR_SCLK_MASK) 18785 #define TRNG_MCTL_FCT_FAIL_MASK (0x100U) 18786 #define TRNG_MCTL_FCT_FAIL_SHIFT (8U) 18787 #define TRNG_MCTL_FCT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_FAIL_SHIFT)) & TRNG_MCTL_FCT_FAIL_MASK) 18788 #define TRNG_MCTL_FCT_VAL_MASK (0x200U) 18789 #define TRNG_MCTL_FCT_VAL_SHIFT (9U) 18790 #define TRNG_MCTL_FCT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_VAL_SHIFT)) & TRNG_MCTL_FCT_VAL_MASK) 18791 #define TRNG_MCTL_ENT_VAL_MASK (0x400U) 18792 #define TRNG_MCTL_ENT_VAL_SHIFT (10U) 18793 #define TRNG_MCTL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ENT_VAL_SHIFT)) & TRNG_MCTL_ENT_VAL_MASK) 18794 #define TRNG_MCTL_TST_OUT_MASK (0x800U) 18795 #define TRNG_MCTL_TST_OUT_SHIFT (11U) 18796 #define TRNG_MCTL_TST_OUT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TST_OUT_SHIFT)) & TRNG_MCTL_TST_OUT_MASK) 18797 #define TRNG_MCTL_ERR_MASK (0x1000U) 18798 #define TRNG_MCTL_ERR_SHIFT (12U) 18799 #define TRNG_MCTL_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ERR_SHIFT)) & TRNG_MCTL_ERR_MASK) 18800 #define TRNG_MCTL_TSTOP_OK_MASK (0x2000U) 18801 #define TRNG_MCTL_TSTOP_OK_SHIFT (13U) 18802 #define TRNG_MCTL_TSTOP_OK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TSTOP_OK_SHIFT)) & TRNG_MCTL_TSTOP_OK_MASK) 18803 #define TRNG_MCTL_PRGM_MASK (0x10000U) 18804 #define TRNG_MCTL_PRGM_SHIFT (16U) 18805 #define TRNG_MCTL_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_PRGM_SHIFT)) & TRNG_MCTL_PRGM_MASK) 18806 /*! @} */ 18807 18808 /*! @name SCMISC - Statistical Check Miscellaneous Register */ 18809 /*! @{ */ 18810 #define TRNG_SCMISC_LRUN_MAX_MASK (0xFFU) 18811 #define TRNG_SCMISC_LRUN_MAX_SHIFT (0U) 18812 #define TRNG_SCMISC_LRUN_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_LRUN_MAX_SHIFT)) & TRNG_SCMISC_LRUN_MAX_MASK) 18813 #define TRNG_SCMISC_RTY_CT_MASK (0xF0000U) 18814 #define TRNG_SCMISC_RTY_CT_SHIFT (16U) 18815 #define TRNG_SCMISC_RTY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_RTY_CT_SHIFT)) & TRNG_SCMISC_RTY_CT_MASK) 18816 /*! @} */ 18817 18818 /*! @name PKRRNG - Poker Range Register */ 18819 /*! @{ */ 18820 #define TRNG_PKRRNG_PKR_RNG_MASK (0xFFFFU) 18821 #define TRNG_PKRRNG_PKR_RNG_SHIFT (0U) 18822 #define TRNG_PKRRNG_PKR_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRRNG_PKR_RNG_SHIFT)) & TRNG_PKRRNG_PKR_RNG_MASK) 18823 /*! @} */ 18824 18825 /*! @name PKRMAX - Poker Maximum Limit Register */ 18826 /*! @{ */ 18827 #define TRNG_PKRMAX_PKR_MAX_MASK (0xFFFFFFU) 18828 #define TRNG_PKRMAX_PKR_MAX_SHIFT (0U) 18829 #define TRNG_PKRMAX_PKR_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRMAX_PKR_MAX_SHIFT)) & TRNG_PKRMAX_PKR_MAX_MASK) 18830 /*! @} */ 18831 18832 /*! @name PKRSQ - Poker Square Calculation Result Register */ 18833 /*! @{ */ 18834 #define TRNG_PKRSQ_PKR_SQ_MASK (0xFFFFFFU) 18835 #define TRNG_PKRSQ_PKR_SQ_SHIFT (0U) 18836 #define TRNG_PKRSQ_PKR_SQ(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRSQ_PKR_SQ_SHIFT)) & TRNG_PKRSQ_PKR_SQ_MASK) 18837 /*! @} */ 18838 18839 /*! @name SDCTL - Seed Control Register */ 18840 /*! @{ */ 18841 #define TRNG_SDCTL_SAMP_SIZE_MASK (0xFFFFU) 18842 #define TRNG_SDCTL_SAMP_SIZE_SHIFT (0U) 18843 #define TRNG_SDCTL_SAMP_SIZE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_SAMP_SIZE_SHIFT)) & TRNG_SDCTL_SAMP_SIZE_MASK) 18844 #define TRNG_SDCTL_ENT_DLY_MASK (0xFFFF0000U) 18845 #define TRNG_SDCTL_ENT_DLY_SHIFT (16U) 18846 #define TRNG_SDCTL_ENT_DLY(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_ENT_DLY_SHIFT)) & TRNG_SDCTL_ENT_DLY_MASK) 18847 /*! @} */ 18848 18849 /*! @name SBLIM - Sparse Bit Limit Register */ 18850 /*! @{ */ 18851 #define TRNG_SBLIM_SB_LIM_MASK (0x3FFU) 18852 #define TRNG_SBLIM_SB_LIM_SHIFT (0U) 18853 #define TRNG_SBLIM_SB_LIM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SBLIM_SB_LIM_SHIFT)) & TRNG_SBLIM_SB_LIM_MASK) 18854 /*! @} */ 18855 18856 /*! @name TOTSAM - Total Samples Register */ 18857 /*! @{ */ 18858 #define TRNG_TOTSAM_TOT_SAM_MASK (0xFFFFFU) 18859 #define TRNG_TOTSAM_TOT_SAM_SHIFT (0U) 18860 #define TRNG_TOTSAM_TOT_SAM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_TOTSAM_TOT_SAM_SHIFT)) & TRNG_TOTSAM_TOT_SAM_MASK) 18861 /*! @} */ 18862 18863 /*! @name FRQMIN - Frequency Count Minimum Limit Register */ 18864 /*! @{ */ 18865 #define TRNG_FRQMIN_FRQ_MIN_MASK (0x3FFFFFU) 18866 #define TRNG_FRQMIN_FRQ_MIN_SHIFT (0U) 18867 #define TRNG_FRQMIN_FRQ_MIN(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMIN_FRQ_MIN_SHIFT)) & TRNG_FRQMIN_FRQ_MIN_MASK) 18868 /*! @} */ 18869 18870 /*! @name FRQCNT - Frequency Count Register */ 18871 /*! @{ */ 18872 #define TRNG_FRQCNT_FRQ_CT_MASK (0x3FFFFFU) 18873 #define TRNG_FRQCNT_FRQ_CT_SHIFT (0U) 18874 #define TRNG_FRQCNT_FRQ_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQCNT_FRQ_CT_SHIFT)) & TRNG_FRQCNT_FRQ_CT_MASK) 18875 /*! @} */ 18876 18877 /*! @name FRQMAX - Frequency Count Maximum Limit Register */ 18878 /*! @{ */ 18879 #define TRNG_FRQMAX_FRQ_MAX_MASK (0x3FFFFFU) 18880 #define TRNG_FRQMAX_FRQ_MAX_SHIFT (0U) 18881 #define TRNG_FRQMAX_FRQ_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMAX_FRQ_MAX_SHIFT)) & TRNG_FRQMAX_FRQ_MAX_MASK) 18882 /*! @} */ 18883 18884 /*! @name SCMC - Statistical Check Monobit Count Register */ 18885 /*! @{ */ 18886 #define TRNG_SCMC_MONO_CT_MASK (0xFFFFU) 18887 #define TRNG_SCMC_MONO_CT_SHIFT (0U) 18888 #define TRNG_SCMC_MONO_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMC_MONO_CT_SHIFT)) & TRNG_SCMC_MONO_CT_MASK) 18889 /*! @} */ 18890 18891 /*! @name SCML - Statistical Check Monobit Limit Register */ 18892 /*! @{ */ 18893 #define TRNG_SCML_MONO_MAX_MASK (0xFFFFU) 18894 #define TRNG_SCML_MONO_MAX_SHIFT (0U) 18895 #define TRNG_SCML_MONO_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_MAX_SHIFT)) & TRNG_SCML_MONO_MAX_MASK) 18896 #define TRNG_SCML_MONO_RNG_MASK (0xFFFF0000U) 18897 #define TRNG_SCML_MONO_RNG_SHIFT (16U) 18898 #define TRNG_SCML_MONO_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_RNG_SHIFT)) & TRNG_SCML_MONO_RNG_MASK) 18899 /*! @} */ 18900 18901 /*! @name SCR1C - Statistical Check Run Length 1 Count Register */ 18902 /*! @{ */ 18903 #define TRNG_SCR1C_R1_0_CT_MASK (0x7FFFU) 18904 #define TRNG_SCR1C_R1_0_CT_SHIFT (0U) 18905 #define TRNG_SCR1C_R1_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_0_CT_SHIFT)) & TRNG_SCR1C_R1_0_CT_MASK) 18906 #define TRNG_SCR1C_R1_1_CT_MASK (0x7FFF0000U) 18907 #define TRNG_SCR1C_R1_1_CT_SHIFT (16U) 18908 #define TRNG_SCR1C_R1_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_1_CT_SHIFT)) & TRNG_SCR1C_R1_1_CT_MASK) 18909 /*! @} */ 18910 18911 /*! @name SCR1L - Statistical Check Run Length 1 Limit Register */ 18912 /*! @{ */ 18913 #define TRNG_SCR1L_RUN1_MAX_MASK (0x7FFFU) 18914 #define TRNG_SCR1L_RUN1_MAX_SHIFT (0U) 18915 #define TRNG_SCR1L_RUN1_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_MAX_SHIFT)) & TRNG_SCR1L_RUN1_MAX_MASK) 18916 #define TRNG_SCR1L_RUN1_RNG_MASK (0x7FFF0000U) 18917 #define TRNG_SCR1L_RUN1_RNG_SHIFT (16U) 18918 #define TRNG_SCR1L_RUN1_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_RNG_SHIFT)) & TRNG_SCR1L_RUN1_RNG_MASK) 18919 /*! @} */ 18920 18921 /*! @name SCR2C - Statistical Check Run Length 2 Count Register */ 18922 /*! @{ */ 18923 #define TRNG_SCR2C_R2_0_CT_MASK (0x3FFFU) 18924 #define TRNG_SCR2C_R2_0_CT_SHIFT (0U) 18925 #define TRNG_SCR2C_R2_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_0_CT_SHIFT)) & TRNG_SCR2C_R2_0_CT_MASK) 18926 #define TRNG_SCR2C_R2_1_CT_MASK (0x3FFF0000U) 18927 #define TRNG_SCR2C_R2_1_CT_SHIFT (16U) 18928 #define TRNG_SCR2C_R2_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_1_CT_SHIFT)) & TRNG_SCR2C_R2_1_CT_MASK) 18929 /*! @} */ 18930 18931 /*! @name SCR2L - Statistical Check Run Length 2 Limit Register */ 18932 /*! @{ */ 18933 #define TRNG_SCR2L_RUN2_MAX_MASK (0x3FFFU) 18934 #define TRNG_SCR2L_RUN2_MAX_SHIFT (0U) 18935 #define TRNG_SCR2L_RUN2_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_MAX_SHIFT)) & TRNG_SCR2L_RUN2_MAX_MASK) 18936 #define TRNG_SCR2L_RUN2_RNG_MASK (0x3FFF0000U) 18937 #define TRNG_SCR2L_RUN2_RNG_SHIFT (16U) 18938 #define TRNG_SCR2L_RUN2_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_RNG_SHIFT)) & TRNG_SCR2L_RUN2_RNG_MASK) 18939 /*! @} */ 18940 18941 /*! @name SCR3C - Statistical Check Run Length 3 Count Register */ 18942 /*! @{ */ 18943 #define TRNG_SCR3C_R3_0_CT_MASK (0x1FFFU) 18944 #define TRNG_SCR3C_R3_0_CT_SHIFT (0U) 18945 #define TRNG_SCR3C_R3_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_0_CT_SHIFT)) & TRNG_SCR3C_R3_0_CT_MASK) 18946 #define TRNG_SCR3C_R3_1_CT_MASK (0x1FFF0000U) 18947 #define TRNG_SCR3C_R3_1_CT_SHIFT (16U) 18948 #define TRNG_SCR3C_R3_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_1_CT_SHIFT)) & TRNG_SCR3C_R3_1_CT_MASK) 18949 /*! @} */ 18950 18951 /*! @name SCR3L - Statistical Check Run Length 3 Limit Register */ 18952 /*! @{ */ 18953 #define TRNG_SCR3L_RUN3_MAX_MASK (0x1FFFU) 18954 #define TRNG_SCR3L_RUN3_MAX_SHIFT (0U) 18955 #define TRNG_SCR3L_RUN3_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_MAX_SHIFT)) & TRNG_SCR3L_RUN3_MAX_MASK) 18956 #define TRNG_SCR3L_RUN3_RNG_MASK (0x1FFF0000U) 18957 #define TRNG_SCR3L_RUN3_RNG_SHIFT (16U) 18958 #define TRNG_SCR3L_RUN3_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_RNG_SHIFT)) & TRNG_SCR3L_RUN3_RNG_MASK) 18959 /*! @} */ 18960 18961 /*! @name SCR4C - Statistical Check Run Length 4 Count Register */ 18962 /*! @{ */ 18963 #define TRNG_SCR4C_R4_0_CT_MASK (0xFFFU) 18964 #define TRNG_SCR4C_R4_0_CT_SHIFT (0U) 18965 #define TRNG_SCR4C_R4_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_0_CT_SHIFT)) & TRNG_SCR4C_R4_0_CT_MASK) 18966 #define TRNG_SCR4C_R4_1_CT_MASK (0xFFF0000U) 18967 #define TRNG_SCR4C_R4_1_CT_SHIFT (16U) 18968 #define TRNG_SCR4C_R4_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_1_CT_SHIFT)) & TRNG_SCR4C_R4_1_CT_MASK) 18969 /*! @} */ 18970 18971 /*! @name SCR4L - Statistical Check Run Length 4 Limit Register */ 18972 /*! @{ */ 18973 #define TRNG_SCR4L_RUN4_MAX_MASK (0xFFFU) 18974 #define TRNG_SCR4L_RUN4_MAX_SHIFT (0U) 18975 #define TRNG_SCR4L_RUN4_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_MAX_SHIFT)) & TRNG_SCR4L_RUN4_MAX_MASK) 18976 #define TRNG_SCR4L_RUN4_RNG_MASK (0xFFF0000U) 18977 #define TRNG_SCR4L_RUN4_RNG_SHIFT (16U) 18978 #define TRNG_SCR4L_RUN4_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_RNG_SHIFT)) & TRNG_SCR4L_RUN4_RNG_MASK) 18979 /*! @} */ 18980 18981 /*! @name SCR5C - Statistical Check Run Length 5 Count Register */ 18982 /*! @{ */ 18983 #define TRNG_SCR5C_R5_0_CT_MASK (0x7FFU) 18984 #define TRNG_SCR5C_R5_0_CT_SHIFT (0U) 18985 #define TRNG_SCR5C_R5_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_0_CT_SHIFT)) & TRNG_SCR5C_R5_0_CT_MASK) 18986 #define TRNG_SCR5C_R5_1_CT_MASK (0x7FF0000U) 18987 #define TRNG_SCR5C_R5_1_CT_SHIFT (16U) 18988 #define TRNG_SCR5C_R5_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_1_CT_SHIFT)) & TRNG_SCR5C_R5_1_CT_MASK) 18989 /*! @} */ 18990 18991 /*! @name SCR5L - Statistical Check Run Length 5 Limit Register */ 18992 /*! @{ */ 18993 #define TRNG_SCR5L_RUN5_MAX_MASK (0x7FFU) 18994 #define TRNG_SCR5L_RUN5_MAX_SHIFT (0U) 18995 #define TRNG_SCR5L_RUN5_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_MAX_SHIFT)) & TRNG_SCR5L_RUN5_MAX_MASK) 18996 #define TRNG_SCR5L_RUN5_RNG_MASK (0x7FF0000U) 18997 #define TRNG_SCR5L_RUN5_RNG_SHIFT (16U) 18998 #define TRNG_SCR5L_RUN5_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_RNG_SHIFT)) & TRNG_SCR5L_RUN5_RNG_MASK) 18999 /*! @} */ 19000 19001 /*! @name SCR6PC - Statistical Check Run Length 6+ Count Register */ 19002 /*! @{ */ 19003 #define TRNG_SCR6PC_R6P_0_CT_MASK (0x7FFU) 19004 #define TRNG_SCR6PC_R6P_0_CT_SHIFT (0U) 19005 #define TRNG_SCR6PC_R6P_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_0_CT_SHIFT)) & TRNG_SCR6PC_R6P_0_CT_MASK) 19006 #define TRNG_SCR6PC_R6P_1_CT_MASK (0x7FF0000U) 19007 #define TRNG_SCR6PC_R6P_1_CT_SHIFT (16U) 19008 #define TRNG_SCR6PC_R6P_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_1_CT_SHIFT)) & TRNG_SCR6PC_R6P_1_CT_MASK) 19009 /*! @} */ 19010 19011 /*! @name SCR6PL - Statistical Check Run Length 6+ Limit Register */ 19012 /*! @{ */ 19013 #define TRNG_SCR6PL_RUN6P_MAX_MASK (0x7FFU) 19014 #define TRNG_SCR6PL_RUN6P_MAX_SHIFT (0U) 19015 #define TRNG_SCR6PL_RUN6P_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_MAX_SHIFT)) & TRNG_SCR6PL_RUN6P_MAX_MASK) 19016 #define TRNG_SCR6PL_RUN6P_RNG_MASK (0x7FF0000U) 19017 #define TRNG_SCR6PL_RUN6P_RNG_SHIFT (16U) 19018 #define TRNG_SCR6PL_RUN6P_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_RNG_SHIFT)) & TRNG_SCR6PL_RUN6P_RNG_MASK) 19019 /*! @} */ 19020 19021 /*! @name STATUS - Status Register */ 19022 /*! @{ */ 19023 #define TRNG_STATUS_TF1BR0_MASK (0x1U) 19024 #define TRNG_STATUS_TF1BR0_SHIFT (0U) 19025 #define TRNG_STATUS_TF1BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR0_SHIFT)) & TRNG_STATUS_TF1BR0_MASK) 19026 #define TRNG_STATUS_TF1BR1_MASK (0x2U) 19027 #define TRNG_STATUS_TF1BR1_SHIFT (1U) 19028 #define TRNG_STATUS_TF1BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR1_SHIFT)) & TRNG_STATUS_TF1BR1_MASK) 19029 #define TRNG_STATUS_TF2BR0_MASK (0x4U) 19030 #define TRNG_STATUS_TF2BR0_SHIFT (2U) 19031 #define TRNG_STATUS_TF2BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR0_SHIFT)) & TRNG_STATUS_TF2BR0_MASK) 19032 #define TRNG_STATUS_TF2BR1_MASK (0x8U) 19033 #define TRNG_STATUS_TF2BR1_SHIFT (3U) 19034 #define TRNG_STATUS_TF2BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR1_SHIFT)) & TRNG_STATUS_TF2BR1_MASK) 19035 #define TRNG_STATUS_TF3BR0_MASK (0x10U) 19036 #define TRNG_STATUS_TF3BR0_SHIFT (4U) 19037 #define TRNG_STATUS_TF3BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR0_SHIFT)) & TRNG_STATUS_TF3BR0_MASK) 19038 #define TRNG_STATUS_TF3BR1_MASK (0x20U) 19039 #define TRNG_STATUS_TF3BR1_SHIFT (5U) 19040 #define TRNG_STATUS_TF3BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR1_SHIFT)) & TRNG_STATUS_TF3BR1_MASK) 19041 #define TRNG_STATUS_TF4BR0_MASK (0x40U) 19042 #define TRNG_STATUS_TF4BR0_SHIFT (6U) 19043 #define TRNG_STATUS_TF4BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR0_SHIFT)) & TRNG_STATUS_TF4BR0_MASK) 19044 #define TRNG_STATUS_TF4BR1_MASK (0x80U) 19045 #define TRNG_STATUS_TF4BR1_SHIFT (7U) 19046 #define TRNG_STATUS_TF4BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR1_SHIFT)) & TRNG_STATUS_TF4BR1_MASK) 19047 #define TRNG_STATUS_TF5BR0_MASK (0x100U) 19048 #define TRNG_STATUS_TF5BR0_SHIFT (8U) 19049 #define TRNG_STATUS_TF5BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR0_SHIFT)) & TRNG_STATUS_TF5BR0_MASK) 19050 #define TRNG_STATUS_TF5BR1_MASK (0x200U) 19051 #define TRNG_STATUS_TF5BR1_SHIFT (9U) 19052 #define TRNG_STATUS_TF5BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR1_SHIFT)) & TRNG_STATUS_TF5BR1_MASK) 19053 #define TRNG_STATUS_TF6PBR0_MASK (0x400U) 19054 #define TRNG_STATUS_TF6PBR0_SHIFT (10U) 19055 #define TRNG_STATUS_TF6PBR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR0_SHIFT)) & TRNG_STATUS_TF6PBR0_MASK) 19056 #define TRNG_STATUS_TF6PBR1_MASK (0x800U) 19057 #define TRNG_STATUS_TF6PBR1_SHIFT (11U) 19058 #define TRNG_STATUS_TF6PBR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR1_SHIFT)) & TRNG_STATUS_TF6PBR1_MASK) 19059 #define TRNG_STATUS_TFSB_MASK (0x1000U) 19060 #define TRNG_STATUS_TFSB_SHIFT (12U) 19061 #define TRNG_STATUS_TFSB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFSB_SHIFT)) & TRNG_STATUS_TFSB_MASK) 19062 #define TRNG_STATUS_TFLR_MASK (0x2000U) 19063 #define TRNG_STATUS_TFLR_SHIFT (13U) 19064 #define TRNG_STATUS_TFLR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFLR_SHIFT)) & TRNG_STATUS_TFLR_MASK) 19065 #define TRNG_STATUS_TFP_MASK (0x4000U) 19066 #define TRNG_STATUS_TFP_SHIFT (14U) 19067 #define TRNG_STATUS_TFP(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFP_SHIFT)) & TRNG_STATUS_TFP_MASK) 19068 #define TRNG_STATUS_TFMB_MASK (0x8000U) 19069 #define TRNG_STATUS_TFMB_SHIFT (15U) 19070 #define TRNG_STATUS_TFMB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFMB_SHIFT)) & TRNG_STATUS_TFMB_MASK) 19071 #define TRNG_STATUS_RETRY_CT_MASK (0xF0000U) 19072 #define TRNG_STATUS_RETRY_CT_SHIFT (16U) 19073 #define TRNG_STATUS_RETRY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_RETRY_CT_SHIFT)) & TRNG_STATUS_RETRY_CT_MASK) 19074 /*! @} */ 19075 19076 /*! @name ENT - Entropy Read Register */ 19077 /*! @{ */ 19078 #define TRNG_ENT_ENT_MASK (0xFFFFFFFFU) 19079 #define TRNG_ENT_ENT_SHIFT (0U) 19080 #define TRNG_ENT_ENT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_ENT_ENT_SHIFT)) & TRNG_ENT_ENT_MASK) 19081 /*! @} */ 19082 19083 /* The count of TRNG_ENT */ 19084 #define TRNG_ENT_COUNT (16U) 19085 19086 /*! @name PKRCNT10 - Statistical Check Poker Count 1 and 0 Register */ 19087 /*! @{ */ 19088 #define TRNG_PKRCNT10_PKR_0_CT_MASK (0xFFFFU) 19089 #define TRNG_PKRCNT10_PKR_0_CT_SHIFT (0U) 19090 #define TRNG_PKRCNT10_PKR_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_0_CT_SHIFT)) & TRNG_PKRCNT10_PKR_0_CT_MASK) 19091 #define TRNG_PKRCNT10_PKR_1_CT_MASK (0xFFFF0000U) 19092 #define TRNG_PKRCNT10_PKR_1_CT_SHIFT (16U) 19093 #define TRNG_PKRCNT10_PKR_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_1_CT_SHIFT)) & TRNG_PKRCNT10_PKR_1_CT_MASK) 19094 /*! @} */ 19095 19096 /*! @name PKRCNT32 - Statistical Check Poker Count 3 and 2 Register */ 19097 /*! @{ */ 19098 #define TRNG_PKRCNT32_PKR_2_CT_MASK (0xFFFFU) 19099 #define TRNG_PKRCNT32_PKR_2_CT_SHIFT (0U) 19100 #define TRNG_PKRCNT32_PKR_2_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_2_CT_SHIFT)) & TRNG_PKRCNT32_PKR_2_CT_MASK) 19101 #define TRNG_PKRCNT32_PKR_3_CT_MASK (0xFFFF0000U) 19102 #define TRNG_PKRCNT32_PKR_3_CT_SHIFT (16U) 19103 #define TRNG_PKRCNT32_PKR_3_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_3_CT_SHIFT)) & TRNG_PKRCNT32_PKR_3_CT_MASK) 19104 /*! @} */ 19105 19106 /*! @name PKRCNT54 - Statistical Check Poker Count 5 and 4 Register */ 19107 /*! @{ */ 19108 #define TRNG_PKRCNT54_PKR_4_CT_MASK (0xFFFFU) 19109 #define TRNG_PKRCNT54_PKR_4_CT_SHIFT (0U) 19110 #define TRNG_PKRCNT54_PKR_4_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_4_CT_SHIFT)) & TRNG_PKRCNT54_PKR_4_CT_MASK) 19111 #define TRNG_PKRCNT54_PKR_5_CT_MASK (0xFFFF0000U) 19112 #define TRNG_PKRCNT54_PKR_5_CT_SHIFT (16U) 19113 #define TRNG_PKRCNT54_PKR_5_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_5_CT_SHIFT)) & TRNG_PKRCNT54_PKR_5_CT_MASK) 19114 /*! @} */ 19115 19116 /*! @name PKRCNT76 - Statistical Check Poker Count 7 and 6 Register */ 19117 /*! @{ */ 19118 #define TRNG_PKRCNT76_PKR_6_CT_MASK (0xFFFFU) 19119 #define TRNG_PKRCNT76_PKR_6_CT_SHIFT (0U) 19120 #define TRNG_PKRCNT76_PKR_6_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_6_CT_SHIFT)) & TRNG_PKRCNT76_PKR_6_CT_MASK) 19121 #define TRNG_PKRCNT76_PKR_7_CT_MASK (0xFFFF0000U) 19122 #define TRNG_PKRCNT76_PKR_7_CT_SHIFT (16U) 19123 #define TRNG_PKRCNT76_PKR_7_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_7_CT_SHIFT)) & TRNG_PKRCNT76_PKR_7_CT_MASK) 19124 /*! @} */ 19125 19126 /*! @name PKRCNT98 - Statistical Check Poker Count 9 and 8 Register */ 19127 /*! @{ */ 19128 #define TRNG_PKRCNT98_PKR_8_CT_MASK (0xFFFFU) 19129 #define TRNG_PKRCNT98_PKR_8_CT_SHIFT (0U) 19130 #define TRNG_PKRCNT98_PKR_8_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_8_CT_SHIFT)) & TRNG_PKRCNT98_PKR_8_CT_MASK) 19131 #define TRNG_PKRCNT98_PKR_9_CT_MASK (0xFFFF0000U) 19132 #define TRNG_PKRCNT98_PKR_9_CT_SHIFT (16U) 19133 #define TRNG_PKRCNT98_PKR_9_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_9_CT_SHIFT)) & TRNG_PKRCNT98_PKR_9_CT_MASK) 19134 /*! @} */ 19135 19136 /*! @name PKRCNTBA - Statistical Check Poker Count B and A Register */ 19137 /*! @{ */ 19138 #define TRNG_PKRCNTBA_PKR_A_CT_MASK (0xFFFFU) 19139 #define TRNG_PKRCNTBA_PKR_A_CT_SHIFT (0U) 19140 #define TRNG_PKRCNTBA_PKR_A_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_A_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_A_CT_MASK) 19141 #define TRNG_PKRCNTBA_PKR_B_CT_MASK (0xFFFF0000U) 19142 #define TRNG_PKRCNTBA_PKR_B_CT_SHIFT (16U) 19143 #define TRNG_PKRCNTBA_PKR_B_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_B_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_B_CT_MASK) 19144 /*! @} */ 19145 19146 /*! @name PKRCNTDC - Statistical Check Poker Count D and C Register */ 19147 /*! @{ */ 19148 #define TRNG_PKRCNTDC_PKR_C_CT_MASK (0xFFFFU) 19149 #define TRNG_PKRCNTDC_PKR_C_CT_SHIFT (0U) 19150 #define TRNG_PKRCNTDC_PKR_C_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_C_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_C_CT_MASK) 19151 #define TRNG_PKRCNTDC_PKR_D_CT_MASK (0xFFFF0000U) 19152 #define TRNG_PKRCNTDC_PKR_D_CT_SHIFT (16U) 19153 #define TRNG_PKRCNTDC_PKR_D_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_D_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_D_CT_MASK) 19154 /*! @} */ 19155 19156 /*! @name PKRCNTFE - Statistical Check Poker Count F and E Register */ 19157 /*! @{ */ 19158 #define TRNG_PKRCNTFE_PKR_E_CT_MASK (0xFFFFU) 19159 #define TRNG_PKRCNTFE_PKR_E_CT_SHIFT (0U) 19160 #define TRNG_PKRCNTFE_PKR_E_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_E_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_E_CT_MASK) 19161 #define TRNG_PKRCNTFE_PKR_F_CT_MASK (0xFFFF0000U) 19162 #define TRNG_PKRCNTFE_PKR_F_CT_SHIFT (16U) 19163 #define TRNG_PKRCNTFE_PKR_F_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_F_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_F_CT_MASK) 19164 /*! @} */ 19165 19166 /*! @name SEC_CFG - Security Configuration Register */ 19167 /*! @{ */ 19168 #define TRNG_SEC_CFG_UNUSED0_MASK (0x1U) 19169 #define TRNG_SEC_CFG_UNUSED0_SHIFT (0U) 19170 #define TRNG_SEC_CFG_UNUSED0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_UNUSED0_SHIFT)) & TRNG_SEC_CFG_UNUSED0_MASK) 19171 #define TRNG_SEC_CFG_NO_PRGM_MASK (0x2U) 19172 #define TRNG_SEC_CFG_NO_PRGM_SHIFT (1U) 19173 /*! NO_PRGM 19174 * 0b0..Programability of registers controlled only by the Miscellaneous Control Register's access mode bit. 19175 * 0b1..Overides Miscellaneous Control Register access mode and prevents TRNG register programming. 19176 */ 19177 #define TRNG_SEC_CFG_NO_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_NO_PRGM_SHIFT)) & TRNG_SEC_CFG_NO_PRGM_MASK) 19178 #define TRNG_SEC_CFG_UNUSED2_MASK (0x4U) 19179 #define TRNG_SEC_CFG_UNUSED2_SHIFT (2U) 19180 #define TRNG_SEC_CFG_UNUSED2(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_UNUSED2_SHIFT)) & TRNG_SEC_CFG_UNUSED2_MASK) 19181 /*! @} */ 19182 19183 /*! @name INT_CTRL - Interrupt Control Register */ 19184 /*! @{ */ 19185 #define TRNG_INT_CTRL_HW_ERR_MASK (0x1U) 19186 #define TRNG_INT_CTRL_HW_ERR_SHIFT (0U) 19187 /*! HW_ERR 19188 * 0b0..Corresponding bit of INT_STATUS register cleared. 19189 * 0b1..Corresponding bit of INT_STATUS register active. 19190 */ 19191 #define TRNG_INT_CTRL_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_HW_ERR_SHIFT)) & TRNG_INT_CTRL_HW_ERR_MASK) 19192 #define TRNG_INT_CTRL_ENT_VAL_MASK (0x2U) 19193 #define TRNG_INT_CTRL_ENT_VAL_SHIFT (1U) 19194 /*! ENT_VAL 19195 * 0b0..Same behavior as bit 0 of this register. 19196 * 0b1..Same behavior as bit 0 of this register. 19197 */ 19198 #define TRNG_INT_CTRL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_ENT_VAL_SHIFT)) & TRNG_INT_CTRL_ENT_VAL_MASK) 19199 #define TRNG_INT_CTRL_FRQ_CT_FAIL_MASK (0x4U) 19200 #define TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT (2U) 19201 /*! FRQ_CT_FAIL 19202 * 0b0..Same behavior as bit 0 of this register. 19203 * 0b1..Same behavior as bit 0 of this register. 19204 */ 19205 #define TRNG_INT_CTRL_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_CTRL_FRQ_CT_FAIL_MASK) 19206 #define TRNG_INT_CTRL_UNUSED_MASK (0xFFFFFFF8U) 19207 #define TRNG_INT_CTRL_UNUSED_SHIFT (3U) 19208 #define TRNG_INT_CTRL_UNUSED(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_UNUSED_SHIFT)) & TRNG_INT_CTRL_UNUSED_MASK) 19209 /*! @} */ 19210 19211 /*! @name INT_MASK - Mask Register */ 19212 /*! @{ */ 19213 #define TRNG_INT_MASK_HW_ERR_MASK (0x1U) 19214 #define TRNG_INT_MASK_HW_ERR_SHIFT (0U) 19215 /*! HW_ERR 19216 * 0b0..Corresponding interrupt of INT_STATUS is masked. 19217 * 0b1..Corresponding bit of INT_STATUS is active. 19218 */ 19219 #define TRNG_INT_MASK_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_HW_ERR_SHIFT)) & TRNG_INT_MASK_HW_ERR_MASK) 19220 #define TRNG_INT_MASK_ENT_VAL_MASK (0x2U) 19221 #define TRNG_INT_MASK_ENT_VAL_SHIFT (1U) 19222 /*! ENT_VAL 19223 * 0b0..Same behavior as bit 0 of this register. 19224 * 0b1..Same behavior as bit 0 of this register. 19225 */ 19226 #define TRNG_INT_MASK_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_ENT_VAL_SHIFT)) & TRNG_INT_MASK_ENT_VAL_MASK) 19227 #define TRNG_INT_MASK_FRQ_CT_FAIL_MASK (0x4U) 19228 #define TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT (2U) 19229 /*! FRQ_CT_FAIL 19230 * 0b0..Same behavior as bit 0 of this register. 19231 * 0b1..Same behavior as bit 0 of this register. 19232 */ 19233 #define TRNG_INT_MASK_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_MASK_FRQ_CT_FAIL_MASK) 19234 /*! @} */ 19235 19236 /*! @name INT_STATUS - Interrupt Status Register */ 19237 /*! @{ */ 19238 #define TRNG_INT_STATUS_HW_ERR_MASK (0x1U) 19239 #define TRNG_INT_STATUS_HW_ERR_SHIFT (0U) 19240 /*! HW_ERR 19241 * 0b0..no error 19242 * 0b1..error detected. 19243 */ 19244 #define TRNG_INT_STATUS_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_HW_ERR_SHIFT)) & TRNG_INT_STATUS_HW_ERR_MASK) 19245 #define TRNG_INT_STATUS_ENT_VAL_MASK (0x2U) 19246 #define TRNG_INT_STATUS_ENT_VAL_SHIFT (1U) 19247 /*! ENT_VAL 19248 * 0b0..Busy generation entropy. Any value read is invalid. 19249 * 0b1..TRNG can be stopped and entropy is valid if read. 19250 */ 19251 #define TRNG_INT_STATUS_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_ENT_VAL_SHIFT)) & TRNG_INT_STATUS_ENT_VAL_MASK) 19252 #define TRNG_INT_STATUS_FRQ_CT_FAIL_MASK (0x4U) 19253 #define TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT (2U) 19254 /*! FRQ_CT_FAIL 19255 * 0b0..No hardware nor self test frequency errors. 19256 * 0b1..The frequency counter has detected a failure. 19257 */ 19258 #define TRNG_INT_STATUS_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_STATUS_FRQ_CT_FAIL_MASK) 19259 /*! @} */ 19260 19261 /*! @name VID1 - Version ID Register (MS) */ 19262 /*! @{ */ 19263 #define TRNG_VID1_MIN_REV_MASK (0xFFU) 19264 #define TRNG_VID1_MIN_REV_SHIFT (0U) 19265 /*! MIN_REV 19266 * 0b00000000..Minor revision number for TRNG. 19267 */ 19268 #define TRNG_VID1_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_MIN_REV_SHIFT)) & TRNG_VID1_MIN_REV_MASK) 19269 #define TRNG_VID1_MAJ_REV_MASK (0xFF00U) 19270 #define TRNG_VID1_MAJ_REV_SHIFT (8U) 19271 /*! MAJ_REV 19272 * 0b00000001..Major revision number for TRNG. 19273 */ 19274 #define TRNG_VID1_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_MAJ_REV_SHIFT)) & TRNG_VID1_MAJ_REV_MASK) 19275 #define TRNG_VID1_IP_ID_MASK (0xFFFF0000U) 19276 #define TRNG_VID1_IP_ID_SHIFT (16U) 19277 /*! IP_ID 19278 * 0b0000000000110000..ID for TRNG. 19279 */ 19280 #define TRNG_VID1_IP_ID(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_IP_ID_SHIFT)) & TRNG_VID1_IP_ID_MASK) 19281 /*! @} */ 19282 19283 /*! @name VID2 - Version ID Register (LS) */ 19284 /*! @{ */ 19285 #define TRNG_VID2_CONFIG_OPT_MASK (0xFFU) 19286 #define TRNG_VID2_CONFIG_OPT_SHIFT (0U) 19287 /*! CONFIG_OPT 19288 * 0b00000000..TRNG_CONFIG_OPT for TRNG. 19289 */ 19290 #define TRNG_VID2_CONFIG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_CONFIG_OPT_SHIFT)) & TRNG_VID2_CONFIG_OPT_MASK) 19291 #define TRNG_VID2_ECO_REV_MASK (0xFF00U) 19292 #define TRNG_VID2_ECO_REV_SHIFT (8U) 19293 /*! ECO_REV 19294 * 0b00000000..TRNG_ECO_REV for TRNG. 19295 */ 19296 #define TRNG_VID2_ECO_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_ECO_REV_SHIFT)) & TRNG_VID2_ECO_REV_MASK) 19297 #define TRNG_VID2_INTG_OPT_MASK (0xFF0000U) 19298 #define TRNG_VID2_INTG_OPT_SHIFT (16U) 19299 /*! INTG_OPT 19300 * 0b00000000..INTG_OPT for TRNG. 19301 */ 19302 #define TRNG_VID2_INTG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_INTG_OPT_SHIFT)) & TRNG_VID2_INTG_OPT_MASK) 19303 #define TRNG_VID2_ERA_MASK (0xFF000000U) 19304 #define TRNG_VID2_ERA_SHIFT (24U) 19305 /*! ERA 19306 * 0b00000000..COMPILE_OPT for TRNG. 19307 */ 19308 #define TRNG_VID2_ERA(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_ERA_SHIFT)) & TRNG_VID2_ERA_MASK) 19309 /*! @} */ 19310 19311 19312 /*! 19313 * @} 19314 */ /* end of group TRNG_Register_Masks */ 19315 19316 19317 /* TRNG - Peripheral instance base addresses */ 19318 /** Peripheral TRNG base address */ 19319 #define TRNG_BASE (0x41029000u) 19320 /** Peripheral TRNG base pointer */ 19321 #define TRNG ((TRNG_Type *)TRNG_BASE) 19322 /** Array initializer of TRNG peripheral base addresses */ 19323 #define TRNG_BASE_ADDRS { TRNG_BASE } 19324 /** Array initializer of TRNG peripheral base pointers */ 19325 #define TRNG_BASE_PTRS { TRNG } 19326 /** Interrupt vectors for the TRNG peripheral type */ 19327 #define TRNG_IRQS { TRNG_IRQn } 19328 /** Backward compatibility macros */ 19329 #define TRNG0 TRNG 19330 19331 19332 /*! 19333 * @} 19334 */ /* end of group TRNG_Peripheral_Access_Layer */ 19335 19336 19337 /* ---------------------------------------------------------------------------- 19338 -- TSTMR Peripheral Access Layer 19339 ---------------------------------------------------------------------------- */ 19340 19341 /*! 19342 * @addtogroup TSTMR_Peripheral_Access_Layer TSTMR Peripheral Access Layer 19343 * @{ 19344 */ 19345 19346 /** TSTMR - Register Layout Typedef */ 19347 typedef struct { 19348 __I uint32_t L; /**< Time Stamp Timer Register Low, offset: 0x0 */ 19349 __I uint32_t H; /**< Time Stamp Timer Register High, offset: 0x4 */ 19350 } TSTMR_Type; 19351 19352 /* ---------------------------------------------------------------------------- 19353 -- TSTMR Register Masks 19354 ---------------------------------------------------------------------------- */ 19355 19356 /*! 19357 * @addtogroup TSTMR_Register_Masks TSTMR Register Masks 19358 * @{ 19359 */ 19360 19361 /*! @name L - Time Stamp Timer Register Low */ 19362 /*! @{ */ 19363 #define TSTMR_L_VALUE_MASK (0xFFFFFFFFU) 19364 #define TSTMR_L_VALUE_SHIFT (0U) 19365 #define TSTMR_L_VALUE(x) (((uint32_t)(((uint32_t)(x)) << TSTMR_L_VALUE_SHIFT)) & TSTMR_L_VALUE_MASK) 19366 /*! @} */ 19367 19368 /*! @name H - Time Stamp Timer Register High */ 19369 /*! @{ */ 19370 #define TSTMR_H_VALUE_MASK (0xFFFFFFU) 19371 #define TSTMR_H_VALUE_SHIFT (0U) 19372 #define TSTMR_H_VALUE(x) (((uint32_t)(((uint32_t)(x)) << TSTMR_H_VALUE_SHIFT)) & TSTMR_H_VALUE_MASK) 19373 /*! @} */ 19374 19375 19376 /*! 19377 * @} 19378 */ /* end of group TSTMR_Register_Masks */ 19379 19380 19381 /* TSTMR - Peripheral instance base addresses */ 19382 /** Peripheral TSTMRB base address */ 19383 #define TSTMRB_BASE (0x4102C000u) 19384 /** Peripheral TSTMRB base pointer */ 19385 #define TSTMRB ((TSTMR_Type *)TSTMRB_BASE) 19386 /** Array initializer of TSTMR peripheral base addresses */ 19387 #define TSTMR_BASE_ADDRS { TSTMRB_BASE } 19388 /** Array initializer of TSTMR peripheral base pointers */ 19389 #define TSTMR_BASE_PTRS { TSTMRB } 19390 19391 /*! 19392 * @} 19393 */ /* end of group TSTMR_Peripheral_Access_Layer */ 19394 19395 19396 /* ---------------------------------------------------------------------------- 19397 -- USB Peripheral Access Layer 19398 ---------------------------------------------------------------------------- */ 19399 19400 /*! 19401 * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer 19402 * @{ 19403 */ 19404 19405 /** USB - Register Layout Typedef */ 19406 typedef struct { 19407 __I uint8_t PERID; /**< Peripheral ID register, offset: 0x0 */ 19408 uint8_t RESERVED_0[3]; 19409 __I uint8_t IDCOMP; /**< Peripheral ID Complement register, offset: 0x4 */ 19410 uint8_t RESERVED_1[3]; 19411 __I uint8_t REV; /**< Peripheral Revision register, offset: 0x8 */ 19412 uint8_t RESERVED_2[3]; 19413 __I uint8_t ADDINFO; /**< Peripheral Additional Info register, offset: 0xC */ 19414 uint8_t RESERVED_3[15]; 19415 __IO uint8_t OTGCTL; /**< OTG Control register, offset: 0x1C */ 19416 uint8_t RESERVED_4[99]; 19417 __IO uint8_t ISTAT; /**< Interrupt Status register, offset: 0x80 */ 19418 uint8_t RESERVED_5[3]; 19419 __IO uint8_t INTEN; /**< Interrupt Enable register, offset: 0x84 */ 19420 uint8_t RESERVED_6[3]; 19421 __IO uint8_t ERRSTAT; /**< Error Interrupt Status register, offset: 0x88 */ 19422 uint8_t RESERVED_7[3]; 19423 __IO uint8_t ERREN; /**< Error Interrupt Enable register, offset: 0x8C */ 19424 uint8_t RESERVED_8[3]; 19425 __I uint8_t STAT; /**< Status register, offset: 0x90 */ 19426 uint8_t RESERVED_9[3]; 19427 __IO uint8_t CTL; /**< Control register, offset: 0x94 */ 19428 uint8_t RESERVED_10[3]; 19429 __IO uint8_t ADDR; /**< Address register, offset: 0x98 */ 19430 uint8_t RESERVED_11[3]; 19431 __IO uint8_t BDTPAGE1; /**< BDT Page register 1, offset: 0x9C */ 19432 uint8_t RESERVED_12[3]; 19433 __IO uint8_t FRMNUML; /**< Frame Number register Low, offset: 0xA0 */ 19434 uint8_t RESERVED_13[3]; 19435 __IO uint8_t FRMNUMH; /**< Frame Number register High, offset: 0xA4 */ 19436 uint8_t RESERVED_14[11]; 19437 __IO uint8_t BDTPAGE2; /**< BDT Page Register 2, offset: 0xB0 */ 19438 uint8_t RESERVED_15[3]; 19439 __IO uint8_t BDTPAGE3; /**< BDT Page Register 3, offset: 0xB4 */ 19440 uint8_t RESERVED_16[11]; 19441 struct { /* offset: 0xC0, array step: 0x4 */ 19442 __IO uint8_t ENDPT; /**< Endpoint Control register, array offset: 0xC0, array step: 0x4 */ 19443 uint8_t RESERVED_0[3]; 19444 } ENDPOINT[16]; 19445 __IO uint8_t USBCTRL; /**< USB Control register, offset: 0x100 */ 19446 uint8_t RESERVED_17[3]; 19447 __I uint8_t OBSERVE; /**< USB OTG Observe register, offset: 0x104 */ 19448 uint8_t RESERVED_18[3]; 19449 __IO uint8_t CONTROL; /**< USB OTG Control register, offset: 0x108 */ 19450 uint8_t RESERVED_19[3]; 19451 __IO uint8_t USBTRC0; /**< USB Transceiver Control register 0, offset: 0x10C */ 19452 uint8_t RESERVED_20[23]; 19453 __IO uint8_t KEEP_ALIVE_CTRL; /**< Keep Alive mode control, offset: 0x124 */ 19454 uint8_t RESERVED_21[3]; 19455 __IO uint8_t KEEP_ALIVE_WKCTRL; /**< Keep Alive mode wakeup control, offset: 0x128 */ 19456 uint8_t RESERVED_22[3]; 19457 __IO uint8_t MISCCTRL; /**< Miscellaneous Control register, offset: 0x12C */ 19458 uint8_t RESERVED_23[3]; 19459 __IO uint8_t STALL_IL_DIS; /**< Peripheral mode stall disable for endpoints 7 to 0 in IN direction, offset: 0x130 */ 19460 uint8_t RESERVED_24[3]; 19461 __IO uint8_t STALL_IH_DIS; /**< Peripheral mode stall disable for endpoints 15 to 8 in IN direction, offset: 0x134 */ 19462 uint8_t RESERVED_25[3]; 19463 __IO uint8_t STALL_OL_DIS; /**< Peripheral mode stall disable for endpoints 7 to 0 in OUT direction, offset: 0x138 */ 19464 uint8_t RESERVED_26[3]; 19465 __IO uint8_t STALL_OH_DIS; /**< Peripheral mode stall disable for endpoints 15 to 8 in OUT direction, offset: 0x13C */ 19466 uint8_t RESERVED_27[3]; 19467 __IO uint8_t CLK_RECOVER_CTRL; /**< USB Clock recovery control, offset: 0x140 */ 19468 uint8_t RESERVED_28[3]; 19469 __IO uint8_t CLK_RECOVER_IRC_EN; /**< IRC48MFIRC oscillator enable register, offset: 0x144 */ 19470 uint8_t RESERVED_29[15]; 19471 __IO uint8_t CLK_RECOVER_INT_EN; /**< Clock recovery combined interrupt enable, offset: 0x154 */ 19472 uint8_t RESERVED_30[7]; 19473 __IO uint8_t CLK_RECOVER_INT_STATUS; /**< Clock recovery separated interrupt status, offset: 0x15C */ 19474 } USB_Type; 19475 19476 /* ---------------------------------------------------------------------------- 19477 -- USB Register Masks 19478 ---------------------------------------------------------------------------- */ 19479 19480 /*! 19481 * @addtogroup USB_Register_Masks USB Register Masks 19482 * @{ 19483 */ 19484 19485 /*! @name PERID - Peripheral ID register */ 19486 /*! @{ */ 19487 #define USB_PERID_ID_MASK (0x3FU) 19488 #define USB_PERID_ID_SHIFT (0U) 19489 #define USB_PERID_ID(x) (((uint8_t)(((uint8_t)(x)) << USB_PERID_ID_SHIFT)) & USB_PERID_ID_MASK) 19490 /*! @} */ 19491 19492 /*! @name IDCOMP - Peripheral ID Complement register */ 19493 /*! @{ */ 19494 #define USB_IDCOMP_NID_MASK (0x3FU) 19495 #define USB_IDCOMP_NID_SHIFT (0U) 19496 #define USB_IDCOMP_NID(x) (((uint8_t)(((uint8_t)(x)) << USB_IDCOMP_NID_SHIFT)) & USB_IDCOMP_NID_MASK) 19497 /*! @} */ 19498 19499 /*! @name REV - Peripheral Revision register */ 19500 /*! @{ */ 19501 #define USB_REV_REV_MASK (0xFFU) 19502 #define USB_REV_REV_SHIFT (0U) 19503 #define USB_REV_REV(x) (((uint8_t)(((uint8_t)(x)) << USB_REV_REV_SHIFT)) & USB_REV_REV_MASK) 19504 /*! @} */ 19505 19506 /*! @name ADDINFO - Peripheral Additional Info register */ 19507 /*! @{ */ 19508 #define USB_ADDINFO_IEHOST_MASK (0x1U) 19509 #define USB_ADDINFO_IEHOST_SHIFT (0U) 19510 #define USB_ADDINFO_IEHOST(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDINFO_IEHOST_SHIFT)) & USB_ADDINFO_IEHOST_MASK) 19511 /*! @} */ 19512 19513 /*! @name OTGCTL - OTG Control register */ 19514 /*! @{ */ 19515 #define USB_OTGCTL_DPHIGH_MASK (0x80U) 19516 #define USB_OTGCTL_DPHIGH_SHIFT (7U) 19517 /*! DPHIGH - D+ Data Line pullup resistor enable 19518 * 0b0..D+ pullup resistor is not enabled 19519 * 0b1..D+ pullup resistor is enabled 19520 */ 19521 #define USB_OTGCTL_DPHIGH(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPHIGH_SHIFT)) & USB_OTGCTL_DPHIGH_MASK) 19522 /*! @} */ 19523 19524 /*! @name ISTAT - Interrupt Status register */ 19525 /*! @{ */ 19526 #define USB_ISTAT_USBRST_MASK (0x1U) 19527 #define USB_ISTAT_USBRST_SHIFT (0U) 19528 #define USB_ISTAT_USBRST(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_USBRST_SHIFT)) & USB_ISTAT_USBRST_MASK) 19529 #define USB_ISTAT_ERROR_MASK (0x2U) 19530 #define USB_ISTAT_ERROR_SHIFT (1U) 19531 #define USB_ISTAT_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ERROR_SHIFT)) & USB_ISTAT_ERROR_MASK) 19532 #define USB_ISTAT_SOFTOK_MASK (0x4U) 19533 #define USB_ISTAT_SOFTOK_SHIFT (2U) 19534 #define USB_ISTAT_SOFTOK(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SOFTOK_SHIFT)) & USB_ISTAT_SOFTOK_MASK) 19535 #define USB_ISTAT_TOKDNE_MASK (0x8U) 19536 #define USB_ISTAT_TOKDNE_SHIFT (3U) 19537 #define USB_ISTAT_TOKDNE(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_TOKDNE_SHIFT)) & USB_ISTAT_TOKDNE_MASK) 19538 #define USB_ISTAT_SLEEP_MASK (0x10U) 19539 #define USB_ISTAT_SLEEP_SHIFT (4U) 19540 #define USB_ISTAT_SLEEP(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SLEEP_SHIFT)) & USB_ISTAT_SLEEP_MASK) 19541 #define USB_ISTAT_RESUME_MASK (0x20U) 19542 #define USB_ISTAT_RESUME_SHIFT (5U) 19543 #define USB_ISTAT_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_RESUME_SHIFT)) & USB_ISTAT_RESUME_MASK) 19544 #define USB_ISTAT_STALL_MASK (0x80U) 19545 #define USB_ISTAT_STALL_SHIFT (7U) 19546 #define USB_ISTAT_STALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_STALL_SHIFT)) & USB_ISTAT_STALL_MASK) 19547 /*! @} */ 19548 19549 /*! @name INTEN - Interrupt Enable register */ 19550 /*! @{ */ 19551 #define USB_INTEN_USBRSTEN_MASK (0x1U) 19552 #define USB_INTEN_USBRSTEN_SHIFT (0U) 19553 /*! USBRSTEN - USBRST Interrupt Enable 19554 * 0b0..Disables the USBRST interrupt. 19555 * 0b1..Enables the USBRST interrupt. 19556 */ 19557 #define USB_INTEN_USBRSTEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_USBRSTEN_SHIFT)) & USB_INTEN_USBRSTEN_MASK) 19558 #define USB_INTEN_ERROREN_MASK (0x2U) 19559 #define USB_INTEN_ERROREN_SHIFT (1U) 19560 /*! ERROREN - ERROR Interrupt Enable 19561 * 0b0..Disables the ERROR interrupt. 19562 * 0b1..Enables the ERROR interrupt. 19563 */ 19564 #define USB_INTEN_ERROREN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ERROREN_SHIFT)) & USB_INTEN_ERROREN_MASK) 19565 #define USB_INTEN_SOFTOKEN_MASK (0x4U) 19566 #define USB_INTEN_SOFTOKEN_SHIFT (2U) 19567 /*! SOFTOKEN - SOFTOK Interrupt Enable 19568 * 0b0..Disbles the SOFTOK interrupt. 19569 * 0b1..Enables the SOFTOK interrupt. 19570 */ 19571 #define USB_INTEN_SOFTOKEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SOFTOKEN_SHIFT)) & USB_INTEN_SOFTOKEN_MASK) 19572 #define USB_INTEN_TOKDNEEN_MASK (0x8U) 19573 #define USB_INTEN_TOKDNEEN_SHIFT (3U) 19574 /*! TOKDNEEN - TOKDNE Interrupt Enable 19575 * 0b0..Disables the TOKDNE interrupt. 19576 * 0b1..Enables the TOKDNE interrupt. 19577 */ 19578 #define USB_INTEN_TOKDNEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_TOKDNEEN_SHIFT)) & USB_INTEN_TOKDNEEN_MASK) 19579 #define USB_INTEN_SLEEPEN_MASK (0x10U) 19580 #define USB_INTEN_SLEEPEN_SHIFT (4U) 19581 /*! SLEEPEN - SLEEP Interrupt Enable 19582 * 0b0..Disables the SLEEP interrupt. 19583 * 0b1..Enables the SLEEP interrupt. 19584 */ 19585 #define USB_INTEN_SLEEPEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SLEEPEN_SHIFT)) & USB_INTEN_SLEEPEN_MASK) 19586 #define USB_INTEN_RESUMEEN_MASK (0x20U) 19587 #define USB_INTEN_RESUMEEN_SHIFT (5U) 19588 /*! RESUMEEN - RESUME Interrupt Enable 19589 * 0b0..Disables the RESUME interrupt. 19590 * 0b1..Enables the RESUME interrupt. 19591 */ 19592 #define USB_INTEN_RESUMEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_RESUMEEN_SHIFT)) & USB_INTEN_RESUMEEN_MASK) 19593 #define USB_INTEN_STALLEN_MASK (0x80U) 19594 #define USB_INTEN_STALLEN_SHIFT (7U) 19595 /*! STALLEN - STALL Interrupt Enable 19596 * 0b0..Diasbles the STALL interrupt. 19597 * 0b1..Enables the STALL interrupt. 19598 */ 19599 #define USB_INTEN_STALLEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_STALLEN_SHIFT)) & USB_INTEN_STALLEN_MASK) 19600 /*! @} */ 19601 19602 /*! @name ERRSTAT - Error Interrupt Status register */ 19603 /*! @{ */ 19604 #define USB_ERRSTAT_PIDERR_MASK (0x1U) 19605 #define USB_ERRSTAT_PIDERR_SHIFT (0U) 19606 #define USB_ERRSTAT_PIDERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_PIDERR_SHIFT)) & USB_ERRSTAT_PIDERR_MASK) 19607 #define USB_ERRSTAT_CRC5EOF_MASK (0x2U) 19608 #define USB_ERRSTAT_CRC5EOF_SHIFT (1U) 19609 #define USB_ERRSTAT_CRC5EOF(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC5EOF_SHIFT)) & USB_ERRSTAT_CRC5EOF_MASK) 19610 #define USB_ERRSTAT_CRC16_MASK (0x4U) 19611 #define USB_ERRSTAT_CRC16_SHIFT (2U) 19612 #define USB_ERRSTAT_CRC16(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC16_SHIFT)) & USB_ERRSTAT_CRC16_MASK) 19613 #define USB_ERRSTAT_DFN8_MASK (0x8U) 19614 #define USB_ERRSTAT_DFN8_SHIFT (3U) 19615 #define USB_ERRSTAT_DFN8(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DFN8_SHIFT)) & USB_ERRSTAT_DFN8_MASK) 19616 #define USB_ERRSTAT_BTOERR_MASK (0x10U) 19617 #define USB_ERRSTAT_BTOERR_SHIFT (4U) 19618 #define USB_ERRSTAT_BTOERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTOERR_SHIFT)) & USB_ERRSTAT_BTOERR_MASK) 19619 #define USB_ERRSTAT_DMAERR_MASK (0x20U) 19620 #define USB_ERRSTAT_DMAERR_SHIFT (5U) 19621 #define USB_ERRSTAT_DMAERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DMAERR_SHIFT)) & USB_ERRSTAT_DMAERR_MASK) 19622 #define USB_ERRSTAT_OWNERR_MASK (0x40U) 19623 #define USB_ERRSTAT_OWNERR_SHIFT (6U) 19624 #define USB_ERRSTAT_OWNERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_OWNERR_SHIFT)) & USB_ERRSTAT_OWNERR_MASK) 19625 #define USB_ERRSTAT_BTSERR_MASK (0x80U) 19626 #define USB_ERRSTAT_BTSERR_SHIFT (7U) 19627 #define USB_ERRSTAT_BTSERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTSERR_SHIFT)) & USB_ERRSTAT_BTSERR_MASK) 19628 /*! @} */ 19629 19630 /*! @name ERREN - Error Interrupt Enable register */ 19631 /*! @{ */ 19632 #define USB_ERREN_PIDERREN_MASK (0x1U) 19633 #define USB_ERREN_PIDERREN_SHIFT (0U) 19634 /*! PIDERREN - PIDERR Interrupt Enable 19635 * 0b0..Disables the PIDERR interrupt. 19636 * 0b1..Enters the PIDERR interrupt. 19637 */ 19638 #define USB_ERREN_PIDERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_PIDERREN_SHIFT)) & USB_ERREN_PIDERREN_MASK) 19639 #define USB_ERREN_CRC5EOFEN_MASK (0x2U) 19640 #define USB_ERREN_CRC5EOFEN_SHIFT (1U) 19641 /*! CRC5EOFEN - CRC5/EOF Interrupt Enable 19642 * 0b0..Disables the CRC5/EOF interrupt. 19643 * 0b1..Enables the CRC5/EOF interrupt. 19644 */ 19645 #define USB_ERREN_CRC5EOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC5EOFEN_SHIFT)) & USB_ERREN_CRC5EOFEN_MASK) 19646 #define USB_ERREN_CRC16EN_MASK (0x4U) 19647 #define USB_ERREN_CRC16EN_SHIFT (2U) 19648 /*! CRC16EN - CRC16 Interrupt Enable 19649 * 0b0..Disables the CRC16 interrupt. 19650 * 0b1..Enables the CRC16 interrupt. 19651 */ 19652 #define USB_ERREN_CRC16EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC16EN_SHIFT)) & USB_ERREN_CRC16EN_MASK) 19653 #define USB_ERREN_DFN8EN_MASK (0x8U) 19654 #define USB_ERREN_DFN8EN_SHIFT (3U) 19655 /*! DFN8EN - DFN8 Interrupt Enable 19656 * 0b0..Disables the DFN8 interrupt. 19657 * 0b1..Enables the DFN8 interrupt. 19658 */ 19659 #define USB_ERREN_DFN8EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DFN8EN_SHIFT)) & USB_ERREN_DFN8EN_MASK) 19660 #define USB_ERREN_BTOERREN_MASK (0x10U) 19661 #define USB_ERREN_BTOERREN_SHIFT (4U) 19662 /*! BTOERREN - BTOERR Interrupt Enable 19663 * 0b0..Disables the BTOERR interrupt. 19664 * 0b1..Enables the BTOERR interrupt. 19665 */ 19666 #define USB_ERREN_BTOERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTOERREN_SHIFT)) & USB_ERREN_BTOERREN_MASK) 19667 #define USB_ERREN_DMAERREN_MASK (0x20U) 19668 #define USB_ERREN_DMAERREN_SHIFT (5U) 19669 /*! DMAERREN - DMAERR Interrupt Enable 19670 * 0b0..Disables the DMAERR interrupt. 19671 * 0b1..Enables the DMAERR interrupt. 19672 */ 19673 #define USB_ERREN_DMAERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DMAERREN_SHIFT)) & USB_ERREN_DMAERREN_MASK) 19674 #define USB_ERREN_OWNERREN_MASK (0x40U) 19675 #define USB_ERREN_OWNERREN_SHIFT (6U) 19676 /*! OWNERREN - OWNERR Interrupt Enable 19677 * 0b0..Disables the OWNERR interrupt. 19678 * 0b1..Enables the OWNERR interrupt. 19679 */ 19680 #define USB_ERREN_OWNERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_OWNERREN_SHIFT)) & USB_ERREN_OWNERREN_MASK) 19681 #define USB_ERREN_BTSERREN_MASK (0x80U) 19682 #define USB_ERREN_BTSERREN_SHIFT (7U) 19683 /*! BTSERREN - BTSERR Interrupt Enable 19684 * 0b0..Disables the BTSERR interrupt. 19685 * 0b1..Enables the BTSERR interrupt. 19686 */ 19687 #define USB_ERREN_BTSERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTSERREN_SHIFT)) & USB_ERREN_BTSERREN_MASK) 19688 /*! @} */ 19689 19690 /*! @name STAT - Status register */ 19691 /*! @{ */ 19692 #define USB_STAT_ODD_MASK (0x4U) 19693 #define USB_STAT_ODD_SHIFT (2U) 19694 #define USB_STAT_ODD(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ODD_SHIFT)) & USB_STAT_ODD_MASK) 19695 #define USB_STAT_TX_MASK (0x8U) 19696 #define USB_STAT_TX_SHIFT (3U) 19697 /*! TX - Transmit Indicator 19698 * 0b0..The most recent transaction was a receive operation. 19699 * 0b1..The most recent transaction was a transmit operation. 19700 */ 19701 #define USB_STAT_TX(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_TX_SHIFT)) & USB_STAT_TX_MASK) 19702 #define USB_STAT_ENDP_MASK (0xF0U) 19703 #define USB_STAT_ENDP_SHIFT (4U) 19704 #define USB_STAT_ENDP(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ENDP_SHIFT)) & USB_STAT_ENDP_MASK) 19705 /*! @} */ 19706 19707 /*! @name CTL - Control register */ 19708 /*! @{ */ 19709 #define USB_CTL_USBENSOFEN_MASK (0x1U) 19710 #define USB_CTL_USBENSOFEN_SHIFT (0U) 19711 /*! USBENSOFEN - USB Enable 19712 * 0b0..Disables the USB Module. 19713 * 0b1..Enables the USB Module. 19714 */ 19715 #define USB_CTL_USBENSOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_USBENSOFEN_SHIFT)) & USB_CTL_USBENSOFEN_MASK) 19716 #define USB_CTL_ODDRST_MASK (0x2U) 19717 #define USB_CTL_ODDRST_SHIFT (1U) 19718 #define USB_CTL_ODDRST(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_ODDRST_SHIFT)) & USB_CTL_ODDRST_MASK) 19719 #define USB_CTL_RESUME_MASK (0x4U) 19720 #define USB_CTL_RESUME_SHIFT (2U) 19721 #define USB_CTL_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESUME_SHIFT)) & USB_CTL_RESUME_MASK) 19722 #define USB_CTL_HOSTMODEEN_MASK (0x8U) 19723 #define USB_CTL_HOSTMODEEN_SHIFT (3U) 19724 /*! HOSTMODEEN - Host mode enable 19725 * 0b0..USB Module operates in Device mode. 19726 * 0b1..USB Module operates in Host mode. In Host mode, the USB module performs USB transactions under the programmed control of the host processor. 19727 */ 19728 #define USB_CTL_HOSTMODEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_HOSTMODEEN_SHIFT)) & USB_CTL_HOSTMODEEN_MASK) 19729 #define USB_CTL_TXSUSPENDTOKENBUSY_MASK (0x20U) 19730 #define USB_CTL_TXSUSPENDTOKENBUSY_SHIFT (5U) 19731 #define USB_CTL_TXSUSPENDTOKENBUSY(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_TXSUSPENDTOKENBUSY_SHIFT)) & USB_CTL_TXSUSPENDTOKENBUSY_MASK) 19732 #define USB_CTL_SE0_MASK (0x40U) 19733 #define USB_CTL_SE0_SHIFT (6U) 19734 #define USB_CTL_SE0(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_SE0_SHIFT)) & USB_CTL_SE0_MASK) 19735 #define USB_CTL_JSTATE_MASK (0x80U) 19736 #define USB_CTL_JSTATE_SHIFT (7U) 19737 #define USB_CTL_JSTATE(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_JSTATE_SHIFT)) & USB_CTL_JSTATE_MASK) 19738 /*! @} */ 19739 19740 /*! @name ADDR - Address register */ 19741 /*! @{ */ 19742 #define USB_ADDR_ADDR_MASK (0x7FU) 19743 #define USB_ADDR_ADDR_SHIFT (0U) 19744 #define USB_ADDR_ADDR(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDR_ADDR_SHIFT)) & USB_ADDR_ADDR_MASK) 19745 /*! @} */ 19746 19747 /*! @name BDTPAGE1 - BDT Page register 1 */ 19748 /*! @{ */ 19749 #define USB_BDTPAGE1_BDTBA_MASK (0xFEU) 19750 #define USB_BDTPAGE1_BDTBA_SHIFT (1U) 19751 #define USB_BDTPAGE1_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE1_BDTBA_SHIFT)) & USB_BDTPAGE1_BDTBA_MASK) 19752 /*! @} */ 19753 19754 /*! @name FRMNUML - Frame Number register Low */ 19755 /*! @{ */ 19756 #define USB_FRMNUML_FRM_MASK (0xFFU) 19757 #define USB_FRMNUML_FRM_SHIFT (0U) 19758 #define USB_FRMNUML_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUML_FRM_SHIFT)) & USB_FRMNUML_FRM_MASK) 19759 /*! @} */ 19760 19761 /*! @name FRMNUMH - Frame Number register High */ 19762 /*! @{ */ 19763 #define USB_FRMNUMH_FRM_MASK (0x7U) 19764 #define USB_FRMNUMH_FRM_SHIFT (0U) 19765 #define USB_FRMNUMH_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUMH_FRM_SHIFT)) & USB_FRMNUMH_FRM_MASK) 19766 /*! @} */ 19767 19768 /*! @name BDTPAGE2 - BDT Page Register 2 */ 19769 /*! @{ */ 19770 #define USB_BDTPAGE2_BDTBA_MASK (0xFFU) 19771 #define USB_BDTPAGE2_BDTBA_SHIFT (0U) 19772 #define USB_BDTPAGE2_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE2_BDTBA_SHIFT)) & USB_BDTPAGE2_BDTBA_MASK) 19773 /*! @} */ 19774 19775 /*! @name BDTPAGE3 - BDT Page Register 3 */ 19776 /*! @{ */ 19777 #define USB_BDTPAGE3_BDTBA_MASK (0xFFU) 19778 #define USB_BDTPAGE3_BDTBA_SHIFT (0U) 19779 #define USB_BDTPAGE3_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE3_BDTBA_SHIFT)) & USB_BDTPAGE3_BDTBA_MASK) 19780 /*! @} */ 19781 19782 /*! @name ENDPT - Endpoint Control register */ 19783 /*! @{ */ 19784 #define USB_ENDPT_EPHSHK_MASK (0x1U) 19785 #define USB_ENDPT_EPHSHK_SHIFT (0U) 19786 #define USB_ENDPT_EPHSHK(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPHSHK_SHIFT)) & USB_ENDPT_EPHSHK_MASK) 19787 #define USB_ENDPT_EPSTALL_MASK (0x2U) 19788 #define USB_ENDPT_EPSTALL_SHIFT (1U) 19789 #define USB_ENDPT_EPSTALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPSTALL_SHIFT)) & USB_ENDPT_EPSTALL_MASK) 19790 #define USB_ENDPT_EPTXEN_MASK (0x4U) 19791 #define USB_ENDPT_EPTXEN_SHIFT (2U) 19792 #define USB_ENDPT_EPTXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPTXEN_SHIFT)) & USB_ENDPT_EPTXEN_MASK) 19793 #define USB_ENDPT_EPRXEN_MASK (0x8U) 19794 #define USB_ENDPT_EPRXEN_SHIFT (3U) 19795 #define USB_ENDPT_EPRXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPRXEN_SHIFT)) & USB_ENDPT_EPRXEN_MASK) 19796 #define USB_ENDPT_EPCTLDIS_MASK (0x10U) 19797 #define USB_ENDPT_EPCTLDIS_SHIFT (4U) 19798 #define USB_ENDPT_EPCTLDIS(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPCTLDIS_SHIFT)) & USB_ENDPT_EPCTLDIS_MASK) 19799 /*! @} */ 19800 19801 /* The count of USB_ENDPT */ 19802 #define USB_ENDPT_COUNT (16U) 19803 19804 /*! @name USBCTRL - USB Control register */ 19805 /*! @{ */ 19806 #define USB_USBCTRL_UARTSEL_MASK (0x10U) 19807 #define USB_USBCTRL_UARTSEL_SHIFT (4U) 19808 /*! UARTSEL - UART Select 19809 * 0b0..USB signals are not used as UART signals. 19810 * 0b1..USB signals are used as UART signals. 19811 */ 19812 #define USB_USBCTRL_UARTSEL(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTSEL_SHIFT)) & USB_USBCTRL_UARTSEL_MASK) 19813 #define USB_USBCTRL_UARTCHLS_MASK (0x20U) 19814 #define USB_USBCTRL_UARTCHLS_SHIFT (5U) 19815 /*! UARTCHLS - UART Signal Channel Select 19816 * 0b0..USB DP/DM signals are used as UART TX/RX. 19817 * 0b1..USB DP/DM signals are used as UART RX/TX. 19818 */ 19819 #define USB_USBCTRL_UARTCHLS(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTCHLS_SHIFT)) & USB_USBCTRL_UARTCHLS_MASK) 19820 #define USB_USBCTRL_PDE_MASK (0x40U) 19821 #define USB_USBCTRL_PDE_SHIFT (6U) 19822 /*! PDE - Pulldown enable 19823 * 0b0..Weak pulldowns are disabled on D+ and D-. 19824 * 0b1..Weak pulldowns are enabled on D+ and D-. 19825 */ 19826 #define USB_USBCTRL_PDE(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_PDE_SHIFT)) & USB_USBCTRL_PDE_MASK) 19827 #define USB_USBCTRL_SUSP_MASK (0x80U) 19828 #define USB_USBCTRL_SUSP_SHIFT (7U) 19829 /*! SUSP - Suspend 19830 * 0b0..USB transceiver is not in the Suspend state. 19831 * 0b1..USB transceiver is in the Suspend state. 19832 */ 19833 #define USB_USBCTRL_SUSP(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_SUSP_SHIFT)) & USB_USBCTRL_SUSP_MASK) 19834 /*! @} */ 19835 19836 /*! @name OBSERVE - USB OTG Observe register */ 19837 /*! @{ */ 19838 #define USB_OBSERVE_DMPD_MASK (0x10U) 19839 #define USB_OBSERVE_DMPD_SHIFT (4U) 19840 /*! DMPD - DMPD 19841 * 0b0..D- pulldown is disabled. 19842 * 0b1..D- pulldown is enabled. 19843 */ 19844 #define USB_OBSERVE_DMPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DMPD_SHIFT)) & USB_OBSERVE_DMPD_MASK) 19845 #define USB_OBSERVE_DPPD_MASK (0x40U) 19846 #define USB_OBSERVE_DPPD_SHIFT (6U) 19847 /*! DPPD - DPPD 19848 * 0b0..D+ pulldown is disabled. 19849 * 0b1..D+ pulldown is enabled. 19850 */ 19851 #define USB_OBSERVE_DPPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPD_SHIFT)) & USB_OBSERVE_DPPD_MASK) 19852 #define USB_OBSERVE_DPPU_MASK (0x80U) 19853 #define USB_OBSERVE_DPPU_SHIFT (7U) 19854 /*! DPPU - DPPU 19855 * 0b0..D+ pullup disabled. 19856 * 0b1..D+ pullup enabled. 19857 */ 19858 #define USB_OBSERVE_DPPU(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPU_SHIFT)) & USB_OBSERVE_DPPU_MASK) 19859 /*! @} */ 19860 19861 /*! @name CONTROL - USB OTG Control register */ 19862 /*! @{ */ 19863 #define USB_CONTROL_DPPULLUPNONOTG_MASK (0x10U) 19864 #define USB_CONTROL_DPPULLUPNONOTG_SHIFT (4U) 19865 /*! DPPULLUPNONOTG - DPPULLUPNONOTG 19866 * 0b0..DP Pullup in non-OTG Device mode is not enabled. 19867 * 0b1..DP Pullup in non-OTG Device mode is enabled. 19868 */ 19869 #define USB_CONTROL_DPPULLUPNONOTG(x) (((uint8_t)(((uint8_t)(x)) << USB_CONTROL_DPPULLUPNONOTG_SHIFT)) & USB_CONTROL_DPPULLUPNONOTG_MASK) 19870 /*! @} */ 19871 19872 /*! @name USBTRC0 - USB Transceiver Control register 0 */ 19873 /*! @{ */ 19874 #define USB_USBTRC0_USB_RESUME_INT_MASK (0x1U) 19875 #define USB_USBTRC0_USB_RESUME_INT_SHIFT (0U) 19876 /*! USB_RESUME_INT - USB Asynchronous Interrupt 19877 * 0b0..No interrupt was generated. 19878 * 0b1..Interrupt was generated because of the USB asynchronous interrupt. 19879 */ 19880 #define USB_USBTRC0_USB_RESUME_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_RESUME_INT_SHIFT)) & USB_USBTRC0_USB_RESUME_INT_MASK) 19881 #define USB_USBTRC0_SYNC_DET_MASK (0x2U) 19882 #define USB_USBTRC0_SYNC_DET_SHIFT (1U) 19883 /*! SYNC_DET - Synchronous USB Interrupt Detect 19884 * 0b0..Synchronous interrupt has not been detected. 19885 * 0b1..Synchronous interrupt has been detected. 19886 */ 19887 #define USB_USBTRC0_SYNC_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_SYNC_DET_SHIFT)) & USB_USBTRC0_SYNC_DET_MASK) 19888 #define USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK (0x4U) 19889 #define USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT (2U) 19890 #define USB_USBTRC0_USB_CLK_RECOVERY_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT)) & USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK) 19891 #define USB_USBTRC0_VREDG_DET_MASK (0x8U) 19892 #define USB_USBTRC0_VREDG_DET_SHIFT (3U) 19893 /*! VREDG_DET - VREGIN Rising Edge Interrupt Detect 19894 * 0b0..VREGIN rising edge interrupt has not been detected. 19895 * 0b1..VREGIN rising edge interrupt has been detected. 19896 */ 19897 #define USB_USBTRC0_VREDG_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VREDG_DET_SHIFT)) & USB_USBTRC0_VREDG_DET_MASK) 19898 #define USB_USBTRC0_VFEDG_DET_MASK (0x10U) 19899 #define USB_USBTRC0_VFEDG_DET_SHIFT (4U) 19900 /*! VFEDG_DET - VREGIN Falling Edge Interrupt Detect 19901 * 0b0..VREGIN falling edge interrupt has not been detected. 19902 * 0b1..VREGIN falling edge interrupt has been detected. 19903 */ 19904 #define USB_USBTRC0_VFEDG_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VFEDG_DET_SHIFT)) & USB_USBTRC0_VFEDG_DET_MASK) 19905 #define USB_USBTRC0_USBRESMEN_MASK (0x20U) 19906 #define USB_USBTRC0_USBRESMEN_SHIFT (5U) 19907 /*! USBRESMEN - Asynchronous Resume Interrupt Enable 19908 * 0b0..USB asynchronous wakeup from Suspend mode is disabled. 19909 * 0b1..USB asynchronous wakeup from Suspend mode is enabled. 19910 */ 19911 #define USB_USBTRC0_USBRESMEN(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESMEN_SHIFT)) & USB_USBTRC0_USBRESMEN_MASK) 19912 #define USB_USBTRC0_VREGIN_STS_MASK (0x40U) 19913 #define USB_USBTRC0_VREGIN_STS_SHIFT (6U) 19914 #define USB_USBTRC0_VREGIN_STS(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VREGIN_STS_SHIFT)) & USB_USBTRC0_VREGIN_STS_MASK) 19915 #define USB_USBTRC0_USBRESET_MASK (0x80U) 19916 #define USB_USBTRC0_USBRESET_SHIFT (7U) 19917 /*! USBRESET - USB Reset 19918 * 0b0..Normal USB module operation. 19919 * 0b1..Returns the USB module to its reset state. 19920 */ 19921 #define USB_USBTRC0_USBRESET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESET_SHIFT)) & USB_USBTRC0_USBRESET_MASK) 19922 /*! @} */ 19923 19924 /*! @name KEEP_ALIVE_CTRL - Keep Alive mode control */ 19925 /*! @{ */ 19926 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_MASK (0x1U) 19927 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_SHIFT (0U) 19928 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_EN_MASK) 19929 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_MASK (0x2U) 19930 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_SHIFT (1U) 19931 #define USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_OWN_OVERRD_EN_MASK) 19932 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_MASK (0x4U) 19933 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_SHIFT (2U) 19934 /*! STOP_ACK_DLY_EN - STOP_ACK_DLY_EN 19935 * 0b0..Enter KEEP_ALIVE mode until the USB core is idle and there is no USB AHB transfer. 19936 * 0b1..Enter KEEP_ALIVE mode immediately when there is no USB AHB transfer. 19937 */ 19938 #define USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_STOP_ACK_DLY_EN_MASK) 19939 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_MASK (0x8U) 19940 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_SHIFT (3U) 19941 /*! WAKE_REQ_EN - WAKE_REQ_EN 19942 * 0b0..USB bus wakeup request is disabled 19943 * 0b1..USB bus wakeup request is enabled 19944 */ 19945 #define USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_REQ_EN_MASK) 19946 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_MASK (0x10U) 19947 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_SHIFT (4U) 19948 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_INT_EN_MASK) 19949 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_MASK (0x40U) 19950 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_SHIFT (6U) 19951 /*! KEEP_ALIVE_STS - Keep Alive Status 19952 * 0b0..USB is not in Keep Alive mode. 19953 * 0b1..USB is in Keep Alive mode. 19954 */ 19955 #define USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_SHIFT)) & USB_KEEP_ALIVE_CTRL_KEEP_ALIVE_STS_MASK) 19956 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_MASK (0x80U) 19957 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_SHIFT (7U) 19958 #define USB_KEEP_ALIVE_CTRL_WAKE_INT_STS(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_SHIFT)) & USB_KEEP_ALIVE_CTRL_WAKE_INT_STS_MASK) 19959 /*! @} */ 19960 19961 /*! @name KEEP_ALIVE_WKCTRL - Keep Alive mode wakeup control */ 19962 /*! @{ */ 19963 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_MASK (0xFU) 19964 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_SHIFT (0U) 19965 /*! WAKE_ON_THIS - WAKE_ON_THIS 19966 * 0b0001..Wake up after receiving OUT/SETUP token packet. 19967 * 0b1101..Wake up after receiving SETUP token packet. All other values are reserved. 19968 */ 19969 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_SHIFT)) & USB_KEEP_ALIVE_WKCTRL_WAKE_ON_THIS_MASK) 19970 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_MASK (0xF0U) 19971 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_SHIFT (4U) 19972 #define USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT(x) (((uint8_t)(((uint8_t)(x)) << USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_SHIFT)) & USB_KEEP_ALIVE_WKCTRL_WAKE_ENDPT_MASK) 19973 /*! @} */ 19974 19975 /*! @name MISCCTRL - Miscellaneous Control register */ 19976 /*! @{ */ 19977 #define USB_MISCCTRL_SOFDYNTHLD_MASK (0x1U) 19978 #define USB_MISCCTRL_SOFDYNTHLD_SHIFT (0U) 19979 /*! SOFDYNTHLD - Dynamic SOF Threshold Compare mode 19980 * 0b0..SOF_TOK interrupt is set when byte times SOF threshold is reached. 19981 * 0b1..SOF_TOK interrupt is set when 8 byte times SOF threshold is reached or overstepped. 19982 */ 19983 #define USB_MISCCTRL_SOFDYNTHLD(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFDYNTHLD_SHIFT)) & USB_MISCCTRL_SOFDYNTHLD_MASK) 19984 #define USB_MISCCTRL_SOFBUSSET_MASK (0x2U) 19985 #define USB_MISCCTRL_SOFBUSSET_SHIFT (1U) 19986 /*! SOFBUSSET - SOF_TOK Interrupt Generation Mode Select 19987 * 0b0..SOF_TOK interrupt is set according to SOF threshold value. 19988 * 0b1..SOF_TOK interrupt is set when SOF counter reaches 0. 19989 */ 19990 #define USB_MISCCTRL_SOFBUSSET(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFBUSSET_SHIFT)) & USB_MISCCTRL_SOFBUSSET_MASK) 19991 #define USB_MISCCTRL_OWNERRISODIS_MASK (0x4U) 19992 #define USB_MISCCTRL_OWNERRISODIS_SHIFT (2U) 19993 /*! OWNERRISODIS - OWN Error Detect for ISO IN / ISO OUT Disable 19994 * 0b0..OWN error detect for ISO IN / ISO OUT is not disabled. 19995 * 0b1..OWN error detect for ISO IN / ISO OUT is disabled. 19996 */ 19997 #define USB_MISCCTRL_OWNERRISODIS(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_OWNERRISODIS_SHIFT)) & USB_MISCCTRL_OWNERRISODIS_MASK) 19998 #define USB_MISCCTRL_VREDG_EN_MASK (0x8U) 19999 #define USB_MISCCTRL_VREDG_EN_SHIFT (3U) 20000 /*! VREDG_EN - VREGIN Rising Edge Interrupt Enable 20001 * 0b0..VREGIN rising edge interrupt disabled. 20002 * 0b1..VREGIN rising edge interrupt enabled. 20003 */ 20004 #define USB_MISCCTRL_VREDG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VREDG_EN_SHIFT)) & USB_MISCCTRL_VREDG_EN_MASK) 20005 #define USB_MISCCTRL_VFEDG_EN_MASK (0x10U) 20006 #define USB_MISCCTRL_VFEDG_EN_SHIFT (4U) 20007 /*! VFEDG_EN - VREGIN Falling Edge Interrupt Enable 20008 * 0b0..VREGIN falling edge interrupt disabled. 20009 * 0b1..VREGIN falling edge interrupt enabled. 20010 */ 20011 #define USB_MISCCTRL_VFEDG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VFEDG_EN_SHIFT)) & USB_MISCCTRL_VFEDG_EN_MASK) 20012 #define USB_MISCCTRL_STL_ADJ_EN_MASK (0x80U) 20013 #define USB_MISCCTRL_STL_ADJ_EN_SHIFT (7U) 20014 /*! STL_ADJ_EN - USB Peripheral mode Stall Adjust Enable 20015 * 0b0..If USB_ENDPTn[END_STALL] = 1, both IN and OUT directions for the associated endpoint will be stalled 20016 * 0b1..If USB_ENDPTn[END_STALL] = 1, the USB_STALL_xx_DIS registers control which directions for the associated endpoint will be stalled. 20017 */ 20018 #define USB_MISCCTRL_STL_ADJ_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_STL_ADJ_EN_SHIFT)) & USB_MISCCTRL_STL_ADJ_EN_MASK) 20019 /*! @} */ 20020 20021 /*! @name STALL_IL_DIS - Peripheral mode stall disable for endpoints 7 to 0 in IN direction */ 20022 /*! @{ */ 20023 #define USB_STALL_IL_DIS_STALL_I_DIS0_MASK (0x1U) 20024 #define USB_STALL_IL_DIS_STALL_I_DIS0_SHIFT (0U) 20025 /*! STALL_I_DIS0 - STALL_I_DIS0 20026 * 0b0..Endpoint 0 IN direction stall is enabled. 20027 * 0b1..Endpoint 0 IN direction stall is disabled. 20028 */ 20029 #define USB_STALL_IL_DIS_STALL_I_DIS0(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS0_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS0_MASK) 20030 #define USB_STALL_IL_DIS_STALL_I_DIS1_MASK (0x2U) 20031 #define USB_STALL_IL_DIS_STALL_I_DIS1_SHIFT (1U) 20032 /*! STALL_I_DIS1 - STALL_I_DIS1 20033 * 0b0..Endpoint 1 IN direction stall is enabled. 20034 * 0b1..Endpoint 1 IN direction stall is disabled. 20035 */ 20036 #define USB_STALL_IL_DIS_STALL_I_DIS1(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS1_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS1_MASK) 20037 #define USB_STALL_IL_DIS_STALL_I_DIS2_MASK (0x4U) 20038 #define USB_STALL_IL_DIS_STALL_I_DIS2_SHIFT (2U) 20039 /*! STALL_I_DIS2 - STALL_I_DIS2 20040 * 0b0..Endpoint 2 IN direction stall is enabled. 20041 * 0b1..Endpoint 2 IN direction stall is disabled. 20042 */ 20043 #define USB_STALL_IL_DIS_STALL_I_DIS2(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS2_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS2_MASK) 20044 #define USB_STALL_IL_DIS_STALL_I_DIS3_MASK (0x8U) 20045 #define USB_STALL_IL_DIS_STALL_I_DIS3_SHIFT (3U) 20046 /*! STALL_I_DIS3 - STALL_I_DIS3 20047 * 0b0..Endpoint 3 IN direction stall is enabled. 20048 * 0b1..Endpoint 3 IN direction stall is disabled. 20049 */ 20050 #define USB_STALL_IL_DIS_STALL_I_DIS3(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS3_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS3_MASK) 20051 #define USB_STALL_IL_DIS_STALL_I_DIS4_MASK (0x10U) 20052 #define USB_STALL_IL_DIS_STALL_I_DIS4_SHIFT (4U) 20053 /*! STALL_I_DIS4 - STALL_I_DIS4 20054 * 0b0..Endpoint 4 IN direction stall is enabled. 20055 * 0b1..Endpoint 4 IN direction stall is disabled. 20056 */ 20057 #define USB_STALL_IL_DIS_STALL_I_DIS4(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS4_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS4_MASK) 20058 #define USB_STALL_IL_DIS_STALL_I_DIS5_MASK (0x20U) 20059 #define USB_STALL_IL_DIS_STALL_I_DIS5_SHIFT (5U) 20060 /*! STALL_I_DIS5 - STALL_I_DIS5 20061 * 0b0..Endpoint 5 IN direction stall is enabled. 20062 * 0b1..Endpoint 5 IN direction stall is disabled. 20063 */ 20064 #define USB_STALL_IL_DIS_STALL_I_DIS5(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS5_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS5_MASK) 20065 #define USB_STALL_IL_DIS_STALL_I_DIS6_MASK (0x40U) 20066 #define USB_STALL_IL_DIS_STALL_I_DIS6_SHIFT (6U) 20067 /*! STALL_I_DIS6 - STALL_I_DIS6 20068 * 0b0..Endpoint 6 IN direction stall is enabled. 20069 * 0b1..Endpoint 6 IN direction stall is disabled. 20070 */ 20071 #define USB_STALL_IL_DIS_STALL_I_DIS6(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS6_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS6_MASK) 20072 #define USB_STALL_IL_DIS_STALL_I_DIS7_MASK (0x80U) 20073 #define USB_STALL_IL_DIS_STALL_I_DIS7_SHIFT (7U) 20074 /*! STALL_I_DIS7 - STALL_I_DIS7 20075 * 0b0..Endpoint 7 IN direction stall is enabled. 20076 * 0b1..Endpoint 7 IN direction stall is disabled. 20077 */ 20078 #define USB_STALL_IL_DIS_STALL_I_DIS7(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IL_DIS_STALL_I_DIS7_SHIFT)) & USB_STALL_IL_DIS_STALL_I_DIS7_MASK) 20079 /*! @} */ 20080 20081 /*! @name STALL_IH_DIS - Peripheral mode stall disable for endpoints 15 to 8 in IN direction */ 20082 /*! @{ */ 20083 #define USB_STALL_IH_DIS_STALL_I_DIS8_MASK (0x1U) 20084 #define USB_STALL_IH_DIS_STALL_I_DIS8_SHIFT (0U) 20085 /*! STALL_I_DIS8 - STALL_I_DIS8 20086 * 0b0..Endpoint 8 IN direction stall is enabled. 20087 * 0b1..Endpoint 8 IN direction stall is disabled. 20088 */ 20089 #define USB_STALL_IH_DIS_STALL_I_DIS8(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS8_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS8_MASK) 20090 #define USB_STALL_IH_DIS_STALL_I_DIS9_MASK (0x2U) 20091 #define USB_STALL_IH_DIS_STALL_I_DIS9_SHIFT (1U) 20092 /*! STALL_I_DIS9 - STALL_I_DIS9 20093 * 0b0..Endpoint 9 IN direction stall is enabled. 20094 * 0b1..Endpoint 9 IN direction stall is disabled. 20095 */ 20096 #define USB_STALL_IH_DIS_STALL_I_DIS9(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS9_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS9_MASK) 20097 #define USB_STALL_IH_DIS_STALL_I_DIS10_MASK (0x4U) 20098 #define USB_STALL_IH_DIS_STALL_I_DIS10_SHIFT (2U) 20099 /*! STALL_I_DIS10 - STALL_I_DIS10 20100 * 0b0..Endpoint 10 IN direction stall is enabled. 20101 * 0b1..Endpoint 10 IN direction stall is disabled. 20102 */ 20103 #define USB_STALL_IH_DIS_STALL_I_DIS10(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS10_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS10_MASK) 20104 #define USB_STALL_IH_DIS_STALL_I_DIS11_MASK (0x8U) 20105 #define USB_STALL_IH_DIS_STALL_I_DIS11_SHIFT (3U) 20106 /*! STALL_I_DIS11 - STALL_I_DIS11 20107 * 0b0..Endpoint 11 IN direction stall is enabled. 20108 * 0b1..Endpoint 11 IN direction stall is disabled. 20109 */ 20110 #define USB_STALL_IH_DIS_STALL_I_DIS11(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS11_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS11_MASK) 20111 #define USB_STALL_IH_DIS_STALL_I_DIS12_MASK (0x10U) 20112 #define USB_STALL_IH_DIS_STALL_I_DIS12_SHIFT (4U) 20113 /*! STALL_I_DIS12 - STALL_I_DIS12 20114 * 0b0..Endpoint 12 IN direction stall is enabled. 20115 * 0b1..Endpoint 12 IN direction stall is disabled. 20116 */ 20117 #define USB_STALL_IH_DIS_STALL_I_DIS12(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS12_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS12_MASK) 20118 #define USB_STALL_IH_DIS_STALL_I_DIS13_MASK (0x20U) 20119 #define USB_STALL_IH_DIS_STALL_I_DIS13_SHIFT (5U) 20120 /*! STALL_I_DIS13 - STALL_I_DIS13 20121 * 0b0..Endpoint 13 IN direction stall is enabled. 20122 * 0b1..Endpoint 13 IN direction stall is disabled. 20123 */ 20124 #define USB_STALL_IH_DIS_STALL_I_DIS13(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS13_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS13_MASK) 20125 #define USB_STALL_IH_DIS_STALL_I_DIS14_MASK (0x40U) 20126 #define USB_STALL_IH_DIS_STALL_I_DIS14_SHIFT (6U) 20127 /*! STALL_I_DIS14 - STALL_I_DIS14 20128 * 0b0..Endpoint 14 IN direction stall is enabled. 20129 * 0b1..Endpoint 14 IN direction stall is disabled. 20130 */ 20131 #define USB_STALL_IH_DIS_STALL_I_DIS14(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS14_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS14_MASK) 20132 #define USB_STALL_IH_DIS_STALL_I_DIS15_MASK (0x80U) 20133 #define USB_STALL_IH_DIS_STALL_I_DIS15_SHIFT (7U) 20134 /*! STALL_I_DIS15 - STALL_I_DIS15 20135 * 0b0..Endpoint 15 IN direction stall is enabled. 20136 * 0b1..Endpoint 15 IN direction stall is disabled. 20137 */ 20138 #define USB_STALL_IH_DIS_STALL_I_DIS15(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_IH_DIS_STALL_I_DIS15_SHIFT)) & USB_STALL_IH_DIS_STALL_I_DIS15_MASK) 20139 /*! @} */ 20140 20141 /*! @name STALL_OL_DIS - Peripheral mode stall disable for endpoints 7 to 0 in OUT direction */ 20142 /*! @{ */ 20143 #define USB_STALL_OL_DIS_STALL_O_DIS0_MASK (0x1U) 20144 #define USB_STALL_OL_DIS_STALL_O_DIS0_SHIFT (0U) 20145 /*! STALL_O_DIS0 - STALL_O_DIS0 20146 * 0b0..Endpoint 0 OUT direction stall is enabled. 20147 * 0b1..Endpoint 0 OUT direction stall is disabled. 20148 */ 20149 #define USB_STALL_OL_DIS_STALL_O_DIS0(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS0_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS0_MASK) 20150 #define USB_STALL_OL_DIS_STALL_O_DIS1_MASK (0x2U) 20151 #define USB_STALL_OL_DIS_STALL_O_DIS1_SHIFT (1U) 20152 /*! STALL_O_DIS1 - STALL_O_DIS1 20153 * 0b0..Endpoint 1 OUT direction stall is enabled. 20154 * 0b1..Endpoint 1 OUT direction stall is disabled. 20155 */ 20156 #define USB_STALL_OL_DIS_STALL_O_DIS1(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS1_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS1_MASK) 20157 #define USB_STALL_OL_DIS_STALL_O_DIS2_MASK (0x4U) 20158 #define USB_STALL_OL_DIS_STALL_O_DIS2_SHIFT (2U) 20159 /*! STALL_O_DIS2 - STALL_O_DIS2 20160 * 0b0..Endpoint 2 OUT direction stall is enabled. 20161 * 0b1..Endpoint 2 OUT direction stall is disabled. 20162 */ 20163 #define USB_STALL_OL_DIS_STALL_O_DIS2(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS2_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS2_MASK) 20164 #define USB_STALL_OL_DIS_STALL_O_DIS3_MASK (0x8U) 20165 #define USB_STALL_OL_DIS_STALL_O_DIS3_SHIFT (3U) 20166 /*! STALL_O_DIS3 - STALL_O_DIS3 20167 * 0b0..Endpoint 3 OUT direction stall is enabled. 20168 * 0b1..Endpoint 3 OUT direction stall is disabled. 20169 */ 20170 #define USB_STALL_OL_DIS_STALL_O_DIS3(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS3_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS3_MASK) 20171 #define USB_STALL_OL_DIS_STALL_O_DIS4_MASK (0x10U) 20172 #define USB_STALL_OL_DIS_STALL_O_DIS4_SHIFT (4U) 20173 /*! STALL_O_DIS4 - STALL_O_DIS4 20174 * 0b0..Endpoint 4 OUT direction stall is enabled. 20175 * 0b1..Endpoint 4 OUT direction stall is disabled. 20176 */ 20177 #define USB_STALL_OL_DIS_STALL_O_DIS4(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS4_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS4_MASK) 20178 #define USB_STALL_OL_DIS_STALL_O_DIS5_MASK (0x20U) 20179 #define USB_STALL_OL_DIS_STALL_O_DIS5_SHIFT (5U) 20180 /*! STALL_O_DIS5 - STALL_O_DIS5 20181 * 0b0..Endpoint 5 OUT direction stall is enabled. 20182 * 0b1..Endpoint 5 OUT direction stall is disabled. 20183 */ 20184 #define USB_STALL_OL_DIS_STALL_O_DIS5(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS5_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS5_MASK) 20185 #define USB_STALL_OL_DIS_STALL_O_DIS6_MASK (0x40U) 20186 #define USB_STALL_OL_DIS_STALL_O_DIS6_SHIFT (6U) 20187 /*! STALL_O_DIS6 - STALL_O_DIS6 20188 * 0b0..Endpoint 6 OUT direction stall is enabled. 20189 * 0b1..Endpoint 6 OUT direction stall is disabled. 20190 */ 20191 #define USB_STALL_OL_DIS_STALL_O_DIS6(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS6_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS6_MASK) 20192 #define USB_STALL_OL_DIS_STALL_O_DIS7_MASK (0x80U) 20193 #define USB_STALL_OL_DIS_STALL_O_DIS7_SHIFT (7U) 20194 /*! STALL_O_DIS7 - STALL_O_DIS7 20195 * 0b0..Endpoint 7 OUT direction stall is enabled. 20196 * 0b1..Endpoint 7 OUT direction stall is disabled. 20197 */ 20198 #define USB_STALL_OL_DIS_STALL_O_DIS7(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OL_DIS_STALL_O_DIS7_SHIFT)) & USB_STALL_OL_DIS_STALL_O_DIS7_MASK) 20199 /*! @} */ 20200 20201 /*! @name STALL_OH_DIS - Peripheral mode stall disable for endpoints 15 to 8 in OUT direction */ 20202 /*! @{ */ 20203 #define USB_STALL_OH_DIS_STALL_O_DIS8_MASK (0x1U) 20204 #define USB_STALL_OH_DIS_STALL_O_DIS8_SHIFT (0U) 20205 /*! STALL_O_DIS8 - STALL_O_DIS8 20206 * 0b0..Endpoint 8 OUT direction stall is enabled. 20207 * 0b1..Endpoint 8 OUT direction stall is disabled. 20208 */ 20209 #define USB_STALL_OH_DIS_STALL_O_DIS8(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS8_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS8_MASK) 20210 #define USB_STALL_OH_DIS_STALL_O_DIS9_MASK (0x2U) 20211 #define USB_STALL_OH_DIS_STALL_O_DIS9_SHIFT (1U) 20212 /*! STALL_O_DIS9 - STALL_O_DIS9 20213 * 0b0..Endpoint 9 OUT direction stall is enabled. 20214 * 0b1..Endpoint 9 OUT direction stall is disabled. 20215 */ 20216 #define USB_STALL_OH_DIS_STALL_O_DIS9(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS9_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS9_MASK) 20217 #define USB_STALL_OH_DIS_STALL_O_DIS10_MASK (0x4U) 20218 #define USB_STALL_OH_DIS_STALL_O_DIS10_SHIFT (2U) 20219 /*! STALL_O_DIS10 - STALL_O_DIS10 20220 * 0b0..Endpoint 10 OUT direction stall is enabled. 20221 * 0b1..Endpoint 10 OUT direction stall is disabled. 20222 */ 20223 #define USB_STALL_OH_DIS_STALL_O_DIS10(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS10_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS10_MASK) 20224 #define USB_STALL_OH_DIS_STALL_O_DIS11_MASK (0x8U) 20225 #define USB_STALL_OH_DIS_STALL_O_DIS11_SHIFT (3U) 20226 /*! STALL_O_DIS11 - STALL_O_DIS11 20227 * 0b0..Endpoint 11 OUT direction stall is enabled. 20228 * 0b1..Endpoint 11 OUT direction stall is disabled. 20229 */ 20230 #define USB_STALL_OH_DIS_STALL_O_DIS11(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS11_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS11_MASK) 20231 #define USB_STALL_OH_DIS_STALL_O_DIS12_MASK (0x10U) 20232 #define USB_STALL_OH_DIS_STALL_O_DIS12_SHIFT (4U) 20233 /*! STALL_O_DIS12 - STALL_O_DIS12 20234 * 0b0..Endpoint 12 OUT direction stall is enabled. 20235 * 0b1..Endpoint 12 OUT direction stall is disabled. 20236 */ 20237 #define USB_STALL_OH_DIS_STALL_O_DIS12(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS12_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS12_MASK) 20238 #define USB_STALL_OH_DIS_STALL_O_DIS13_MASK (0x20U) 20239 #define USB_STALL_OH_DIS_STALL_O_DIS13_SHIFT (5U) 20240 /*! STALL_O_DIS13 - STALL_O_DIS13 20241 * 0b0..Endpoint 13 OUT direction stall is enabled. 20242 * 0b1..Endpoint 13 OUT direction stall is disabled. 20243 */ 20244 #define USB_STALL_OH_DIS_STALL_O_DIS13(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS13_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS13_MASK) 20245 #define USB_STALL_OH_DIS_STALL_O_DIS14_MASK (0x40U) 20246 #define USB_STALL_OH_DIS_STALL_O_DIS14_SHIFT (6U) 20247 /*! STALL_O_DIS14 - STALL_O_DIS14 20248 * 0b0..Endpoint 14 OUT direction stall is enabled. 20249 * 0b1..Endpoint 14 OUT direction stall is disabled. 20250 */ 20251 #define USB_STALL_OH_DIS_STALL_O_DIS14(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS14_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS14_MASK) 20252 #define USB_STALL_OH_DIS_STALL_O_DIS15_MASK (0x80U) 20253 #define USB_STALL_OH_DIS_STALL_O_DIS15_SHIFT (7U) 20254 /*! STALL_O_DIS15 - STALL_O_DIS15 20255 * 0b0..Endpoint 15 OUT direction stall is enabled. 20256 * 0b1..Endpoint 15 OUT direction stall is disabled. 20257 */ 20258 #define USB_STALL_OH_DIS_STALL_O_DIS15(x) (((uint8_t)(((uint8_t)(x)) << USB_STALL_OH_DIS_STALL_O_DIS15_SHIFT)) & USB_STALL_OH_DIS_STALL_O_DIS15_MASK) 20259 /*! @} */ 20260 20261 /*! @name CLK_RECOVER_CTRL - USB Clock recovery control */ 20262 /*! @{ */ 20263 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK (0x20U) 20264 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT (5U) 20265 /*! RESTART_IFRTRIM_EN - Restart from IFR trim value 20266 * 0b0..Trim fine adjustment always works based on the previous updated trim fine value (default). 20267 * 0b1..Trim fine restarts from the IFR trim value, whenever bus_reset/bus_resume is detected or module enable is desasserted. 20268 */ 20269 #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK) 20270 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK (0x40U) 20271 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT (6U) 20272 /*! RESET_RESUME_ROUGH_EN - Reset/resume to rough phase enable 20273 * 0b0..Always works in tracking phase after the first time rough phase, to track transition (default). 20274 * 0b1..Go back to rough stage whenever a bus reset or bus resume occurs. 20275 */ 20276 #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK) 20277 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK (0x80U) 20278 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT (7U) 20279 /*! CLOCK_RECOVER_EN - Crystal-less USB enable 20280 * 0b0..Disable clock recovery block (default) 20281 * 0b1..Enable clock recovery block 20282 */ 20283 #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK) 20284 /*! @} */ 20285 20286 /*! @name CLK_RECOVER_IRC_EN - IRC48MFIRC oscillator enable register */ 20287 /*! @{ */ 20288 #define USB_CLK_RECOVER_IRC_EN_REG_EN_MASK (0x1U) 20289 #define USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT (0U) 20290 /*! REG_EN - Regulator enable 20291 * 0b0..IRC48M local regulator is disabled 20292 * 0b1..IRC48M local regulator is enabled (default) 20293 */ 20294 #define USB_CLK_RECOVER_IRC_EN_REG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_REG_EN_MASK) 20295 #define USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK (0x2U) 20296 #define USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT (1U) 20297 /*! IRC_EN - IRC_EN 20298 * 0b0..Disable the IRC48M module (default) 20299 * 0b1..Enable the IRC48M module 20300 */ 20301 #define USB_CLK_RECOVER_IRC_EN_IRC_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK) 20302 /*! @} */ 20303 20304 /*! @name CLK_RECOVER_INT_EN - Clock recovery combined interrupt enable */ 20305 /*! @{ */ 20306 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK (0x10U) 20307 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT (4U) 20308 /*! OVF_ERROR_EN - OVF_ERROR_EN 20309 * 0b0..The interrupt will be masked 20310 * 0b1..The interrupt will be enabled (default) 20311 */ 20312 #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT)) & USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK) 20313 /*! @} */ 20314 20315 /*! @name CLK_RECOVER_INT_STATUS - Clock recovery separated interrupt status */ 20316 /*! @{ */ 20317 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK (0x10U) 20318 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT (4U) 20319 /*! OVF_ERROR - OVF_ERROR 20320 * 0b0..No interrupt is reported 20321 * 0b1..Unmasked interrupt has been generated 20322 */ 20323 #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT)) & USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK) 20324 /*! @} */ 20325 20326 20327 /*! 20328 * @} 20329 */ /* end of group USB_Register_Masks */ 20330 20331 20332 /* USB - Peripheral instance base addresses */ 20333 /** Peripheral USB0 base address */ 20334 #define USB0_BASE (0x40045000u) 20335 /** Peripheral USB0 base pointer */ 20336 #define USB0 ((USB_Type *)USB0_BASE) 20337 /** Array initializer of USB peripheral base addresses */ 20338 #define USB_BASE_ADDRS { USB0_BASE } 20339 /** Array initializer of USB peripheral base pointers */ 20340 #define USB_BASE_PTRS { USB0 } 20341 /** Interrupt vectors for the USB peripheral type */ 20342 #define USB_IRQS { USB0_IRQn } 20343 20344 /*! 20345 * @} 20346 */ /* end of group USB_Peripheral_Access_Layer */ 20347 20348 20349 /* ---------------------------------------------------------------------------- 20350 -- USBVREG Peripheral Access Layer 20351 ---------------------------------------------------------------------------- */ 20352 20353 /*! 20354 * @addtogroup USBVREG_Peripheral_Access_Layer USBVREG Peripheral Access Layer 20355 * @{ 20356 */ 20357 20358 /** USBVREG - Register Layout Typedef */ 20359 typedef struct { 20360 __IO uint32_t CTRL; /**< USB VREG Control Register, offset: 0x0 */ 20361 __IO uint32_t CFGCTRL; /**< USB VREG Configuration Control Register, offset: 0x4 */ 20362 } USBVREG_Type; 20363 20364 /* ---------------------------------------------------------------------------- 20365 -- USBVREG Register Masks 20366 ---------------------------------------------------------------------------- */ 20367 20368 /*! 20369 * @addtogroup USBVREG_Register_Masks USBVREG Register Masks 20370 * @{ 20371 */ 20372 20373 /*! @name CTRL - USB VREG Control Register */ 20374 /*! @{ */ 20375 #define USBVREG_CTRL_VSTBY_MASK (0x20000000U) 20376 #define USBVREG_CTRL_VSTBY_SHIFT (29U) 20377 /*! VSTBY - USB Voltage Regulator in Standby Mode during VLPR and VLPW modes 20378 * 0b0..USB voltage regulator is not in standby during VLPR and VLPW modes. 20379 * 0b1..USB voltage regulator in standby during VLPR and VLPW modes. 20380 */ 20381 #define USBVREG_CTRL_VSTBY(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_VSTBY_SHIFT)) & USBVREG_CTRL_VSTBY_MASK) 20382 #define USBVREG_CTRL_SSTBY_MASK (0x40000000U) 20383 #define USBVREG_CTRL_SSTBY_SHIFT (30U) 20384 /*! SSTBY - USB Voltage Regulator in Standby Mode during Stop, VLPS, LLS and VLLS Modes 20385 * 0b0..USB voltage regulator is not in standby during Stop,VLPS,LLS and VLLS modes. 20386 * 0b1..USB voltage regulator is in standby during Stop,VLPS,LLS and VLLS modes. 20387 */ 20388 #define USBVREG_CTRL_SSTBY(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_SSTBY_SHIFT)) & USBVREG_CTRL_SSTBY_MASK) 20389 #define USBVREG_CTRL_EN_MASK (0x80000000U) 20390 #define USBVREG_CTRL_EN_SHIFT (31U) 20391 /*! EN - USB Voltage Regulator Enable 20392 * 0b0..USB voltage regulator is disabled. 20393 * 0b1..USB voltage regulator is enabled. 20394 */ 20395 #define USBVREG_CTRL_EN(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CTRL_EN_SHIFT)) & USBVREG_CTRL_EN_MASK) 20396 /*! @} */ 20397 20398 /*! @name CFGCTRL - USB VREG Configuration Control Register */ 20399 /*! @{ */ 20400 #define USBVREG_CFGCTRL_URWE_MASK (0x1000000U) 20401 #define USBVREG_CFGCTRL_URWE_SHIFT (24U) 20402 /*! URWE - USB Voltage Regulator Enable Write Enable 20403 * 0b0..CTRL[EN] can not be written. 20404 * 0b1..CTRL[EN] can be written. 20405 */ 20406 #define USBVREG_CFGCTRL_URWE(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_URWE_SHIFT)) & USBVREG_CFGCTRL_URWE_MASK) 20407 #define USBVREG_CFGCTRL_UVSWE_MASK (0x2000000U) 20408 #define USBVREG_CFGCTRL_UVSWE_SHIFT (25U) 20409 /*! UVSWE - USB Voltage Regulator VLP Standby Write Enable 20410 * 0b0..CTRL[VSTBY] cannot be written. 20411 * 0b1..CTRL[VSTBY] can be written. 20412 */ 20413 #define USBVREG_CFGCTRL_UVSWE(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_UVSWE_SHIFT)) & USBVREG_CFGCTRL_UVSWE_MASK) 20414 #define USBVREG_CFGCTRL_USSWE_MASK (0x4000000U) 20415 #define USBVREG_CFGCTRL_USSWE_SHIFT (26U) 20416 /*! USSWE - USB Voltage Rregulator Stop Standby Write Enable 20417 * 0b0..CTRL[SSTBY] field cannot be written. 20418 * 0b1..CTRL[SSTBY] can be written. 20419 */ 20420 #define USBVREG_CFGCTRL_USSWE(x) (((uint32_t)(((uint32_t)(x)) << USBVREG_CFGCTRL_USSWE_SHIFT)) & USBVREG_CFGCTRL_USSWE_MASK) 20421 /*! @} */ 20422 20423 20424 /*! 20425 * @} 20426 */ /* end of group USBVREG_Register_Masks */ 20427 20428 20429 /* USBVREG - Peripheral instance base addresses */ 20430 /** Peripheral USBVREG base address */ 20431 #define USBVREG_BASE (0x40027000u) 20432 /** Peripheral USBVREG base pointer */ 20433 #define USBVREG ((USBVREG_Type *)USBVREG_BASE) 20434 /** Array initializer of USBVREG peripheral base addresses */ 20435 #define USBVREG_BASE_ADDRS { USBVREG_BASE } 20436 /** Array initializer of USBVREG peripheral base pointers */ 20437 #define USBVREG_BASE_PTRS { USBVREG } 20438 20439 /*! 20440 * @} 20441 */ /* end of group USBVREG_Peripheral_Access_Layer */ 20442 20443 20444 /* ---------------------------------------------------------------------------- 20445 -- USDHC Peripheral Access Layer 20446 ---------------------------------------------------------------------------- */ 20447 20448 /*! 20449 * @addtogroup USDHC_Peripheral_Access_Layer USDHC Peripheral Access Layer 20450 * @{ 20451 */ 20452 20453 /** USDHC - Register Layout Typedef */ 20454 typedef struct { 20455 __IO uint32_t DS_ADDR; /**< DMA System Address, offset: 0x0 */ 20456 __IO uint32_t BLK_ATT; /**< Block Attributes, offset: 0x4 */ 20457 __IO uint32_t CMD_ARG; /**< Command Argument, offset: 0x8 */ 20458 __IO uint32_t CMD_XFR_TYP; /**< Command Transfer Type, offset: 0xC */ 20459 __I uint32_t CMD_RSP0; /**< Command Response0, offset: 0x10 */ 20460 __I uint32_t CMD_RSP1; /**< Command Response1, offset: 0x14 */ 20461 __I uint32_t CMD_RSP2; /**< Command Response2, offset: 0x18 */ 20462 __I uint32_t CMD_RSP3; /**< Command Response3, offset: 0x1C */ 20463 __IO uint32_t DATA_BUFF_ACC_PORT; /**< Data Buffer Access Port, offset: 0x20 */ 20464 __I uint32_t PRES_STATE; /**< Present State, offset: 0x24 */ 20465 __IO uint32_t PROT_CTRL; /**< Protocol Control, offset: 0x28 */ 20466 __IO uint32_t SYS_CTRL; /**< System Control, offset: 0x2C */ 20467 __IO uint32_t INT_STATUS; /**< Interrupt Status, offset: 0x30 */ 20468 __IO uint32_t INT_STATUS_EN; /**< Interrupt Status Enable, offset: 0x34 */ 20469 __IO uint32_t INT_SIGNAL_EN; /**< Interrupt Signal Enable, offset: 0x38 */ 20470 __I uint32_t AUTOCMD12_ERR_STATUS; /**< Auto CMD12 Error Status, offset: 0x3C */ 20471 __I uint32_t HOST_CTRL_CAP; /**< Host Controller Capabilities, offset: 0x40 */ 20472 __IO uint32_t WTMK_LVL; /**< Watermark Level, offset: 0x44 */ 20473 __IO uint32_t MIX_CTRL; /**< Mixer Control, offset: 0x48 */ 20474 uint8_t RESERVED_0[4]; 20475 __O uint32_t FORCE_EVENT; /**< Force Event, offset: 0x50 */ 20476 __I uint32_t ADMA_ERR_STATUS; /**< ADMA Error Status Register, offset: 0x54 */ 20477 __IO uint32_t ADMA_SYS_ADDR; /**< ADMA System Address, offset: 0x58 */ 20478 uint8_t RESERVED_1[100]; 20479 __IO uint32_t VEND_SPEC; /**< Vendor Specific Register, offset: 0xC0 */ 20480 __IO uint32_t MMC_BOOT; /**< MMC Boot Register, offset: 0xC4 */ 20481 __IO uint32_t VEND_SPEC2; /**< Vendor Specific 2 Register, offset: 0xC8 */ 20482 } USDHC_Type; 20483 20484 /* ---------------------------------------------------------------------------- 20485 -- USDHC Register Masks 20486 ---------------------------------------------------------------------------- */ 20487 20488 /*! 20489 * @addtogroup USDHC_Register_Masks USDHC Register Masks 20490 * @{ 20491 */ 20492 20493 /*! @name DS_ADDR - DMA System Address */ 20494 /*! @{ */ 20495 #define USDHC_DS_ADDR_DS_ADDR_MASK (0xFFFFFFFFU) 20496 #define USDHC_DS_ADDR_DS_ADDR_SHIFT (0U) 20497 #define USDHC_DS_ADDR_DS_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USDHC_DS_ADDR_DS_ADDR_SHIFT)) & USDHC_DS_ADDR_DS_ADDR_MASK) 20498 /*! @} */ 20499 20500 /*! @name BLK_ATT - Block Attributes */ 20501 /*! @{ */ 20502 #define USDHC_BLK_ATT_BLKSIZE_MASK (0x1FFFU) 20503 #define USDHC_BLK_ATT_BLKSIZE_SHIFT (0U) 20504 /*! BLKSIZE - Block Size 20505 * 0b1000000000000..4096 Bytes 20506 * 0b0100000000000..2048 Bytes 20507 * 0b0001000000000..512 Bytes 20508 * 0b0000111111111..511 Bytes 20509 * 0b0000000000100..4 Bytes 20510 * 0b0000000000011..3 Bytes 20511 * 0b0000000000010..2 Bytes 20512 * 0b0000000000001..1 Byte 20513 * 0b0000000000000..No data transfer 20514 */ 20515 #define USDHC_BLK_ATT_BLKSIZE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_BLK_ATT_BLKSIZE_SHIFT)) & USDHC_BLK_ATT_BLKSIZE_MASK) 20516 #define USDHC_BLK_ATT_BLKCNT_MASK (0xFFFF0000U) 20517 #define USDHC_BLK_ATT_BLKCNT_SHIFT (16U) 20518 /*! BLKCNT - Block Count 20519 * 0b1111111111111111..65535 blocks 20520 * 0b0000000000000010..2 blocks 20521 * 0b0000000000000001..1 block 20522 * 0b0000000000000000..Stop Count 20523 */ 20524 #define USDHC_BLK_ATT_BLKCNT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_BLK_ATT_BLKCNT_SHIFT)) & USDHC_BLK_ATT_BLKCNT_MASK) 20525 /*! @} */ 20526 20527 /*! @name CMD_ARG - Command Argument */ 20528 /*! @{ */ 20529 #define USDHC_CMD_ARG_CMDARG_MASK (0xFFFFFFFFU) 20530 #define USDHC_CMD_ARG_CMDARG_SHIFT (0U) 20531 #define USDHC_CMD_ARG_CMDARG(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_ARG_CMDARG_SHIFT)) & USDHC_CMD_ARG_CMDARG_MASK) 20532 /*! @} */ 20533 20534 /*! @name CMD_XFR_TYP - Command Transfer Type */ 20535 /*! @{ */ 20536 #define USDHC_CMD_XFR_TYP_RSPTYP_MASK (0x30000U) 20537 #define USDHC_CMD_XFR_TYP_RSPTYP_SHIFT (16U) 20538 /*! RSPTYP - Response Type Select 20539 * 0b00..No Response 20540 * 0b01..Response Length 136 20541 * 0b10..Response Length 48 20542 * 0b11..Response Length 48, check Busy after response 20543 */ 20544 #define USDHC_CMD_XFR_TYP_RSPTYP(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_RSPTYP_SHIFT)) & USDHC_CMD_XFR_TYP_RSPTYP_MASK) 20545 #define USDHC_CMD_XFR_TYP_CCCEN_MASK (0x80000U) 20546 #define USDHC_CMD_XFR_TYP_CCCEN_SHIFT (19U) 20547 /*! CCCEN - Command CRC Check Enable 20548 * 0b1..Enable 20549 * 0b0..Disable 20550 */ 20551 #define USDHC_CMD_XFR_TYP_CCCEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CCCEN_SHIFT)) & USDHC_CMD_XFR_TYP_CCCEN_MASK) 20552 #define USDHC_CMD_XFR_TYP_CICEN_MASK (0x100000U) 20553 #define USDHC_CMD_XFR_TYP_CICEN_SHIFT (20U) 20554 /*! CICEN - Command Index Check Enable 20555 * 0b1..Enable 20556 * 0b0..Disable 20557 */ 20558 #define USDHC_CMD_XFR_TYP_CICEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CICEN_SHIFT)) & USDHC_CMD_XFR_TYP_CICEN_MASK) 20559 #define USDHC_CMD_XFR_TYP_DPSEL_MASK (0x200000U) 20560 #define USDHC_CMD_XFR_TYP_DPSEL_SHIFT (21U) 20561 /*! DPSEL - Data Present Select 20562 * 0b1..Data Present 20563 * 0b0..No Data Present 20564 */ 20565 #define USDHC_CMD_XFR_TYP_DPSEL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_DPSEL_SHIFT)) & USDHC_CMD_XFR_TYP_DPSEL_MASK) 20566 #define USDHC_CMD_XFR_TYP_CMDTYP_MASK (0xC00000U) 20567 #define USDHC_CMD_XFR_TYP_CMDTYP_SHIFT (22U) 20568 /*! CMDTYP - Command Type 20569 * 0b11..Abort CMD12, CMD52 for writing I/O Abort in CCCR 20570 * 0b10..Resume CMD52 for writing Function Select in CCCR 20571 * 0b01..Suspend CMD52 for writing Bus Suspend in CCCR 20572 * 0b00..Normal Other commands 20573 */ 20574 #define USDHC_CMD_XFR_TYP_CMDTYP(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CMDTYP_SHIFT)) & USDHC_CMD_XFR_TYP_CMDTYP_MASK) 20575 #define USDHC_CMD_XFR_TYP_CMDINX_MASK (0x3F000000U) 20576 #define USDHC_CMD_XFR_TYP_CMDINX_SHIFT (24U) 20577 #define USDHC_CMD_XFR_TYP_CMDINX(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_XFR_TYP_CMDINX_SHIFT)) & USDHC_CMD_XFR_TYP_CMDINX_MASK) 20578 /*! @} */ 20579 20580 /*! @name CMD_RSP0 - Command Response0 */ 20581 /*! @{ */ 20582 #define USDHC_CMD_RSP0_CMDRSP0_MASK (0xFFFFFFFFU) 20583 #define USDHC_CMD_RSP0_CMDRSP0_SHIFT (0U) 20584 #define USDHC_CMD_RSP0_CMDRSP0(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP0_CMDRSP0_SHIFT)) & USDHC_CMD_RSP0_CMDRSP0_MASK) 20585 /*! @} */ 20586 20587 /*! @name CMD_RSP1 - Command Response1 */ 20588 /*! @{ */ 20589 #define USDHC_CMD_RSP1_CMDRSP1_MASK (0xFFFFFFFFU) 20590 #define USDHC_CMD_RSP1_CMDRSP1_SHIFT (0U) 20591 #define USDHC_CMD_RSP1_CMDRSP1(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP1_CMDRSP1_SHIFT)) & USDHC_CMD_RSP1_CMDRSP1_MASK) 20592 /*! @} */ 20593 20594 /*! @name CMD_RSP2 - Command Response2 */ 20595 /*! @{ */ 20596 #define USDHC_CMD_RSP2_CMDRSP2_MASK (0xFFFFFFFFU) 20597 #define USDHC_CMD_RSP2_CMDRSP2_SHIFT (0U) 20598 #define USDHC_CMD_RSP2_CMDRSP2(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP2_CMDRSP2_SHIFT)) & USDHC_CMD_RSP2_CMDRSP2_MASK) 20599 /*! @} */ 20600 20601 /*! @name CMD_RSP3 - Command Response3 */ 20602 /*! @{ */ 20603 #define USDHC_CMD_RSP3_CMDRSP3_MASK (0xFFFFFFFFU) 20604 #define USDHC_CMD_RSP3_CMDRSP3_SHIFT (0U) 20605 #define USDHC_CMD_RSP3_CMDRSP3(x) (((uint32_t)(((uint32_t)(x)) << USDHC_CMD_RSP3_CMDRSP3_SHIFT)) & USDHC_CMD_RSP3_CMDRSP3_MASK) 20606 /*! @} */ 20607 20608 /*! @name DATA_BUFF_ACC_PORT - Data Buffer Access Port */ 20609 /*! @{ */ 20610 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT_MASK (0xFFFFFFFFU) 20611 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT_SHIFT (0U) 20612 #define USDHC_DATA_BUFF_ACC_PORT_DATCONT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_DATA_BUFF_ACC_PORT_DATCONT_SHIFT)) & USDHC_DATA_BUFF_ACC_PORT_DATCONT_MASK) 20613 /*! @} */ 20614 20615 /*! @name PRES_STATE - Present State */ 20616 /*! @{ */ 20617 #define USDHC_PRES_STATE_CIHB_MASK (0x1U) 20618 #define USDHC_PRES_STATE_CIHB_SHIFT (0U) 20619 /*! CIHB - Command Inhibit (CMD) 20620 * 0b1..Cannot issue command 20621 * 0b0..Can issue command using only CMD line 20622 */ 20623 #define USDHC_PRES_STATE_CIHB(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CIHB_SHIFT)) & USDHC_PRES_STATE_CIHB_MASK) 20624 #define USDHC_PRES_STATE_CDIHB_MASK (0x2U) 20625 #define USDHC_PRES_STATE_CDIHB_SHIFT (1U) 20626 /*! CDIHB - Command Inhibit (DATA) 20627 * 0b1..Cannot issue command which uses the DATA line 20628 * 0b0..Can issue command which uses the DATA line 20629 */ 20630 #define USDHC_PRES_STATE_CDIHB(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CDIHB_SHIFT)) & USDHC_PRES_STATE_CDIHB_MASK) 20631 #define USDHC_PRES_STATE_DLA_MASK (0x4U) 20632 #define USDHC_PRES_STATE_DLA_SHIFT (2U) 20633 /*! DLA - Data Line Active 20634 * 0b1..DATA Line Active 20635 * 0b0..DATA Line Inactive 20636 */ 20637 #define USDHC_PRES_STATE_DLA(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_DLA_SHIFT)) & USDHC_PRES_STATE_DLA_MASK) 20638 #define USDHC_PRES_STATE_SDSTB_MASK (0x8U) 20639 #define USDHC_PRES_STATE_SDSTB_SHIFT (3U) 20640 /*! SDSTB - SD Clock Stable 20641 * 0b1..Clock is stable. 20642 * 0b0..Clock is changing frequency and not stable. 20643 */ 20644 #define USDHC_PRES_STATE_SDSTB(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_SDSTB_SHIFT)) & USDHC_PRES_STATE_SDSTB_MASK) 20645 #define USDHC_PRES_STATE_IPGOFF_MASK (0x10U) 20646 #define USDHC_PRES_STATE_IPGOFF_SHIFT (4U) 20647 /*! IPGOFF - IPG_CLK Gated Off Internally 20648 * 0b1..IPG_CLK is gated off. 20649 * 0b0..IPG_CLK is active. 20650 */ 20651 #define USDHC_PRES_STATE_IPGOFF(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_IPGOFF_SHIFT)) & USDHC_PRES_STATE_IPGOFF_MASK) 20652 #define USDHC_PRES_STATE_HCKOFF_MASK (0x20U) 20653 #define USDHC_PRES_STATE_HCKOFF_SHIFT (5U) 20654 /*! HCKOFF - HCLK Gated Off Internally 20655 * 0b1..HCLK is gated off. 20656 * 0b0..HCLK is active. 20657 */ 20658 #define USDHC_PRES_STATE_HCKOFF(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_HCKOFF_SHIFT)) & USDHC_PRES_STATE_HCKOFF_MASK) 20659 #define USDHC_PRES_STATE_PEROFF_MASK (0x40U) 20660 #define USDHC_PRES_STATE_PEROFF_SHIFT (6U) 20661 /*! PEROFF - IPG_PERCLK Gated Off Internally 20662 * 0b1..IPG_PERCLK is gated off. 20663 * 0b0..IPG_PERCLK is active. 20664 */ 20665 #define USDHC_PRES_STATE_PEROFF(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_PEROFF_SHIFT)) & USDHC_PRES_STATE_PEROFF_MASK) 20666 #define USDHC_PRES_STATE_SDOFF_MASK (0x80U) 20667 #define USDHC_PRES_STATE_SDOFF_SHIFT (7U) 20668 /*! SDOFF - SD Clock Gated Off Internally 20669 * 0b1..SD Clock is gated off. 20670 * 0b0..SD Clock is active. 20671 */ 20672 #define USDHC_PRES_STATE_SDOFF(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_SDOFF_SHIFT)) & USDHC_PRES_STATE_SDOFF_MASK) 20673 #define USDHC_PRES_STATE_WTA_MASK (0x100U) 20674 #define USDHC_PRES_STATE_WTA_SHIFT (8U) 20675 /*! WTA - Write Transfer Active 20676 * 0b1..Transferring data 20677 * 0b0..No valid data 20678 */ 20679 #define USDHC_PRES_STATE_WTA(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_WTA_SHIFT)) & USDHC_PRES_STATE_WTA_MASK) 20680 #define USDHC_PRES_STATE_RTA_MASK (0x200U) 20681 #define USDHC_PRES_STATE_RTA_SHIFT (9U) 20682 /*! RTA - Read Transfer Active 20683 * 0b1..Transferring data 20684 * 0b0..No valid data 20685 */ 20686 #define USDHC_PRES_STATE_RTA(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_RTA_SHIFT)) & USDHC_PRES_STATE_RTA_MASK) 20687 #define USDHC_PRES_STATE_BWEN_MASK (0x400U) 20688 #define USDHC_PRES_STATE_BWEN_SHIFT (10U) 20689 /*! BWEN - Buffer Write Enable 20690 * 0b1..Write enable 20691 * 0b0..Write disable 20692 */ 20693 #define USDHC_PRES_STATE_BWEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_BWEN_SHIFT)) & USDHC_PRES_STATE_BWEN_MASK) 20694 #define USDHC_PRES_STATE_BREN_MASK (0x800U) 20695 #define USDHC_PRES_STATE_BREN_SHIFT (11U) 20696 /*! BREN - Buffer Read Enable 20697 * 0b1..Read enable 20698 * 0b0..Read disable 20699 */ 20700 #define USDHC_PRES_STATE_BREN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_BREN_SHIFT)) & USDHC_PRES_STATE_BREN_MASK) 20701 #define USDHC_PRES_STATE_CINST_MASK (0x10000U) 20702 #define USDHC_PRES_STATE_CINST_SHIFT (16U) 20703 /*! CINST - Card Inserted 20704 * 0b1..Card Inserted 20705 * 0b0..Power on Reset or No Card 20706 */ 20707 #define USDHC_PRES_STATE_CINST(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CINST_SHIFT)) & USDHC_PRES_STATE_CINST_MASK) 20708 #define USDHC_PRES_STATE_CDPL_MASK (0x40000U) 20709 #define USDHC_PRES_STATE_CDPL_SHIFT (18U) 20710 /*! CDPL - Card Detect Pin Level 20711 * 0b1..Card present (CD_B = 0) 20712 * 0b0..No card present (CD_B = 1) 20713 */ 20714 #define USDHC_PRES_STATE_CDPL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CDPL_SHIFT)) & USDHC_PRES_STATE_CDPL_MASK) 20715 #define USDHC_PRES_STATE_WPSPL_MASK (0x80000U) 20716 #define USDHC_PRES_STATE_WPSPL_SHIFT (19U) 20717 /*! WPSPL - Write Protect Switch Pin Level 20718 * 0b1..Write enabled (WP = 0) 20719 * 0b0..Write protected (WP = 1) 20720 */ 20721 #define USDHC_PRES_STATE_WPSPL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_WPSPL_SHIFT)) & USDHC_PRES_STATE_WPSPL_MASK) 20722 #define USDHC_PRES_STATE_CLSL_MASK (0x800000U) 20723 #define USDHC_PRES_STATE_CLSL_SHIFT (23U) 20724 #define USDHC_PRES_STATE_CLSL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_CLSL_SHIFT)) & USDHC_PRES_STATE_CLSL_MASK) 20725 #define USDHC_PRES_STATE_DLSL_MASK (0xFF000000U) 20726 #define USDHC_PRES_STATE_DLSL_SHIFT (24U) 20727 /*! DLSL - DATA[7:0] Line Signal Level 20728 * 0b00000111..Data 7 line signal level 20729 * 0b00000110..Data 6 line signal level 20730 * 0b00000101..Data 5 line signal level 20731 * 0b00000100..Data 4 line signal level 20732 * 0b00000011..Data 3 line signal level 20733 * 0b00000010..Data 2 line signal level 20734 * 0b00000001..Data 1 line signal level 20735 * 0b00000000..Data 0 line signal level 20736 */ 20737 #define USDHC_PRES_STATE_DLSL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PRES_STATE_DLSL_SHIFT)) & USDHC_PRES_STATE_DLSL_MASK) 20738 /*! @} */ 20739 20740 /*! @name PROT_CTRL - Protocol Control */ 20741 /*! @{ */ 20742 #define USDHC_PROT_CTRL_LCTL_MASK (0x1U) 20743 #define USDHC_PROT_CTRL_LCTL_SHIFT (0U) 20744 /*! LCTL - LED Control 20745 * 0b1..LED on 20746 * 0b0..LED off 20747 */ 20748 #define USDHC_PROT_CTRL_LCTL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_LCTL_SHIFT)) & USDHC_PROT_CTRL_LCTL_MASK) 20749 #define USDHC_PROT_CTRL_DTW_MASK (0x6U) 20750 #define USDHC_PROT_CTRL_DTW_SHIFT (1U) 20751 /*! DTW - Data Transfer Width 20752 * 0b10..8-bit mode 20753 * 0b01..4-bit mode 20754 * 0b00..1-bit mode 20755 * 0b11..Reserved 20756 */ 20757 #define USDHC_PROT_CTRL_DTW(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_DTW_SHIFT)) & USDHC_PROT_CTRL_DTW_MASK) 20758 #define USDHC_PROT_CTRL_D3CD_MASK (0x8U) 20759 #define USDHC_PROT_CTRL_D3CD_SHIFT (3U) 20760 /*! D3CD - DATA3 as Card Detection Pin 20761 * 0b1..DATA3 as Card Detection Pin 20762 * 0b0..DATA3 does not monitor Card Insertion 20763 */ 20764 #define USDHC_PROT_CTRL_D3CD(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_D3CD_SHIFT)) & USDHC_PROT_CTRL_D3CD_MASK) 20765 #define USDHC_PROT_CTRL_EMODE_MASK (0x30U) 20766 #define USDHC_PROT_CTRL_EMODE_SHIFT (4U) 20767 /*! EMODE - Endian Mode 20768 * 0b00..Big Endian Mode 20769 * 0b01..Half Word Big Endian Mode 20770 * 0b10..Little Endian Mode 20771 * 0b11..Reserved 20772 */ 20773 #define USDHC_PROT_CTRL_EMODE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_EMODE_SHIFT)) & USDHC_PROT_CTRL_EMODE_MASK) 20774 #define USDHC_PROT_CTRL_CDTL_MASK (0x40U) 20775 #define USDHC_PROT_CTRL_CDTL_SHIFT (6U) 20776 /*! CDTL - Card Detect Test Level 20777 * 0b1..Card Detect Test Level is 1, card inserted 20778 * 0b0..Card Detect Test Level is 0, no card inserted 20779 */ 20780 #define USDHC_PROT_CTRL_CDTL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CDTL_SHIFT)) & USDHC_PROT_CTRL_CDTL_MASK) 20781 #define USDHC_PROT_CTRL_CDSS_MASK (0x80U) 20782 #define USDHC_PROT_CTRL_CDSS_SHIFT (7U) 20783 /*! CDSS - Card Detect Signal Selection 20784 * 0b1..Card Detection Test Level is selected (for test purpose). 20785 * 0b0..Card Detection Level is selected (for normal purpose). 20786 */ 20787 #define USDHC_PROT_CTRL_CDSS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CDSS_SHIFT)) & USDHC_PROT_CTRL_CDSS_MASK) 20788 #define USDHC_PROT_CTRL_DMASEL_MASK (0x300U) 20789 #define USDHC_PROT_CTRL_DMASEL_SHIFT (8U) 20790 /*! DMASEL - DMA Select 20791 * 0b00..No DMA or Simple DMA is selected 20792 * 0b01..ADMA1 is selected 20793 * 0b10..ADMA2 is selected 20794 * 0b11..reserved 20795 */ 20796 #define USDHC_PROT_CTRL_DMASEL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_DMASEL_SHIFT)) & USDHC_PROT_CTRL_DMASEL_MASK) 20797 #define USDHC_PROT_CTRL_SABGREQ_MASK (0x10000U) 20798 #define USDHC_PROT_CTRL_SABGREQ_SHIFT (16U) 20799 /*! SABGREQ - Stop At Block Gap Request 20800 * 0b1..Stop 20801 * 0b0..Transfer 20802 */ 20803 #define USDHC_PROT_CTRL_SABGREQ(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_SABGREQ_SHIFT)) & USDHC_PROT_CTRL_SABGREQ_MASK) 20804 #define USDHC_PROT_CTRL_CREQ_MASK (0x20000U) 20805 #define USDHC_PROT_CTRL_CREQ_SHIFT (17U) 20806 /*! CREQ - Continue Request 20807 * 0b1..Restart 20808 * 0b0..No effect 20809 */ 20810 #define USDHC_PROT_CTRL_CREQ(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_CREQ_SHIFT)) & USDHC_PROT_CTRL_CREQ_MASK) 20811 #define USDHC_PROT_CTRL_RWCTL_MASK (0x40000U) 20812 #define USDHC_PROT_CTRL_RWCTL_SHIFT (18U) 20813 /*! RWCTL - Read Wait Control 20814 * 0b1..Enable Read Wait Control, and assert Read Wait without stopping SD Clock at block gap when SABGREQ bit is set 20815 * 0b0..Disable Read Wait Control, and stop SD Clock at block gap when SABGREQ bit is set 20816 */ 20817 #define USDHC_PROT_CTRL_RWCTL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_RWCTL_SHIFT)) & USDHC_PROT_CTRL_RWCTL_MASK) 20818 #define USDHC_PROT_CTRL_IABG_MASK (0x80000U) 20819 #define USDHC_PROT_CTRL_IABG_SHIFT (19U) 20820 /*! IABG - Interrupt At Block Gap 20821 * 0b1..Enabled 20822 * 0b0..Disabled 20823 */ 20824 #define USDHC_PROT_CTRL_IABG(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_IABG_SHIFT)) & USDHC_PROT_CTRL_IABG_MASK) 20825 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK_MASK (0x100000U) 20826 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK_SHIFT (20U) 20827 #define USDHC_PROT_CTRL_RD_DONE_NO_8CLK(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_RD_DONE_NO_8CLK_SHIFT)) & USDHC_PROT_CTRL_RD_DONE_NO_8CLK_MASK) 20828 #define USDHC_PROT_CTRL_WECINT_MASK (0x1000000U) 20829 #define USDHC_PROT_CTRL_WECINT_SHIFT (24U) 20830 /*! WECINT - Wakeup Event Enable On Card Interrupt 20831 * 0b1..Enable 20832 * 0b0..Disable 20833 */ 20834 #define USDHC_PROT_CTRL_WECINT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECINT_SHIFT)) & USDHC_PROT_CTRL_WECINT_MASK) 20835 #define USDHC_PROT_CTRL_WECINS_MASK (0x2000000U) 20836 #define USDHC_PROT_CTRL_WECINS_SHIFT (25U) 20837 /*! WECINS - Wakeup Event Enable On SD Card Insertion 20838 * 0b1..Enable 20839 * 0b0..Disable 20840 */ 20841 #define USDHC_PROT_CTRL_WECINS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECINS_SHIFT)) & USDHC_PROT_CTRL_WECINS_MASK) 20842 #define USDHC_PROT_CTRL_WECRM_MASK (0x4000000U) 20843 #define USDHC_PROT_CTRL_WECRM_SHIFT (26U) 20844 /*! WECRM - Wakeup Event Enable On SD Card Removal 20845 * 0b1..Enable 20846 * 0b0..Disable 20847 */ 20848 #define USDHC_PROT_CTRL_WECRM(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_WECRM_SHIFT)) & USDHC_PROT_CTRL_WECRM_MASK) 20849 #define USDHC_PROT_CTRL_BURST_LEN_EN_MASK (0x38000000U) 20850 #define USDHC_PROT_CTRL_BURST_LEN_EN_SHIFT (27U) 20851 /*! BURST_LEN_EN - BURST length enable for INCR, INCR4 / INCR8 / INCR16, INCR4-WRAP / INCR8-WRAP / INCR16-WRAP 20852 * 0bxx1..Burst length is enabled for INCR 20853 * 0bx1x..Burst length is enabled for INCR4 / INCR8 / INCR16 20854 * 0b1xx..Burst length is enabled for INCR4-WRAP / INCR8-WRAP / INCR16-WRAP 20855 */ 20856 #define USDHC_PROT_CTRL_BURST_LEN_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_BURST_LEN_EN_SHIFT)) & USDHC_PROT_CTRL_BURST_LEN_EN_MASK) 20857 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD_MASK (0x40000000U) 20858 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD_SHIFT (30U) 20859 /*! NON_EXACT_BLK_RD - NON_EXACT_BLK_RD 20860 * 0b1..The block read is non-exact block read. Host driver needs to issue abort command to terminate this multi-block read. 20861 * 0b0..The block read is exact block read. Host driver doesn't need to issue abort command to terminate this multi-block read. 20862 */ 20863 #define USDHC_PROT_CTRL_NON_EXACT_BLK_RD(x) (((uint32_t)(((uint32_t)(x)) << USDHC_PROT_CTRL_NON_EXACT_BLK_RD_SHIFT)) & USDHC_PROT_CTRL_NON_EXACT_BLK_RD_MASK) 20864 /*! @} */ 20865 20866 /*! @name SYS_CTRL - System Control */ 20867 /*! @{ */ 20868 #define USDHC_SYS_CTRL_DVS_MASK (0xF0U) 20869 #define USDHC_SYS_CTRL_DVS_SHIFT (4U) 20870 /*! DVS - Divisor 20871 * 0b0000..Divide-by-1 20872 * 0b0001..Divide-by-2 20873 * 0b1110..Divide-by-15 20874 * 0b1111..Divide-by-16 20875 */ 20876 #define USDHC_SYS_CTRL_DVS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_DVS_SHIFT)) & USDHC_SYS_CTRL_DVS_MASK) 20877 #define USDHC_SYS_CTRL_SDCLKFS_MASK (0xFF00U) 20878 #define USDHC_SYS_CTRL_SDCLKFS_SHIFT (8U) 20879 #define USDHC_SYS_CTRL_SDCLKFS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_SDCLKFS_SHIFT)) & USDHC_SYS_CTRL_SDCLKFS_MASK) 20880 #define USDHC_SYS_CTRL_DTOCV_MASK (0xF0000U) 20881 #define USDHC_SYS_CTRL_DTOCV_SHIFT (16U) 20882 /*! DTOCV - Data Timeout Counter Value 20883 * 0b1111..SDCLK x 2 29 20884 * 0b1110..SDCLK x 2 28 20885 * 0b1101..SDCLK x 2 27 20886 * 0b0001..SDCLK x 2 15 20887 * 0b0000..SDCLK x 2 14 20888 */ 20889 #define USDHC_SYS_CTRL_DTOCV(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_DTOCV_SHIFT)) & USDHC_SYS_CTRL_DTOCV_MASK) 20890 #define USDHC_SYS_CTRL_IPP_RST_N_MASK (0x800000U) 20891 #define USDHC_SYS_CTRL_IPP_RST_N_SHIFT (23U) 20892 #define USDHC_SYS_CTRL_IPP_RST_N(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_IPP_RST_N_SHIFT)) & USDHC_SYS_CTRL_IPP_RST_N_MASK) 20893 #define USDHC_SYS_CTRL_RSTA_MASK (0x1000000U) 20894 #define USDHC_SYS_CTRL_RSTA_SHIFT (24U) 20895 /*! RSTA - Software Reset For ALL 20896 * 0b1..Reset 20897 * 0b0..No Reset 20898 */ 20899 #define USDHC_SYS_CTRL_RSTA(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTA_SHIFT)) & USDHC_SYS_CTRL_RSTA_MASK) 20900 #define USDHC_SYS_CTRL_RSTC_MASK (0x2000000U) 20901 #define USDHC_SYS_CTRL_RSTC_SHIFT (25U) 20902 /*! RSTC - Software Reset For CMD Line 20903 * 0b1..Reset 20904 * 0b0..No Reset 20905 */ 20906 #define USDHC_SYS_CTRL_RSTC(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTC_SHIFT)) & USDHC_SYS_CTRL_RSTC_MASK) 20907 #define USDHC_SYS_CTRL_RSTD_MASK (0x4000000U) 20908 #define USDHC_SYS_CTRL_RSTD_SHIFT (26U) 20909 /*! RSTD - Software Reset For DATA Line 20910 * 0b1..Reset 20911 * 0b0..No Reset 20912 */ 20913 #define USDHC_SYS_CTRL_RSTD(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_RSTD_SHIFT)) & USDHC_SYS_CTRL_RSTD_MASK) 20914 #define USDHC_SYS_CTRL_INITA_MASK (0x8000000U) 20915 #define USDHC_SYS_CTRL_INITA_SHIFT (27U) 20916 #define USDHC_SYS_CTRL_INITA(x) (((uint32_t)(((uint32_t)(x)) << USDHC_SYS_CTRL_INITA_SHIFT)) & USDHC_SYS_CTRL_INITA_MASK) 20917 /*! @} */ 20918 20919 /*! @name INT_STATUS - Interrupt Status */ 20920 /*! @{ */ 20921 #define USDHC_INT_STATUS_CC_MASK (0x1U) 20922 #define USDHC_INT_STATUS_CC_SHIFT (0U) 20923 /*! CC - Command Complete 20924 * 0b1..Command complete 20925 * 0b0..Command not complete 20926 */ 20927 #define USDHC_INT_STATUS_CC(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CC_SHIFT)) & USDHC_INT_STATUS_CC_MASK) 20928 #define USDHC_INT_STATUS_TC_MASK (0x2U) 20929 #define USDHC_INT_STATUS_TC_SHIFT (1U) 20930 /*! TC - Transfer Complete 20931 * 0b1..Transfer complete 20932 * 0b0..Transfer not complete 20933 */ 20934 #define USDHC_INT_STATUS_TC(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_TC_SHIFT)) & USDHC_INT_STATUS_TC_MASK) 20935 #define USDHC_INT_STATUS_BGE_MASK (0x4U) 20936 #define USDHC_INT_STATUS_BGE_SHIFT (2U) 20937 /*! BGE - Block Gap Event 20938 * 0b1..Transaction stopped at block gap 20939 * 0b0..No block gap event 20940 */ 20941 #define USDHC_INT_STATUS_BGE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BGE_SHIFT)) & USDHC_INT_STATUS_BGE_MASK) 20942 #define USDHC_INT_STATUS_DINT_MASK (0x8U) 20943 #define USDHC_INT_STATUS_DINT_SHIFT (3U) 20944 /*! DINT - DMA Interrupt 20945 * 0b1..DMA Interrupt is generated 20946 * 0b0..No DMA Interrupt 20947 */ 20948 #define USDHC_INT_STATUS_DINT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DINT_SHIFT)) & USDHC_INT_STATUS_DINT_MASK) 20949 #define USDHC_INT_STATUS_BWR_MASK (0x10U) 20950 #define USDHC_INT_STATUS_BWR_SHIFT (4U) 20951 /*! BWR - Buffer Write Ready 20952 * 0b1..Ready to write buffer: 20953 * 0b0..Not ready to write buffer 20954 */ 20955 #define USDHC_INT_STATUS_BWR(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BWR_SHIFT)) & USDHC_INT_STATUS_BWR_MASK) 20956 #define USDHC_INT_STATUS_BRR_MASK (0x20U) 20957 #define USDHC_INT_STATUS_BRR_SHIFT (5U) 20958 /*! BRR - Buffer Read Ready 20959 * 0b1..Ready to read buffer 20960 * 0b0..Not ready to read buffer 20961 */ 20962 #define USDHC_INT_STATUS_BRR(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_BRR_SHIFT)) & USDHC_INT_STATUS_BRR_MASK) 20963 #define USDHC_INT_STATUS_CINS_MASK (0x40U) 20964 #define USDHC_INT_STATUS_CINS_SHIFT (6U) 20965 /*! CINS - Card Insertion 20966 * 0b1..Card inserted 20967 * 0b0..Card state unstable or removed 20968 */ 20969 #define USDHC_INT_STATUS_CINS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CINS_SHIFT)) & USDHC_INT_STATUS_CINS_MASK) 20970 #define USDHC_INT_STATUS_CRM_MASK (0x80U) 20971 #define USDHC_INT_STATUS_CRM_SHIFT (7U) 20972 /*! CRM - Card Removal 20973 * 0b1..Card removed 20974 * 0b0..Card state unstable or inserted 20975 */ 20976 #define USDHC_INT_STATUS_CRM(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CRM_SHIFT)) & USDHC_INT_STATUS_CRM_MASK) 20977 #define USDHC_INT_STATUS_CINT_MASK (0x100U) 20978 #define USDHC_INT_STATUS_CINT_SHIFT (8U) 20979 /*! CINT - Card Interrupt 20980 * 0b1..Generate Card Interrupt 20981 * 0b0..No Card Interrupt 20982 */ 20983 #define USDHC_INT_STATUS_CINT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CINT_SHIFT)) & USDHC_INT_STATUS_CINT_MASK) 20984 #define USDHC_INT_STATUS_CTOE_MASK (0x10000U) 20985 #define USDHC_INT_STATUS_CTOE_SHIFT (16U) 20986 /*! CTOE - Command Timeout Error 20987 * 0b1..Time out 20988 * 0b0..No Error 20989 */ 20990 #define USDHC_INT_STATUS_CTOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CTOE_SHIFT)) & USDHC_INT_STATUS_CTOE_MASK) 20991 #define USDHC_INT_STATUS_CCE_MASK (0x20000U) 20992 #define USDHC_INT_STATUS_CCE_SHIFT (17U) 20993 /*! CCE - Command CRC Error 20994 * 0b1..CRC Error Generated. 20995 * 0b0..No Error 20996 */ 20997 #define USDHC_INT_STATUS_CCE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CCE_SHIFT)) & USDHC_INT_STATUS_CCE_MASK) 20998 #define USDHC_INT_STATUS_CEBE_MASK (0x40000U) 20999 #define USDHC_INT_STATUS_CEBE_SHIFT (18U) 21000 /*! CEBE - Command End Bit Error 21001 * 0b1..End Bit Error Generated 21002 * 0b0..No Error 21003 */ 21004 #define USDHC_INT_STATUS_CEBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CEBE_SHIFT)) & USDHC_INT_STATUS_CEBE_MASK) 21005 #define USDHC_INT_STATUS_CIE_MASK (0x80000U) 21006 #define USDHC_INT_STATUS_CIE_SHIFT (19U) 21007 /*! CIE - Command Index Error 21008 * 0b1..Error 21009 * 0b0..No Error 21010 */ 21011 #define USDHC_INT_STATUS_CIE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_CIE_SHIFT)) & USDHC_INT_STATUS_CIE_MASK) 21012 #define USDHC_INT_STATUS_DTOE_MASK (0x100000U) 21013 #define USDHC_INT_STATUS_DTOE_SHIFT (20U) 21014 /*! DTOE - Data Timeout Error 21015 * 0b1..Time out 21016 * 0b0..No Error 21017 */ 21018 #define USDHC_INT_STATUS_DTOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DTOE_SHIFT)) & USDHC_INT_STATUS_DTOE_MASK) 21019 #define USDHC_INT_STATUS_DCE_MASK (0x200000U) 21020 #define USDHC_INT_STATUS_DCE_SHIFT (21U) 21021 /*! DCE - Data CRC Error 21022 * 0b1..Error 21023 * 0b0..No Error 21024 */ 21025 #define USDHC_INT_STATUS_DCE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DCE_SHIFT)) & USDHC_INT_STATUS_DCE_MASK) 21026 #define USDHC_INT_STATUS_DEBE_MASK (0x400000U) 21027 #define USDHC_INT_STATUS_DEBE_SHIFT (22U) 21028 /*! DEBE - Data End Bit Error 21029 * 0b1..Error 21030 * 0b0..No Error 21031 */ 21032 #define USDHC_INT_STATUS_DEBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DEBE_SHIFT)) & USDHC_INT_STATUS_DEBE_MASK) 21033 #define USDHC_INT_STATUS_AC12E_MASK (0x1000000U) 21034 #define USDHC_INT_STATUS_AC12E_SHIFT (24U) 21035 /*! AC12E - Auto CMD12 Error 21036 * 0b1..Error 21037 * 0b0..No Error 21038 */ 21039 #define USDHC_INT_STATUS_AC12E(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_AC12E_SHIFT)) & USDHC_INT_STATUS_AC12E_MASK) 21040 #define USDHC_INT_STATUS_DMAE_MASK (0x10000000U) 21041 #define USDHC_INT_STATUS_DMAE_SHIFT (28U) 21042 /*! DMAE - DMA Error 21043 * 0b1..Error 21044 * 0b0..No Error 21045 */ 21046 #define USDHC_INT_STATUS_DMAE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_DMAE_SHIFT)) & USDHC_INT_STATUS_DMAE_MASK) 21047 /*! @} */ 21048 21049 /*! @name INT_STATUS_EN - Interrupt Status Enable */ 21050 /*! @{ */ 21051 #define USDHC_INT_STATUS_EN_CCSEN_MASK (0x1U) 21052 #define USDHC_INT_STATUS_EN_CCSEN_SHIFT (0U) 21053 /*! CCSEN - Command Complete Status Enable 21054 * 0b1..Enabled 21055 * 0b0..Masked 21056 */ 21057 #define USDHC_INT_STATUS_EN_CCSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CCSEN_SHIFT)) & USDHC_INT_STATUS_EN_CCSEN_MASK) 21058 #define USDHC_INT_STATUS_EN_TCSEN_MASK (0x2U) 21059 #define USDHC_INT_STATUS_EN_TCSEN_SHIFT (1U) 21060 /*! TCSEN - Transfer Complete Status Enable 21061 * 0b1..Enabled 21062 * 0b0..Masked 21063 */ 21064 #define USDHC_INT_STATUS_EN_TCSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_TCSEN_SHIFT)) & USDHC_INT_STATUS_EN_TCSEN_MASK) 21065 #define USDHC_INT_STATUS_EN_BGESEN_MASK (0x4U) 21066 #define USDHC_INT_STATUS_EN_BGESEN_SHIFT (2U) 21067 /*! BGESEN - Block Gap Event Status Enable 21068 * 0b1..Enabled 21069 * 0b0..Masked 21070 */ 21071 #define USDHC_INT_STATUS_EN_BGESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BGESEN_SHIFT)) & USDHC_INT_STATUS_EN_BGESEN_MASK) 21072 #define USDHC_INT_STATUS_EN_DINTSEN_MASK (0x8U) 21073 #define USDHC_INT_STATUS_EN_DINTSEN_SHIFT (3U) 21074 /*! DINTSEN - DMA Interrupt Status Enable 21075 * 0b1..Enabled 21076 * 0b0..Masked 21077 */ 21078 #define USDHC_INT_STATUS_EN_DINTSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DINTSEN_SHIFT)) & USDHC_INT_STATUS_EN_DINTSEN_MASK) 21079 #define USDHC_INT_STATUS_EN_BWRSEN_MASK (0x10U) 21080 #define USDHC_INT_STATUS_EN_BWRSEN_SHIFT (4U) 21081 /*! BWRSEN - Buffer Write Ready Status Enable 21082 * 0b1..Enabled 21083 * 0b0..Masked 21084 */ 21085 #define USDHC_INT_STATUS_EN_BWRSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BWRSEN_SHIFT)) & USDHC_INT_STATUS_EN_BWRSEN_MASK) 21086 #define USDHC_INT_STATUS_EN_BRRSEN_MASK (0x20U) 21087 #define USDHC_INT_STATUS_EN_BRRSEN_SHIFT (5U) 21088 /*! BRRSEN - Buffer Read Ready Status Enable 21089 * 0b1..Enabled 21090 * 0b0..Masked 21091 */ 21092 #define USDHC_INT_STATUS_EN_BRRSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_BRRSEN_SHIFT)) & USDHC_INT_STATUS_EN_BRRSEN_MASK) 21093 #define USDHC_INT_STATUS_EN_CINSSEN_MASK (0x40U) 21094 #define USDHC_INT_STATUS_EN_CINSSEN_SHIFT (6U) 21095 /*! CINSSEN - Card Insertion Status Enable 21096 * 0b1..Enabled 21097 * 0b0..Masked 21098 */ 21099 #define USDHC_INT_STATUS_EN_CINSSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CINSSEN_SHIFT)) & USDHC_INT_STATUS_EN_CINSSEN_MASK) 21100 #define USDHC_INT_STATUS_EN_CRMSEN_MASK (0x80U) 21101 #define USDHC_INT_STATUS_EN_CRMSEN_SHIFT (7U) 21102 /*! CRMSEN - Card Removal Status Enable 21103 * 0b1..Enabled 21104 * 0b0..Masked 21105 */ 21106 #define USDHC_INT_STATUS_EN_CRMSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CRMSEN_SHIFT)) & USDHC_INT_STATUS_EN_CRMSEN_MASK) 21107 #define USDHC_INT_STATUS_EN_CINTSEN_MASK (0x100U) 21108 #define USDHC_INT_STATUS_EN_CINTSEN_SHIFT (8U) 21109 /*! CINTSEN - Card Interrupt Status Enable 21110 * 0b1..Enabled 21111 * 0b0..Masked 21112 */ 21113 #define USDHC_INT_STATUS_EN_CINTSEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CINTSEN_SHIFT)) & USDHC_INT_STATUS_EN_CINTSEN_MASK) 21114 #define USDHC_INT_STATUS_EN_CTOESEN_MASK (0x10000U) 21115 #define USDHC_INT_STATUS_EN_CTOESEN_SHIFT (16U) 21116 /*! CTOESEN - Command Timeout Error Status Enable 21117 * 0b1..Enabled 21118 * 0b0..Masked 21119 */ 21120 #define USDHC_INT_STATUS_EN_CTOESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CTOESEN_SHIFT)) & USDHC_INT_STATUS_EN_CTOESEN_MASK) 21121 #define USDHC_INT_STATUS_EN_CCESEN_MASK (0x20000U) 21122 #define USDHC_INT_STATUS_EN_CCESEN_SHIFT (17U) 21123 /*! CCESEN - Command CRC Error Status Enable 21124 * 0b1..Enabled 21125 * 0b0..Masked 21126 */ 21127 #define USDHC_INT_STATUS_EN_CCESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CCESEN_SHIFT)) & USDHC_INT_STATUS_EN_CCESEN_MASK) 21128 #define USDHC_INT_STATUS_EN_CEBESEN_MASK (0x40000U) 21129 #define USDHC_INT_STATUS_EN_CEBESEN_SHIFT (18U) 21130 /*! CEBESEN - Command End Bit Error Status Enable 21131 * 0b1..Enabled 21132 * 0b0..Masked 21133 */ 21134 #define USDHC_INT_STATUS_EN_CEBESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CEBESEN_SHIFT)) & USDHC_INT_STATUS_EN_CEBESEN_MASK) 21135 #define USDHC_INT_STATUS_EN_CIESEN_MASK (0x80000U) 21136 #define USDHC_INT_STATUS_EN_CIESEN_SHIFT (19U) 21137 /*! CIESEN - Command Index Error Status Enable 21138 * 0b1..Enabled 21139 * 0b0..Masked 21140 */ 21141 #define USDHC_INT_STATUS_EN_CIESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_CIESEN_SHIFT)) & USDHC_INT_STATUS_EN_CIESEN_MASK) 21142 #define USDHC_INT_STATUS_EN_DTOESEN_MASK (0x100000U) 21143 #define USDHC_INT_STATUS_EN_DTOESEN_SHIFT (20U) 21144 /*! DTOESEN - Data Timeout Error Status Enable 21145 * 0b1..Enabled 21146 * 0b0..Masked 21147 */ 21148 #define USDHC_INT_STATUS_EN_DTOESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DTOESEN_SHIFT)) & USDHC_INT_STATUS_EN_DTOESEN_MASK) 21149 #define USDHC_INT_STATUS_EN_DCESEN_MASK (0x200000U) 21150 #define USDHC_INT_STATUS_EN_DCESEN_SHIFT (21U) 21151 /*! DCESEN - Data CRC Error Status Enable 21152 * 0b1..Enabled 21153 * 0b0..Masked 21154 */ 21155 #define USDHC_INT_STATUS_EN_DCESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DCESEN_SHIFT)) & USDHC_INT_STATUS_EN_DCESEN_MASK) 21156 #define USDHC_INT_STATUS_EN_DEBESEN_MASK (0x400000U) 21157 #define USDHC_INT_STATUS_EN_DEBESEN_SHIFT (22U) 21158 /*! DEBESEN - Data End Bit Error Status Enable 21159 * 0b1..Enabled 21160 * 0b0..Masked 21161 */ 21162 #define USDHC_INT_STATUS_EN_DEBESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DEBESEN_SHIFT)) & USDHC_INT_STATUS_EN_DEBESEN_MASK) 21163 #define USDHC_INT_STATUS_EN_AC12ESEN_MASK (0x1000000U) 21164 #define USDHC_INT_STATUS_EN_AC12ESEN_SHIFT (24U) 21165 /*! AC12ESEN - Auto CMD12 Error Status Enable 21166 * 0b1..Enabled 21167 * 0b0..Masked 21168 */ 21169 #define USDHC_INT_STATUS_EN_AC12ESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_AC12ESEN_SHIFT)) & USDHC_INT_STATUS_EN_AC12ESEN_MASK) 21170 #define USDHC_INT_STATUS_EN_DMAESEN_MASK (0x10000000U) 21171 #define USDHC_INT_STATUS_EN_DMAESEN_SHIFT (28U) 21172 /*! DMAESEN - DMA Error Status Enable 21173 * 0b1..Enabled 21174 * 0b0..Masked 21175 */ 21176 #define USDHC_INT_STATUS_EN_DMAESEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_STATUS_EN_DMAESEN_SHIFT)) & USDHC_INT_STATUS_EN_DMAESEN_MASK) 21177 /*! @} */ 21178 21179 /*! @name INT_SIGNAL_EN - Interrupt Signal Enable */ 21180 /*! @{ */ 21181 #define USDHC_INT_SIGNAL_EN_CCIEN_MASK (0x1U) 21182 #define USDHC_INT_SIGNAL_EN_CCIEN_SHIFT (0U) 21183 /*! CCIEN - Command Complete Interrupt Enable 21184 * 0b1..Enabled 21185 * 0b0..Masked 21186 */ 21187 #define USDHC_INT_SIGNAL_EN_CCIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CCIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CCIEN_MASK) 21188 #define USDHC_INT_SIGNAL_EN_TCIEN_MASK (0x2U) 21189 #define USDHC_INT_SIGNAL_EN_TCIEN_SHIFT (1U) 21190 /*! TCIEN - Transfer Complete Interrupt Enable 21191 * 0b1..Enabled 21192 * 0b0..Masked 21193 */ 21194 #define USDHC_INT_SIGNAL_EN_TCIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_TCIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_TCIEN_MASK) 21195 #define USDHC_INT_SIGNAL_EN_BGEIEN_MASK (0x4U) 21196 #define USDHC_INT_SIGNAL_EN_BGEIEN_SHIFT (2U) 21197 /*! BGEIEN - Block Gap Event Interrupt Enable 21198 * 0b1..Enabled 21199 * 0b0..Masked 21200 */ 21201 #define USDHC_INT_SIGNAL_EN_BGEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BGEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BGEIEN_MASK) 21202 #define USDHC_INT_SIGNAL_EN_DINTIEN_MASK (0x8U) 21203 #define USDHC_INT_SIGNAL_EN_DINTIEN_SHIFT (3U) 21204 /*! DINTIEN - DMA Interrupt Enable 21205 * 0b1..Enabled 21206 * 0b0..Masked 21207 */ 21208 #define USDHC_INT_SIGNAL_EN_DINTIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DINTIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DINTIEN_MASK) 21209 #define USDHC_INT_SIGNAL_EN_BWRIEN_MASK (0x10U) 21210 #define USDHC_INT_SIGNAL_EN_BWRIEN_SHIFT (4U) 21211 /*! BWRIEN - Buffer Write Ready Interrupt Enable 21212 * 0b1..Enabled 21213 * 0b0..Masked 21214 */ 21215 #define USDHC_INT_SIGNAL_EN_BWRIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BWRIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BWRIEN_MASK) 21216 #define USDHC_INT_SIGNAL_EN_BRRIEN_MASK (0x20U) 21217 #define USDHC_INT_SIGNAL_EN_BRRIEN_SHIFT (5U) 21218 /*! BRRIEN - Buffer Read Ready Interrupt Enable 21219 * 0b1..Enabled 21220 * 0b0..Masked 21221 */ 21222 #define USDHC_INT_SIGNAL_EN_BRRIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_BRRIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_BRRIEN_MASK) 21223 #define USDHC_INT_SIGNAL_EN_CINSIEN_MASK (0x40U) 21224 #define USDHC_INT_SIGNAL_EN_CINSIEN_SHIFT (6U) 21225 /*! CINSIEN - Card Insertion Interrupt Enable 21226 * 0b1..Enabled 21227 * 0b0..Masked 21228 */ 21229 #define USDHC_INT_SIGNAL_EN_CINSIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CINSIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CINSIEN_MASK) 21230 #define USDHC_INT_SIGNAL_EN_CRMIEN_MASK (0x80U) 21231 #define USDHC_INT_SIGNAL_EN_CRMIEN_SHIFT (7U) 21232 /*! CRMIEN - Card Removal Interrupt Enable 21233 * 0b1..Enabled 21234 * 0b0..Masked 21235 */ 21236 #define USDHC_INT_SIGNAL_EN_CRMIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CRMIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CRMIEN_MASK) 21237 #define USDHC_INT_SIGNAL_EN_CINTIEN_MASK (0x100U) 21238 #define USDHC_INT_SIGNAL_EN_CINTIEN_SHIFT (8U) 21239 /*! CINTIEN - Card Interrupt Interrupt Enable 21240 * 0b1..Enabled 21241 * 0b0..Masked 21242 */ 21243 #define USDHC_INT_SIGNAL_EN_CINTIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CINTIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CINTIEN_MASK) 21244 #define USDHC_INT_SIGNAL_EN_CTOEIEN_MASK (0x10000U) 21245 #define USDHC_INT_SIGNAL_EN_CTOEIEN_SHIFT (16U) 21246 /*! CTOEIEN - Command Timeout Error Interrupt Enable 21247 * 0b1..Enabled 21248 * 0b0..Masked 21249 */ 21250 #define USDHC_INT_SIGNAL_EN_CTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CTOEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CTOEIEN_MASK) 21251 #define USDHC_INT_SIGNAL_EN_CCEIEN_MASK (0x20000U) 21252 #define USDHC_INT_SIGNAL_EN_CCEIEN_SHIFT (17U) 21253 /*! CCEIEN - Command CRC Error Interrupt Enable 21254 * 0b1..Enabled 21255 * 0b0..Masked 21256 */ 21257 #define USDHC_INT_SIGNAL_EN_CCEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CCEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CCEIEN_MASK) 21258 #define USDHC_INT_SIGNAL_EN_CEBEIEN_MASK (0x40000U) 21259 #define USDHC_INT_SIGNAL_EN_CEBEIEN_SHIFT (18U) 21260 /*! CEBEIEN - Command End Bit Error Interrupt Enable 21261 * 0b1..Enabled 21262 * 0b0..Masked 21263 */ 21264 #define USDHC_INT_SIGNAL_EN_CEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CEBEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CEBEIEN_MASK) 21265 #define USDHC_INT_SIGNAL_EN_CIEIEN_MASK (0x80000U) 21266 #define USDHC_INT_SIGNAL_EN_CIEIEN_SHIFT (19U) 21267 /*! CIEIEN - Command Index Error Interrupt Enable 21268 * 0b1..Enabled 21269 * 0b0..Masked 21270 */ 21271 #define USDHC_INT_SIGNAL_EN_CIEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_CIEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_CIEIEN_MASK) 21272 #define USDHC_INT_SIGNAL_EN_DTOEIEN_MASK (0x100000U) 21273 #define USDHC_INT_SIGNAL_EN_DTOEIEN_SHIFT (20U) 21274 /*! DTOEIEN - Data Timeout Error Interrupt Enable 21275 * 0b1..Enabled 21276 * 0b0..Masked 21277 */ 21278 #define USDHC_INT_SIGNAL_EN_DTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DTOEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DTOEIEN_MASK) 21279 #define USDHC_INT_SIGNAL_EN_DCEIEN_MASK (0x200000U) 21280 #define USDHC_INT_SIGNAL_EN_DCEIEN_SHIFT (21U) 21281 /*! DCEIEN - Data CRC Error Interrupt Enable 21282 * 0b1..Enabled 21283 * 0b0..Masked 21284 */ 21285 #define USDHC_INT_SIGNAL_EN_DCEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DCEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DCEIEN_MASK) 21286 #define USDHC_INT_SIGNAL_EN_DEBEIEN_MASK (0x400000U) 21287 #define USDHC_INT_SIGNAL_EN_DEBEIEN_SHIFT (22U) 21288 /*! DEBEIEN - Data End Bit Error Interrupt Enable 21289 * 0b1..Enabled 21290 * 0b0..Masked 21291 */ 21292 #define USDHC_INT_SIGNAL_EN_DEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DEBEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DEBEIEN_MASK) 21293 #define USDHC_INT_SIGNAL_EN_AC12EIEN_MASK (0x1000000U) 21294 #define USDHC_INT_SIGNAL_EN_AC12EIEN_SHIFT (24U) 21295 /*! AC12EIEN - Auto CMD12 Error Interrupt Enable 21296 * 0b1..Enabled 21297 * 0b0..Masked 21298 */ 21299 #define USDHC_INT_SIGNAL_EN_AC12EIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_AC12EIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_AC12EIEN_MASK) 21300 #define USDHC_INT_SIGNAL_EN_DMAEIEN_MASK (0x10000000U) 21301 #define USDHC_INT_SIGNAL_EN_DMAEIEN_SHIFT (28U) 21302 /*! DMAEIEN - DMA Error Interrupt Enable 21303 * 0b1..Enable 21304 * 0b0..Masked 21305 */ 21306 #define USDHC_INT_SIGNAL_EN_DMAEIEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_INT_SIGNAL_EN_DMAEIEN_SHIFT)) & USDHC_INT_SIGNAL_EN_DMAEIEN_MASK) 21307 /*! @} */ 21308 21309 /*! @name AUTOCMD12_ERR_STATUS - Auto CMD12 Error Status */ 21310 /*! @{ */ 21311 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE_MASK (0x1U) 21312 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE_SHIFT (0U) 21313 /*! AC12NE - Auto CMD12 Not Executed 21314 * 0b1..Not executed 21315 * 0b0..Executed 21316 */ 21317 #define USDHC_AUTOCMD12_ERR_STATUS_AC12NE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12NE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12NE_MASK) 21318 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_MASK (0x2U) 21319 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_SHIFT (1U) 21320 /*! AC12TOE - Auto CMD12 / 23 Timeout Error 21321 * 0b1..Time out 21322 * 0b0..No error 21323 */ 21324 #define USDHC_AUTOCMD12_ERR_STATUS_AC12TOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12TOE_MASK) 21325 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_MASK (0x4U) 21326 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_SHIFT (2U) 21327 /*! AC12EBE - Auto CMD12 / 23 End Bit Error 21328 * 0b1..End Bit Error Generated 21329 * 0b0..No error 21330 */ 21331 #define USDHC_AUTOCMD12_ERR_STATUS_AC12EBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12EBE_MASK) 21332 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE_MASK (0x8U) 21333 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE_SHIFT (3U) 21334 /*! AC12CE - Auto CMD12 / 23 CRC Error 21335 * 0b1..CRC Error Met in Auto CMD12/23 Response 21336 * 0b0..No CRC error 21337 */ 21338 #define USDHC_AUTOCMD12_ERR_STATUS_AC12CE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12CE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12CE_MASK) 21339 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE_MASK (0x10U) 21340 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE_SHIFT (4U) 21341 /*! AC12IE - Auto CMD12 / 23 Index Error 21342 * 0b1..Error, the CMD index in response is not CMD12/23 21343 * 0b0..No error 21344 */ 21345 #define USDHC_AUTOCMD12_ERR_STATUS_AC12IE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_AC12IE_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_AC12IE_MASK) 21346 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_MASK (0x80U) 21347 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_SHIFT (7U) 21348 /*! CNIBAC12E - Command Not Issued By Auto CMD12 Error 21349 * 0b1..Not Issued 21350 * 0b0..No error 21351 */ 21352 #define USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_SHIFT)) & USDHC_AUTOCMD12_ERR_STATUS_CNIBAC12E_MASK) 21353 /*! @} */ 21354 21355 /*! @name HOST_CTRL_CAP - Host Controller Capabilities */ 21356 /*! @{ */ 21357 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_MASK (0x4U) 21358 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_SHIFT (2U) 21359 #define USDHC_HOST_CTRL_CAP_DDR50_SUPPORT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_SHIFT)) & USDHC_HOST_CTRL_CAP_DDR50_SUPPORT_MASK) 21360 #define USDHC_HOST_CTRL_CAP_MBL_MASK (0x70000U) 21361 #define USDHC_HOST_CTRL_CAP_MBL_SHIFT (16U) 21362 /*! MBL - Max Block Length 21363 * 0b000..512 bytes 21364 * 0b001..1024 bytes 21365 * 0b010..2048 bytes 21366 * 0b011..4096 bytes 21367 */ 21368 #define USDHC_HOST_CTRL_CAP_MBL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_MBL_SHIFT)) & USDHC_HOST_CTRL_CAP_MBL_MASK) 21369 #define USDHC_HOST_CTRL_CAP_ADMAS_MASK (0x100000U) 21370 #define USDHC_HOST_CTRL_CAP_ADMAS_SHIFT (20U) 21371 /*! ADMAS - ADMA Support 21372 * 0b1..Advanced DMA Supported 21373 * 0b0..Advanced DMA Not supported 21374 */ 21375 #define USDHC_HOST_CTRL_CAP_ADMAS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_ADMAS_SHIFT)) & USDHC_HOST_CTRL_CAP_ADMAS_MASK) 21376 #define USDHC_HOST_CTRL_CAP_HSS_MASK (0x200000U) 21377 #define USDHC_HOST_CTRL_CAP_HSS_SHIFT (21U) 21378 /*! HSS - High Speed Support 21379 * 0b1..High Speed Supported 21380 * 0b0..High Speed Not Supported 21381 */ 21382 #define USDHC_HOST_CTRL_CAP_HSS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_HSS_SHIFT)) & USDHC_HOST_CTRL_CAP_HSS_MASK) 21383 #define USDHC_HOST_CTRL_CAP_DMAS_MASK (0x400000U) 21384 #define USDHC_HOST_CTRL_CAP_DMAS_SHIFT (22U) 21385 /*! DMAS - DMA Support 21386 * 0b1..DMA Supported 21387 * 0b0..DMA not supported 21388 */ 21389 #define USDHC_HOST_CTRL_CAP_DMAS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_DMAS_SHIFT)) & USDHC_HOST_CTRL_CAP_DMAS_MASK) 21390 #define USDHC_HOST_CTRL_CAP_SRS_MASK (0x800000U) 21391 #define USDHC_HOST_CTRL_CAP_SRS_SHIFT (23U) 21392 /*! SRS - Suspend / Resume Support 21393 * 0b1..Supported 21394 * 0b0..Not supported 21395 */ 21396 #define USDHC_HOST_CTRL_CAP_SRS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_SRS_SHIFT)) & USDHC_HOST_CTRL_CAP_SRS_MASK) 21397 #define USDHC_HOST_CTRL_CAP_VS33_MASK (0x1000000U) 21398 #define USDHC_HOST_CTRL_CAP_VS33_SHIFT (24U) 21399 /*! VS33 - Voltage Support 3.3V 21400 * 0b1..3.3V supported 21401 * 0b0..3.3V not supported 21402 */ 21403 #define USDHC_HOST_CTRL_CAP_VS33(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS33_SHIFT)) & USDHC_HOST_CTRL_CAP_VS33_MASK) 21404 #define USDHC_HOST_CTRL_CAP_VS30_MASK (0x2000000U) 21405 #define USDHC_HOST_CTRL_CAP_VS30_SHIFT (25U) 21406 /*! VS30 - Voltage Support 3.0 V 21407 * 0b1..3.0V supported 21408 * 0b0..3.0V not supported 21409 */ 21410 #define USDHC_HOST_CTRL_CAP_VS30(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS30_SHIFT)) & USDHC_HOST_CTRL_CAP_VS30_MASK) 21411 #define USDHC_HOST_CTRL_CAP_VS18_MASK (0x4000000U) 21412 #define USDHC_HOST_CTRL_CAP_VS18_SHIFT (26U) 21413 /*! VS18 - Voltage Support 1.8 V 21414 * 0b1..1.8V supported 21415 * 0b0..1.8V not supported 21416 */ 21417 #define USDHC_HOST_CTRL_CAP_VS18(x) (((uint32_t)(((uint32_t)(x)) << USDHC_HOST_CTRL_CAP_VS18_SHIFT)) & USDHC_HOST_CTRL_CAP_VS18_MASK) 21418 /*! @} */ 21419 21420 /*! @name WTMK_LVL - Watermark Level */ 21421 /*! @{ */ 21422 #define USDHC_WTMK_LVL_RD_WML_MASK (0xFFU) 21423 #define USDHC_WTMK_LVL_RD_WML_SHIFT (0U) 21424 #define USDHC_WTMK_LVL_RD_WML(x) (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_RD_WML_SHIFT)) & USDHC_WTMK_LVL_RD_WML_MASK) 21425 #define USDHC_WTMK_LVL_RD_BRST_LEN_MASK (0x1F00U) 21426 #define USDHC_WTMK_LVL_RD_BRST_LEN_SHIFT (8U) 21427 #define USDHC_WTMK_LVL_RD_BRST_LEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_RD_BRST_LEN_SHIFT)) & USDHC_WTMK_LVL_RD_BRST_LEN_MASK) 21428 #define USDHC_WTMK_LVL_WR_WML_MASK (0xFF0000U) 21429 #define USDHC_WTMK_LVL_WR_WML_SHIFT (16U) 21430 #define USDHC_WTMK_LVL_WR_WML(x) (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_WR_WML_SHIFT)) & USDHC_WTMK_LVL_WR_WML_MASK) 21431 #define USDHC_WTMK_LVL_WR_BRST_LEN_MASK (0x1F000000U) 21432 #define USDHC_WTMK_LVL_WR_BRST_LEN_SHIFT (24U) 21433 #define USDHC_WTMK_LVL_WR_BRST_LEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_WTMK_LVL_WR_BRST_LEN_SHIFT)) & USDHC_WTMK_LVL_WR_BRST_LEN_MASK) 21434 /*! @} */ 21435 21436 /*! @name MIX_CTRL - Mixer Control */ 21437 /*! @{ */ 21438 #define USDHC_MIX_CTRL_DMAEN_MASK (0x1U) 21439 #define USDHC_MIX_CTRL_DMAEN_SHIFT (0U) 21440 /*! DMAEN - DMA Enable 21441 * 0b1..Enable 21442 * 0b0..Disable 21443 */ 21444 #define USDHC_MIX_CTRL_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DMAEN_SHIFT)) & USDHC_MIX_CTRL_DMAEN_MASK) 21445 #define USDHC_MIX_CTRL_BCEN_MASK (0x2U) 21446 #define USDHC_MIX_CTRL_BCEN_SHIFT (1U) 21447 /*! BCEN - Block Count Enable 21448 * 0b1..Enable 21449 * 0b0..Disable 21450 */ 21451 #define USDHC_MIX_CTRL_BCEN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_BCEN_SHIFT)) & USDHC_MIX_CTRL_BCEN_MASK) 21452 #define USDHC_MIX_CTRL_AC12EN_MASK (0x4U) 21453 #define USDHC_MIX_CTRL_AC12EN_SHIFT (2U) 21454 /*! AC12EN - Auto CMD12 Enable 21455 * 0b1..Enable 21456 * 0b0..Disable 21457 */ 21458 #define USDHC_MIX_CTRL_AC12EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_AC12EN_SHIFT)) & USDHC_MIX_CTRL_AC12EN_MASK) 21459 #define USDHC_MIX_CTRL_DDR_EN_MASK (0x8U) 21460 #define USDHC_MIX_CTRL_DDR_EN_SHIFT (3U) 21461 #define USDHC_MIX_CTRL_DDR_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DDR_EN_SHIFT)) & USDHC_MIX_CTRL_DDR_EN_MASK) 21462 #define USDHC_MIX_CTRL_DTDSEL_MASK (0x10U) 21463 #define USDHC_MIX_CTRL_DTDSEL_SHIFT (4U) 21464 /*! DTDSEL - Data Transfer Direction Select 21465 * 0b1..Read (Card to Host) 21466 * 0b0..Write (Host to Card) 21467 */ 21468 #define USDHC_MIX_CTRL_DTDSEL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_DTDSEL_SHIFT)) & USDHC_MIX_CTRL_DTDSEL_MASK) 21469 #define USDHC_MIX_CTRL_MSBSEL_MASK (0x20U) 21470 #define USDHC_MIX_CTRL_MSBSEL_SHIFT (5U) 21471 /*! MSBSEL - Multi / Single Block Select 21472 * 0b1..Multiple Blocks 21473 * 0b0..Single Block 21474 */ 21475 #define USDHC_MIX_CTRL_MSBSEL(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_MSBSEL_SHIFT)) & USDHC_MIX_CTRL_MSBSEL_MASK) 21476 #define USDHC_MIX_CTRL_NIBBLE_POS_MASK (0x40U) 21477 #define USDHC_MIX_CTRL_NIBBLE_POS_SHIFT (6U) 21478 #define USDHC_MIX_CTRL_NIBBLE_POS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_NIBBLE_POS_SHIFT)) & USDHC_MIX_CTRL_NIBBLE_POS_MASK) 21479 #define USDHC_MIX_CTRL_AC23EN_MASK (0x80U) 21480 #define USDHC_MIX_CTRL_AC23EN_SHIFT (7U) 21481 #define USDHC_MIX_CTRL_AC23EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MIX_CTRL_AC23EN_SHIFT)) & USDHC_MIX_CTRL_AC23EN_MASK) 21482 /*! @} */ 21483 21484 /*! @name FORCE_EVENT - Force Event */ 21485 /*! @{ */ 21486 #define USDHC_FORCE_EVENT_FEVTAC12NE_MASK (0x1U) 21487 #define USDHC_FORCE_EVENT_FEVTAC12NE_SHIFT (0U) 21488 #define USDHC_FORCE_EVENT_FEVTAC12NE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12NE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12NE_MASK) 21489 #define USDHC_FORCE_EVENT_FEVTAC12TOE_MASK (0x2U) 21490 #define USDHC_FORCE_EVENT_FEVTAC12TOE_SHIFT (1U) 21491 #define USDHC_FORCE_EVENT_FEVTAC12TOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12TOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12TOE_MASK) 21492 #define USDHC_FORCE_EVENT_FEVTAC12CE_MASK (0x4U) 21493 #define USDHC_FORCE_EVENT_FEVTAC12CE_SHIFT (2U) 21494 #define USDHC_FORCE_EVENT_FEVTAC12CE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12CE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12CE_MASK) 21495 #define USDHC_FORCE_EVENT_FEVTAC12EBE_MASK (0x8U) 21496 #define USDHC_FORCE_EVENT_FEVTAC12EBE_SHIFT (3U) 21497 #define USDHC_FORCE_EVENT_FEVTAC12EBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12EBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12EBE_MASK) 21498 #define USDHC_FORCE_EVENT_FEVTAC12IE_MASK (0x10U) 21499 #define USDHC_FORCE_EVENT_FEVTAC12IE_SHIFT (4U) 21500 #define USDHC_FORCE_EVENT_FEVTAC12IE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12IE_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12IE_MASK) 21501 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E_MASK (0x80U) 21502 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E_SHIFT (7U) 21503 #define USDHC_FORCE_EVENT_FEVTCNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCNIBAC12E_SHIFT)) & USDHC_FORCE_EVENT_FEVTCNIBAC12E_MASK) 21504 #define USDHC_FORCE_EVENT_FEVTCTOE_MASK (0x10000U) 21505 #define USDHC_FORCE_EVENT_FEVTCTOE_SHIFT (16U) 21506 #define USDHC_FORCE_EVENT_FEVTCTOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCTOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCTOE_MASK) 21507 #define USDHC_FORCE_EVENT_FEVTCCE_MASK (0x20000U) 21508 #define USDHC_FORCE_EVENT_FEVTCCE_SHIFT (17U) 21509 #define USDHC_FORCE_EVENT_FEVTCCE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCCE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCCE_MASK) 21510 #define USDHC_FORCE_EVENT_FEVTCEBE_MASK (0x40000U) 21511 #define USDHC_FORCE_EVENT_FEVTCEBE_SHIFT (18U) 21512 #define USDHC_FORCE_EVENT_FEVTCEBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCEBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCEBE_MASK) 21513 #define USDHC_FORCE_EVENT_FEVTCIE_MASK (0x80000U) 21514 #define USDHC_FORCE_EVENT_FEVTCIE_SHIFT (19U) 21515 #define USDHC_FORCE_EVENT_FEVTCIE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCIE_SHIFT)) & USDHC_FORCE_EVENT_FEVTCIE_MASK) 21516 #define USDHC_FORCE_EVENT_FEVTDTOE_MASK (0x100000U) 21517 #define USDHC_FORCE_EVENT_FEVTDTOE_SHIFT (20U) 21518 #define USDHC_FORCE_EVENT_FEVTDTOE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDTOE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDTOE_MASK) 21519 #define USDHC_FORCE_EVENT_FEVTDCE_MASK (0x200000U) 21520 #define USDHC_FORCE_EVENT_FEVTDCE_SHIFT (21U) 21521 #define USDHC_FORCE_EVENT_FEVTDCE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDCE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDCE_MASK) 21522 #define USDHC_FORCE_EVENT_FEVTDEBE_MASK (0x400000U) 21523 #define USDHC_FORCE_EVENT_FEVTDEBE_SHIFT (22U) 21524 #define USDHC_FORCE_EVENT_FEVTDEBE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDEBE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDEBE_MASK) 21525 #define USDHC_FORCE_EVENT_FEVTAC12E_MASK (0x1000000U) 21526 #define USDHC_FORCE_EVENT_FEVTAC12E_SHIFT (24U) 21527 #define USDHC_FORCE_EVENT_FEVTAC12E(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTAC12E_SHIFT)) & USDHC_FORCE_EVENT_FEVTAC12E_MASK) 21528 #define USDHC_FORCE_EVENT_FEVTDMAE_MASK (0x10000000U) 21529 #define USDHC_FORCE_EVENT_FEVTDMAE_SHIFT (28U) 21530 #define USDHC_FORCE_EVENT_FEVTDMAE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTDMAE_SHIFT)) & USDHC_FORCE_EVENT_FEVTDMAE_MASK) 21531 #define USDHC_FORCE_EVENT_FEVTCINT_MASK (0x80000000U) 21532 #define USDHC_FORCE_EVENT_FEVTCINT_SHIFT (31U) 21533 #define USDHC_FORCE_EVENT_FEVTCINT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_FORCE_EVENT_FEVTCINT_SHIFT)) & USDHC_FORCE_EVENT_FEVTCINT_MASK) 21534 /*! @} */ 21535 21536 /*! @name ADMA_ERR_STATUS - ADMA Error Status Register */ 21537 /*! @{ */ 21538 #define USDHC_ADMA_ERR_STATUS_ADMAES_MASK (0x3U) 21539 #define USDHC_ADMA_ERR_STATUS_ADMAES_SHIFT (0U) 21540 #define USDHC_ADMA_ERR_STATUS_ADMAES(x) (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMAES_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMAES_MASK) 21541 #define USDHC_ADMA_ERR_STATUS_ADMALME_MASK (0x4U) 21542 #define USDHC_ADMA_ERR_STATUS_ADMALME_SHIFT (2U) 21543 /*! ADMALME - ADMA Length Mismatch Error 21544 * 0b1..Error 21545 * 0b0..No Error 21546 */ 21547 #define USDHC_ADMA_ERR_STATUS_ADMALME(x) (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMALME_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMALME_MASK) 21548 #define USDHC_ADMA_ERR_STATUS_ADMADCE_MASK (0x8U) 21549 #define USDHC_ADMA_ERR_STATUS_ADMADCE_SHIFT (3U) 21550 /*! ADMADCE - ADMA Descriptor Error 21551 * 0b1..Error 21552 * 0b0..No Error 21553 */ 21554 #define USDHC_ADMA_ERR_STATUS_ADMADCE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_ERR_STATUS_ADMADCE_SHIFT)) & USDHC_ADMA_ERR_STATUS_ADMADCE_MASK) 21555 /*! @} */ 21556 21557 /*! @name ADMA_SYS_ADDR - ADMA System Address */ 21558 /*! @{ */ 21559 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR_MASK (0xFFFFFFFCU) 21560 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR_SHIFT (2U) 21561 #define USDHC_ADMA_SYS_ADDR_ADS_ADDR(x) (((uint32_t)(((uint32_t)(x)) << USDHC_ADMA_SYS_ADDR_ADS_ADDR_SHIFT)) & USDHC_ADMA_SYS_ADDR_ADS_ADDR_MASK) 21562 /*! @} */ 21563 21564 /*! @name VEND_SPEC - Vendor Specific Register */ 21565 /*! @{ */ 21566 #define USDHC_VEND_SPEC_VSELECT_MASK (0x2U) 21567 #define USDHC_VEND_SPEC_VSELECT_SHIFT (1U) 21568 /*! VSELECT - Voltage Selection 21569 * 0b1..Change the voltage to low voltage range, around 1.8 V 21570 * 0b0..Change the voltage to high voltage range, around 3.0 V 21571 */ 21572 #define USDHC_VEND_SPEC_VSELECT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_VSELECT_SHIFT)) & USDHC_VEND_SPEC_VSELECT_MASK) 21573 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN_MASK (0x4U) 21574 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN_SHIFT (2U) 21575 /*! CONFLICT_CHK_EN - Conflict check enable. 21576 * 0b0..Conflict check disable 21577 * 0b1..Conflict check enable 21578 */ 21579 #define USDHC_VEND_SPEC_CONFLICT_CHK_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CONFLICT_CHK_EN_SHIFT)) & USDHC_VEND_SPEC_CONFLICT_CHK_EN_MASK) 21580 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_MASK (0x8U) 21581 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_SHIFT (3U) 21582 /*! AC12_WR_CHKBUSY_EN - AC12_WR_CHKBUSY_EN 21583 * 0b0..Do not check busy after auto CMD12 for write data packet 21584 * 0b1..Check busy after auto CMD12 for write data packet 21585 */ 21586 #define USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_SHIFT)) & USDHC_VEND_SPEC_AC12_WR_CHKBUSY_EN_MASK) 21587 #define USDHC_VEND_SPEC_FRC_SDCLK_ON_MASK (0x100U) 21588 #define USDHC_VEND_SPEC_FRC_SDCLK_ON_SHIFT (8U) 21589 /*! FRC_SDCLK_ON - FRC_SDCLK_ON 21590 * 0b0..CLK active or inactive is fully controlled by the hardware. 21591 * 0b1..Force CLK active. 21592 */ 21593 #define USDHC_VEND_SPEC_FRC_SDCLK_ON(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_FRC_SDCLK_ON_SHIFT)) & USDHC_VEND_SPEC_FRC_SDCLK_ON_MASK) 21594 #define USDHC_VEND_SPEC_CRC_CHK_DIS_MASK (0x8000U) 21595 #define USDHC_VEND_SPEC_CRC_CHK_DIS_SHIFT (15U) 21596 /*! CRC_CHK_DIS - CRC Check Disable 21597 * 0b0..Check CRC16 for every read data packet and check CRC bits for every write data packet 21598 * 0b1..Ignore CRC16 check for every read data packet and ignore CRC bits check for every write data packet 21599 */ 21600 #define USDHC_VEND_SPEC_CRC_CHK_DIS(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CRC_CHK_DIS_SHIFT)) & USDHC_VEND_SPEC_CRC_CHK_DIS_MASK) 21601 #define USDHC_VEND_SPEC_CMD_BYTE_EN_MASK (0x80000000U) 21602 #define USDHC_VEND_SPEC_CMD_BYTE_EN_SHIFT (31U) 21603 /*! CMD_BYTE_EN - CMD_BYTE_EN 21604 * 0b0..Disable 21605 * 0b1..Enable 21606 */ 21607 #define USDHC_VEND_SPEC_CMD_BYTE_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC_CMD_BYTE_EN_SHIFT)) & USDHC_VEND_SPEC_CMD_BYTE_EN_MASK) 21608 /*! @} */ 21609 21610 /*! @name MMC_BOOT - MMC Boot Register */ 21611 /*! @{ */ 21612 #define USDHC_MMC_BOOT_DTOCV_ACK_MASK (0xFU) 21613 #define USDHC_MMC_BOOT_DTOCV_ACK_SHIFT (0U) 21614 /*! DTOCV_ACK - DTOCV_ACK 21615 * 0b0000..SDCLK x 2^14 21616 * 0b0001..SDCLK x 2^15 21617 * 0b0010..SDCLK x 2^16 21618 * 0b0011..SDCLK x 2^17 21619 * 0b0100..SDCLK x 2^18 21620 * 0b0101..SDCLK x 2^19 21621 * 0b0110..SDCLK x 2^20 21622 * 0b0111..SDCLK x 2^21 21623 * 0b1110..SDCLK x 2^28 21624 * 0b1111..SDCLK x 2^29 21625 */ 21626 #define USDHC_MMC_BOOT_DTOCV_ACK(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_DTOCV_ACK_SHIFT)) & USDHC_MMC_BOOT_DTOCV_ACK_MASK) 21627 #define USDHC_MMC_BOOT_BOOT_ACK_MASK (0x10U) 21628 #define USDHC_MMC_BOOT_BOOT_ACK_SHIFT (4U) 21629 /*! BOOT_ACK - BOOT_ACK 21630 * 0b0..No ack 21631 * 0b1..Ack 21632 */ 21633 #define USDHC_MMC_BOOT_BOOT_ACK(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_ACK_SHIFT)) & USDHC_MMC_BOOT_BOOT_ACK_MASK) 21634 #define USDHC_MMC_BOOT_BOOT_MODE_MASK (0x20U) 21635 #define USDHC_MMC_BOOT_BOOT_MODE_SHIFT (5U) 21636 /*! BOOT_MODE - BOOT_MODE 21637 * 0b0..Normal boot 21638 * 0b1..Alternative boot 21639 */ 21640 #define USDHC_MMC_BOOT_BOOT_MODE(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_MODE_SHIFT)) & USDHC_MMC_BOOT_BOOT_MODE_MASK) 21641 #define USDHC_MMC_BOOT_BOOT_EN_MASK (0x40U) 21642 #define USDHC_MMC_BOOT_BOOT_EN_SHIFT (6U) 21643 /*! BOOT_EN - BOOT_EN 21644 * 0b0..Fast boot disable 21645 * 0b1..Fast boot enable 21646 */ 21647 #define USDHC_MMC_BOOT_BOOT_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_EN_SHIFT)) & USDHC_MMC_BOOT_BOOT_EN_MASK) 21648 #define USDHC_MMC_BOOT_AUTO_SABG_EN_MASK (0x80U) 21649 #define USDHC_MMC_BOOT_AUTO_SABG_EN_SHIFT (7U) 21650 #define USDHC_MMC_BOOT_AUTO_SABG_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_AUTO_SABG_EN_SHIFT)) & USDHC_MMC_BOOT_AUTO_SABG_EN_MASK) 21651 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT_MASK (0x100U) 21652 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT_SHIFT (8U) 21653 /*! DISABLE_TIME_OUT - Disable Time Out 21654 * 0b0..Enable time out 21655 * 0b1..Disable time out 21656 */ 21657 #define USDHC_MMC_BOOT_DISABLE_TIME_OUT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_DISABLE_TIME_OUT_SHIFT)) & USDHC_MMC_BOOT_DISABLE_TIME_OUT_MASK) 21658 #define USDHC_MMC_BOOT_BOOT_BLK_CNT_MASK (0xFFFF0000U) 21659 #define USDHC_MMC_BOOT_BOOT_BLK_CNT_SHIFT (16U) 21660 #define USDHC_MMC_BOOT_BOOT_BLK_CNT(x) (((uint32_t)(((uint32_t)(x)) << USDHC_MMC_BOOT_BOOT_BLK_CNT_SHIFT)) & USDHC_MMC_BOOT_BOOT_BLK_CNT_MASK) 21661 /*! @} */ 21662 21663 /*! @name VEND_SPEC2 - Vendor Specific 2 Register */ 21664 /*! @{ */ 21665 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST_MASK (0x8U) 21666 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST_SHIFT (3U) 21667 /*! CARD_INT_D3_TEST - Card Interrupt Detection Test 21668 * 0b0..Check the card interrupt only when DATA3 is high. 21669 * 0b1..Check the card interrupt by ignoring the status of DATA3. 21670 */ 21671 #define USDHC_VEND_SPEC2_CARD_INT_D3_TEST(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_CARD_INT_D3_TEST_SHIFT)) & USDHC_VEND_SPEC2_CARD_INT_D3_TEST_MASK) 21672 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_MASK (0x1000U) 21673 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_SHIFT (12U) 21674 /*! ACMD23_ARGU2_EN - Argument2 register enable for ACMD23 21675 * 0b1..Argument2 register enable for ACMD23 sharing with SDMA system address register. Default is enable. 21676 * 0b0..Disable 21677 */ 21678 #define USDHC_VEND_SPEC2_ACMD23_ARGU2_EN(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_SHIFT)) & USDHC_VEND_SPEC2_ACMD23_ARGU2_EN_MASK) 21679 #define USDHC_VEND_SPEC2_AHB_RST_MASK (0x4000U) 21680 #define USDHC_VEND_SPEC2_AHB_RST_SHIFT (14U) 21681 #define USDHC_VEND_SPEC2_AHB_RST(x) (((uint32_t)(((uint32_t)(x)) << USDHC_VEND_SPEC2_AHB_RST_SHIFT)) & USDHC_VEND_SPEC2_AHB_RST_MASK) 21682 /*! @} */ 21683 21684 21685 /*! 21686 * @} 21687 */ /* end of group USDHC_Register_Masks */ 21688 21689 21690 /* USDHC - Peripheral instance base addresses */ 21691 /** Peripheral USDHC0 base address */ 21692 #define USDHC0_BASE (0x4003E000u) 21693 /** Peripheral USDHC0 base pointer */ 21694 #define USDHC0 ((USDHC_Type *)USDHC0_BASE) 21695 /** Array initializer of USDHC peripheral base addresses */ 21696 #define USDHC_BASE_ADDRS { USDHC0_BASE } 21697 /** Array initializer of USDHC peripheral base pointers */ 21698 #define USDHC_BASE_PTRS { USDHC0 } 21699 /** Interrupt vectors for the USDHC peripheral type */ 21700 #define USDHC_IRQS { USDHC0_IRQn } 21701 21702 /*! 21703 * @} 21704 */ /* end of group USDHC_Peripheral_Access_Layer */ 21705 21706 21707 /* ---------------------------------------------------------------------------- 21708 -- VREF Peripheral Access Layer 21709 ---------------------------------------------------------------------------- */ 21710 21711 /*! 21712 * @addtogroup VREF_Peripheral_Access_Layer VREF Peripheral Access Layer 21713 * @{ 21714 */ 21715 21716 /** VREF - Register Layout Typedef */ 21717 typedef struct { 21718 __IO uint8_t TRM; /**< VREF Trim Register, offset: 0x0 */ 21719 __IO uint8_t SC; /**< VREF Status and Control Register, offset: 0x1 */ 21720 uint8_t RESERVED_0[3]; 21721 __IO uint8_t TRM4; /**< VREF Trim 2.1V Register, offset: 0x5 */ 21722 } VREF_Type; 21723 21724 /* ---------------------------------------------------------------------------- 21725 -- VREF Register Masks 21726 ---------------------------------------------------------------------------- */ 21727 21728 /*! 21729 * @addtogroup VREF_Register_Masks VREF Register Masks 21730 * @{ 21731 */ 21732 21733 /*! @name TRM - VREF Trim Register */ 21734 /*! @{ */ 21735 #define VREF_TRM_TRIM_MASK (0x3FU) 21736 #define VREF_TRM_TRIM_SHIFT (0U) 21737 /*! TRIM - Trim bits 21738 * 0b000000..Min 21739 * 0b111111..Max 21740 */ 21741 #define VREF_TRM_TRIM(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_TRIM_SHIFT)) & VREF_TRM_TRIM_MASK) 21742 #define VREF_TRM_CHOPEN_MASK (0x40U) 21743 #define VREF_TRM_CHOPEN_SHIFT (6U) 21744 /*! CHOPEN - Chop oscillator enable. When set, the internal chopping operation is enabled and the 21745 * internal analog offset will be minimized. 21746 * 0b0..Chop oscillator is disabled. 21747 * 0b1..Chop oscillator is enabled. 21748 */ 21749 #define VREF_TRM_CHOPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_CHOPEN_SHIFT)) & VREF_TRM_CHOPEN_MASK) 21750 /*! @} */ 21751 21752 /*! @name SC - VREF Status and Control Register */ 21753 /*! @{ */ 21754 #define VREF_SC_MODE_LV_MASK (0x3U) 21755 #define VREF_SC_MODE_LV_SHIFT (0U) 21756 /*! MODE_LV - Buffer Mode selection 21757 * 0b00..Bandgap on only, for stabilization and startup 21758 * 0b01..High power buffer mode enabled 21759 * 0b10..Low-power buffer mode enabled 21760 * 0b11..Reserved 21761 */ 21762 #define VREF_SC_MODE_LV(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_MODE_LV_SHIFT)) & VREF_SC_MODE_LV_MASK) 21763 #define VREF_SC_VREFST_MASK (0x4U) 21764 #define VREF_SC_VREFST_SHIFT (2U) 21765 /*! VREFST - Internal Voltage Reference stable 21766 * 0b0..The module is disabled or not stable. 21767 * 0b1..The module is stable. 21768 */ 21769 #define VREF_SC_VREFST(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFST_SHIFT)) & VREF_SC_VREFST_MASK) 21770 #define VREF_SC_ICOMPEN_MASK (0x20U) 21771 #define VREF_SC_ICOMPEN_SHIFT (5U) 21772 /*! ICOMPEN - Second order curvature compensation enable 21773 * 0b0..Disabled 21774 * 0b1..Enabled 21775 */ 21776 #define VREF_SC_ICOMPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_ICOMPEN_SHIFT)) & VREF_SC_ICOMPEN_MASK) 21777 #define VREF_SC_REGEN_MASK (0x40U) 21778 #define VREF_SC_REGEN_SHIFT (6U) 21779 /*! REGEN - Regulator enable 21780 * 0b0..Internal 1.75 V regulator is disabled. 21781 * 0b1..Internal 1.75 V regulator is enabled. 21782 */ 21783 #define VREF_SC_REGEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_REGEN_SHIFT)) & VREF_SC_REGEN_MASK) 21784 #define VREF_SC_VREFEN_MASK (0x80U) 21785 #define VREF_SC_VREFEN_SHIFT (7U) 21786 /*! VREFEN - Internal Voltage Reference enable 21787 * 0b0..The module is disabled. 21788 * 0b1..The module is enabled. 21789 */ 21790 #define VREF_SC_VREFEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFEN_SHIFT)) & VREF_SC_VREFEN_MASK) 21791 /*! @} */ 21792 21793 /*! @name TRM4 - VREF Trim 2.1V Register */ 21794 /*! @{ */ 21795 #define VREF_TRM4_TRIM2V1_MASK (0x3FU) 21796 #define VREF_TRM4_TRIM2V1_SHIFT (0U) 21797 /*! TRIM2V1 - VREF 2.1V Trim Bits 21798 * 0b000000..Max 21799 * 0b111111..Min 21800 */ 21801 #define VREF_TRM4_TRIM2V1(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM4_TRIM2V1_SHIFT)) & VREF_TRM4_TRIM2V1_MASK) 21802 #define VREF_TRM4_VREF2V1_EN_MASK (0x80U) 21803 #define VREF_TRM4_VREF2V1_EN_SHIFT (7U) 21804 /*! VREF2V1_EN - Internal Voltage Reference (2.1V) Enable 21805 * 0b0..VREF 2.1V is enabled 21806 * 0b1..VREF 2.1V is disabled 21807 */ 21808 #define VREF_TRM4_VREF2V1_EN(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM4_VREF2V1_EN_SHIFT)) & VREF_TRM4_VREF2V1_EN_MASK) 21809 /*! @} */ 21810 21811 21812 /*! 21813 * @} 21814 */ /* end of group VREF_Register_Masks */ 21815 21816 21817 /* VREF - Peripheral instance base addresses */ 21818 /** Peripheral VREF base address */ 21819 #define VREF_BASE (0x4004D000u) 21820 /** Peripheral VREF base pointer */ 21821 #define VREF ((VREF_Type *)VREF_BASE) 21822 /** Array initializer of VREF peripheral base addresses */ 21823 #define VREF_BASE_ADDRS { VREF_BASE } 21824 /** Array initializer of VREF peripheral base pointers */ 21825 #define VREF_BASE_PTRS { VREF } 21826 21827 /*! 21828 * @} 21829 */ /* end of group VREF_Peripheral_Access_Layer */ 21830 21831 21832 /* ---------------------------------------------------------------------------- 21833 -- WDOG Peripheral Access Layer 21834 ---------------------------------------------------------------------------- */ 21835 21836 /*! 21837 * @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer 21838 * @{ 21839 */ 21840 21841 /** WDOG - Register Layout Typedef */ 21842 typedef struct { 21843 __IO uint32_t CS; /**< Watchdog Control and Status Register, offset: 0x0 */ 21844 __IO uint32_t CNT; /**< Watchdog Counter Register, offset: 0x4 */ 21845 __IO uint32_t TOVAL; /**< Watchdog Timeout Value Register, offset: 0x8 */ 21846 __IO uint32_t WIN; /**< Watchdog Window Register, offset: 0xC */ 21847 } WDOG_Type; 21848 21849 /* ---------------------------------------------------------------------------- 21850 -- WDOG Register Masks 21851 ---------------------------------------------------------------------------- */ 21852 21853 /*! 21854 * @addtogroup WDOG_Register_Masks WDOG Register Masks 21855 * @{ 21856 */ 21857 21858 /*! @name CS - Watchdog Control and Status Register */ 21859 /*! @{ */ 21860 #define WDOG_CS_STOP_MASK (0x1U) 21861 #define WDOG_CS_STOP_SHIFT (0U) 21862 /*! STOP - Stop Enable 21863 * 0b0..Watchdog disabled in chip stop mode. 21864 * 0b1..Watchdog enabled in chip stop mode. 21865 */ 21866 #define WDOG_CS_STOP(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_STOP_SHIFT)) & WDOG_CS_STOP_MASK) 21867 #define WDOG_CS_WAIT_MASK (0x2U) 21868 #define WDOG_CS_WAIT_SHIFT (1U) 21869 /*! WAIT - Wait Enable 21870 * 0b0..Watchdog disabled in chip wait mode. 21871 * 0b1..Watchdog enabled in chip wait mode. 21872 */ 21873 #define WDOG_CS_WAIT(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_WAIT_SHIFT)) & WDOG_CS_WAIT_MASK) 21874 #define WDOG_CS_DBG_MASK (0x4U) 21875 #define WDOG_CS_DBG_SHIFT (2U) 21876 /*! DBG - Debug Enable 21877 * 0b0..Watchdog disabled in chip debug mode. 21878 * 0b1..Watchdog enabled in chip debug mode. 21879 */ 21880 #define WDOG_CS_DBG(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_DBG_SHIFT)) & WDOG_CS_DBG_MASK) 21881 #define WDOG_CS_TST_MASK (0x18U) 21882 #define WDOG_CS_TST_SHIFT (3U) 21883 /*! TST - Watchdog Test 21884 * 0b00..Watchdog test mode disabled. 21885 * 0b01..Watchdog user mode enabled. (Watchdog test mode disabled.) After testing the watchdog, software should 21886 * use this setting to indicate that the watchdog is functioning normally in user mode. 21887 * 0b10..Watchdog test mode enabled, only the low byte is used. CNT[CNTLOW] is compared with TOVAL[TOVALLOW]. 21888 * 0b11..Watchdog test mode enabled, only the high byte is used. CNT[CNTHIGH] is compared with TOVAL[TOVALHIGH]. 21889 */ 21890 #define WDOG_CS_TST(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_TST_SHIFT)) & WDOG_CS_TST_MASK) 21891 #define WDOG_CS_UPDATE_MASK (0x20U) 21892 #define WDOG_CS_UPDATE_SHIFT (5U) 21893 /*! UPDATE - Allow updates 21894 * 0b0..Updates not allowed. After the initial configuration, the watchdog cannot be later modified without forcing a reset. 21895 * 0b1..Updates allowed. Software can modify the watchdog configuration registers within 128 bus clocks after performing the unlock write sequence. 21896 */ 21897 #define WDOG_CS_UPDATE(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_UPDATE_SHIFT)) & WDOG_CS_UPDATE_MASK) 21898 #define WDOG_CS_INT_MASK (0x40U) 21899 #define WDOG_CS_INT_SHIFT (6U) 21900 /*! INT - Watchdog Interrupt 21901 * 0b0..Watchdog interrupts are disabled. Watchdog resets are not delayed. 21902 * 0b1..Watchdog interrupts are enabled. Watchdog resets are delayed by 128 bus clocks from the interrupt vector fetch. 21903 */ 21904 #define WDOG_CS_INT(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_INT_SHIFT)) & WDOG_CS_INT_MASK) 21905 #define WDOG_CS_EN_MASK (0x80U) 21906 #define WDOG_CS_EN_SHIFT (7U) 21907 /*! EN - Watchdog Enable 21908 * 0b0..Watchdog disabled. 21909 * 0b1..Watchdog enabled. 21910 */ 21911 #define WDOG_CS_EN(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_EN_SHIFT)) & WDOG_CS_EN_MASK) 21912 #define WDOG_CS_CLK_MASK (0x300U) 21913 #define WDOG_CS_CLK_SHIFT (8U) 21914 /*! CLK - Watchdog Clock 21915 * 0b00..Bus clock 21916 * 0b01..LPO clock 21917 * 0b10..INTCLK (internal clock) 21918 * 0b11..ERCLK (external reference clock) 21919 */ 21920 #define WDOG_CS_CLK(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_CLK_SHIFT)) & WDOG_CS_CLK_MASK) 21921 #define WDOG_CS_RCS_MASK (0x400U) 21922 #define WDOG_CS_RCS_SHIFT (10U) 21923 /*! RCS - Reconfiguration Success 21924 * 0b0..Reconfiguring WDOG. 21925 * 0b1..Reconfiguration is successful. 21926 */ 21927 #define WDOG_CS_RCS(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_RCS_SHIFT)) & WDOG_CS_RCS_MASK) 21928 #define WDOG_CS_ULK_MASK (0x800U) 21929 #define WDOG_CS_ULK_SHIFT (11U) 21930 /*! ULK - Unlock status 21931 * 0b0..WDOG is locked. 21932 * 0b1..WDOG is unlocked. 21933 */ 21934 #define WDOG_CS_ULK(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_ULK_SHIFT)) & WDOG_CS_ULK_MASK) 21935 #define WDOG_CS_PRES_MASK (0x1000U) 21936 #define WDOG_CS_PRES_SHIFT (12U) 21937 /*! PRES - Watchdog prescaler 21938 * 0b0..256 prescaler disabled. 21939 * 0b1..256 prescaler enabled. 21940 */ 21941 #define WDOG_CS_PRES(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_PRES_SHIFT)) & WDOG_CS_PRES_MASK) 21942 #define WDOG_CS_CMD32EN_MASK (0x2000U) 21943 #define WDOG_CS_CMD32EN_SHIFT (13U) 21944 /*! CMD32EN - Enables or disables WDOG support for 32-bit (otherwise 16-bit or 8-bit) refresh/unlock command write words 21945 * 0b0..Disables support for 32-bit refresh/unlock command write words. Only 16-bit or 8-bit is supported. 21946 * 0b1..Enables support for 32-bit refresh/unlock command write words. 16-bit or 8-bit is NOT supported. 21947 */ 21948 #define WDOG_CS_CMD32EN(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_CMD32EN_SHIFT)) & WDOG_CS_CMD32EN_MASK) 21949 #define WDOG_CS_FLG_MASK (0x4000U) 21950 #define WDOG_CS_FLG_SHIFT (14U) 21951 /*! FLG - Watchdog Interrupt Flag 21952 * 0b0..No interrupt occurred. 21953 * 0b1..An interrupt occurred. 21954 */ 21955 #define WDOG_CS_FLG(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_FLG_SHIFT)) & WDOG_CS_FLG_MASK) 21956 #define WDOG_CS_WIN_MASK (0x8000U) 21957 #define WDOG_CS_WIN_SHIFT (15U) 21958 /*! WIN - Watchdog Window 21959 * 0b0..Window mode disabled. 21960 * 0b1..Window mode enabled. 21961 */ 21962 #define WDOG_CS_WIN(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CS_WIN_SHIFT)) & WDOG_CS_WIN_MASK) 21963 /*! @} */ 21964 21965 /*! @name CNT - Watchdog Counter Register */ 21966 /*! @{ */ 21967 #define WDOG_CNT_CNTLOW_MASK (0xFFU) 21968 #define WDOG_CNT_CNTLOW_SHIFT (0U) 21969 #define WDOG_CNT_CNTLOW(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CNT_CNTLOW_SHIFT)) & WDOG_CNT_CNTLOW_MASK) 21970 #define WDOG_CNT_CNTHIGH_MASK (0xFF00U) 21971 #define WDOG_CNT_CNTHIGH_SHIFT (8U) 21972 #define WDOG_CNT_CNTHIGH(x) (((uint32_t)(((uint32_t)(x)) << WDOG_CNT_CNTHIGH_SHIFT)) & WDOG_CNT_CNTHIGH_MASK) 21973 /*! @} */ 21974 21975 /*! @name TOVAL - Watchdog Timeout Value Register */ 21976 /*! @{ */ 21977 #define WDOG_TOVAL_TOVALLOW_MASK (0xFFU) 21978 #define WDOG_TOVAL_TOVALLOW_SHIFT (0U) 21979 #define WDOG_TOVAL_TOVALLOW(x) (((uint32_t)(((uint32_t)(x)) << WDOG_TOVAL_TOVALLOW_SHIFT)) & WDOG_TOVAL_TOVALLOW_MASK) 21980 #define WDOG_TOVAL_TOVALHIGH_MASK (0xFF00U) 21981 #define WDOG_TOVAL_TOVALHIGH_SHIFT (8U) 21982 #define WDOG_TOVAL_TOVALHIGH(x) (((uint32_t)(((uint32_t)(x)) << WDOG_TOVAL_TOVALHIGH_SHIFT)) & WDOG_TOVAL_TOVALHIGH_MASK) 21983 /*! @} */ 21984 21985 /*! @name WIN - Watchdog Window Register */ 21986 /*! @{ */ 21987 #define WDOG_WIN_WINLOW_MASK (0xFFU) 21988 #define WDOG_WIN_WINLOW_SHIFT (0U) 21989 #define WDOG_WIN_WINLOW(x) (((uint32_t)(((uint32_t)(x)) << WDOG_WIN_WINLOW_SHIFT)) & WDOG_WIN_WINLOW_MASK) 21990 #define WDOG_WIN_WINHIGH_MASK (0xFF00U) 21991 #define WDOG_WIN_WINHIGH_SHIFT (8U) 21992 #define WDOG_WIN_WINHIGH(x) (((uint32_t)(((uint32_t)(x)) << WDOG_WIN_WINHIGH_SHIFT)) & WDOG_WIN_WINHIGH_MASK) 21993 /*! @} */ 21994 21995 21996 /*! 21997 * @} 21998 */ /* end of group WDOG_Register_Masks */ 21999 22000 22001 /* WDOG - Peripheral instance base addresses */ 22002 /** Peripheral WDOG0 base address */ 22003 #define WDOG0_BASE (0x4002A000u) 22004 /** Peripheral WDOG0 base pointer */ 22005 #define WDOG0 ((WDOG_Type *)WDOG0_BASE) 22006 /** Peripheral WDOG1 base address */ 22007 #define WDOG1_BASE (0x41026000u) 22008 /** Peripheral WDOG1 base pointer */ 22009 #define WDOG1 ((WDOG_Type *)WDOG1_BASE) 22010 /** Array initializer of WDOG peripheral base addresses */ 22011 #define WDOG_BASE_ADDRS { WDOG0_BASE, WDOG1_BASE } 22012 /** Array initializer of WDOG peripheral base pointers */ 22013 #define WDOG_BASE_PTRS { WDOG0, WDOG1 } 22014 /** Interrupt vectors for the WDOG peripheral type */ 22015 #define WDOG_IRQS { NotAvail_IRQn, WDOG1_IRQn } 22016 /* Extra definition */ 22017 #define WDOG_UPDATE_KEY (0xD928C520U) 22018 #define WDOG_REFRESH_KEY (0xB480A602U) 22019 22020 22021 /*! 22022 * @} 22023 */ /* end of group WDOG_Peripheral_Access_Layer */ 22024 22025 22026 /* ---------------------------------------------------------------------------- 22027 -- XRDC Peripheral Access Layer 22028 ---------------------------------------------------------------------------- */ 22029 22030 /*! 22031 * @addtogroup XRDC_Peripheral_Access_Layer XRDC Peripheral Access Layer 22032 * @{ 22033 */ 22034 22035 /** XRDC - Register Layout Typedef */ 22036 typedef struct { 22037 __IO uint32_t CR; /**< Control Register, offset: 0x0 */ 22038 uint8_t RESERVED_0[236]; 22039 __I uint32_t HWCFG0; /**< Hardware Configuration Register 0, offset: 0xF0 */ 22040 __I uint32_t HWCFG1; /**< Hardware Configuration Register 1, offset: 0xF4 */ 22041 __I uint32_t HWCFG2; /**< Hardware Configuration Register 2, offset: 0xF8 */ 22042 __I uint32_t HWCFG3; /**< Hardware Configuration Register 3, offset: 0xFC */ 22043 __I uint8_t MDACFG[35]; /**< Master Domain Assignment Configuration Register, array offset: 0x100, array step: 0x1 */ 22044 uint8_t RESERVED_1[29]; 22045 __I uint8_t MRCFG[2]; /**< Memory Region Configuration Register, array offset: 0x140, array step: 0x1 */ 22046 uint8_t RESERVED_2[186]; 22047 __IO uint32_t FDID; /**< Fault Domain ID, offset: 0x1FC */ 22048 __I uint32_t DERRLOC[3]; /**< Domain Error Location Register, array offset: 0x200, array step: 0x4 */ 22049 uint8_t RESERVED_3[500]; 22050 __IO uint32_t DERR_W[19][4]; /**< Domain Error Word0 Register..Domain Error Word3 Register, array offset: 0x400, array step: index*0x10, index2*0x4 */ 22051 uint8_t RESERVED_4[464]; 22052 __IO uint32_t PID[33]; /**< Process Identifier, array offset: 0x700, array step: 0x4 */ 22053 uint8_t RESERVED_5[124]; 22054 struct { /* offset: 0x800, array step: 0x20 */ 22055 __IO uint32_t MDA_W[2]; /**< Master Domain Assignment, array offset: 0x800, array step: index*0x20, index2*0x4 */ 22056 uint8_t RESERVED_0[24]; 22057 } MDA[35]; 22058 uint8_t RESERVED_6[928]; 22059 __IO uint32_t PDAC_W[289][2]; /**< Peripheral Domain Access Control, array offset: 0x1000, array step: index*0x8, index2*0x4 */ 22060 uint8_t RESERVED_7[1784]; 22061 struct { /* offset: 0x2000, array step: 0x20 */ 22062 __IO uint32_t MRGD_W[5]; /**< Memory Region Descriptor, array offset: 0x2000, array step: index*0x20, index2*0x4 */ 22063 uint8_t RESERVED_0[12]; 22064 } MRGD[24]; 22065 } XRDC_Type; 22066 22067 /* ---------------------------------------------------------------------------- 22068 -- XRDC Register Masks 22069 ---------------------------------------------------------------------------- */ 22070 22071 /*! 22072 * @addtogroup XRDC_Register_Masks XRDC Register Masks 22073 * @{ 22074 */ 22075 22076 /*! @name CR - Control Register */ 22077 /*! @{ */ 22078 #define XRDC_CR_GVLDM_MASK (0x1U) 22079 #define XRDC_CR_GVLDM_SHIFT (0U) 22080 /*! GVLDM - Global Valid MDACs(XRDC global enable/disable). 22081 * 0b0..XRDC MDACs are disabled. 22082 * 0b1..XRDC MDACs are enabled. 22083 */ 22084 #define XRDC_CR_GVLDM(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDM_SHIFT)) & XRDC_CR_GVLDM_MASK) 22085 #define XRDC_CR_HRL_MASK (0x1EU) 22086 #define XRDC_CR_HRL_SHIFT (1U) 22087 #define XRDC_CR_HRL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_HRL_SHIFT)) & XRDC_CR_HRL_MASK) 22088 #define XRDC_CR_VAW_MASK (0x100U) 22089 #define XRDC_CR_VAW_SHIFT (8U) 22090 /*! VAW - Virtualization aware 22091 * 0b0..Implementation is not virtualization aware. 22092 * 0b1..Implementation is virtualization aware. 22093 */ 22094 #define XRDC_CR_VAW(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_VAW_SHIFT)) & XRDC_CR_VAW_MASK) 22095 #define XRDC_CR_GVLDP_MASK (0x4000U) 22096 #define XRDC_CR_GVLDP_SHIFT (14U) 22097 /*! GVLDP - Global Valid for PACs/MSCs 22098 * 0b0..XRDC PACs/MSCs are disabled. 22099 * 0b1..XRDC PACs/MSCs are enabled. 22100 */ 22101 #define XRDC_CR_GVLDP(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDP_SHIFT)) & XRDC_CR_GVLDP_MASK) 22102 #define XRDC_CR_GVLDC_MASK (0x8000U) 22103 #define XRDC_CR_GVLDC_SHIFT (15U) 22104 /*! GVLDC - Global Valid for MRCs 22105 * 0b0..XRDC MRCs are disabled. 22106 * 0b1..XRDC MRCs are enabled. 22107 */ 22108 #define XRDC_CR_GVLDC(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_GVLDC_SHIFT)) & XRDC_CR_GVLDC_MASK) 22109 #define XRDC_CR_LK1_MASK (0x40000000U) 22110 #define XRDC_CR_LK1_SHIFT (30U) 22111 /*! LK1 - 1-bit Lock 22112 * 0b0..Register can be written by any secure privileged write. 22113 * 0b1..Register is locked (read-only) until the next reset. 22114 */ 22115 #define XRDC_CR_LK1(x) (((uint32_t)(((uint32_t)(x)) << XRDC_CR_LK1_SHIFT)) & XRDC_CR_LK1_MASK) 22116 /*! @} */ 22117 22118 /*! @name HWCFG0 - Hardware Configuration Register 0 */ 22119 /*! @{ */ 22120 #define XRDC_HWCFG0_NDID_MASK (0xFFU) 22121 #define XRDC_HWCFG0_NDID_SHIFT (0U) 22122 #define XRDC_HWCFG0_NDID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NDID_SHIFT)) & XRDC_HWCFG0_NDID_MASK) 22123 #define XRDC_HWCFG0_NMSTR_MASK (0xFF00U) 22124 #define XRDC_HWCFG0_NMSTR_SHIFT (8U) 22125 #define XRDC_HWCFG0_NMSTR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NMSTR_SHIFT)) & XRDC_HWCFG0_NMSTR_MASK) 22126 #define XRDC_HWCFG0_NMRC_MASK (0xFF0000U) 22127 #define XRDC_HWCFG0_NMRC_SHIFT (16U) 22128 #define XRDC_HWCFG0_NMRC(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NMRC_SHIFT)) & XRDC_HWCFG0_NMRC_MASK) 22129 #define XRDC_HWCFG0_NPAC_MASK (0xF000000U) 22130 #define XRDC_HWCFG0_NPAC_SHIFT (24U) 22131 #define XRDC_HWCFG0_NPAC(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_NPAC_SHIFT)) & XRDC_HWCFG0_NPAC_MASK) 22132 #define XRDC_HWCFG0_MID_MASK (0xF0000000U) 22133 #define XRDC_HWCFG0_MID_SHIFT (28U) 22134 #define XRDC_HWCFG0_MID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG0_MID_SHIFT)) & XRDC_HWCFG0_MID_MASK) 22135 /*! @} */ 22136 22137 /*! @name HWCFG1 - Hardware Configuration Register 1 */ 22138 /*! @{ */ 22139 #define XRDC_HWCFG1_DID_MASK (0xFU) 22140 #define XRDC_HWCFG1_DID_SHIFT (0U) 22141 #define XRDC_HWCFG1_DID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG1_DID_SHIFT)) & XRDC_HWCFG1_DID_MASK) 22142 /*! @} */ 22143 22144 /*! @name HWCFG2 - Hardware Configuration Register 2 */ 22145 /*! @{ */ 22146 #define XRDC_HWCFG2_PIDP0_MASK (0x1U) 22147 #define XRDC_HWCFG2_PIDP0_SHIFT (0U) 22148 /*! PIDP0 - Process identifier 22149 * 0b0..Bus master 0 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22150 * 0b1..Bus master 0 sources a process identifier register to the XRDC_MDAC logic. 22151 */ 22152 #define XRDC_HWCFG2_PIDP0(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP0_SHIFT)) & XRDC_HWCFG2_PIDP0_MASK) 22153 #define XRDC_HWCFG2_PIDP1_MASK (0x2U) 22154 #define XRDC_HWCFG2_PIDP1_SHIFT (1U) 22155 /*! PIDP1 - Process identifier 22156 * 0b0..Bus master 1 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22157 * 0b1..Bus master 1 sources a process identifier register to the XRDC_MDAC logic. 22158 */ 22159 #define XRDC_HWCFG2_PIDP1(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP1_SHIFT)) & XRDC_HWCFG2_PIDP1_MASK) 22160 #define XRDC_HWCFG2_PIDP2_MASK (0x4U) 22161 #define XRDC_HWCFG2_PIDP2_SHIFT (2U) 22162 /*! PIDP2 - Process identifier 22163 * 0b0..Bus master 2 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22164 * 0b1..Bus master 2 sources a process identifier register to the XRDC_MDAC logic. 22165 */ 22166 #define XRDC_HWCFG2_PIDP2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP2_SHIFT)) & XRDC_HWCFG2_PIDP2_MASK) 22167 #define XRDC_HWCFG2_PIDP3_MASK (0x8U) 22168 #define XRDC_HWCFG2_PIDP3_SHIFT (3U) 22169 /*! PIDP3 - Process identifier 22170 * 0b0..Bus master 3 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22171 * 0b1..Bus master 3 sources a process identifier register to the XRDC_MDAC logic. 22172 */ 22173 #define XRDC_HWCFG2_PIDP3(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP3_SHIFT)) & XRDC_HWCFG2_PIDP3_MASK) 22174 #define XRDC_HWCFG2_PIDP4_MASK (0x10U) 22175 #define XRDC_HWCFG2_PIDP4_SHIFT (4U) 22176 /*! PIDP4 - Process identifier 22177 * 0b0..Bus master 4 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22178 * 0b1..Bus master 4 sources a process identifier register to the XRDC_MDAC logic. 22179 */ 22180 #define XRDC_HWCFG2_PIDP4(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP4_SHIFT)) & XRDC_HWCFG2_PIDP4_MASK) 22181 #define XRDC_HWCFG2_PIDP5_MASK (0x20U) 22182 #define XRDC_HWCFG2_PIDP5_SHIFT (5U) 22183 /*! PIDP5 - Process identifier 22184 * 0b0..Bus master 5 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22185 * 0b1..Bus master 5 sources a process identifier register to the XRDC_MDAC logic. 22186 */ 22187 #define XRDC_HWCFG2_PIDP5(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP5_SHIFT)) & XRDC_HWCFG2_PIDP5_MASK) 22188 #define XRDC_HWCFG2_PIDP6_MASK (0x40U) 22189 #define XRDC_HWCFG2_PIDP6_SHIFT (6U) 22190 /*! PIDP6 - Process identifier 22191 * 0b0..Bus master 6 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22192 * 0b1..Bus master 6 sources a process identifier register to the XRDC_MDAC logic. 22193 */ 22194 #define XRDC_HWCFG2_PIDP6(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP6_SHIFT)) & XRDC_HWCFG2_PIDP6_MASK) 22195 #define XRDC_HWCFG2_PIDP7_MASK (0x80U) 22196 #define XRDC_HWCFG2_PIDP7_SHIFT (7U) 22197 /*! PIDP7 - Process identifier 22198 * 0b0..Bus master 7 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22199 * 0b1..Bus master 7 sources a process identifier register to the XRDC_MDAC logic. 22200 */ 22201 #define XRDC_HWCFG2_PIDP7(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP7_SHIFT)) & XRDC_HWCFG2_PIDP7_MASK) 22202 #define XRDC_HWCFG2_PIDP8_MASK (0x100U) 22203 #define XRDC_HWCFG2_PIDP8_SHIFT (8U) 22204 /*! PIDP8 - Process identifier 22205 * 0b0..Bus master 8 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22206 * 0b1..Bus master 8 sources a process identifier register to the XRDC_MDAC logic. 22207 */ 22208 #define XRDC_HWCFG2_PIDP8(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP8_SHIFT)) & XRDC_HWCFG2_PIDP8_MASK) 22209 #define XRDC_HWCFG2_PIDP9_MASK (0x200U) 22210 #define XRDC_HWCFG2_PIDP9_SHIFT (9U) 22211 /*! PIDP9 - Process identifier 22212 * 0b0..Bus master 9 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22213 * 0b1..Bus master 9 sources a process identifier register to the XRDC_MDAC logic. 22214 */ 22215 #define XRDC_HWCFG2_PIDP9(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP9_SHIFT)) & XRDC_HWCFG2_PIDP9_MASK) 22216 #define XRDC_HWCFG2_PIDP10_MASK (0x400U) 22217 #define XRDC_HWCFG2_PIDP10_SHIFT (10U) 22218 /*! PIDP10 - Process identifier 22219 * 0b0..Bus master 10 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22220 * 0b1..Bus master 10 sources a process identifier register to the XRDC_MDAC logic. 22221 */ 22222 #define XRDC_HWCFG2_PIDP10(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP10_SHIFT)) & XRDC_HWCFG2_PIDP10_MASK) 22223 #define XRDC_HWCFG2_PIDP11_MASK (0x800U) 22224 #define XRDC_HWCFG2_PIDP11_SHIFT (11U) 22225 /*! PIDP11 - Process identifier 22226 * 0b0..Bus master 11 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22227 * 0b1..Bus master 11 sources a process identifier register to the XRDC_MDAC logic. 22228 */ 22229 #define XRDC_HWCFG2_PIDP11(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP11_SHIFT)) & XRDC_HWCFG2_PIDP11_MASK) 22230 #define XRDC_HWCFG2_PIDP12_MASK (0x1000U) 22231 #define XRDC_HWCFG2_PIDP12_SHIFT (12U) 22232 /*! PIDP12 - Process identifier 22233 * 0b0..Bus master 12 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22234 * 0b1..Bus master 12 sources a process identifier register to the XRDC_MDAC logic. 22235 */ 22236 #define XRDC_HWCFG2_PIDP12(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP12_SHIFT)) & XRDC_HWCFG2_PIDP12_MASK) 22237 #define XRDC_HWCFG2_PIDP13_MASK (0x2000U) 22238 #define XRDC_HWCFG2_PIDP13_SHIFT (13U) 22239 /*! PIDP13 - Process identifier 22240 * 0b0..Bus master 13 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22241 * 0b1..Bus master 13 sources a process identifier register to the XRDC_MDAC logic. 22242 */ 22243 #define XRDC_HWCFG2_PIDP13(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP13_SHIFT)) & XRDC_HWCFG2_PIDP13_MASK) 22244 #define XRDC_HWCFG2_PIDP14_MASK (0x4000U) 22245 #define XRDC_HWCFG2_PIDP14_SHIFT (14U) 22246 /*! PIDP14 - Process identifier 22247 * 0b0..Bus master 14 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22248 * 0b1..Bus master 14 sources a process identifier register to the XRDC_MDAC logic. 22249 */ 22250 #define XRDC_HWCFG2_PIDP14(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP14_SHIFT)) & XRDC_HWCFG2_PIDP14_MASK) 22251 #define XRDC_HWCFG2_PIDP15_MASK (0x8000U) 22252 #define XRDC_HWCFG2_PIDP15_SHIFT (15U) 22253 /*! PIDP15 - Process identifier 22254 * 0b0..Bus master 15 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22255 * 0b1..Bus master 15 sources a process identifier register to the XRDC_MDAC logic. 22256 */ 22257 #define XRDC_HWCFG2_PIDP15(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP15_SHIFT)) & XRDC_HWCFG2_PIDP15_MASK) 22258 #define XRDC_HWCFG2_PIDP16_MASK (0x10000U) 22259 #define XRDC_HWCFG2_PIDP16_SHIFT (16U) 22260 /*! PIDP16 - Process identifier 22261 * 0b0..Bus master 16 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22262 * 0b1..Bus master 16 sources a process identifier register to the XRDC_MDAC logic. 22263 */ 22264 #define XRDC_HWCFG2_PIDP16(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP16_SHIFT)) & XRDC_HWCFG2_PIDP16_MASK) 22265 #define XRDC_HWCFG2_PIDP17_MASK (0x20000U) 22266 #define XRDC_HWCFG2_PIDP17_SHIFT (17U) 22267 /*! PIDP17 - Process identifier 22268 * 0b0..Bus master 17 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22269 * 0b1..Bus master 17 sources a process identifier register to the XRDC_MDAC logic. 22270 */ 22271 #define XRDC_HWCFG2_PIDP17(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP17_SHIFT)) & XRDC_HWCFG2_PIDP17_MASK) 22272 #define XRDC_HWCFG2_PIDP18_MASK (0x40000U) 22273 #define XRDC_HWCFG2_PIDP18_SHIFT (18U) 22274 /*! PIDP18 - Process identifier 22275 * 0b0..Bus master 18 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22276 * 0b1..Bus master 18 sources a process identifier register to the XRDC_MDAC logic. 22277 */ 22278 #define XRDC_HWCFG2_PIDP18(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP18_SHIFT)) & XRDC_HWCFG2_PIDP18_MASK) 22279 #define XRDC_HWCFG2_PIDP19_MASK (0x80000U) 22280 #define XRDC_HWCFG2_PIDP19_SHIFT (19U) 22281 /*! PIDP19 - Process identifier 22282 * 0b0..Bus master 19 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22283 * 0b1..Bus master 19 sources a process identifier register to the XRDC_MDAC logic. 22284 */ 22285 #define XRDC_HWCFG2_PIDP19(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP19_SHIFT)) & XRDC_HWCFG2_PIDP19_MASK) 22286 #define XRDC_HWCFG2_PIDP20_MASK (0x100000U) 22287 #define XRDC_HWCFG2_PIDP20_SHIFT (20U) 22288 /*! PIDP20 - Process identifier 22289 * 0b0..Bus master 20 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22290 * 0b1..Bus master 20 sources a process identifier register to the XRDC_MDAC logic. 22291 */ 22292 #define XRDC_HWCFG2_PIDP20(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP20_SHIFT)) & XRDC_HWCFG2_PIDP20_MASK) 22293 #define XRDC_HWCFG2_PIDP21_MASK (0x200000U) 22294 #define XRDC_HWCFG2_PIDP21_SHIFT (21U) 22295 /*! PIDP21 - Process identifier 22296 * 0b0..Bus master 21 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22297 * 0b1..Bus master 21 sources a process identifier register to the XRDC_MDAC logic. 22298 */ 22299 #define XRDC_HWCFG2_PIDP21(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP21_SHIFT)) & XRDC_HWCFG2_PIDP21_MASK) 22300 #define XRDC_HWCFG2_PIDP22_MASK (0x400000U) 22301 #define XRDC_HWCFG2_PIDP22_SHIFT (22U) 22302 /*! PIDP22 - Process identifier 22303 * 0b0..Bus master 22 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22304 * 0b1..Bus master 22 sources a process identifier register to the XRDC_MDAC logic. 22305 */ 22306 #define XRDC_HWCFG2_PIDP22(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP22_SHIFT)) & XRDC_HWCFG2_PIDP22_MASK) 22307 #define XRDC_HWCFG2_PIDP23_MASK (0x800000U) 22308 #define XRDC_HWCFG2_PIDP23_SHIFT (23U) 22309 /*! PIDP23 - Process identifier 22310 * 0b0..Bus master 23 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22311 * 0b1..Bus master 23 sources a process identifier register to the XRDC_MDAC logic. 22312 */ 22313 #define XRDC_HWCFG2_PIDP23(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP23_SHIFT)) & XRDC_HWCFG2_PIDP23_MASK) 22314 #define XRDC_HWCFG2_PIDP24_MASK (0x1000000U) 22315 #define XRDC_HWCFG2_PIDP24_SHIFT (24U) 22316 /*! PIDP24 - Process identifier 22317 * 0b0..Bus master 24 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22318 * 0b1..Bus master 24 sources a process identifier register to the XRDC_MDAC logic. 22319 */ 22320 #define XRDC_HWCFG2_PIDP24(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP24_SHIFT)) & XRDC_HWCFG2_PIDP24_MASK) 22321 #define XRDC_HWCFG2_PIDP25_MASK (0x2000000U) 22322 #define XRDC_HWCFG2_PIDP25_SHIFT (25U) 22323 /*! PIDP25 - Process identifier 22324 * 0b0..Bus master 25 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22325 * 0b1..Bus master 25 sources a process identifier register to the XRDC_MDAC logic. 22326 */ 22327 #define XRDC_HWCFG2_PIDP25(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP25_SHIFT)) & XRDC_HWCFG2_PIDP25_MASK) 22328 #define XRDC_HWCFG2_PIDP26_MASK (0x4000000U) 22329 #define XRDC_HWCFG2_PIDP26_SHIFT (26U) 22330 /*! PIDP26 - Process identifier 22331 * 0b0..Bus master 26 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22332 * 0b1..Bus master 26 sources a process identifier register to the XRDC_MDAC logic. 22333 */ 22334 #define XRDC_HWCFG2_PIDP26(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP26_SHIFT)) & XRDC_HWCFG2_PIDP26_MASK) 22335 #define XRDC_HWCFG2_PIDP27_MASK (0x8000000U) 22336 #define XRDC_HWCFG2_PIDP27_SHIFT (27U) 22337 /*! PIDP27 - Process identifier 22338 * 0b0..Bus master 27 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22339 * 0b1..Bus master 27 sources a process identifier register to the XRDC_MDAC logic. 22340 */ 22341 #define XRDC_HWCFG2_PIDP27(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP27_SHIFT)) & XRDC_HWCFG2_PIDP27_MASK) 22342 #define XRDC_HWCFG2_PIDP28_MASK (0x10000000U) 22343 #define XRDC_HWCFG2_PIDP28_SHIFT (28U) 22344 /*! PIDP28 - Process identifier 22345 * 0b0..Bus master 28 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22346 * 0b1..Bus master 28 sources a process identifier register to the XRDC_MDAC logic. 22347 */ 22348 #define XRDC_HWCFG2_PIDP28(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP28_SHIFT)) & XRDC_HWCFG2_PIDP28_MASK) 22349 #define XRDC_HWCFG2_PIDP29_MASK (0x20000000U) 22350 #define XRDC_HWCFG2_PIDP29_SHIFT (29U) 22351 /*! PIDP29 - Process identifier 22352 * 0b0..Bus master 29 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22353 * 0b1..Bus master 29 sources a process identifier register to the XRDC_MDAC logic. 22354 */ 22355 #define XRDC_HWCFG2_PIDP29(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP29_SHIFT)) & XRDC_HWCFG2_PIDP29_MASK) 22356 #define XRDC_HWCFG2_PIDP30_MASK (0x40000000U) 22357 #define XRDC_HWCFG2_PIDP30_SHIFT (30U) 22358 /*! PIDP30 - Process identifier 22359 * 0b0..Bus master 30 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22360 * 0b1..Bus master 30 sources a process identifier register to the XRDC_MDAC logic. 22361 */ 22362 #define XRDC_HWCFG2_PIDP30(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP30_SHIFT)) & XRDC_HWCFG2_PIDP30_MASK) 22363 #define XRDC_HWCFG2_PIDP31_MASK (0x80000000U) 22364 #define XRDC_HWCFG2_PIDP31_SHIFT (31U) 22365 /*! PIDP31 - Process identifier 22366 * 0b0..Bus master 31 does not source a process identifier register. The XRDC_MDAC logic provides the needed PID for processor cores. 22367 * 0b1..Bus master 31 sources a process identifier register to the XRDC_MDAC logic. 22368 */ 22369 #define XRDC_HWCFG2_PIDP31(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG2_PIDP31_SHIFT)) & XRDC_HWCFG2_PIDP31_MASK) 22370 /*! @} */ 22371 22372 /*! @name HWCFG3 - Hardware Configuration Register 3 */ 22373 /*! @{ */ 22374 #define XRDC_HWCFG3_PIDPn_MASK (0xFFFFFFFFU) 22375 #define XRDC_HWCFG3_PIDPn_SHIFT (0U) 22376 #define XRDC_HWCFG3_PIDPn(x) (((uint32_t)(((uint32_t)(x)) << XRDC_HWCFG3_PIDPn_SHIFT)) & XRDC_HWCFG3_PIDPn_MASK) 22377 /*! @} */ 22378 22379 /*! @name MDACFG - Master Domain Assignment Configuration Register */ 22380 /*! @{ */ 22381 #define XRDC_MDACFG_NMDAR_MASK (0xFU) 22382 #define XRDC_MDACFG_NMDAR_SHIFT (0U) 22383 #define XRDC_MDACFG_NMDAR(x) (((uint8_t)(((uint8_t)(x)) << XRDC_MDACFG_NMDAR_SHIFT)) & XRDC_MDACFG_NMDAR_MASK) 22384 #define XRDC_MDACFG_NCM_MASK (0x80U) 22385 #define XRDC_MDACFG_NCM_SHIFT (7U) 22386 /*! NCM - Non-CPU Master 22387 * 0b0..Bus master is a processor. 22388 * 0b1..Bus master is a non-processor. 22389 */ 22390 #define XRDC_MDACFG_NCM(x) (((uint8_t)(((uint8_t)(x)) << XRDC_MDACFG_NCM_SHIFT)) & XRDC_MDACFG_NCM_MASK) 22391 /*! @} */ 22392 22393 /* The count of XRDC_MDACFG */ 22394 #define XRDC_MDACFG_COUNT (35U) 22395 22396 /*! @name MRCFG - Memory Region Configuration Register */ 22397 /*! @{ */ 22398 #define XRDC_MRCFG_NMRGD_MASK (0x1FU) 22399 #define XRDC_MRCFG_NMRGD_SHIFT (0U) 22400 #define XRDC_MRCFG_NMRGD(x) (((uint8_t)(((uint8_t)(x)) << XRDC_MRCFG_NMRGD_SHIFT)) & XRDC_MRCFG_NMRGD_MASK) 22401 /*! @} */ 22402 22403 /* The count of XRDC_MRCFG */ 22404 #define XRDC_MRCFG_COUNT (2U) 22405 22406 /*! @name FDID - Fault Domain ID */ 22407 /*! @{ */ 22408 #define XRDC_FDID_FDID_MASK (0xFU) 22409 #define XRDC_FDID_FDID_SHIFT (0U) 22410 #define XRDC_FDID_FDID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_FDID_FDID_SHIFT)) & XRDC_FDID_FDID_MASK) 22411 /*! @} */ 22412 22413 /*! @name DERRLOC - Domain Error Location Register */ 22414 /*! @{ */ 22415 #define XRDC_DERRLOC_MRCINST_MASK (0xFFFFU) 22416 #define XRDC_DERRLOC_MRCINST_SHIFT (0U) 22417 #define XRDC_DERRLOC_MRCINST(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERRLOC_MRCINST_SHIFT)) & XRDC_DERRLOC_MRCINST_MASK) 22418 #define XRDC_DERRLOC_PACINST_MASK (0xF0000U) 22419 #define XRDC_DERRLOC_PACINST_SHIFT (16U) 22420 #define XRDC_DERRLOC_PACINST(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERRLOC_PACINST_SHIFT)) & XRDC_DERRLOC_PACINST_MASK) 22421 /*! @} */ 22422 22423 /* The count of XRDC_DERRLOC */ 22424 #define XRDC_DERRLOC_COUNT (3U) 22425 22426 /*! @name DERR_W - Domain Error Word0 Register..Domain Error Word3 Register */ 22427 /*! @{ */ 22428 #define XRDC_DERR_W_EADDR_MASK (0xFFFFFFFFU) 22429 #define XRDC_DERR_W_EADDR_SHIFT (0U) 22430 #define XRDC_DERR_W_EADDR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EADDR_SHIFT)) & XRDC_DERR_W_EADDR_MASK) 22431 #define XRDC_DERR_W_EDID_MASK (0xFU) 22432 #define XRDC_DERR_W_EDID_SHIFT (0U) 22433 #define XRDC_DERR_W_EDID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EDID_SHIFT)) & XRDC_DERR_W_EDID_MASK) 22434 #define XRDC_DERR_W_EATR_MASK (0x700U) 22435 #define XRDC_DERR_W_EATR_SHIFT (8U) 22436 /*! EATR - Error attributes 22437 * 0b000..Secure user mode, instruction fetch access. 22438 * 0b001..Secure user mode, data access. 22439 * 0b010..Secure privileged mode, instruction fetch access. 22440 * 0b011..Secure privileged mode, data access. 22441 * 0b100..Nonsecure user mode, instruction fetch access. 22442 * 0b101..Nonsecure user mode, data access. 22443 * 0b110..Nonsecure privileged mode, instruction fetch access. 22444 * 0b111..Nonsecure privileged mode, data access. 22445 */ 22446 #define XRDC_DERR_W_EATR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EATR_SHIFT)) & XRDC_DERR_W_EATR_MASK) 22447 #define XRDC_DERR_W_ERW_MASK (0x800U) 22448 #define XRDC_DERR_W_ERW_SHIFT (11U) 22449 /*! ERW - Error read/write 22450 * 0b0..Read access 22451 * 0b1..Write access 22452 */ 22453 #define XRDC_DERR_W_ERW(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_ERW_SHIFT)) & XRDC_DERR_W_ERW_MASK) 22454 #define XRDC_DERR_W_EPORT_MASK (0x7000000U) 22455 #define XRDC_DERR_W_EPORT_SHIFT (24U) 22456 #define XRDC_DERR_W_EPORT(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EPORT_SHIFT)) & XRDC_DERR_W_EPORT_MASK) 22457 #define XRDC_DERR_W_EST_MASK (0xC0000000U) 22458 #define XRDC_DERR_W_EST_SHIFT (30U) 22459 /*! EST - Error state 22460 * 0b00..No access violation has been detected. 22461 * 0b01..No access violation has been detected. 22462 * 0b10..A single access violation has been detected. 22463 * 0b11..Multiple access violations for this domain have been detected by this submodule instance. Only the 22464 * address and attribute information for the first error have been captured in DERR_W0_i and DERR_W1_i. 22465 */ 22466 #define XRDC_DERR_W_EST(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_EST_SHIFT)) & XRDC_DERR_W_EST_MASK) 22467 #define XRDC_DERR_W_RECR_MASK (0xC0000000U) 22468 #define XRDC_DERR_W_RECR_SHIFT (30U) 22469 #define XRDC_DERR_W_RECR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_DERR_W_RECR_SHIFT)) & XRDC_DERR_W_RECR_MASK) 22470 /*! @} */ 22471 22472 /* The count of XRDC_DERR_W */ 22473 #define XRDC_DERR_W_COUNT (19U) 22474 22475 /* The count of XRDC_DERR_W */ 22476 #define XRDC_DERR_W_COUNT2 (4U) 22477 22478 /*! @name PID - Process Identifier */ 22479 /*! @{ */ 22480 #define XRDC_PID_PID_MASK (0x3FU) 22481 #define XRDC_PID_PID_SHIFT (0U) 22482 #define XRDC_PID_PID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PID_PID_SHIFT)) & XRDC_PID_PID_MASK) 22483 #define XRDC_PID_SP4SM_MASK (0x8000000U) 22484 #define XRDC_PID_SP4SM_SHIFT (27U) 22485 #define XRDC_PID_SP4SM(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PID_SP4SM_SHIFT)) & XRDC_PID_SP4SM_MASK) 22486 #define XRDC_PID_TSM_MASK (0x10000000U) 22487 #define XRDC_PID_TSM_SHIFT (28U) 22488 #define XRDC_PID_TSM(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PID_TSM_SHIFT)) & XRDC_PID_TSM_MASK) 22489 #define XRDC_PID_LK2_MASK (0x60000000U) 22490 #define XRDC_PID_LK2_SHIFT (29U) 22491 /*! LK2 - Lock 22492 * 0b00..Register can be written by any secure privileged write. 22493 * 0b01..Register can be written by any secure privileged write. 22494 * 0b10..Register can only be written by a secure privileged write from bus master m. 22495 * 0b11..Register is locked (read-only) until the next reset. 22496 */ 22497 #define XRDC_PID_LK2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PID_LK2_SHIFT)) & XRDC_PID_LK2_MASK) 22498 /*! @} */ 22499 22500 /* The count of XRDC_PID */ 22501 #define XRDC_PID_COUNT (33U) 22502 22503 /*! @name MDA_W - Master Domain Assignment */ 22504 /*! @{ */ 22505 #define XRDC_MDA_W_DID_MASK (0xFU) 22506 #define XRDC_MDA_W_DID_SHIFT (0U) 22507 #define XRDC_MDA_W_DID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DID_SHIFT)) & XRDC_MDA_W_DID_MASK) 22508 #define XRDC_MDA_W_DIDS_MASK (0x30U) 22509 #define XRDC_MDA_W_DIDS_SHIFT (4U) 22510 /*! DIDS - DID Select 22511 * 0b00..Use MDAm[3:0] as the domain identifier. 22512 * 0b01..Use the input DID as the domain identifier. 22513 * 0b10..Use MDAm[3:2] concatenated with the low-order 2 bits of the input DID (DID_in[1:0]) as the domain identifier. 22514 * 0b11..Reserved for future use. 22515 */ 22516 #define XRDC_MDA_W_DIDS(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DIDS_SHIFT)) & XRDC_MDA_W_DIDS_MASK) 22517 #define XRDC_MDA_W_PA_MASK (0x30U) 22518 #define XRDC_MDA_W_PA_SHIFT (4U) 22519 /*! PA - Privileged attribute 22520 * 0b00..Force the bus attribute for this master to user. 22521 * 0b01..Force the bus attribute for this master to privileged. 22522 * 0b10..Use the bus master's privileged/user attribute directly. 22523 * 0b11..Use the bus master's privileged/user attribute directly. 22524 */ 22525 #define XRDC_MDA_W_PA(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PA_SHIFT)) & XRDC_MDA_W_PA_MASK) 22526 #define XRDC_MDA_W_PE_MASK (0xC0U) 22527 #define XRDC_MDA_W_PE_SHIFT (6U) 22528 /*! PE - Process identifier enable 22529 * 0b00..No process identifier is included in the domain hit evaluation. 22530 * 0b01..No process identifier is included in the domain hit evaluation. 22531 * 0b10..The process identifier is included in the domain hit evaluation as defined by the expression: 22532 * partial_domain_hit = (PE == 2) && ((PID & ~PIDM) == (XRDC_PIDn[PID] & ~PIDM)) 22533 * 0b11..The process identifier is included in the domain hit evaluation as defined by the expression: 22534 * partial_domain_hit = (PE == 3) && ~((PID & ~PIDM) == (XRDC_PIDn[PID] & ~PIDM)) 22535 */ 22536 #define XRDC_MDA_W_PE(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PE_SHIFT)) & XRDC_MDA_W_PE_MASK) 22537 #define XRDC_MDA_W_SA_MASK (0xC0U) 22538 #define XRDC_MDA_W_SA_SHIFT (6U) 22539 /*! SA - Secure attribute 22540 * 0b00..Force the bus attribute for this master to secure. 22541 * 0b01..Force the bus attribute for this master to nonsecure. 22542 * 0b10..Use the bus master's secure/nonsecure attribute directly. 22543 * 0b11..Use the bus master's secure/nonsecure attribute directly. 22544 */ 22545 #define XRDC_MDA_W_SA(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_SA_SHIFT)) & XRDC_MDA_W_SA_MASK) 22546 #define XRDC_MDA_W_DIDB_MASK (0x100U) 22547 #define XRDC_MDA_W_DIDB_SHIFT (8U) 22548 /*! DIDB - DID Bypass 22549 * 0b0..Use MDAn[3:0] as the domain identifier. 22550 * 0b1..Use the DID input as the domain identifier. 22551 */ 22552 #define XRDC_MDA_W_DIDB(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DIDB_SHIFT)) & XRDC_MDA_W_DIDB_MASK) 22553 #define XRDC_MDA_W_PIDM_MASK (0x3F00U) 22554 #define XRDC_MDA_W_PIDM_SHIFT (8U) 22555 #define XRDC_MDA_W_PIDM(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PIDM_SHIFT)) & XRDC_MDA_W_PIDM_MASK) 22556 #define XRDC_MDA_W_PID_MASK (0x3F0000U) 22557 #define XRDC_MDA_W_PID_SHIFT (16U) 22558 #define XRDC_MDA_W_PID(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_PID_SHIFT)) & XRDC_MDA_W_PID_MASK) 22559 #define XRDC_MDA_W_DFMT_MASK (0x20000000U) 22560 #define XRDC_MDA_W_DFMT_SHIFT (29U) 22561 /*! DFMT - Domain format 22562 * 0b0..Processor-core domain assignment 22563 * 0b1..Non-processor domain assignment 22564 */ 22565 #define XRDC_MDA_W_DFMT(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_DFMT_SHIFT)) & XRDC_MDA_W_DFMT_MASK) 22566 #define XRDC_MDA_W_LK1_MASK (0x40000000U) 22567 #define XRDC_MDA_W_LK1_SHIFT (30U) 22568 /*! LK1 - 1-bit Lock 22569 * 0b0..Register can be written by any secure privileged write. 22570 * 0b1..Register is locked (read-only) until the next reset. 22571 */ 22572 #define XRDC_MDA_W_LK1(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_LK1_SHIFT)) & XRDC_MDA_W_LK1_MASK) 22573 #define XRDC_MDA_W_VLD_MASK (0x80000000U) 22574 #define XRDC_MDA_W_VLD_SHIFT (31U) 22575 /*! VLD - Valid 22576 * 0b0..The Wr domain assignment is invalid. 22577 * 0b1..The Wr domain assignment is valid. 22578 */ 22579 #define XRDC_MDA_W_VLD(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MDA_W_VLD_SHIFT)) & XRDC_MDA_W_VLD_MASK) 22580 /*! @} */ 22581 22582 /* The count of XRDC_MDA_W */ 22583 #define XRDC_MDA_W_COUNT (35U) 22584 22585 /* The count of XRDC_MDA_W */ 22586 #define XRDC_MDA_W_COUNT2 (2U) 22587 22588 /*! @name PDAC_W - Peripheral Domain Access Control */ 22589 /*! @{ */ 22590 #define XRDC_PDAC_W_D0ACP_MASK (0x7U) 22591 #define XRDC_PDAC_W_D0ACP_SHIFT (0U) 22592 #define XRDC_PDAC_W_D0ACP(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D0ACP_SHIFT)) & XRDC_PDAC_W_D0ACP_MASK) 22593 #define XRDC_PDAC_W_D1ACP_MASK (0x38U) 22594 #define XRDC_PDAC_W_D1ACP_SHIFT (3U) 22595 #define XRDC_PDAC_W_D1ACP(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D1ACP_SHIFT)) & XRDC_PDAC_W_D1ACP_MASK) 22596 #define XRDC_PDAC_W_D2ACP_MASK (0x1C0U) 22597 #define XRDC_PDAC_W_D2ACP_SHIFT (6U) 22598 #define XRDC_PDAC_W_D2ACP(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_D2ACP_SHIFT)) & XRDC_PDAC_W_D2ACP_MASK) 22599 #define XRDC_PDAC_W_EAL_MASK (0x3000000U) 22600 #define XRDC_PDAC_W_EAL_SHIFT (24U) 22601 /*! EAL - Exclusive Access Lock 22602 * 0b00..Lock disabled 22603 * 0b01..Lock disabled until next reset 22604 * 0b10..Lock enabled, lock state = available 22605 * 0b11..Lock enabled, lock state = not available 22606 */ 22607 #define XRDC_PDAC_W_EAL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_EAL_SHIFT)) & XRDC_PDAC_W_EAL_MASK) 22608 #define XRDC_PDAC_W_EALO_MASK (0xF000000U) 22609 #define XRDC_PDAC_W_EALO_SHIFT (24U) 22610 #define XRDC_PDAC_W_EALO(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_EALO_SHIFT)) & XRDC_PDAC_W_EALO_MASK) 22611 #define XRDC_PDAC_W_LK2_MASK (0x60000000U) 22612 #define XRDC_PDAC_W_LK2_SHIFT (29U) 22613 /*! LK2 - Lock 22614 * 0b00..Entire PDACs can be written. 22615 * 0b01..Entire PDACs can be written. 22616 * 0b10..Domain x can only update the DxACP field and the LK2 field; no other PDACs fields can be written. 22617 * 0b11..PDACs is locked (read-only) until the next reset. 22618 */ 22619 #define XRDC_PDAC_W_LK2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_LK2_SHIFT)) & XRDC_PDAC_W_LK2_MASK) 22620 #define XRDC_PDAC_W_VLD_MASK (0x80000000U) 22621 #define XRDC_PDAC_W_VLD_SHIFT (31U) 22622 /*! VLD - Valid 22623 * 0b0..The PDACs assignment is invalid. 22624 * 0b1..The PDACs assignment is valid. 22625 */ 22626 #define XRDC_PDAC_W_VLD(x) (((uint32_t)(((uint32_t)(x)) << XRDC_PDAC_W_VLD_SHIFT)) & XRDC_PDAC_W_VLD_MASK) 22627 /*! @} */ 22628 22629 /* The count of XRDC_PDAC_W */ 22630 #define XRDC_PDAC_W_COUNT (289U) 22631 22632 /* The count of XRDC_PDAC_W */ 22633 #define XRDC_PDAC_W_COUNT2 (2U) 22634 22635 /*! @name MRGD_W - Memory Region Descriptor */ 22636 /*! @{ */ 22637 #define XRDC_MRGD_W_ACCSET1_MASK (0xFFFU) 22638 #define XRDC_MRGD_W_ACCSET1_SHIFT (0U) 22639 #define XRDC_MRGD_W_ACCSET1(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ACCSET1_SHIFT)) & XRDC_MRGD_W_ACCSET1_MASK) 22640 #define XRDC_MRGD_W_D0SEL_MASK (0x7U) 22641 #define XRDC_MRGD_W_D0SEL_SHIFT (0U) 22642 #define XRDC_MRGD_W_D0SEL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D0SEL_SHIFT)) & XRDC_MRGD_W_D0SEL_MASK) 22643 #define XRDC_MRGD_W_D1SEL_MASK (0x38U) 22644 #define XRDC_MRGD_W_D1SEL_SHIFT (3U) 22645 #define XRDC_MRGD_W_D1SEL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D1SEL_SHIFT)) & XRDC_MRGD_W_D1SEL_MASK) 22646 #define XRDC_MRGD_W_ENDADDR_MASK (0xFFFFFFE0U) 22647 #define XRDC_MRGD_W_ENDADDR_SHIFT (5U) 22648 #define XRDC_MRGD_W_ENDADDR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ENDADDR_SHIFT)) & XRDC_MRGD_W_ENDADDR_MASK) 22649 #define XRDC_MRGD_W_SRTADDR_MASK (0xFFFFFFE0U) 22650 #define XRDC_MRGD_W_SRTADDR_SHIFT (5U) 22651 #define XRDC_MRGD_W_SRTADDR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_SRTADDR_SHIFT)) & XRDC_MRGD_W_SRTADDR_MASK) 22652 #define XRDC_MRGD_W_D2SEL_MASK (0x1C0U) 22653 #define XRDC_MRGD_W_D2SEL_SHIFT (6U) 22654 #define XRDC_MRGD_W_D2SEL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_D2SEL_SHIFT)) & XRDC_MRGD_W_D2SEL_MASK) 22655 #define XRDC_MRGD_W_LKAS1_MASK (0x1000U) 22656 #define XRDC_MRGD_W_LKAS1_SHIFT (12U) 22657 /*! LKAS1 - Lock ACCSET1 22658 * 0b0..Writes to ACCSET1 affect lesser modes 22659 * 0b1..ACCSET1 cannot be modified 22660 */ 22661 #define XRDC_MRGD_W_LKAS1(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LKAS1_SHIFT)) & XRDC_MRGD_W_LKAS1_MASK) 22662 #define XRDC_MRGD_W_ACCSET2_MASK (0xFFF0000U) 22663 #define XRDC_MRGD_W_ACCSET2_SHIFT (16U) 22664 #define XRDC_MRGD_W_ACCSET2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_ACCSET2_SHIFT)) & XRDC_MRGD_W_ACCSET2_MASK) 22665 #define XRDC_MRGD_W_EAL_MASK (0x3000000U) 22666 #define XRDC_MRGD_W_EAL_SHIFT (24U) 22667 /*! EAL - Exclusive Access Lock 22668 * 0b00..Lock disabled 22669 * 0b01..Lock disabled until next reset 22670 * 0b10..Lock enabled, lock state = available 22671 * 0b11..Lock enabled, lock state = not available 22672 */ 22673 #define XRDC_MRGD_W_EAL(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_EAL_SHIFT)) & XRDC_MRGD_W_EAL_MASK) 22674 #define XRDC_MRGD_W_EALO_MASK (0xF000000U) 22675 #define XRDC_MRGD_W_EALO_SHIFT (24U) 22676 #define XRDC_MRGD_W_EALO(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_EALO_SHIFT)) & XRDC_MRGD_W_EALO_MASK) 22677 #define XRDC_MRGD_W_LKAS2_MASK (0x10000000U) 22678 #define XRDC_MRGD_W_LKAS2_SHIFT (28U) 22679 /*! LKAS2 - Lock ACCSET2 22680 * 0b0..Writes to ACCSET2 affect lesser modes 22681 * 0b1..ACCSET2 cannot be modified 22682 */ 22683 #define XRDC_MRGD_W_LKAS2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LKAS2_SHIFT)) & XRDC_MRGD_W_LKAS2_MASK) 22684 #define XRDC_MRGD_W_LK2_MASK (0x60000000U) 22685 #define XRDC_MRGD_W_LK2_SHIFT (29U) 22686 /*! LK2 - Lock 22687 * 0b00..Entire MRGDn can be written. 22688 * 0b01..Entire MRGDn can be written. 22689 * 0b10..Domain x can only update the DxACP field and the LK2 field; no other MRGDn fields can be written. 22690 * 0b11..MRGDn is locked (read-only) until the next reset. 22691 */ 22692 #define XRDC_MRGD_W_LK2(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_LK2_SHIFT)) & XRDC_MRGD_W_LK2_MASK) 22693 #define XRDC_MRGD_W_CR_MASK (0x80000000U) 22694 #define XRDC_MRGD_W_CR_SHIFT (31U) 22695 #define XRDC_MRGD_W_CR(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_CR_SHIFT)) & XRDC_MRGD_W_CR_MASK) 22696 #define XRDC_MRGD_W_VLD_MASK (0x80000000U) 22697 #define XRDC_MRGD_W_VLD_SHIFT (31U) 22698 /*! VLD - Valid 22699 * 0b0..The MRGDn assignment is invalid. 22700 * 0b1..The MRGDn assignment is valid. 22701 */ 22702 #define XRDC_MRGD_W_VLD(x) (((uint32_t)(((uint32_t)(x)) << XRDC_MRGD_W_VLD_SHIFT)) & XRDC_MRGD_W_VLD_MASK) 22703 /*! @} */ 22704 22705 /* The count of XRDC_MRGD_W */ 22706 #define XRDC_MRGD_W_COUNT (24U) 22707 22708 /* The count of XRDC_MRGD_W */ 22709 #define XRDC_MRGD_W_COUNT2 (5U) 22710 22711 22712 /*! 22713 * @} 22714 */ /* end of group XRDC_Register_Masks */ 22715 22716 22717 /* XRDC - Peripheral instance base addresses */ 22718 /** Peripheral XRDC base address */ 22719 #define XRDC_BASE (0x40014000u) 22720 /** Peripheral XRDC base pointer */ 22721 #define XRDC ((XRDC_Type *)XRDC_BASE) 22722 /** Array initializer of XRDC peripheral base addresses */ 22723 #define XRDC_BASE_ADDRS { XRDC_BASE } 22724 /** Array initializer of XRDC peripheral base pointers */ 22725 #define XRDC_BASE_PTRS { XRDC } 22726 22727 /*! 22728 * @} 22729 */ /* end of group XRDC_Peripheral_Access_Layer */ 22730 22731 22732 /* 22733 ** End of section using anonymous unions 22734 */ 22735 22736 #if defined(__ARMCC_VERSION) 22737 #if (__ARMCC_VERSION >= 6010050) 22738 #pragma clang diagnostic pop 22739 #else 22740 #pragma pop 22741 #endif 22742 #elif defined(__GNUC__) 22743 /* leave anonymous unions enabled */ 22744 #elif defined(__IAR_SYSTEMS_ICC__) 22745 #pragma language=default 22746 #else 22747 #error Not supported compiler type 22748 #endif 22749 22750 /*! 22751 * @} 22752 */ /* end of group Peripheral_access_layer */ 22753 22754 22755 /* ---------------------------------------------------------------------------- 22756 -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK). 22757 ---------------------------------------------------------------------------- */ 22758 22759 /*! 22760 * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK). 22761 * @{ 22762 */ 22763 22764 #if defined(__ARMCC_VERSION) 22765 #if (__ARMCC_VERSION >= 6010050) 22766 #pragma clang system_header 22767 #endif 22768 #elif defined(__IAR_SYSTEMS_ICC__) 22769 #pragma system_include 22770 #endif 22771 22772 /** 22773 * @brief Mask and left-shift a bit field value for use in a register bit range. 22774 * @param field Name of the register bit field. 22775 * @param value Value of the bit field. 22776 * @return Masked and shifted value. 22777 */ 22778 #define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK)) 22779 /** 22780 * @brief Mask and right-shift a register value to extract a bit field value. 22781 * @param field Name of the register bit field. 22782 * @param value Value of the register. 22783 * @return Masked and shifted bit field value. 22784 */ 22785 #define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT)) 22786 22787 /*! 22788 * @} 22789 */ /* end of group Bit_Field_Generic_Macros */ 22790 22791 22792 /* ---------------------------------------------------------------------------- 22793 -- SDK Compatibility 22794 ---------------------------------------------------------------------------- */ 22795 22796 /*! 22797 * @addtogroup SDK_Compatibility_Symbols SDK Compatibility 22798 * @{ 22799 */ 22800 22801 /* No SDK compatibility issues. */ 22802 22803 /*! 22804 * @} 22805 */ /* end of group SDK_Compatibility_Symbols */ 22806 22807 22808 #endif /* _K32L3A60_CM0PLUS_H_ */ 22809 22810