mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Nov 03 10:30:07 2014 +0000
Revision:
381:5460fc57b6e4
Synchronized with git revision 02478cd1f27fc7b9643486472635eb515b2bca81

Full URL: https://github.com/mbedmicro/mbed/commit/02478cd1f27fc7b9643486472635eb515b2bca81/

Target: LPC1549 - Fix serial interrupt issues (issue report #616)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 381:5460fc57b6e4 1 /**
mbed_official 381:5460fc57b6e4 2 ******************************************************************************
mbed_official 381:5460fc57b6e4 3 * @file stm32f3xx_hal_hrtim.h
mbed_official 381:5460fc57b6e4 4 * @author MCD Application Team
mbed_official 381:5460fc57b6e4 5 * @version V1.1.0
mbed_official 381:5460fc57b6e4 6 * @date 12-Sept-2014
mbed_official 381:5460fc57b6e4 7 * @brief Header file of HRTIM HAL module.
mbed_official 381:5460fc57b6e4 8 ******************************************************************************
mbed_official 381:5460fc57b6e4 9 * @attention
mbed_official 381:5460fc57b6e4 10 *
mbed_official 381:5460fc57b6e4 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 381:5460fc57b6e4 12 *
mbed_official 381:5460fc57b6e4 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 381:5460fc57b6e4 14 * are permitted provided that the following conditions are met:
mbed_official 381:5460fc57b6e4 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 381:5460fc57b6e4 16 * this list of conditions and the following disclaimer.
mbed_official 381:5460fc57b6e4 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 381:5460fc57b6e4 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 381:5460fc57b6e4 19 * and/or other materials provided with the distribution.
mbed_official 381:5460fc57b6e4 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 381:5460fc57b6e4 21 * may be used to endorse or promote products derived from this software
mbed_official 381:5460fc57b6e4 22 * without specific prior written permission.
mbed_official 381:5460fc57b6e4 23 *
mbed_official 381:5460fc57b6e4 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 381:5460fc57b6e4 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 381:5460fc57b6e4 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 381:5460fc57b6e4 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 381:5460fc57b6e4 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 381:5460fc57b6e4 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 381:5460fc57b6e4 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 381:5460fc57b6e4 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 381:5460fc57b6e4 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 381:5460fc57b6e4 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 381:5460fc57b6e4 34 *
mbed_official 381:5460fc57b6e4 35 ******************************************************************************
mbed_official 381:5460fc57b6e4 36 */
mbed_official 381:5460fc57b6e4 37
mbed_official 381:5460fc57b6e4 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 381:5460fc57b6e4 39 #ifndef __STM32F3xx_HAL_HRTIM_H
mbed_official 381:5460fc57b6e4 40 #define __STM32F3xx_HAL_HRTIM_H
mbed_official 381:5460fc57b6e4 41
mbed_official 381:5460fc57b6e4 42 #ifdef __cplusplus
mbed_official 381:5460fc57b6e4 43 extern "C" {
mbed_official 381:5460fc57b6e4 44 #endif
mbed_official 381:5460fc57b6e4 45
mbed_official 381:5460fc57b6e4 46 #if defined(STM32F334x8)
mbed_official 381:5460fc57b6e4 47
mbed_official 381:5460fc57b6e4 48 /* Includes ------------------------------------------------------------------*/
mbed_official 381:5460fc57b6e4 49 #include "stm32f3xx_hal_def.h"
mbed_official 381:5460fc57b6e4 50
mbed_official 381:5460fc57b6e4 51 /** @addtogroup STM32F3xx_HAL_Driver
mbed_official 381:5460fc57b6e4 52 * @{
mbed_official 381:5460fc57b6e4 53 */
mbed_official 381:5460fc57b6e4 54
mbed_official 381:5460fc57b6e4 55 /** @addtogroup HRTIM HRTIM HAL module driver
mbed_official 381:5460fc57b6e4 56 * @{
mbed_official 381:5460fc57b6e4 57 */
mbed_official 381:5460fc57b6e4 58
mbed_official 381:5460fc57b6e4 59 /* Exported types ------------------------------------------------------------*/
mbed_official 381:5460fc57b6e4 60 /** @addtogroup HRTIM_Exported_Constants HRTIM Exported Constants
mbed_official 381:5460fc57b6e4 61 * @{
mbed_official 381:5460fc57b6e4 62 */
mbed_official 381:5460fc57b6e4 63 /** @defgroup HRTIM_Max_Timer HRTIM Max Timer
mbed_official 381:5460fc57b6e4 64 * @{
mbed_official 381:5460fc57b6e4 65 */
mbed_official 381:5460fc57b6e4 66 #define MAX_HRTIM_TIMER 6
mbed_official 381:5460fc57b6e4 67 /**
mbed_official 381:5460fc57b6e4 68 * @}
mbed_official 381:5460fc57b6e4 69 */
mbed_official 381:5460fc57b6e4 70 /**
mbed_official 381:5460fc57b6e4 71 * @}
mbed_official 381:5460fc57b6e4 72 */
mbed_official 381:5460fc57b6e4 73
mbed_official 381:5460fc57b6e4 74 /** @defgroup HRTIM_Exported_Types HRTIM Exported Types
mbed_official 381:5460fc57b6e4 75 * @{
mbed_official 381:5460fc57b6e4 76 */
mbed_official 381:5460fc57b6e4 77
mbed_official 381:5460fc57b6e4 78 /**
mbed_official 381:5460fc57b6e4 79 * @brief HRTIM Configuration Structure definition - Time base related parameters
mbed_official 381:5460fc57b6e4 80 */
mbed_official 381:5460fc57b6e4 81 typedef struct
mbed_official 381:5460fc57b6e4 82 {
mbed_official 381:5460fc57b6e4 83 uint32_t HRTIMInterruptResquests; /*!< Specifies which interrupts requests must enabled for the HRTIM instance
mbed_official 381:5460fc57b6e4 84 This parameter can be any combination of @ref HRTIM_Common_Interrupt_Enable */
mbed_official 381:5460fc57b6e4 85 uint32_t SyncOptions; /*!< Specifies how the HRTIM instance handles the external synchronization signals
mbed_official 381:5460fc57b6e4 86 This parameter can be a combination of @ref HRTIM_Synchronization_Options */
mbed_official 381:5460fc57b6e4 87 uint32_t SyncInputSource; /*!< Specifies the external synchronization input source
mbed_official 381:5460fc57b6e4 88 This parameter can be a value of @ref HRTIM_Synchronization_Input_Source */
mbed_official 381:5460fc57b6e4 89 uint32_t SyncOutputSource; /*!< Specifies the source and event to be sent on the external synchronization outputs
mbed_official 381:5460fc57b6e4 90 This parameter can be a value of @ref HRTIM_Synchronization_Output_Source */
mbed_official 381:5460fc57b6e4 91 uint32_t SyncOutputPolarity; /*!< Specifies the conditionning of the event to be sent on the external synchronization outputs
mbed_official 381:5460fc57b6e4 92 This parameter can be a value of @ref HRTIM_Synchronization_Output_Polarity */
mbed_official 381:5460fc57b6e4 93 } HRTIM_InitTypeDef;
mbed_official 381:5460fc57b6e4 94
mbed_official 381:5460fc57b6e4 95 /**
mbed_official 381:5460fc57b6e4 96 * @brief HAL State structures definition
mbed_official 381:5460fc57b6e4 97 */
mbed_official 381:5460fc57b6e4 98 typedef enum
mbed_official 381:5460fc57b6e4 99 {
mbed_official 381:5460fc57b6e4 100 HAL_HRTIM_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
mbed_official 381:5460fc57b6e4 101 HAL_HRTIM_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
mbed_official 381:5460fc57b6e4 102 HAL_HRTIM_STATE_TIMEOUT = 0x06, /*!< Timeout state */
mbed_official 381:5460fc57b6e4 103 HAL_HRTIM_STATE_ERROR = 0x07, /*!< Error state */
mbed_official 381:5460fc57b6e4 104 } HAL_HRTIM_StateTypeDef;
mbed_official 381:5460fc57b6e4 105
mbed_official 381:5460fc57b6e4 106 /**
mbed_official 381:5460fc57b6e4 107 * @brief HRTIM Timer Structure definition
mbed_official 381:5460fc57b6e4 108 */
mbed_official 381:5460fc57b6e4 109 typedef struct
mbed_official 381:5460fc57b6e4 110 {
mbed_official 381:5460fc57b6e4 111 uint32_t CaptureTrigger1; /*!< Event(s) triggering capture unit 1 */
mbed_official 381:5460fc57b6e4 112 uint32_t CaptureTrigger2; /*!< Event(s) triggering capture unit 2 */
mbed_official 381:5460fc57b6e4 113 uint32_t InterruptRequests; /*!< Interrupts requests enabled for the timer */
mbed_official 381:5460fc57b6e4 114 uint32_t DMARequests; /*!< DMA requests enabled for the timer */
mbed_official 381:5460fc57b6e4 115 uint32_t DMASrcAddress; /*!< Address of the source address of the DMA transfer */
mbed_official 381:5460fc57b6e4 116 uint32_t DMADstAddress; /*!< Address of the destination address of the DMA transfer */
mbed_official 381:5460fc57b6e4 117 uint32_t DMASize; /*!< Ssize of the DMA transfer */
mbed_official 381:5460fc57b6e4 118 } HRTIM_TimerParamTypeDef;
mbed_official 381:5460fc57b6e4 119
mbed_official 381:5460fc57b6e4 120 /**
mbed_official 381:5460fc57b6e4 121 * @brief HRTIM Handle Structure definition
mbed_official 381:5460fc57b6e4 122 */
mbed_official 381:5460fc57b6e4 123 typedef struct __HRTIM_HandleTypeDef
mbed_official 381:5460fc57b6e4 124 {
mbed_official 381:5460fc57b6e4 125 HRTIM_TypeDef * Instance; /*!< Register base address */
mbed_official 381:5460fc57b6e4 126
mbed_official 381:5460fc57b6e4 127 HRTIM_InitTypeDef Init; /*!< HRTIM required parameters */
mbed_official 381:5460fc57b6e4 128
mbed_official 381:5460fc57b6e4 129 HRTIM_TimerParamTypeDef TimerParam[MAX_HRTIM_TIMER]; /*!< HRTIM timers - including the master - parameters */
mbed_official 381:5460fc57b6e4 130
mbed_official 381:5460fc57b6e4 131 HAL_LockTypeDef Lock; /*!< Locking object */
mbed_official 381:5460fc57b6e4 132
mbed_official 381:5460fc57b6e4 133 __IO HAL_HRTIM_StateTypeDef State; /*!< HRTIM communication state */
mbed_official 381:5460fc57b6e4 134
mbed_official 381:5460fc57b6e4 135 DMA_HandleTypeDef * hdmaMaster; /*!< Master timer DMA handle parameters */
mbed_official 381:5460fc57b6e4 136 DMA_HandleTypeDef * hdmaTimerA; /*!< Timer A DMA handle parameters */
mbed_official 381:5460fc57b6e4 137 DMA_HandleTypeDef * hdmaTimerB; /*!< Timer B DMA handle parameters */
mbed_official 381:5460fc57b6e4 138 DMA_HandleTypeDef * hdmaTimerC; /*!< Timer C DMA handle parameters */
mbed_official 381:5460fc57b6e4 139 DMA_HandleTypeDef * hdmaTimerD; /*!< Timer D DMA handle parameters */
mbed_official 381:5460fc57b6e4 140 DMA_HandleTypeDef * hdmaTimerE; /*!< Timer E DMA handle parameters */
mbed_official 381:5460fc57b6e4 141 } HRTIM_HandleTypeDef;
mbed_official 381:5460fc57b6e4 142
mbed_official 381:5460fc57b6e4 143 /**
mbed_official 381:5460fc57b6e4 144 * @brief Simple output compare mode configuration definition
mbed_official 381:5460fc57b6e4 145 */
mbed_official 381:5460fc57b6e4 146 typedef struct {
mbed_official 381:5460fc57b6e4 147 uint32_t Period; /*!< Specifies the timer period
mbed_official 381:5460fc57b6e4 148 The period value must be above 3 periods of the fHRTIM clock.
mbed_official 381:5460fc57b6e4 149 Maximum value is = 0xFFDF */
mbed_official 381:5460fc57b6e4 150 uint32_t RepetitionCounter; /*!< Specifies the timer repetition period
mbed_official 381:5460fc57b6e4 151 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
mbed_official 381:5460fc57b6e4 152 uint32_t PrescalerRatio; /*!< Specifies the timer clock prescaler ratio.
mbed_official 381:5460fc57b6e4 153 This parameter can be any value of @ref HRTIM_Prescaler_Ratio */
mbed_official 381:5460fc57b6e4 154 uint32_t Mode; /*!< Specifies the counter operating mode
mbed_official 381:5460fc57b6e4 155 This parameter can be any value of @ref HRTIM_Mode */
mbed_official 381:5460fc57b6e4 156 } HRTIM_TimeBaseCfgTypeDef;
mbed_official 381:5460fc57b6e4 157
mbed_official 381:5460fc57b6e4 158 /**
mbed_official 381:5460fc57b6e4 159 * @brief Simple output compare mode configuration definition
mbed_official 381:5460fc57b6e4 160 */
mbed_official 381:5460fc57b6e4 161 typedef struct {
mbed_official 381:5460fc57b6e4 162 uint32_t Mode; /*!< Specifies the output compare mode (toggle, active, inactive)
mbed_official 381:5460fc57b6e4 163 This parameter can be any value of of @ref HRTIM_Simple_OC_Mode */
mbed_official 381:5460fc57b6e4 164 uint32_t Pulse; /*!< Specifies the compare value to be loaded into the Compare Register.
mbed_official 381:5460fc57b6e4 165 The compare value must be above or equal to 3 periods of the fHRTIM clock */
mbed_official 381:5460fc57b6e4 166 uint32_t Polarity; /*!< Specifies the output polarity
mbed_official 381:5460fc57b6e4 167 This parameter can be any value of @ref HRTIM_Output_Polarity */
mbed_official 381:5460fc57b6e4 168 uint32_t IdleLevel; /*!< Specifies whether the output level is active or inactive when in IDLE state
mbed_official 381:5460fc57b6e4 169 This parameter can be any value of @ref HRTIM_Output_IDLE_Level */
mbed_official 381:5460fc57b6e4 170 } HRTIM_SimpleOCChannelCfgTypeDef;
mbed_official 381:5460fc57b6e4 171
mbed_official 381:5460fc57b6e4 172 /**
mbed_official 381:5460fc57b6e4 173 * @brief Simple PWM output mode configuration definition
mbed_official 381:5460fc57b6e4 174 */
mbed_official 381:5460fc57b6e4 175 typedef struct {
mbed_official 381:5460fc57b6e4 176 uint32_t Pulse; /*!< Specifies the compare value to be loaded into the Compare Register.
mbed_official 381:5460fc57b6e4 177 The compare value must be above or equal to 3 periods of the fHRTIM clock */
mbed_official 381:5460fc57b6e4 178 uint32_t Polarity; /*!< Specifies the output polarity
mbed_official 381:5460fc57b6e4 179 This parameter can be any value of @ref HRTIM_Output_Polarity */
mbed_official 381:5460fc57b6e4 180 uint32_t IdleLevel; /*!< Specifies whether the output level is active or inactive when in IDLE state
mbed_official 381:5460fc57b6e4 181 This parameter can be any value of @ref HRTIM_Output_IDLE_Level */
mbed_official 381:5460fc57b6e4 182 } HRTIM_SimplePWMChannelCfgTypeDef;
mbed_official 381:5460fc57b6e4 183
mbed_official 381:5460fc57b6e4 184 /**
mbed_official 381:5460fc57b6e4 185 * @brief Simple capture mode configuration definition
mbed_official 381:5460fc57b6e4 186 */
mbed_official 381:5460fc57b6e4 187 typedef struct {
mbed_official 381:5460fc57b6e4 188 uint32_t Event; /*!< Specifies the external event triggering the capture
mbed_official 381:5460fc57b6e4 189 This parameter can be any 'EEVx' value of @ref HRTIM_External_Event_Channels */
mbed_official 381:5460fc57b6e4 190 uint32_t EventPolarity; /*!< Specifies the polarity of the external event (in case of level sensitivity)
mbed_official 381:5460fc57b6e4 191 This parameter can be a value of @ref HRTIM_External_Event_Polarity */
mbed_official 381:5460fc57b6e4 192 uint32_t EventSensitivity; /*!< Specifies the sensitivity of the external event
mbed_official 381:5460fc57b6e4 193 This parameter can be a value of @ref HRTIM_External_Event_Sensitivity */
mbed_official 381:5460fc57b6e4 194 uint32_t EventFilter; /*!< Defines the frequency used to sample the External Event and the length of the digital filter
mbed_official 381:5460fc57b6e4 195 This parameter can be a value of @ref HRTIM_External_Event_Filter */
mbed_official 381:5460fc57b6e4 196 } HRTIM_SimpleCaptureChannelCfgTypeDef;
mbed_official 381:5460fc57b6e4 197
mbed_official 381:5460fc57b6e4 198 /**
mbed_official 381:5460fc57b6e4 199 * @brief Simple One Pulse mode configuration definition
mbed_official 381:5460fc57b6e4 200 */
mbed_official 381:5460fc57b6e4 201 typedef struct {
mbed_official 381:5460fc57b6e4 202 uint32_t Pulse; /*!< Specifies the compare value to be loaded into the Compare Register.
mbed_official 381:5460fc57b6e4 203 The compare value must be above or equal to 3 periods of the fHRTIM clock */
mbed_official 381:5460fc57b6e4 204 uint32_t OutputPolarity; /*!< Specifies the output polarity
mbed_official 381:5460fc57b6e4 205 This parameter can be any value of @ref HRTIM_Output_Polarity */
mbed_official 381:5460fc57b6e4 206 uint32_t OutputIdleLevel; /*!< Specifies whether the output level is active or inactive when in IDLE state
mbed_official 381:5460fc57b6e4 207 This parameter can be any value of @ref HRTIM_Output_IDLE_Level */
mbed_official 381:5460fc57b6e4 208 uint32_t Event; /*!< Specifies the external event triggering the pulse generation
mbed_official 381:5460fc57b6e4 209 This parameter can be any 'EEVx' value of @ref HRTIM_External_Event_Channels */
mbed_official 381:5460fc57b6e4 210 uint32_t EventPolarity; /*!< Specifies the polarity of the external event (in case of level sensitivity)
mbed_official 381:5460fc57b6e4 211 This parameter can be a value of @ref HRTIM_External_Event_Polarity */
mbed_official 381:5460fc57b6e4 212 uint32_t EventSensitivity; /*!< Specifies the sensitivity of the external event
mbed_official 381:5460fc57b6e4 213 This parameter can be a value of @ref HRTIM_External_Event_Sensitivity */
mbed_official 381:5460fc57b6e4 214 uint32_t EventFilter; /*!< Defines the frequency used to sample the External Event and the length of the digital filter
mbed_official 381:5460fc57b6e4 215 This parameter can be a value of @ref HRTIM_External_Event_Filter */
mbed_official 381:5460fc57b6e4 216 } HRTIM_SimpleOnePulseChannelCfgTypeDef;
mbed_official 381:5460fc57b6e4 217
mbed_official 381:5460fc57b6e4 218 /**
mbed_official 381:5460fc57b6e4 219 * @brief Timer configuration definition
mbed_official 381:5460fc57b6e4 220 */
mbed_official 381:5460fc57b6e4 221 typedef struct {
mbed_official 381:5460fc57b6e4 222 uint32_t InterruptRequests; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 223 Specifies which interrupts requests must enabled for the timer
mbed_official 381:5460fc57b6e4 224 This parameter can be any combination of @ref HRTIM_Master_Interrupt_Enable
mbed_official 381:5460fc57b6e4 225 or HRTIM_Timing_Unit_Interrupt_Enable */
mbed_official 381:5460fc57b6e4 226 uint32_t DMARequests; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 227 Specifies which DMA requests must be enabled for the timer
mbed_official 381:5460fc57b6e4 228 This parameter can be any combination of @ref HRTIM_Master_DMA_Request_Enable
mbed_official 381:5460fc57b6e4 229 or HRTIM_Timing_Unit_DMA_Request_Enable */
mbed_official 381:5460fc57b6e4 230 uint32_t DMASrcAddress; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 231 Specifies the address of the source address of the DMA transfer */
mbed_official 381:5460fc57b6e4 232 uint32_t DMADstAddress; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 233 Specifies the address of the destination address of the DMA transfer */
mbed_official 381:5460fc57b6e4 234 uint32_t DMASize; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 235 Specifies the size of the DMA transfer */
mbed_official 381:5460fc57b6e4 236 uint32_t HalfModeEnable; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 237 Specifies whether or not hald mode is enabled
mbed_official 381:5460fc57b6e4 238 This parameter can be any value of @ref HRTIM_Half_Mode_Enable */
mbed_official 381:5460fc57b6e4 239 uint32_t StartOnSync; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 240 Specifies whether or not timer is reset by a rising edge on the synchronization input (when enabled)
mbed_official 381:5460fc57b6e4 241 This parameter can be any value of @ref HRTIM_Start_On_Sync_Input_Event */
mbed_official 381:5460fc57b6e4 242 uint32_t ResetOnSync; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 243 Specifies whether or not timer is reset by a rising edge on the synchronization input (when enabled)
mbed_official 381:5460fc57b6e4 244 This parameter can be any value of @ref HRTIM_Reset_On_Sync_Input_Event */
mbed_official 381:5460fc57b6e4 245 uint32_t DACSynchro; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 246 Indicates whether or not the a DAC synchronization event is generated
mbed_official 381:5460fc57b6e4 247 This parameter can be any value of @ref HRTIM_DAC_Synchronization */
mbed_official 381:5460fc57b6e4 248 uint32_t PreloadEnable; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 249 Specifies whether or not register preload is enabled
mbed_official 381:5460fc57b6e4 250 This parameter can be any value of @ref HRTIM_Register_Preload_Enable */
mbed_official 381:5460fc57b6e4 251 uint32_t UpdateGating; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 252 Specifies how the update occurs with respect to a burst DMA transaction or
mbed_official 381:5460fc57b6e4 253 update enable inputs (Slave timers only)
mbed_official 381:5460fc57b6e4 254 This parameter can be any value of @ref HRTIM_Update_Gating */
mbed_official 381:5460fc57b6e4 255 uint32_t BurstMode; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 256 Specifies how the timer behaves during a burst mode operation
mbed_official 381:5460fc57b6e4 257 This parameter can be any value of @ref HRTIM_Timer_Burst_Mode */
mbed_official 381:5460fc57b6e4 258 uint32_t RepetitionUpdate; /*!< Relevant for all HRTIM timers, including the master
mbed_official 381:5460fc57b6e4 259 Specifies whether or not registers update is triggered by the repetition event
mbed_official 381:5460fc57b6e4 260 This parameter can be any valuen of @ref HRTIM_Timer_Repetition_Update */
mbed_official 381:5460fc57b6e4 261 uint32_t PushPull; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 262 Specifies whether or not the push-pull mode is enabled
mbed_official 381:5460fc57b6e4 263 This parameter can be any value of @ref HRTIM_Timer_Push_Pull_Mode */
mbed_official 381:5460fc57b6e4 264 uint32_t FaultEnable; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 265 Specifies which fault channels are enabled for the timer
mbed_official 381:5460fc57b6e4 266 This parameter can be a combination of @ref HRTIM_Timer_Fault_Enabling */
mbed_official 381:5460fc57b6e4 267 uint32_t FaultLock; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 268 Specifies whether or not fault enabling status is write protected
mbed_official 381:5460fc57b6e4 269 This parameter can be a value of @ref HRTIM_Timer_Fault_Lock */
mbed_official 381:5460fc57b6e4 270 uint32_t DeadTimeInsertion; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 271 Specifies whether or not deadtime insertion is enabled for the timer
mbed_official 381:5460fc57b6e4 272 This parameter can be a value of @ref HRTIM_Timer_Deadtime_Insertion */
mbed_official 381:5460fc57b6e4 273 uint32_t DelayedProtectionMode; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 274 Specifies the delayed protection mode
mbed_official 381:5460fc57b6e4 275 This parameter can be a value of @ref HRTIM_Timer_Delayed_Protection_Mode */
mbed_official 381:5460fc57b6e4 276 uint32_t UpdateTrigger; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 277 Specifies source(s) triggering the timer registers update
mbed_official 381:5460fc57b6e4 278 This parameter can be a combination of @ref HRTIM_Timer_Update_Trigger */
mbed_official 381:5460fc57b6e4 279 uint32_t ResetTrigger; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 280 Specifies source(s) triggering the timer counter reset
mbed_official 381:5460fc57b6e4 281 This parameter can be a combination of @ref HRTIM_Timer_Reset_Trigger */
mbed_official 381:5460fc57b6e4 282 uint32_t ResetUpdate; /*!< Relevant for Timer A to Timer E
mbed_official 381:5460fc57b6e4 283 Specifies whether or not registers update is triggered when the timer counter is reset
mbed_official 381:5460fc57b6e4 284 This parameter can be a value of @ref HRTIM_Timer_Reset_Update */
mbed_official 381:5460fc57b6e4 285 } HRTIM_TimerCfgTypeDef;
mbed_official 381:5460fc57b6e4 286
mbed_official 381:5460fc57b6e4 287 /**
mbed_official 381:5460fc57b6e4 288 * @brief Compare unit configuration definition
mbed_official 381:5460fc57b6e4 289 */
mbed_official 381:5460fc57b6e4 290 typedef struct {
mbed_official 381:5460fc57b6e4 291 uint32_t CompareValue; /*!< Specifies the compare value of the timer compare unit
mbed_official 381:5460fc57b6e4 292 the minimum value must be greater than or equal to 3 periods of the fHRTIM clock
mbed_official 381:5460fc57b6e4 293 the maximum value must be less than or equal to 0xFFFF - 1 periods of the fHRTIM clock */
mbed_official 381:5460fc57b6e4 294 uint32_t AutoDelayedMode; /*!< Specifies the auto delayed mode for compare unit 2 or 4
mbed_official 381:5460fc57b6e4 295 This parameter can be a value of @ref HRTIM_Compare_Unit_Auto_Delayed_Mode */
mbed_official 381:5460fc57b6e4 296 uint32_t AutoDelayedTimeout; /*!< Specifies compare value for timing unit 1 or 3 when auto delayed mode with time out is selected
mbed_official 381:5460fc57b6e4 297 CompareValue + AutoDelayedTimeout must be less than 0xFFFF */
mbed_official 381:5460fc57b6e4 298 } HRTIM_CompareCfgTypeDef;
mbed_official 381:5460fc57b6e4 299
mbed_official 381:5460fc57b6e4 300 /**
mbed_official 381:5460fc57b6e4 301 * @brief Capture unit configuration definition
mbed_official 381:5460fc57b6e4 302 */
mbed_official 381:5460fc57b6e4 303 typedef struct {
mbed_official 381:5460fc57b6e4 304 uint32_t Trigger; /*!< Specifies source(s) triggering the capture
mbed_official 381:5460fc57b6e4 305 This parameter can be a combination of @ref HRTIM_Capture_Unit_Trigger */
mbed_official 381:5460fc57b6e4 306 } HRTIM_CaptureCfgTypeDef;
mbed_official 381:5460fc57b6e4 307
mbed_official 381:5460fc57b6e4 308 /**
mbed_official 381:5460fc57b6e4 309 * @brief Output configuration definition
mbed_official 381:5460fc57b6e4 310 */
mbed_official 381:5460fc57b6e4 311 typedef struct {
mbed_official 381:5460fc57b6e4 312 uint32_t Polarity; /*!< Specifies the output polarity
mbed_official 381:5460fc57b6e4 313 This parameter can be any value of @ref HRTIM_Output_Polarity */
mbed_official 381:5460fc57b6e4 314 uint32_t SetSource; /*!< Specifies the event(s) transitioning the output from its inactive level to its active level
mbed_official 381:5460fc57b6e4 315 This parameter can be a combination of @ref HRTIM_Output_Set_Source */
mbed_official 381:5460fc57b6e4 316 uint32_t ResetSource; /*!< Specifies the event(s) transitioning the output from its active level to its inactive level
mbed_official 381:5460fc57b6e4 317 This parameter can be a combination of @ref HRTIM_Output_Reset_Source */
mbed_official 381:5460fc57b6e4 318 uint32_t IdleMode; /*!< Specifies whether or not the output is affected by a burst mode operation
mbed_official 381:5460fc57b6e4 319 This parameter can be any value of @ref HRTIM_Output_Idle_Mode */
mbed_official 381:5460fc57b6e4 320 uint32_t IdleLevel; /*!< Specifies whether the output level is active or inactive when in IDLE state
mbed_official 381:5460fc57b6e4 321 This parameter can be any value of @ref HRTIM_Output_IDLE_Level */
mbed_official 381:5460fc57b6e4 322 uint32_t FaultLevel; /*!< Specifies whether the output level is active or inactive when in FAULT state
mbed_official 381:5460fc57b6e4 323 This parameter can be any value of @ref HRTIM_Output_FAULT_Level */
mbed_official 381:5460fc57b6e4 324 uint32_t ChopperModeEnable; /*!< Indicates whether or not the chopper mode is enabled
mbed_official 381:5460fc57b6e4 325 This parameter can be any value of @ref HRTIM_Output_Chopper_Mode_Enable */
mbed_official 381:5460fc57b6e4 326 uint32_t BurstModeEntryDelayed; /* !<Indicates whether or not deadtime is inserted when entering the IDLE state
mbed_official 381:5460fc57b6e4 327 during a burst mode operation
mbed_official 381:5460fc57b6e4 328 This parameters can be any value of @ref HRTIM_Output_Burst_Mode_Entry_Delayed */
mbed_official 381:5460fc57b6e4 329 } HRTIM_OutputCfgTypeDef;
mbed_official 381:5460fc57b6e4 330
mbed_official 381:5460fc57b6e4 331 /**
mbed_official 381:5460fc57b6e4 332 * @brief External event filtering in timing units configuration definition
mbed_official 381:5460fc57b6e4 333 */
mbed_official 381:5460fc57b6e4 334 typedef struct {
mbed_official 381:5460fc57b6e4 335 uint32_t Filter; /*!< Specifies the type of event filtering within the timing unit
mbed_official 381:5460fc57b6e4 336 This parameter can be a value of @ref HRTIM_Timer_External_Event_Filter */
mbed_official 381:5460fc57b6e4 337 uint32_t Latch; /*!< Specifies whether or not the signal is latched
mbed_official 381:5460fc57b6e4 338 This parameter can be a value of @ref HRTIM_Timer_External_Event_Latch */
mbed_official 381:5460fc57b6e4 339 } HRTIM_TimerEventFilteringCfgTypeDef;
mbed_official 381:5460fc57b6e4 340
mbed_official 381:5460fc57b6e4 341 /**
mbed_official 381:5460fc57b6e4 342 * @brief Dead time feature configuration definition
mbed_official 381:5460fc57b6e4 343 */
mbed_official 381:5460fc57b6e4 344 typedef struct {
mbed_official 381:5460fc57b6e4 345 uint32_t Prescaler; /*!< Specifies the Deadtime Prescaler
mbed_official 381:5460fc57b6e4 346 This parameter can be a value of @ref HRTIM_Deadtime_Prescaler_Ratio */
mbed_official 381:5460fc57b6e4 347 uint32_t RisingValue; /*!< Specifies the Deadtime following a rising edge
mbed_official 381:5460fc57b6e4 348 This parameter can be a number between 0x0 and 0x1FF */
mbed_official 381:5460fc57b6e4 349 uint32_t RisingSign; /*!< Specifies whether the deadtime is positive or negative on rising edge
mbed_official 381:5460fc57b6e4 350 This parameter can be a value of @ref HRTIM_Deadtime_Rising_Sign */
mbed_official 381:5460fc57b6e4 351 uint32_t RisingLock; /*!< Specifies whether or not deadtime rising settings (value and sign) are write protected
mbed_official 381:5460fc57b6e4 352 This parameter can be a value of @ref HRTIM_Deadtime_Rising_Lock */
mbed_official 381:5460fc57b6e4 353 uint32_t RisingSignLock; /*!< Specifies whether or not deadtime rising sign is write protected
mbed_official 381:5460fc57b6e4 354 This parameter can be a value of @ref HRTIM_Deadtime_Rising_Sign_Lock */
mbed_official 381:5460fc57b6e4 355 uint32_t FallingValue; /*!< Specifies the Deadtime following a falling edge
mbed_official 381:5460fc57b6e4 356 This parameter can be a number between 0x0 and 0x1FF */
mbed_official 381:5460fc57b6e4 357 uint32_t FallingSign; /*!< Specifies whether the deadtime is positive or negative on falling edge
mbed_official 381:5460fc57b6e4 358 This parameter can be a value of @ref HRTIM_Deadtime_Falling_Sign */
mbed_official 381:5460fc57b6e4 359 uint32_t FallingLock; /*!< Specifies whether or not deadtime falling settings (value and sign) are write protected
mbed_official 381:5460fc57b6e4 360 This parameter can be a value of @ref HRTIM_Deadtime_Falling_Lock */
mbed_official 381:5460fc57b6e4 361 uint32_t FallingSignLock; /*!< Specifies whether or not deadtime falling sign is write protected
mbed_official 381:5460fc57b6e4 362 This parameter can be a value of @ref HRTIM_Deadtime_Falling_Sign_Lock */
mbed_official 381:5460fc57b6e4 363 } HRTIM_DeadTimeCfgTypeDef ;
mbed_official 381:5460fc57b6e4 364
mbed_official 381:5460fc57b6e4 365 /**
mbed_official 381:5460fc57b6e4 366 * @brief Chopper mode configuration definition
mbed_official 381:5460fc57b6e4 367 */
mbed_official 381:5460fc57b6e4 368 typedef struct {
mbed_official 381:5460fc57b6e4 369 uint32_t CarrierFreq; /*!< Specifies the Timer carrier frequency value.
mbed_official 381:5460fc57b6e4 370 This parameter can be a value of @ref HRTIM_Chopper_Frequency */
mbed_official 381:5460fc57b6e4 371 uint32_t DutyCycle; /*!< Specifies the Timer chopper duty cycle value.
mbed_official 381:5460fc57b6e4 372 This parameter can be a value of @ref HRTIM_Chopper_Duty_Cycle */
mbed_official 381:5460fc57b6e4 373 uint32_t StartPulse; /*!< Specifies the Timer pulse width value.
mbed_official 381:5460fc57b6e4 374 This parameter can be a value of @ref HRTIM_Chopper_Start_Pulse_Width */
mbed_official 381:5460fc57b6e4 375 } HRTIM_ChopperModeCfgTypeDef;
mbed_official 381:5460fc57b6e4 376
mbed_official 381:5460fc57b6e4 377 /**
mbed_official 381:5460fc57b6e4 378 * @brief External event channel configuration definition
mbed_official 381:5460fc57b6e4 379 */
mbed_official 381:5460fc57b6e4 380 typedef struct {
mbed_official 381:5460fc57b6e4 381 uint32_t Source; /*!< Identifies the source of the external event
mbed_official 381:5460fc57b6e4 382 This parameter can be a value of @ref HRTIM_External_Event_Sources */
mbed_official 381:5460fc57b6e4 383 uint32_t Polarity; /*!< Specifies the polarity of the external event (in case of level sensitivity)
mbed_official 381:5460fc57b6e4 384 This parameter can be a value of @ref HRTIM_External_Event_Polarity */
mbed_official 381:5460fc57b6e4 385 uint32_t Sensitivity; /*!< Specifies the sensitivity of the external event
mbed_official 381:5460fc57b6e4 386 This parameter can be a value of @ref HRTIM_External_Event_Sensitivity */
mbed_official 381:5460fc57b6e4 387 uint32_t Filter; /*!< Defines the frequency used to sample the External Event and the length of the digital filter
mbed_official 381:5460fc57b6e4 388 This parameter can be a value of @ref HRTIM_External_Event_Filter */
mbed_official 381:5460fc57b6e4 389 uint32_t FastMode; /*!< Indicates whether or not low latency mode is enabled for the external event
mbed_official 381:5460fc57b6e4 390 This parameter can be a value of @ref HRTIM_External_Event_Fast_Mode */
mbed_official 381:5460fc57b6e4 391 } HRTIM_EventCfgTypeDef;
mbed_official 381:5460fc57b6e4 392
mbed_official 381:5460fc57b6e4 393 /**
mbed_official 381:5460fc57b6e4 394 * @brief Fault channel configuration definition
mbed_official 381:5460fc57b6e4 395 */
mbed_official 381:5460fc57b6e4 396 typedef struct {
mbed_official 381:5460fc57b6e4 397 uint32_t Source; /*!< Identifies the source of the fault
mbed_official 381:5460fc57b6e4 398 This parameter can be a value of @ref HRTIM_Fault_Sources */
mbed_official 381:5460fc57b6e4 399 uint32_t Polarity; /*!< Specifies the polarity of the fault event
mbed_official 381:5460fc57b6e4 400 This parameter can be a value of @ref HRTIM_Fault_Polarity */
mbed_official 381:5460fc57b6e4 401 uint32_t Filter; /*!< Defines the frequency used to sample the Fault input and the length of the digital filter
mbed_official 381:5460fc57b6e4 402 This parameter can be a value of @ref HRTIM_Fault_Filter */
mbed_official 381:5460fc57b6e4 403 uint32_t Lock; /*!< Indicates whether or not fault programming bits are write protected
mbed_official 381:5460fc57b6e4 404 This parameter can be a value of @ref HRTIM_Fault_Lock */
mbed_official 381:5460fc57b6e4 405 } HRTIM_FaultCfgTypeDef;
mbed_official 381:5460fc57b6e4 406
mbed_official 381:5460fc57b6e4 407 /**
mbed_official 381:5460fc57b6e4 408 * @brief Burst mode configuration definition
mbed_official 381:5460fc57b6e4 409 */
mbed_official 381:5460fc57b6e4 410 typedef struct {
mbed_official 381:5460fc57b6e4 411 uint32_t Mode; /*!< Specifies the burst mode operating mode
mbed_official 381:5460fc57b6e4 412 This parameter can be a value of @ref HRTIM_Burst_Mode_Operating_Mode */
mbed_official 381:5460fc57b6e4 413 uint32_t ClockSource; /*!< Specifies the burst mode clock source
mbed_official 381:5460fc57b6e4 414 This parameter can be a value of @ref HRTIM_Burst_Mode_Clock_Source */
mbed_official 381:5460fc57b6e4 415 uint32_t Prescaler; /*!< Specifies the burst mode prescaler
mbed_official 381:5460fc57b6e4 416 This parameter can be a value of @ref HRTIM_Burst_Mode_Prescaler */
mbed_official 381:5460fc57b6e4 417 uint32_t PreloadEnable; /*!< Specifies whether or not preload is enabled for burst mode related registers (HRTIM_BMCMPR and HRTIM_BMPER)
mbed_official 381:5460fc57b6e4 418 This parameter can be a combination of @ref HRTIM_Burst_Mode_Register_Preload_Enable */
mbed_official 381:5460fc57b6e4 419 uint32_t Trigger; /*!< Specifies the event(s) trigering the burst operation
mbed_official 381:5460fc57b6e4 420 This parameter can be a combination of @ref HRTIM_Burst_Mode_Trigger */
mbed_official 381:5460fc57b6e4 421 uint32_t IdleDuration; /*!< Specifies number of periods during which the selected timers are in idle state
mbed_official 381:5460fc57b6e4 422 This parameter can be a number between 0x0 and 0xFFFF */
mbed_official 381:5460fc57b6e4 423 uint32_t Period; /*!< Specifies burst mode repetition period
mbed_official 381:5460fc57b6e4 424 This parameter can be a number between 0x1 and 0xFFFF */
mbed_official 381:5460fc57b6e4 425 } HRTIM_BurstModeCfgTypeDef;
mbed_official 381:5460fc57b6e4 426
mbed_official 381:5460fc57b6e4 427 /**
mbed_official 381:5460fc57b6e4 428 * @brief ADC trigger configuration definition
mbed_official 381:5460fc57b6e4 429 */
mbed_official 381:5460fc57b6e4 430 typedef struct {
mbed_official 381:5460fc57b6e4 431 uint32_t UpdateSource; /*!< Specifies the ADC trigger update source
mbed_official 381:5460fc57b6e4 432 This parameter can be a combination of @ref HRTIM_ADC_Trigger_Update_Source */
mbed_official 381:5460fc57b6e4 433 uint32_t Trigger; /*!< Specifies the event(s) triggering the ADC conversion
mbed_official 381:5460fc57b6e4 434 This parameter can be a value of @ref HRTIM_ADC_Trigger_Event */
mbed_official 381:5460fc57b6e4 435 } HRTIM_ADCTriggerCfgTypeDef;
mbed_official 381:5460fc57b6e4 436
mbed_official 381:5460fc57b6e4 437 /**
mbed_official 381:5460fc57b6e4 438 * @}
mbed_official 381:5460fc57b6e4 439 */
mbed_official 381:5460fc57b6e4 440
mbed_official 381:5460fc57b6e4 441 /* Exported constants --------------------------------------------------------*/
mbed_official 381:5460fc57b6e4 442 /** @defgroup HRTIM_Exported_Constants HRTIM Exported Constants
mbed_official 381:5460fc57b6e4 443 * @{
mbed_official 381:5460fc57b6e4 444 */
mbed_official 381:5460fc57b6e4 445
mbed_official 381:5460fc57b6e4 446 /** @defgroup HRTIM_Timer_Index HRTIM Timer Index
mbed_official 381:5460fc57b6e4 447 * @{
mbed_official 381:5460fc57b6e4 448 * @brief Constants defining the timer indexes
mbed_official 381:5460fc57b6e4 449 */
mbed_official 381:5460fc57b6e4 450 #define HRTIM_TIMERINDEX_TIMER_A (uint32_t)0x0 /*!< Index used to access timer A registers */
mbed_official 381:5460fc57b6e4 451 #define HRTIM_TIMERINDEX_TIMER_B (uint32_t)0x1 /*!< Index used to access timer B registers */
mbed_official 381:5460fc57b6e4 452 #define HRTIM_TIMERINDEX_TIMER_C (uint32_t)0x2 /*!< Index used to access timer C registers */
mbed_official 381:5460fc57b6e4 453 #define HRTIM_TIMERINDEX_TIMER_D (uint32_t)0x3 /*!< Index used to access timer D registers */
mbed_official 381:5460fc57b6e4 454 #define HRTIM_TIMERINDEX_TIMER_E (uint32_t)0x4 /*!< Index used to access timer E registers */
mbed_official 381:5460fc57b6e4 455 #define HRTIM_TIMERINDEX_MASTER (uint32_t)0x5 /*!< Index used to access master registers */
mbed_official 381:5460fc57b6e4 456 #define HRTIM_TIMERINDEX_COMMON (uint32_t)0xFF /*!< Index used to access HRTIM common registers */
mbed_official 381:5460fc57b6e4 457
mbed_official 381:5460fc57b6e4 458 #define IS_HRTIM_TIMERINDEX(TIMERINDEX)\
mbed_official 381:5460fc57b6e4 459 (((TIMERINDEX) == HRTIM_TIMERINDEX_MASTER) || \
mbed_official 381:5460fc57b6e4 460 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_A) || \
mbed_official 381:5460fc57b6e4 461 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_B) || \
mbed_official 381:5460fc57b6e4 462 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_C) || \
mbed_official 381:5460fc57b6e4 463 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_D) || \
mbed_official 381:5460fc57b6e4 464 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_E))
mbed_official 381:5460fc57b6e4 465
mbed_official 381:5460fc57b6e4 466 #define IS_HRTIM_TIMING_UNIT(TIMERINDEX)\
mbed_official 381:5460fc57b6e4 467 (((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_A) || \
mbed_official 381:5460fc57b6e4 468 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_B) || \
mbed_official 381:5460fc57b6e4 469 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_C) || \
mbed_official 381:5460fc57b6e4 470 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_D) || \
mbed_official 381:5460fc57b6e4 471 ((TIMERINDEX) == HRTIM_TIMERINDEX_TIMER_E))
mbed_official 381:5460fc57b6e4 472 /**
mbed_official 381:5460fc57b6e4 473 * @}
mbed_official 381:5460fc57b6e4 474 */
mbed_official 381:5460fc57b6e4 475
mbed_official 381:5460fc57b6e4 476 /** @defgroup HRTIM_Timer_identifier HRTIM Timer identifier
mbed_official 381:5460fc57b6e4 477 * @{
mbed_official 381:5460fc57b6e4 478 * @brief Constants defining timer identifiers
mbed_official 381:5460fc57b6e4 479 */
mbed_official 381:5460fc57b6e4 480 #define HRTIM_TIMERID_MASTER (HRTIM_MCR_MCEN) /*!< Master identifier*/
mbed_official 381:5460fc57b6e4 481 #define HRTIM_TIMERID_TIMER_A (HRTIM_MCR_TACEN) /*!< Timer A identifier */
mbed_official 381:5460fc57b6e4 482 #define HRTIM_TIMERID_TIMER_B (HRTIM_MCR_TBCEN) /*!< Timer B identifier */
mbed_official 381:5460fc57b6e4 483 #define HRTIM_TIMERID_TIMER_C (HRTIM_MCR_TCCEN) /*!< Timer C identifier */
mbed_official 381:5460fc57b6e4 484 #define HRTIM_TIMERID_TIMER_D (HRTIM_MCR_TDCEN) /*!< Timer D identifier */
mbed_official 381:5460fc57b6e4 485 #define HRTIM_TIMERID_TIMER_E (HRTIM_MCR_TECEN) /*!< Timer E identifier */
mbed_official 381:5460fc57b6e4 486
mbed_official 381:5460fc57b6e4 487 #define IS_HRTIM_TIMERID(TIMERID) (((TIMERID) & 0xFFC0FFFF) == 0x00000000)
mbed_official 381:5460fc57b6e4 488
mbed_official 381:5460fc57b6e4 489 /**
mbed_official 381:5460fc57b6e4 490 * @}
mbed_official 381:5460fc57b6e4 491 */
mbed_official 381:5460fc57b6e4 492
mbed_official 381:5460fc57b6e4 493 /** @defgroup HRTIM_Compare_Unit HRTIM Compare Unit
mbed_official 381:5460fc57b6e4 494 * @{
mbed_official 381:5460fc57b6e4 495 * @brief Constants defining compare unit identifiers
mbed_official 381:5460fc57b6e4 496 */
mbed_official 381:5460fc57b6e4 497 #define HRTIM_COMPAREUNIT_1 (uint32_t)0x00000001 /*!< Compare unit 1 identifier */
mbed_official 381:5460fc57b6e4 498 #define HRTIM_COMPAREUNIT_2 (uint32_t)0x00000002 /*!< Compare unit 2 identifier */
mbed_official 381:5460fc57b6e4 499 #define HRTIM_COMPAREUNIT_3 (uint32_t)0x00000004 /*!< Compare unit 3 identifier */
mbed_official 381:5460fc57b6e4 500 #define HRTIM_COMPAREUNIT_4 (uint32_t)0x00000008 /*!< Compare unit 4 identifier */
mbed_official 381:5460fc57b6e4 501
mbed_official 381:5460fc57b6e4 502 #define IS_HRTIM_COMPAREUNIT(COMPAREUNIT)\
mbed_official 381:5460fc57b6e4 503 (((COMPAREUNIT) == HRTIM_COMPAREUNIT_1) || \
mbed_official 381:5460fc57b6e4 504 ((COMPAREUNIT) == HRTIM_COMPAREUNIT_2) || \
mbed_official 381:5460fc57b6e4 505 ((COMPAREUNIT) == HRTIM_COMPAREUNIT_3) || \
mbed_official 381:5460fc57b6e4 506 ((COMPAREUNIT) == HRTIM_COMPAREUNIT_4))
mbed_official 381:5460fc57b6e4 507 /**
mbed_official 381:5460fc57b6e4 508 * @}
mbed_official 381:5460fc57b6e4 509 */
mbed_official 381:5460fc57b6e4 510
mbed_official 381:5460fc57b6e4 511 /** @defgroup HRTIM_Capture_Unit HRTIM Capture Unit
mbed_official 381:5460fc57b6e4 512 * @{
mbed_official 381:5460fc57b6e4 513 * @brief Constants defining capture unit identifiers
mbed_official 381:5460fc57b6e4 514 */
mbed_official 381:5460fc57b6e4 515 #define HRTIM_CAPTUREUNIT_1 (uint32_t)0x00000001 /*!< Capture unit 1 identifier */
mbed_official 381:5460fc57b6e4 516 #define HRTIM_CAPTUREUNIT_2 (uint32_t)0x00000002 /*!< Capture unit 2 identifier */
mbed_official 381:5460fc57b6e4 517
mbed_official 381:5460fc57b6e4 518 #define IS_HRTIM_CAPTUREUNIT(CAPTUREUNIT)\
mbed_official 381:5460fc57b6e4 519 (((CAPTUREUNIT) == HRTIM_CAPTUREUNIT_1) || \
mbed_official 381:5460fc57b6e4 520 ((CAPTUREUNIT) == HRTIM_CAPTUREUNIT_2))
mbed_official 381:5460fc57b6e4 521 /**
mbed_official 381:5460fc57b6e4 522 * @}
mbed_official 381:5460fc57b6e4 523 */
mbed_official 381:5460fc57b6e4 524
mbed_official 381:5460fc57b6e4 525 /** @defgroup HRTIM_Timer_Output HRTIM Timer Output
mbed_official 381:5460fc57b6e4 526 * @{
mbed_official 381:5460fc57b6e4 527 * @brief Constants defining timer output identifiers
mbed_official 381:5460fc57b6e4 528 */
mbed_official 381:5460fc57b6e4 529 #define HRTIM_OUTPUT_TA1 (uint32_t)0x00000001 /*!< Timer A - Ouput 1 identifier */
mbed_official 381:5460fc57b6e4 530 #define HRTIM_OUTPUT_TA2 (uint32_t)0x00000002 /*!< Timer A - Ouput 2 identifier */
mbed_official 381:5460fc57b6e4 531 #define HRTIM_OUTPUT_TB1 (uint32_t)0x00000004 /*!< Timer B - Ouput 1 identifier */
mbed_official 381:5460fc57b6e4 532 #define HRTIM_OUTPUT_TB2 (uint32_t)0x00000008 /*!< Timer B - Ouput 2 identifier */
mbed_official 381:5460fc57b6e4 533 #define HRTIM_OUTPUT_TC1 (uint32_t)0x00000010 /*!< Timer C - Ouput 1 identifier */
mbed_official 381:5460fc57b6e4 534 #define HRTIM_OUTPUT_TC2 (uint32_t)0x00000020 /*!< Timer C - Ouput 2 identifier */
mbed_official 381:5460fc57b6e4 535 #define HRTIM_OUTPUT_TD1 (uint32_t)0x00000040 /*!< Timer D - Ouput 1 identifier */
mbed_official 381:5460fc57b6e4 536 #define HRTIM_OUTPUT_TD2 (uint32_t)0x00000080 /*!< Timer D - Ouput 2 identifier */
mbed_official 381:5460fc57b6e4 537 #define HRTIM_OUTPUT_TE1 (uint32_t)0x00000100 /*!< Timer E - Ouput 1 identifier */
mbed_official 381:5460fc57b6e4 538 #define HRTIM_OUTPUT_TE2 (uint32_t)0x00000200 /*!< Timer E - Ouput 2 identifier */
mbed_official 381:5460fc57b6e4 539
mbed_official 381:5460fc57b6e4 540 #define IS_HRTIM_OUTPUT(OUTPUT) (((OUTPUT) & 0xFFFFFC00) == 0x00000000)
mbed_official 381:5460fc57b6e4 541
mbed_official 381:5460fc57b6e4 542 #define IS_HRTIM_TIMER_OUTPUT(TIMER, OUTPUT)\
mbed_official 381:5460fc57b6e4 543 ((((TIMER) == HRTIM_TIMERINDEX_TIMER_A) && \
mbed_official 381:5460fc57b6e4 544 (((OUTPUT) == HRTIM_OUTPUT_TA1) || \
mbed_official 381:5460fc57b6e4 545 ((OUTPUT) == HRTIM_OUTPUT_TA2))) \
mbed_official 381:5460fc57b6e4 546 || \
mbed_official 381:5460fc57b6e4 547 (((TIMER) == HRTIM_TIMERINDEX_TIMER_B) && \
mbed_official 381:5460fc57b6e4 548 (((OUTPUT) == HRTIM_OUTPUT_TB1) || \
mbed_official 381:5460fc57b6e4 549 ((OUTPUT) == HRTIM_OUTPUT_TB2))) \
mbed_official 381:5460fc57b6e4 550 || \
mbed_official 381:5460fc57b6e4 551 (((TIMER) == HRTIM_TIMERINDEX_TIMER_C) && \
mbed_official 381:5460fc57b6e4 552 (((OUTPUT) == HRTIM_OUTPUT_TC1) || \
mbed_official 381:5460fc57b6e4 553 ((OUTPUT) == HRTIM_OUTPUT_TC2))) \
mbed_official 381:5460fc57b6e4 554 || \
mbed_official 381:5460fc57b6e4 555 (((TIMER) == HRTIM_TIMERINDEX_TIMER_D) && \
mbed_official 381:5460fc57b6e4 556 (((OUTPUT) == HRTIM_OUTPUT_TD1) || \
mbed_official 381:5460fc57b6e4 557 ((OUTPUT) == HRTIM_OUTPUT_TD2))) \
mbed_official 381:5460fc57b6e4 558 || \
mbed_official 381:5460fc57b6e4 559 (((TIMER) == HRTIM_TIMERINDEX_TIMER_E) && \
mbed_official 381:5460fc57b6e4 560 (((OUTPUT) == HRTIM_OUTPUT_TE1) || \
mbed_official 381:5460fc57b6e4 561 ((OUTPUT) == HRTIM_OUTPUT_TE2))))
mbed_official 381:5460fc57b6e4 562 /**
mbed_official 381:5460fc57b6e4 563 * @}
mbed_official 381:5460fc57b6e4 564 */
mbed_official 381:5460fc57b6e4 565
mbed_official 381:5460fc57b6e4 566 /** @defgroup HRTIM_ADC_Trigger HRTIM ADC Trigger
mbed_official 381:5460fc57b6e4 567 * @{
mbed_official 381:5460fc57b6e4 568 * @brief Constants defining ADC triggers identifiers
mbed_official 381:5460fc57b6e4 569 */
mbed_official 381:5460fc57b6e4 570 #define HRTIM_ADCTRIGGER_1 (uint32_t)0x00000001 /*!< ADC trigger 1 identifier */
mbed_official 381:5460fc57b6e4 571 #define HRTIM_ADCTRIGGER_2 (uint32_t)0x00000002 /*!< ADC trigger 2 identifier */
mbed_official 381:5460fc57b6e4 572 #define HRTIM_ADCTRIGGER_3 (uint32_t)0x00000004 /*!< ADC trigger 3 identifier */
mbed_official 381:5460fc57b6e4 573 #define HRTIM_ADCTRIGGER_4 (uint32_t)0x00000008 /*!< ADC trigger 4 identifier */
mbed_official 381:5460fc57b6e4 574
mbed_official 381:5460fc57b6e4 575 #define IS_HRTIM_ADCTRIGGER(ADCTRIGGER)\
mbed_official 381:5460fc57b6e4 576 (((ADCTRIGGER) == HRTIM_ADCTRIGGER_1) || \
mbed_official 381:5460fc57b6e4 577 ((ADCTRIGGER) == HRTIM_ADCTRIGGER_2) || \
mbed_official 381:5460fc57b6e4 578 ((ADCTRIGGER) == HRTIM_ADCTRIGGER_3) || \
mbed_official 381:5460fc57b6e4 579 ((ADCTRIGGER) == HRTIM_ADCTRIGGER_4))
mbed_official 381:5460fc57b6e4 580 /**
mbed_official 381:5460fc57b6e4 581 * @}
mbed_official 381:5460fc57b6e4 582 */
mbed_official 381:5460fc57b6e4 583
mbed_official 381:5460fc57b6e4 584 /** @defgroup HRTIM_External_Event_Channels HRTIM External Event Channels
mbed_official 381:5460fc57b6e4 585 * @{
mbed_official 381:5460fc57b6e4 586 * @brief Constants defining external event channel identifiers
mbed_official 381:5460fc57b6e4 587 */
mbed_official 381:5460fc57b6e4 588 #define HRTIM_EVENT_NONE ((uint32_t)0x00000000) /*!< Undefined event channel */
mbed_official 381:5460fc57b6e4 589 #define HRTIM_EVENT_1 ((uint32_t)0x00000001) /*!< External event channel 1 identifier */
mbed_official 381:5460fc57b6e4 590 #define HRTIM_EVENT_2 ((uint32_t)0x00000002) /*!< External event channel 2 identifier */
mbed_official 381:5460fc57b6e4 591 #define HRTIM_EVENT_3 ((uint32_t)0x00000004) /*!< External event channel 3 identifier */
mbed_official 381:5460fc57b6e4 592 #define HRTIM_EVENT_4 ((uint32_t)0x00000008) /*!< External event channel 4 identifier */
mbed_official 381:5460fc57b6e4 593 #define HRTIM_EVENT_5 ((uint32_t)0x00000010) /*!< External event channel 5 identifier */
mbed_official 381:5460fc57b6e4 594 #define HRTIM_EVENT_6 ((uint32_t)0x00000020) /*!< External event channel 6 identifier */
mbed_official 381:5460fc57b6e4 595 #define HRTIM_EVENT_7 ((uint32_t)0x00000040) /*!< External event channel 7 identifier */
mbed_official 381:5460fc57b6e4 596 #define HRTIM_EVENT_8 ((uint32_t)0x00000080) /*!< External event channel 8 identifier */
mbed_official 381:5460fc57b6e4 597 #define HRTIM_EVENT_9 ((uint32_t)0x00000100) /*!< External event channel 9 identifier */
mbed_official 381:5460fc57b6e4 598 #define HRTIM_EVENT_10 ((uint32_t)0x00000200) /*!< External event channel 10 identifier */
mbed_official 381:5460fc57b6e4 599
mbed_official 381:5460fc57b6e4 600 #define IS_HRTIM_EVENT(EVENT)\
mbed_official 381:5460fc57b6e4 601 (((EVENT) == HRTIM_EVENT_1) || \
mbed_official 381:5460fc57b6e4 602 ((EVENT) == HRTIM_EVENT_2) || \
mbed_official 381:5460fc57b6e4 603 ((EVENT) == HRTIM_EVENT_3) || \
mbed_official 381:5460fc57b6e4 604 ((EVENT) == HRTIM_EVENT_4) || \
mbed_official 381:5460fc57b6e4 605 ((EVENT) == HRTIM_EVENT_5) || \
mbed_official 381:5460fc57b6e4 606 ((EVENT) == HRTIM_EVENT_6) || \
mbed_official 381:5460fc57b6e4 607 ((EVENT) == HRTIM_EVENT_7) || \
mbed_official 381:5460fc57b6e4 608 ((EVENT) == HRTIM_EVENT_8) || \
mbed_official 381:5460fc57b6e4 609 ((EVENT) == HRTIM_EVENT_9) || \
mbed_official 381:5460fc57b6e4 610 ((EVENT) == HRTIM_EVENT_10))
mbed_official 381:5460fc57b6e4 611 /**
mbed_official 381:5460fc57b6e4 612 * @}
mbed_official 381:5460fc57b6e4 613 */
mbed_official 381:5460fc57b6e4 614
mbed_official 381:5460fc57b6e4 615 /** @defgroup HRTIM_Fault_Channel HRTIM Fault Channel
mbed_official 381:5460fc57b6e4 616 * @{
mbed_official 381:5460fc57b6e4 617 * @brief Constants defining fault channel identifiers
mbed_official 381:5460fc57b6e4 618 */
mbed_official 381:5460fc57b6e4 619 #define HRTIM_FAULT_1 ((uint32_t)0x01) /*!< Fault channel 1 identifier */
mbed_official 381:5460fc57b6e4 620 #define HRTIM_FAULT_2 ((uint32_t)0x02) /*!< Fault channel 2 identifier */
mbed_official 381:5460fc57b6e4 621 #define HRTIM_FAULT_3 ((uint32_t)0x04) /*!< Fault channel 3 identifier */
mbed_official 381:5460fc57b6e4 622 #define HRTIM_FAULT_4 ((uint32_t)0x08) /*!< Fault channel 4 identifier */
mbed_official 381:5460fc57b6e4 623 #define HRTIM_FAULT_5 ((uint32_t)0x10) /*!< Fault channel 5 identifier */
mbed_official 381:5460fc57b6e4 624
mbed_official 381:5460fc57b6e4 625 #define IS_HRTIM_FAULT(FAULT)\
mbed_official 381:5460fc57b6e4 626 (((FAULT) == HRTIM_FAULT_1) || \
mbed_official 381:5460fc57b6e4 627 ((FAULT) == HRTIM_FAULT_2) || \
mbed_official 381:5460fc57b6e4 628 ((FAULT) == HRTIM_FAULT_3) || \
mbed_official 381:5460fc57b6e4 629 ((FAULT) == HRTIM_FAULT_4) || \
mbed_official 381:5460fc57b6e4 630 ((FAULT) == HRTIM_FAULT_5))
mbed_official 381:5460fc57b6e4 631 /**
mbed_official 381:5460fc57b6e4 632 * @}
mbed_official 381:5460fc57b6e4 633 */
mbed_official 381:5460fc57b6e4 634
mbed_official 381:5460fc57b6e4 635
mbed_official 381:5460fc57b6e4 636 /** @defgroup HRTIM_Prescaler_Ratio HRTIM Prescaler Ratio
mbed_official 381:5460fc57b6e4 637 * @{
mbed_official 381:5460fc57b6e4 638 * @brief Constants defining timer high-resolution clock prescaler ratio.
mbed_official 381:5460fc57b6e4 639 */
mbed_official 381:5460fc57b6e4 640 #define HRTIM_PRESCALERRATIO_MUL32 ((uint32_t)0x00000000) /*!< fHRCK: 4.608 GHz - Resolution: 217 ps - Min PWM frequency: 70.3 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 641 #define HRTIM_PRESCALERRATIO_MUL16 ((uint32_t)0x00000001) /*!< fHRCK: 2.304 GHz - Resolution: 434 ps - Min PWM frequency: 35.1 KHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 642 #define HRTIM_PRESCALERRATIO_MUL8 ((uint32_t)0x00000002) /*!< fHRCK: 1.152 GHz - Resolution: 868 ps - Min PWM frequency: 17.6 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 643 #define HRTIM_PRESCALERRATIO_MUL4 ((uint32_t)0x00000003) /*!< fHRCK: 576 MHz - Resolution: 1.73 ns - Min PWM frequency: 8.8 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 644 #define HRTIM_PRESCALERRATIO_MUL2 ((uint32_t)0x00000004) /*!< fHRCK: 288 MHz - Resolution: 3.47 ns - Min PWM frequency: 4.4 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 645 #define HRTIM_PRESCALERRATIO_DIV1 ((uint32_t)0x00000005) /*!< fHRCK: 144 MHz - Resolution: 6.95 ns - Min PWM frequency: 2.2 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 646 #define HRTIM_PRESCALERRATIO_DIV2 ((uint32_t)0x00000006) /*!< fHRCK: 72 MHz - Resolution: 13.88 ns- Min PWM frequency: 1.1 kHz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 647 #define HRTIM_PRESCALERRATIO_DIV4 ((uint32_t)0x00000007) /*!< fHRCK: 36 MHz - Resolution: 27.7 ns- Min PWM frequency: 550Hz (fHRTIM=144MHz) */
mbed_official 381:5460fc57b6e4 648
mbed_official 381:5460fc57b6e4 649 #define IS_HRTIM_PRESCALERRATIO(PRESCALERRATIO)\
mbed_official 381:5460fc57b6e4 650 (((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_MUL32) || \
mbed_official 381:5460fc57b6e4 651 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_MUL16) || \
mbed_official 381:5460fc57b6e4 652 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_MUL8) || \
mbed_official 381:5460fc57b6e4 653 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_MUL4) || \
mbed_official 381:5460fc57b6e4 654 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_MUL2) || \
mbed_official 381:5460fc57b6e4 655 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_DIV1) || \
mbed_official 381:5460fc57b6e4 656 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_DIV2) || \
mbed_official 381:5460fc57b6e4 657 ((PRESCALERRATIO) == HRTIM_PRESCALERRATIO_DIV4))
mbed_official 381:5460fc57b6e4 658 /**
mbed_official 381:5460fc57b6e4 659 * @}
mbed_official 381:5460fc57b6e4 660 */
mbed_official 381:5460fc57b6e4 661
mbed_official 381:5460fc57b6e4 662 /** @defgroup HRTIM_Mode HRTIM Mode
mbed_official 381:5460fc57b6e4 663 * @{
mbed_official 381:5460fc57b6e4 664 * @brief Constants defining timer counter operating mode.
mbed_official 381:5460fc57b6e4 665 */
mbed_official 381:5460fc57b6e4 666 #define HRTIM_MODE_CONTINUOUS ((uint32_t)0x00000008) /*!< The timer operates in continuous (free-running) mode */
mbed_official 381:5460fc57b6e4 667 #define HRTIM_MODE_SINGLESHOT ((uint32_t)0x00000000) /*!< The timer operates in non retriggerable single-shot mode */
mbed_official 381:5460fc57b6e4 668 #define HRTIM_MODE_SINGLESHOT_RETRIGGERABLE ((uint32_t)0x00000010) /*!< The timer operates in retriggerable single-shot mode */
mbed_official 381:5460fc57b6e4 669
mbed_official 381:5460fc57b6e4 670 #define IS_HRTIM_MODE(MODE)\
mbed_official 381:5460fc57b6e4 671 (((MODE) == HRTIM_MODE_CONTINUOUS) || \
mbed_official 381:5460fc57b6e4 672 ((MODE) == HRTIM_MODE_SINGLESHOT) || \
mbed_official 381:5460fc57b6e4 673 ((MODE) == HRTIM_MODE_SINGLESHOT_RETRIGGERABLE))
mbed_official 381:5460fc57b6e4 674
mbed_official 381:5460fc57b6e4 675 #define IS_HRTIM_MODE_ONEPULSE(MODE)\
mbed_official 381:5460fc57b6e4 676 (((MODE) == HRTIM_MODE_SINGLESHOT) || \
mbed_official 381:5460fc57b6e4 677 ((MODE) == HRTIM_MODE_SINGLESHOT_RETRIGGERABLE))
mbed_official 381:5460fc57b6e4 678
mbed_official 381:5460fc57b6e4 679 /**
mbed_official 381:5460fc57b6e4 680 * @}
mbed_official 381:5460fc57b6e4 681 */
mbed_official 381:5460fc57b6e4 682
mbed_official 381:5460fc57b6e4 683 /** @defgroup HRTIM_Half_Mode_Enable HRTIM Half Mode Enable
mbed_official 381:5460fc57b6e4 684 * @{
mbed_official 381:5460fc57b6e4 685 * @brief Constants defining half mode enabling status.
mbed_official 381:5460fc57b6e4 686 */
mbed_official 381:5460fc57b6e4 687 #define HRTIM_HALFMODE_DISABLED ((uint32_t)0x00000000) /*!< Half mode is disabled */
mbed_official 381:5460fc57b6e4 688 #define HRTIM_HALFMODE_ENABLED ((uint32_t)0x00000020) /*!< Half mode is enabled */
mbed_official 381:5460fc57b6e4 689
mbed_official 381:5460fc57b6e4 690 #define IS_HRTIM_HALFMODE(HALFMODE)\
mbed_official 381:5460fc57b6e4 691 (((HALFMODE) == HRTIM_HALFMODE_DISABLED) || \
mbed_official 381:5460fc57b6e4 692 ((HALFMODE) == HRTIM_HALFMODE_ENABLED))
mbed_official 381:5460fc57b6e4 693 /**
mbed_official 381:5460fc57b6e4 694 * @}
mbed_official 381:5460fc57b6e4 695 */
mbed_official 381:5460fc57b6e4 696
mbed_official 381:5460fc57b6e4 697 /** @defgroup HRTIM_Start_On_Sync_Input_Event HRTIM Start On Sync Input Event
mbed_official 381:5460fc57b6e4 698 * @{
mbed_official 381:5460fc57b6e4 699 * @brief Constants defining the timer behavior following the synchronization event
mbed_official 381:5460fc57b6e4 700 */
mbed_official 381:5460fc57b6e4 701 #define HRTIM_SYNCSTART_DISABLED ((uint32_t)0x00000000) /*!< Synchronization input event has effect on the timer */
mbed_official 381:5460fc57b6e4 702 #define HRTIM_SYNCSTART_ENABLED (HRTIM_MCR_SYNCSTRTM) /*!< Synchronization input event starts the timer */
mbed_official 381:5460fc57b6e4 703
mbed_official 381:5460fc57b6e4 704 #define IS_HRTIM_SYNCSTART(SYNCSTART)\
mbed_official 381:5460fc57b6e4 705 (((SYNCSTART) == HRTIM_SYNCSTART_DISABLED) || \
mbed_official 381:5460fc57b6e4 706 ((SYNCSTART) == HRTIM_SYNCSTART_ENABLED))
mbed_official 381:5460fc57b6e4 707 /**
mbed_official 381:5460fc57b6e4 708 * @}
mbed_official 381:5460fc57b6e4 709 */
mbed_official 381:5460fc57b6e4 710
mbed_official 381:5460fc57b6e4 711 /** @defgroup HRTIM_Reset_On_Sync_Input_Event HRTIM Reset On Sync Input Event
mbed_official 381:5460fc57b6e4 712 * @{
mbed_official 381:5460fc57b6e4 713 * @brief Constants defining the timer behavior following the synchronization event
mbed_official 381:5460fc57b6e4 714 */
mbed_official 381:5460fc57b6e4 715 #define HRTIM_SYNCRESET_DISABLED ((uint32_t)0x00000000) /*!< Synchronization input event has effect on the timer */
mbed_official 381:5460fc57b6e4 716 #define HRTIM_SYNCRESET_ENABLED (HRTIM_MCR_SYNCRSTM) /*!< Synchronization input event resets the timer */
mbed_official 381:5460fc57b6e4 717
mbed_official 381:5460fc57b6e4 718 #define IS_HRTIM_SYNCRESET(SYNCRESET)\
mbed_official 381:5460fc57b6e4 719 (((SYNCRESET) == HRTIM_SYNCRESET_DISABLED) || \
mbed_official 381:5460fc57b6e4 720 ((SYNCRESET) == HRTIM_SYNCRESET_ENABLED))
mbed_official 381:5460fc57b6e4 721 /**
mbed_official 381:5460fc57b6e4 722 * @}
mbed_official 381:5460fc57b6e4 723 */
mbed_official 381:5460fc57b6e4 724
mbed_official 381:5460fc57b6e4 725 /** @defgroup HRTIM_DAC_Synchronization HRTIM DAC Synchronization
mbed_official 381:5460fc57b6e4 726 * @{
mbed_official 381:5460fc57b6e4 727 * @brief Constants defining on which output the DAC synchronization event is sent
mbed_official 381:5460fc57b6e4 728 */
mbed_official 381:5460fc57b6e4 729 #define HRTIM_DACSYNC_NONE (uint32_t)0x00000000 /*!< No DAC synchronization event generated */
mbed_official 381:5460fc57b6e4 730 #define HRTIM_DACSYNC_DACTRIGOUT_1 (HRTIM_MCR_DACSYNC_0) /*!< DAC synchronization event generated on DACTrigOut1 output upon timer update */
mbed_official 381:5460fc57b6e4 731 #define HRTIM_DACSYNC_DACTRIGOUT_2 (HRTIM_MCR_DACSYNC_1) /*!< DAC synchronization event generated on DACTrigOut2 output upon timer update */
mbed_official 381:5460fc57b6e4 732 #define HRTIM_DACSYNC_DACTRIGOUT_3 (HRTIM_MCR_DACSYNC_1 | HRTIM_MCR_DACSYNC_0) /*!< DAC update generated on DACTrigOut3 output upon timer update */
mbed_official 381:5460fc57b6e4 733
mbed_official 381:5460fc57b6e4 734 #define IS_HHRTIM_DACSYNC(DACSYNC)\
mbed_official 381:5460fc57b6e4 735 (((DACSYNC) == HRTIM_DACSYNC_NONE) || \
mbed_official 381:5460fc57b6e4 736 ((DACSYNC) == HRTIM_DACSYNC_DACTRIGOUT_1) || \
mbed_official 381:5460fc57b6e4 737 ((DACSYNC) == HRTIM_DACSYNC_DACTRIGOUT_2) || \
mbed_official 381:5460fc57b6e4 738 ((DACSYNC) == HRTIM_DACSYNC_DACTRIGOUT_3))
mbed_official 381:5460fc57b6e4 739 /**
mbed_official 381:5460fc57b6e4 740 * @}
mbed_official 381:5460fc57b6e4 741 */
mbed_official 381:5460fc57b6e4 742
mbed_official 381:5460fc57b6e4 743 /** @defgroup HRTIM_Register_Preload_Enable HRTIM Register Preload Enable
mbed_official 381:5460fc57b6e4 744 * @{
mbed_official 381:5460fc57b6e4 745 * @brief Constants defining whether a write access into a preloadable
mbed_official 381:5460fc57b6e4 746 * register is done into the active or the preload register.
mbed_official 381:5460fc57b6e4 747 */
mbed_official 381:5460fc57b6e4 748 #define HRTIM_PRELOAD_DISABLED ((uint32_t)0x00000000) /*!< Preload disabled: the write access is directly done into the active register */
mbed_official 381:5460fc57b6e4 749 #define HRTIM_PRELOAD_ENABLED (HRTIM_MCR_PREEN) /*!< Preload enabled: the write access is done into the preload register */
mbed_official 381:5460fc57b6e4 750
mbed_official 381:5460fc57b6e4 751 #define IS_HRTIM_PRELOAD(PRELOAD)\
mbed_official 381:5460fc57b6e4 752 (((PRELOAD) == HRTIM_PRELOAD_DISABLED) || \
mbed_official 381:5460fc57b6e4 753 ((PRELOAD) == HRTIM_PRELOAD_ENABLED))
mbed_official 381:5460fc57b6e4 754 /**
mbed_official 381:5460fc57b6e4 755 * @}
mbed_official 381:5460fc57b6e4 756 */
mbed_official 381:5460fc57b6e4 757
mbed_official 381:5460fc57b6e4 758 /** @defgroup HRTIM_Update_Gating HRTIM Update Gating
mbed_official 381:5460fc57b6e4 759 * @{
mbed_official 381:5460fc57b6e4 760 * @brief Constants defining how the update occurs relatively to the burst DMA
mbed_official 381:5460fc57b6e4 761 * transaction and the external update request on update enable inputs 1 to 3.
mbed_official 381:5460fc57b6e4 762 */
mbed_official 381:5460fc57b6e4 763 #define HRTIM_UPDATEGATING_INDEPENDENT (uint32_t)0x00000000 /*!< Update done independently from the DMA burst transfer completion */
mbed_official 381:5460fc57b6e4 764 #define HRTIM_UPDATEGATING_DMABURST (HRTIM_TIMCR_UPDGAT_0) /*!< Update done when the DMA burst transfer is completed */
mbed_official 381:5460fc57b6e4 765 #define HRTIM_UPDATEGATING_DMABURST_UPDATE (HRTIM_TIMCR_UPDGAT_1) /*!< Update done on timer roll-over following a DMA burst transfer completion*/
mbed_official 381:5460fc57b6e4 766 #define HRTIM_UPDATEGATING_UPDEN1 (HRTIM_TIMCR_UPDGAT_1 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 1 */
mbed_official 381:5460fc57b6e4 767 #define HRTIM_UPDATEGATING_UPDEN2 (HRTIM_TIMCR_UPDGAT_2) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 2 */
mbed_official 381:5460fc57b6e4 768 #define HRTIM_UPDATEGATING_UPDEN3 (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 3 */
mbed_official 381:5460fc57b6e4 769 #define HRTIM_UPDATEGATING_UPDEN1_UPDATE (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_1) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 1 */
mbed_official 381:5460fc57b6e4 770 #define HRTIM_UPDATEGATING_UPDEN2_UPDATE (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_1 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 2 */
mbed_official 381:5460fc57b6e4 771 #define HRTIM_UPDATEGATING_UPDEN3_UPDATE (HRTIM_TIMCR_UPDGAT_3) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 3 */
mbed_official 381:5460fc57b6e4 772
mbed_official 381:5460fc57b6e4 773 #define IS_HRTIM_UPDATEGATING_MASTER(UPDATEGATING)\
mbed_official 381:5460fc57b6e4 774 (((UPDATEGATING) == HRTIM_UPDATEGATING_INDEPENDENT) || \
mbed_official 381:5460fc57b6e4 775 ((UPDATEGATING) == HRTIM_UPDATEGATING_DMABURST) || \
mbed_official 381:5460fc57b6e4 776 ((UPDATEGATING) == HRTIM_UPDATEGATING_DMABURST_UPDATE))
mbed_official 381:5460fc57b6e4 777
mbed_official 381:5460fc57b6e4 778 #define IS_HRTIM_UPDATEGATING_TIM(UPDATEGATING)\
mbed_official 381:5460fc57b6e4 779 (((UPDATEGATING) == HRTIM_UPDATEGATING_INDEPENDENT) || \
mbed_official 381:5460fc57b6e4 780 ((UPDATEGATING) == HRTIM_UPDATEGATING_DMABURST) || \
mbed_official 381:5460fc57b6e4 781 ((UPDATEGATING) == HRTIM_UPDATEGATING_DMABURST_UPDATE) || \
mbed_official 381:5460fc57b6e4 782 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN1) || \
mbed_official 381:5460fc57b6e4 783 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN2) || \
mbed_official 381:5460fc57b6e4 784 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN3) || \
mbed_official 381:5460fc57b6e4 785 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN1_UPDATE) || \
mbed_official 381:5460fc57b6e4 786 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN2_UPDATE) || \
mbed_official 381:5460fc57b6e4 787 ((UPDATEGATING) == HRTIM_UPDATEGATING_UPDEN3_UPDATE))
mbed_official 381:5460fc57b6e4 788 /**
mbed_official 381:5460fc57b6e4 789 * @}
mbed_official 381:5460fc57b6e4 790 */
mbed_official 381:5460fc57b6e4 791
mbed_official 381:5460fc57b6e4 792 /** @defgroup HRTIM_Timer_Burst_Mode HRTIM Timer Burst Mode
mbed_official 381:5460fc57b6e4 793 * @{
mbed_official 381:5460fc57b6e4 794 * @brief Constants defining how the timer behaves during a burst
mbed_official 381:5460fc57b6e4 795 mode operation.
mbed_official 381:5460fc57b6e4 796 */
mbed_official 381:5460fc57b6e4 797 #define HRTIM_TIMERBURSTMODE_MAINTAINCLOCK (uint32_t)0x000000 /*!< Timer counter clock is maintained and the timer operates normally */
mbed_official 381:5460fc57b6e4 798 #define HRTIM_TIMERBURSTMODE_RESETCOUNTER (HRTIM_BMCR_MTBM) /*!< Timer counter clock is stopped and the counter is reset */
mbed_official 381:5460fc57b6e4 799
mbed_official 381:5460fc57b6e4 800 #define IS_HRTIM_TIMERBURSTMODE(TIMERBURSTMODE) \
mbed_official 381:5460fc57b6e4 801 (((TIMERBURSTMODE) == HRTIM_TIMERBURSTMODE_MAINTAINCLOCK) || \
mbed_official 381:5460fc57b6e4 802 ((TIMERBURSTMODE) == HRTIM_TIMERBURSTMODE_RESETCOUNTER))
mbed_official 381:5460fc57b6e4 803 /**
mbed_official 381:5460fc57b6e4 804 * @}
mbed_official 381:5460fc57b6e4 805 */
mbed_official 381:5460fc57b6e4 806
mbed_official 381:5460fc57b6e4 807 /** @defgroup HRTIM_Timer_Repetition_Update HRTIM Timer Repetition Update
mbed_official 381:5460fc57b6e4 808 * @{
mbed_official 381:5460fc57b6e4 809 * @brief Constants defining whether registers are updated when the timer
mbed_official 381:5460fc57b6e4 810 * repetition period is completed (either due to roll-over or
mbed_official 381:5460fc57b6e4 811 * reset events)
mbed_official 381:5460fc57b6e4 812 */
mbed_official 381:5460fc57b6e4 813 #define HRTIM_UPDATEONREPETITION_DISABLED (uint32_t)0x00000000 /*!< Update on repetition disabled */
mbed_official 381:5460fc57b6e4 814 #define HRTIM_UPDATEONREPETITION_ENABLED (HRTIM_MCR_MREPU) /*!< Update on repetition enabled */
mbed_official 381:5460fc57b6e4 815
mbed_official 381:5460fc57b6e4 816 #define IS_HRTIM_UPDATEONREPETITION(UPDATEONREPETITION) \
mbed_official 381:5460fc57b6e4 817 (((UPDATEONREPETITION) == HRTIM_UPDATEONREPETITION_DISABLED) || \
mbed_official 381:5460fc57b6e4 818 ((UPDATEONREPETITION) == HRTIM_UPDATEONREPETITION_ENABLED))
mbed_official 381:5460fc57b6e4 819 /**
mbed_official 381:5460fc57b6e4 820 * @}
mbed_official 381:5460fc57b6e4 821 */
mbed_official 381:5460fc57b6e4 822
mbed_official 381:5460fc57b6e4 823
mbed_official 381:5460fc57b6e4 824 /** @defgroup HRTIM_Timer_Push_Pull_Mode HRTIM Timer Push Pull Mode
mbed_official 381:5460fc57b6e4 825 * @{
mbed_official 381:5460fc57b6e4 826 * @brief Constants defining whether or not the puhs-pull mode is enabled for
mbed_official 381:5460fc57b6e4 827 * a timer.
mbed_official 381:5460fc57b6e4 828 */
mbed_official 381:5460fc57b6e4 829 #define HRTIM_TIMPUSHPULLMODE_DISABLED ((uint32_t)0x00000000) /*!< Push-Pull mode disabled */
mbed_official 381:5460fc57b6e4 830 #define HRTIM_TIMPUSHPULLMODE_ENABLED ((uint32_t)HRTIM_TIMCR_PSHPLL) /*!< Push-Pull mode enabled */
mbed_official 381:5460fc57b6e4 831
mbed_official 381:5460fc57b6e4 832 #define IS_HRTIM_TIMPUSHPULLMODE(TIMPUSHPULLMODE)\
mbed_official 381:5460fc57b6e4 833 (((TIMPUSHPULLMODE) == HRTIM_TIMPUSHPULLMODE_DISABLED) || \
mbed_official 381:5460fc57b6e4 834 ((TIMPUSHPULLMODE) == HRTIM_TIMPUSHPULLMODE_ENABLED))
mbed_official 381:5460fc57b6e4 835 /**
mbed_official 381:5460fc57b6e4 836 * @}
mbed_official 381:5460fc57b6e4 837 */
mbed_official 381:5460fc57b6e4 838
mbed_official 381:5460fc57b6e4 839 /** @defgroup HRTIM_Timer_Fault_Enabling HRTIM Timer Fault Enabling
mbed_official 381:5460fc57b6e4 840 * @{
mbed_official 381:5460fc57b6e4 841 * @brief Constants defining whether a faut channel is enabled for a timer
mbed_official 381:5460fc57b6e4 842 */
mbed_official 381:5460fc57b6e4 843 #define HRTIM_TIMFAULTENABLE_NONE (uint32_t)0x00000000 /*!< No fault enabled */
mbed_official 381:5460fc57b6e4 844 #define HRTIM_TIMFAULTENABLE_FAULT1 (HRTIM_FLTR_FLT1EN) /*!< Fault 1 enabled */
mbed_official 381:5460fc57b6e4 845 #define HRTIM_TIMFAULTENABLE_FAULT2 (HRTIM_FLTR_FLT2EN) /*!< Fault 2 enabled */
mbed_official 381:5460fc57b6e4 846 #define HRTIM_TIMFAULTENABLE_FAULT3 (HRTIM_FLTR_FLT3EN) /*!< Fault 3 enabled */
mbed_official 381:5460fc57b6e4 847 #define HRTIM_TIMFAULTENABLE_FAULT4 (HRTIM_FLTR_FLT4EN) /*!< Fault 4 enabled */
mbed_official 381:5460fc57b6e4 848 #define HRTIM_TIMFAULTENABLE_FAULT5 (HRTIM_FLTR_FLT5EN) /*!< Fault 5 enabled */
mbed_official 381:5460fc57b6e4 849
mbed_official 381:5460fc57b6e4 850 #define IS_HRTIM_TIMFAULTENABLE(TIMFAULTENABLE) (((TIMFAULTENABLE) & 0xFFFFFFE0) == 0x00000000)
mbed_official 381:5460fc57b6e4 851
mbed_official 381:5460fc57b6e4 852 /**
mbed_official 381:5460fc57b6e4 853 * @}
mbed_official 381:5460fc57b6e4 854 */
mbed_official 381:5460fc57b6e4 855
mbed_official 381:5460fc57b6e4 856 /** @defgroup HRTIM_Timer_Fault_Lock HRTIM Timer Fault Lock
mbed_official 381:5460fc57b6e4 857 * @{
mbed_official 381:5460fc57b6e4 858 * @brief Constants defining whether or not fault enabling bits are write
mbed_official 381:5460fc57b6e4 859 * protected for a timer
mbed_official 381:5460fc57b6e4 860 */
mbed_official 381:5460fc57b6e4 861 #define HRTIM_TIMFAULTLOCK_READWRITE ((uint32_t)0x00000000) /*!< Timer fault enabling bits are read/write */
mbed_official 381:5460fc57b6e4 862 #define HRTIM_TIMFAULTLOCK_READONLY (HRTIM_FLTR_FLTLCK) /*!< Timer fault enabling bits are read only */
mbed_official 381:5460fc57b6e4 863
mbed_official 381:5460fc57b6e4 864 #define IS_HRTIM_TIMFAULTLOCK(TIMFAULTLOCK)\
mbed_official 381:5460fc57b6e4 865 (((TIMFAULTLOCK) == HRTIM_TIMFAULTLOCK_READWRITE) || \
mbed_official 381:5460fc57b6e4 866 ((TIMFAULTLOCK) == HRTIM_TIMFAULTLOCK_READONLY))
mbed_official 381:5460fc57b6e4 867 /**
mbed_official 381:5460fc57b6e4 868 * @}
mbed_official 381:5460fc57b6e4 869 */
mbed_official 381:5460fc57b6e4 870
mbed_official 381:5460fc57b6e4 871 /** @defgroup HRTIM_Timer_Deadtime_Insertion HRTIM Timer Deadtime Insertion
mbed_official 381:5460fc57b6e4 872 * @{
mbed_official 381:5460fc57b6e4 873 * @brief Constants defining whether or not fault the dead time insertion
mbed_official 381:5460fc57b6e4 874 * feature is enabled for a timer
mbed_official 381:5460fc57b6e4 875 */
mbed_official 381:5460fc57b6e4 876 #define HRTIM_TIMDEADTIMEINSERTION_DISABLED ((uint32_t)0x00000000) /*!< Output 1 and output 2 signals are independent */
mbed_official 381:5460fc57b6e4 877 #define HRTIM_TIMDEADTIMEINSERTION_ENABLED HRTIM_OUTR_DTEN /*!< Deadtime is inserted between output 1 and output 2 */
mbed_official 381:5460fc57b6e4 878
mbed_official 381:5460fc57b6e4 879 #define IS_HRTIM_TIMDEADTIMEINSERTION(TIMPUSHPULLMODE, TIMDEADTIMEINSERTION)\
mbed_official 381:5460fc57b6e4 880 ((((TIMPUSHPULLMODE) == HRTIM_TIMPUSHPULLMODE_DISABLED) && \
mbed_official 381:5460fc57b6e4 881 ((((TIMDEADTIMEINSERTION) == HRTIM_TIMDEADTIMEINSERTION_DISABLED) || \
mbed_official 381:5460fc57b6e4 882 ((TIMDEADTIMEINSERTION) == HRTIM_TIMDEADTIMEINSERTION_ENABLED)))) \
mbed_official 381:5460fc57b6e4 883 || \
mbed_official 381:5460fc57b6e4 884 (((TIMPUSHPULLMODE) == HRTIM_TIMPUSHPULLMODE_ENABLED) && \
mbed_official 381:5460fc57b6e4 885 ((TIMDEADTIMEINSERTION) == HRTIM_TIMDEADTIMEINSERTION_DISABLED)))
mbed_official 381:5460fc57b6e4 886 /**
mbed_official 381:5460fc57b6e4 887 * @}
mbed_official 381:5460fc57b6e4 888 */
mbed_official 381:5460fc57b6e4 889
mbed_official 381:5460fc57b6e4 890 /** @defgroup HRTIM_Timer_Delayed_Protection_Mode HRTIM Timer Delayed Protection Mode
mbed_official 381:5460fc57b6e4 891 * @{
mbed_official 381:5460fc57b6e4 892 * @brief Constants defining all possible delayed protection modes
mbed_official 381:5460fc57b6e4 893 * for a timer. Also definethe source and outputs on which the delayed
mbed_official 381:5460fc57b6e4 894 * protection schemes are applied
mbed_official 381:5460fc57b6e4 895 */
mbed_official 381:5460fc57b6e4 896 #define HRTIM_TIMDELAYEDPROTECTION_DISABLED ((uint32_t)0x00000000) /*!< No action */
mbed_official 381:5460fc57b6e4 897 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_EEV68 (HRTIM_OUTR_DLYPRTEN) /*!< Output 1 delayed Idle on external Event 6 or 8 */
mbed_official 381:5460fc57b6e4 898 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_EEV68 (HRTIM_OUTR_DLYPRT_0 | HRTIM_OUTR_DLYPRTEN) /*!< Output 2 delayed Idle on external Event 6 or 8 */
mbed_official 381:5460fc57b6e4 899 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV68 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRTEN) /*!< Output 1 and output 2 delayed Idle on external Event 6 or 8 */
mbed_official 381:5460fc57b6e4 900 #define HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV68 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0 | HRTIM_OUTR_DLYPRTEN) /*!< Balanced Idle on external Event 6 or 8 */
mbed_official 381:5460fc57b6e4 901 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_DEEV79 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRTEN) /*!< Output 1 delayed Idle on external Event 7 or 9 */
mbed_official 381:5460fc57b6e4 902 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_DEEV79 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_0 | HRTIM_OUTR_DLYPRTEN) /*!< Output 2 delayed Idle on external Event 7 or 9 */
mbed_official 381:5460fc57b6e4 903 #define HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV79 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRTEN) /*!< Output 1 and output2 delayed Idle on external Event 7 or 9 */
mbed_official 381:5460fc57b6e4 904 #define HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV79 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0 | HRTIM_OUTR_DLYPRTEN) /*!< Balanced Idle on external Event 7 or 9 */
mbed_official 381:5460fc57b6e4 905
mbed_official 381:5460fc57b6e4 906 #define IS_HRTIM_TIMDELAYEDPROTECTION(TIMPUSHPULLMODE, TIMDELAYEDPROTECTION)\
mbed_official 381:5460fc57b6e4 907 ((((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DISABLED) || \
mbed_official 381:5460fc57b6e4 908 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_EEV68) || \
mbed_official 381:5460fc57b6e4 909 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_EEV68) || \
mbed_official 381:5460fc57b6e4 910 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV68) || \
mbed_official 381:5460fc57b6e4 911 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_DEEV79) || \
mbed_official 381:5460fc57b6e4 912 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_DEEV79) || \
mbed_official 381:5460fc57b6e4 913 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV79)) \
mbed_official 381:5460fc57b6e4 914 || \
mbed_official 381:5460fc57b6e4 915 (((TIMPUSHPULLMODE) == HRTIM_TIMPUSHPULLMODE_ENABLED) && \
mbed_official 381:5460fc57b6e4 916 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV68) || \
mbed_official 381:5460fc57b6e4 917 ((TIMDELAYEDPROTECTION) == HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV79)))
mbed_official 381:5460fc57b6e4 918 /**
mbed_official 381:5460fc57b6e4 919 * @}
mbed_official 381:5460fc57b6e4 920 */
mbed_official 381:5460fc57b6e4 921
mbed_official 381:5460fc57b6e4 922 /** @defgroup HRTIM_Timer_Update_Trigger HRTIM Timer Update Trigger
mbed_official 381:5460fc57b6e4 923 * @{
mbed_official 381:5460fc57b6e4 924 * @brief Constants defining whether the registers update is done synchronously
mbed_official 381:5460fc57b6e4 925 * with any other timer or master update
mbed_official 381:5460fc57b6e4 926 */
mbed_official 381:5460fc57b6e4 927 #define HRTIM_TIMUPDATETRIGGER_NONE (uint32_t)0x00000000 /*!< Register update is disabled */
mbed_official 381:5460fc57b6e4 928 #define HRTIM_TIMUPDATETRIGGER_MASTER (HRTIM_TIMCR_MSTU) /*!< Register update is triggered by the master timer update */
mbed_official 381:5460fc57b6e4 929 #define HRTIM_TIMUPDATETRIGGER_TIMER_A (HRTIM_TIMCR_TAU) /*!< Register update is triggered by the timer A update */
mbed_official 381:5460fc57b6e4 930 #define HRTIM_TIMUPDATETRIGGER_TIMER_B (HRTIM_TIMCR_TBU) /*!< Register update is triggered by the timer B update */
mbed_official 381:5460fc57b6e4 931 #define HRTIM_TIMUPDATETRIGGER_TIMER_C (HRTIM_TIMCR_TCU) /*!< Register update is triggered by the timer C update*/
mbed_official 381:5460fc57b6e4 932 #define HRTIM_TIMUPDATETRIGGER_TIMER_D (HRTIM_TIMCR_TDU) /*!< Register update is triggered by the timer D update */
mbed_official 381:5460fc57b6e4 933 #define HRTIM_TIMUPDATETRIGGER_TIMER_E (HRTIM_TIMCR_TEU) /*!< Register update is triggered by the timer E update */
mbed_official 381:5460fc57b6e4 934
mbed_official 381:5460fc57b6e4 935 #define IS_HRTIM_TIMUPDATETRIGGER(TIMUPDATETRIGGER) (((TIMUPDATETRIGGER) & 0xFE07FFFF) == 0x00000000)
mbed_official 381:5460fc57b6e4 936 /**
mbed_official 381:5460fc57b6e4 937 * @}
mbed_official 381:5460fc57b6e4 938 */
mbed_official 381:5460fc57b6e4 939
mbed_official 381:5460fc57b6e4 940 /** @defgroup HRTIM_Timer_Reset_Trigger HRTIM Timer Reset Trigger
mbed_official 381:5460fc57b6e4 941 * @{
mbed_official 381:5460fc57b6e4 942 * @brief Constants defining the events that can be selected to trigger the reset
mbed_official 381:5460fc57b6e4 943 * of the timer counter
mbed_official 381:5460fc57b6e4 944 */
mbed_official 381:5460fc57b6e4 945 #define HRTIM_TIMRESETTRIGGER_NONE (uint32_t)0x00000000 /*!< No counter reset trigger */
mbed_official 381:5460fc57b6e4 946 #define HRTIM_TIMRESETTRIGGER_UPDATE (HRTIM_RSTR_UPDATE) /*!< The timer counter is reset upon update event */
mbed_official 381:5460fc57b6e4 947 #define HRTIM_TIMRESETTRIGGER_CMP2 (HRTIM_RSTR_CMP2) /*!< The timer counter is reset upon Timer Compare 2 event */
mbed_official 381:5460fc57b6e4 948 #define HRTIM_TIMRESETTRIGGER_CMP4 (HRTIM_RSTR_CMP4) /*!< The timer counter is reset upon Timer Compare 4 event */
mbed_official 381:5460fc57b6e4 949 #define HRTIM_TIMRESETTRIGGER_MASTER_PER (HRTIM_RSTR_MSTPER) /*!< The timercounter is reset upon master timer period event */
mbed_official 381:5460fc57b6e4 950 #define HRTIM_TIMRESETTRIGGER_MASTER_CMP1 (HRTIM_RSTR_MSTCMP1) /*!< The timer counter is reset upon master timer Compare 1 event */
mbed_official 381:5460fc57b6e4 951 #define HRTIM_TIMRESETTRIGGER_MASTER_CMP2 (HRTIM_RSTR_MSTCMP2) /*!< The timer counter is reset upon master timer Compare 2 event */
mbed_official 381:5460fc57b6e4 952 #define HRTIM_TIMRESETTRIGGER_MASTER_CMP3 (HRTIM_RSTR_MSTCMP3) /*!< The timer counter is reset upon master timer Compare 3 event */
mbed_official 381:5460fc57b6e4 953 #define HRTIM_TIMRESETTRIGGER_MASTER_CMP4 (HRTIM_RSTR_MSTCMP4) /*!< The timer counter is reset upon master timer Compare 4 event */
mbed_official 381:5460fc57b6e4 954 #define HRTIM_TIMRESETTRIGGER_EEV_1 (HRTIM_RSTR_EXTEVNT1) /*!< The timer counter is reset upon external event 1 */
mbed_official 381:5460fc57b6e4 955 #define HRTIM_TIMRESETTRIGGER_EEV_2 (HRTIM_RSTR_EXTEVNT2) /*!< The timer counter is reset upon external event 2 */
mbed_official 381:5460fc57b6e4 956 #define HRTIM_TIMRESETTRIGGER_EEV_3 (HRTIM_RSTR_EXTEVNT3) /*!< The timer counter is reset upon external event 3 */
mbed_official 381:5460fc57b6e4 957 #define HRTIM_TIMRESETTRIGGER_EEV_4 (HRTIM_RSTR_EXTEVNT4) /*!< The timer counter is reset upon external event 4 */
mbed_official 381:5460fc57b6e4 958 #define HRTIM_TIMRESETTRIGGER_EEV_5 (HRTIM_RSTR_EXTEVNT5) /*!< The timer counter is reset upon external event 5 */
mbed_official 381:5460fc57b6e4 959 #define HRTIM_TIMRESETTRIGGER_EEV_6 (HRTIM_RSTR_EXTEVNT6) /*!< The timer counter is reset upon external event 6 */
mbed_official 381:5460fc57b6e4 960 #define HRTIM_TIMRESETTRIGGER_EEV_7 (HRTIM_RSTR_EXTEVNT7) /*!< The timer counter is reset upon external event 7 */
mbed_official 381:5460fc57b6e4 961 #define HRTIM_TIMRESETTRIGGER_EEV_8 (HRTIM_RSTR_EXTEVNT8) /*!< The timer counter is reset upon external event 8 */
mbed_official 381:5460fc57b6e4 962 #define HRTIM_TIMRESETTRIGGER_EEV_9 (HRTIM_RSTR_EXTEVNT9) /*!< The timer counter is reset upon external event 9 */
mbed_official 381:5460fc57b6e4 963 #define HRTIM_TIMRESETTRIGGER_EEV_10 (HRTIM_RSTR_EXTEVNT10) /*!< The timer counter is reset upon external event 10 */
mbed_official 381:5460fc57b6e4 964 #define HRTIM_TIMRESETTRIGGER_OTHER1_CMP1 (HRTIM_RSTR_TIMBCMP1) /*!< The timer counter is reset upon other timer Compare 1 event */
mbed_official 381:5460fc57b6e4 965 #define HRTIM_TIMRESETTRIGGER_OTHER1_CMP2 (HRTIM_RSTR_TIMBCMP2) /*!< The timer counter is reset upon other timer Compare 2 event */
mbed_official 381:5460fc57b6e4 966 #define HRTIM_TIMRESETTRIGGER_OTHER1_CMP4 (HRTIM_RSTR_TIMBCMP4) /*!< The timer counter is reset upon other timer Compare 4 event */
mbed_official 381:5460fc57b6e4 967 #define HRTIM_TIMRESETTRIGGER_OTHER2_CMP1 (HRTIM_RSTR_TIMCCMP1) /*!< The timer counter is reset upon other timer Compare 1 event */
mbed_official 381:5460fc57b6e4 968 #define HRTIM_TIMRESETTRIGGER_OTHER2_CMP2 (HRTIM_RSTR_TIMCCMP2) /*!< The timer counter is reset upon other timer Compare 2 event */
mbed_official 381:5460fc57b6e4 969 #define HRTIM_TIMRESETTRIGGER_OTHER2_CMP4 (HRTIM_RSTR_TIMCCMP4) /*!< The timer counter is reset upon other timer Compare 4 event */
mbed_official 381:5460fc57b6e4 970 #define HRTIM_TIMRESETTRIGGER_OTHER3_CMP1 (HRTIM_RSTR_TIMDCMP1) /*!< The timer counter is reset upon other timer Compare 1 event */
mbed_official 381:5460fc57b6e4 971 #define HRTIM_TIMRESETTRIGGER_OTHER3_CMP2 (HRTIM_RSTR_TIMDCMP2) /*!< The timer counter is reset upon other timer Compare 2 event */
mbed_official 381:5460fc57b6e4 972 #define HRTIM_TIMRESETTRIGGER_OTHER3_CMP4 (HRTIM_RSTR_TIMDCMP4) /*!< The timer counter is reset upon other timer Compare 4 event */
mbed_official 381:5460fc57b6e4 973 #define HRTIM_TIMRESETTRIGGER_OTHER4_CMP1 (HRTIM_RSTR_TIMECMP1) /*!< The timer counter is reset upon other timer Compare 1 event */
mbed_official 381:5460fc57b6e4 974 #define HRTIM_TIMRESETTRIGGER_OTHER4_CMP2 (HRTIM_RSTR_TIMECMP2) /*!< The timer counter is reset upon other timer Compare 2 event */
mbed_official 381:5460fc57b6e4 975 #define HRTIM_TIMRESETTRIGGER_OTHER4_CMP4 (HRTIM_RSTR_TIMECMP4) /*!< The timer counter is reset upon other timer Compare 4 event */
mbed_official 381:5460fc57b6e4 976
mbed_official 381:5460fc57b6e4 977 #define IS_HRTIM_TIMRESETTRIGGER(TIMRESETTRIGGER) (((TIMRESETTRIGGER) & 0x800000001) == 0x00000000)
mbed_official 381:5460fc57b6e4 978
mbed_official 381:5460fc57b6e4 979 /**
mbed_official 381:5460fc57b6e4 980 * @}
mbed_official 381:5460fc57b6e4 981 */
mbed_official 381:5460fc57b6e4 982
mbed_official 381:5460fc57b6e4 983 /** @defgroup HRTIM_Timer_Reset_Update HRTIM Timer Reset Update
mbed_official 381:5460fc57b6e4 984 * @{
mbed_official 381:5460fc57b6e4 985 * @brief Constants defining whether the register are updated upon Timerx
mbed_official 381:5460fc57b6e4 986 * counter reset or roll-over to 0 after reaching the period value
mbed_official 381:5460fc57b6e4 987 * in continuous mode
mbed_official 381:5460fc57b6e4 988 */
mbed_official 381:5460fc57b6e4 989 #define HRTIM_TIMUPDATEONRESET_DISABLED (uint32_t)0x00000000 /*!< Update by timer x reset / roll-over disabled */
mbed_official 381:5460fc57b6e4 990 #define HRTIM_TIMUPDATEONRESET_ENABLED (HRTIM_TIMCR_TRSTU) /*!< Update by timer x reset / roll-over enabled */
mbed_official 381:5460fc57b6e4 991
mbed_official 381:5460fc57b6e4 992 #define IS_HRTIM_TIMUPDATEONRESET(TIMUPDATEONRESET) \
mbed_official 381:5460fc57b6e4 993 (((TIMUPDATEONRESET) == HRTIM_TIMUPDATEONRESET_DISABLED) || \
mbed_official 381:5460fc57b6e4 994 ((TIMUPDATEONRESET) == HRTIM_TIMUPDATEONRESET_ENABLED))
mbed_official 381:5460fc57b6e4 995 /**
mbed_official 381:5460fc57b6e4 996 * @}
mbed_official 381:5460fc57b6e4 997 */
mbed_official 381:5460fc57b6e4 998
mbed_official 381:5460fc57b6e4 999 /** @defgroup HRTIM_Compare_Unit_Auto_Delayed_Mode HRTIM Compare Unit Auto Delayed Mode
mbed_official 381:5460fc57b6e4 1000 * @{
mbed_official 381:5460fc57b6e4 1001 * @brief Constants defining whether the compare register is behaving in
mbed_official 381:5460fc57b6e4 1002 * regular mode (compare match issued as soon as counter equal compare),
mbed_official 381:5460fc57b6e4 1003 * or in auto-delayed mode
mbed_official 381:5460fc57b6e4 1004 */
mbed_official 381:5460fc57b6e4 1005 #define HRTIM_AUTODELAYEDMODE_REGULAR ((uint32_t)0x00000000) /*!< standard compare mode */
mbed_official 381:5460fc57b6e4 1006 #define HRTIM_AUTODELAYEDMODE_AUTODELAYED_NOTIMEOUT (HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated only if a capture has occured */
mbed_official 381:5460fc57b6e4 1007 #define HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP1 (HRTIM_TIMCR_DELCMP2_1) /*!< Compare event generated if a capture has occured or after a Compare 1 match (timeout if capture event is missing) */
mbed_official 381:5460fc57b6e4 1008 #define HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP3 (HRTIM_TIMCR_DELCMP2_1 | HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated if a capture has occured or after a Compare 3 match (timeout if capture event is missing) */
mbed_official 381:5460fc57b6e4 1009
mbed_official 381:5460fc57b6e4 1010 #define IS_HRTIM_AUTODELAYEDMODE(AUTODELAYEDMODE)\
mbed_official 381:5460fc57b6e4 1011 (((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_REGULAR) || \
mbed_official 381:5460fc57b6e4 1012 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_NOTIMEOUT) || \
mbed_official 381:5460fc57b6e4 1013 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP1) || \
mbed_official 381:5460fc57b6e4 1014 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP3))
mbed_official 381:5460fc57b6e4 1015
mbed_official 381:5460fc57b6e4 1016 /* Auto delayed mode is only available for compare units 2 and 4 */
mbed_official 381:5460fc57b6e4 1017 #define IS_HRTIM_COMPAREUNIT_AUTODELAYEDMODE(COMPAREUNIT, AUTODELAYEDMODE) \
mbed_official 381:5460fc57b6e4 1018 ((((COMPAREUNIT) == HRTIM_COMPAREUNIT_2) && \
mbed_official 381:5460fc57b6e4 1019 (((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_REGULAR) || \
mbed_official 381:5460fc57b6e4 1020 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_NOTIMEOUT) || \
mbed_official 381:5460fc57b6e4 1021 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP1) || \
mbed_official 381:5460fc57b6e4 1022 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP3))) \
mbed_official 381:5460fc57b6e4 1023 || \
mbed_official 381:5460fc57b6e4 1024 (((COMPAREUNIT) == HRTIM_COMPAREUNIT_4) && \
mbed_official 381:5460fc57b6e4 1025 (((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_REGULAR) || \
mbed_official 381:5460fc57b6e4 1026 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_NOTIMEOUT) || \
mbed_official 381:5460fc57b6e4 1027 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP1) || \
mbed_official 381:5460fc57b6e4 1028 ((AUTODELAYEDMODE) == HRTIM_AUTODELAYEDMODE_AUTODELAYED_TIMEOUTCMP3))))
mbed_official 381:5460fc57b6e4 1029 /**
mbed_official 381:5460fc57b6e4 1030 * @}
mbed_official 381:5460fc57b6e4 1031 */
mbed_official 381:5460fc57b6e4 1032
mbed_official 381:5460fc57b6e4 1033 /** @defgroup HRTIM_Simple_OC_Mode HRTIM Simple OC Mode
mbed_official 381:5460fc57b6e4 1034 * @{
mbed_official 381:5460fc57b6e4 1035 * @brief Constants defining the behavior of the output signal when the timer
mbed_official 381:5460fc57b6e4 1036 operates in basic output compare mode
mbed_official 381:5460fc57b6e4 1037 */
mbed_official 381:5460fc57b6e4 1038 #define HRTIM_BASICOCMODE_TOGGLE ((uint32_t)0x00000001) /*!< Ouput toggles when the timer counter reaches the compare value */
mbed_official 381:5460fc57b6e4 1039 #define HRTIM_BASICOCMODE_INACTIVE ((uint32_t)0x00000002) /*!< Ouput forced to active level when the timer counter reaches the compare value */
mbed_official 381:5460fc57b6e4 1040 #define HRTIM_BASICOCMODE_ACTIVE ((uint32_t)0x00000003) /*!< Ouput forced to inactive level when the timer counter reaches the compare value */
mbed_official 381:5460fc57b6e4 1041
mbed_official 381:5460fc57b6e4 1042 #define IS_HRTIM_BASICOCMODE(BASICOCMODE)\
mbed_official 381:5460fc57b6e4 1043 (((BASICOCMODE) == HRTIM_BASICOCMODE_TOGGLE) || \
mbed_official 381:5460fc57b6e4 1044 ((BASICOCMODE) == HRTIM_BASICOCMODE_INACTIVE) || \
mbed_official 381:5460fc57b6e4 1045 ((BASICOCMODE) == HRTIM_BASICOCMODE_ACTIVE))
mbed_official 381:5460fc57b6e4 1046 /**
mbed_official 381:5460fc57b6e4 1047 * @}
mbed_official 381:5460fc57b6e4 1048 */
mbed_official 381:5460fc57b6e4 1049
mbed_official 381:5460fc57b6e4 1050 /** @defgroup HRTIM_Output_Polarity HRTIM Output Polarity
mbed_official 381:5460fc57b6e4 1051 * @{
mbed_official 381:5460fc57b6e4 1052 * @brief Constants defining the polarity of a timer output
mbed_official 381:5460fc57b6e4 1053 */
mbed_official 381:5460fc57b6e4 1054 #define HRTIM_OUTPUTPOLARITY_HIGH ((uint32_t)0x00000000) /*!< Output is acitve HIGH */
mbed_official 381:5460fc57b6e4 1055 #define HRTIM_OUTPUTPOLARITY_LOW (HRTIM_OUTR_POL1) /*!< Output is active LOW */
mbed_official 381:5460fc57b6e4 1056
mbed_official 381:5460fc57b6e4 1057 #define IS_HRTIM_OUTPUTPOLARITY(OUTPUTPOLARITY)\
mbed_official 381:5460fc57b6e4 1058 (((OUTPUTPOLARITY) == HRTIM_OUTPUTPOLARITY_HIGH) || \
mbed_official 381:5460fc57b6e4 1059 ((OUTPUTPOLARITY) == HRTIM_OUTPUTPOLARITY_LOW))
mbed_official 381:5460fc57b6e4 1060 /**
mbed_official 381:5460fc57b6e4 1061 * @}
mbed_official 381:5460fc57b6e4 1062 */
mbed_official 381:5460fc57b6e4 1063
mbed_official 381:5460fc57b6e4 1064 /** @defgroup HRTIM_Output_Set_Source HRTIM Output Set Source
mbed_official 381:5460fc57b6e4 1065 * @{
mbed_official 381:5460fc57b6e4 1066 * @brief Constants defining the events that can be selected to configure the
mbed_official 381:5460fc57b6e4 1067 * set crossbar of a timer output
mbed_official 381:5460fc57b6e4 1068 */
mbed_official 381:5460fc57b6e4 1069 #define HRTIM_OUTPUTSET_NONE (uint32_t)0x00000000 /*!< Reset the output set crossbar */
mbed_official 381:5460fc57b6e4 1070 #define HRTIM_OUTPUTSET_RESYNC (HRTIM_SET1R_RESYNC) /*!< Timer reset event coming solely from software or SYNC input forces the output to its active state */
mbed_official 381:5460fc57b6e4 1071 #define HRTIM_OUTPUTSET_TIMPER (HRTIM_SET1R_PER) /*!< Timer period event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1072 #define HRTIM_OUTPUTSET_TIMCMP1 (HRTIM_SET1R_CMP1) /*!< Timer compare 1 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1073 #define HRTIM_OUTPUTSET_TIMCMP2 (HRTIM_SET1R_CMP2) /*!< Timer compare 2 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1074 #define HRTIM_OUTPUTSET_TIMCMP3 (HRTIM_SET1R_CMP3) /*!< Timer compare 3 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1075 #define HRTIM_OUTPUTSET_TIMCMP4 (HRTIM_SET1R_CMP4) /*!< Timer compare 4 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1076 #define HRTIM_OUTPUTSET_MASTERPER (HRTIM_SET1R_MSTPER) /*!< The master timer period event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1077 #define HRTIM_OUTPUTSET_MASTERCMP1 (HRTIM_SET1R_MSTCMP1) /*!< Master Timer compare 1 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1078 #define HRTIM_OUTPUTSET_MASTERCMP2 (HRTIM_SET1R_MSTCMP2) /*!< Master Timer compare 2 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1079 #define HRTIM_OUTPUTSET_MASTERCMP3 (HRTIM_SET1R_MSTCMP3) /*!< Master Timer compare 3 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1080 #define HRTIM_OUTPUTSET_MASTERCMP4 (HRTIM_SET1R_MSTCMP4) /*!< Master Timer compare 4 event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1081 #define HRTIM_OUTPUTSET_TIMEV_1 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1082 #define HRTIM_OUTPUTSET_TIMEV_2 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1083 #define HRTIM_OUTPUTSET_TIMEV_3 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1084 #define HRTIM_OUTPUTSET_TIMEV_4 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1085 #define HRTIM_OUTPUTSET_TIMEV_5 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1086 #define HRTIM_OUTPUTSET_TIMEV_6 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1087 #define HRTIM_OUTPUTSET_TIMEV_7 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1088 #define HRTIM_OUTPUTSET_TIMEV_8 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1089 #define HRTIM_OUTPUTSET_TIMEV_9 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1090 #define HRTIM_OUTPUTSET_EEV_1 (HRTIM_SET1R_EXTVNT1) /*!< External event 1 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1091 #define HRTIM_OUTPUTSET_EEV_2 (HRTIM_SET1R_EXTVNT2) /*!< External event 2 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1092 #define HRTIM_OUTPUTSET_EEV_3 (HRTIM_SET1R_EXTVNT3) /*!< External event 3 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1093 #define HRTIM_OUTPUTSET_EEV_4 (HRTIM_SET1R_EXTVNT4) /*!< External event 4 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1094 #define HRTIM_OUTPUTSET_EEV_5 (HRTIM_SET1R_EXTVNT5) /*!< External event 5 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1095 #define HRTIM_OUTPUTSET_EEV_6 (HRTIM_SET1R_EXTVNT6) /*!< External event 6 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1096 #define HRTIM_OUTPUTSET_EEV_7 (HRTIM_SET1R_EXTVNT7) /*!< External event 7 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1097 #define HRTIM_OUTPUTSET_EEV_8 (HRTIM_SET1R_EXTVNT8) /*!< External event 8 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1098 #define HRTIM_OUTPUTSET_EEV_9 (HRTIM_SET1R_EXTVNT9) /*!< External event 9 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1099 #define HRTIM_OUTPUTSET_EEV_10 (HRTIM_SET1R_EXTVNT10) /*!< External event 10 forces the output to its active state */
mbed_official 381:5460fc57b6e4 1100 #define HRTIM_OUTPUTSET_UPDATE (HRTIM_SET1R_UPDATE) /*!< Timer register update event forces the output to its active state */
mbed_official 381:5460fc57b6e4 1101
mbed_official 381:5460fc57b6e4 1102 #define IS_HRTIM_OUTPUTSET(OUTPUTSET)\
mbed_official 381:5460fc57b6e4 1103 (((OUTPUTSET) == HRTIM_OUTPUTSET_NONE) || \
mbed_official 381:5460fc57b6e4 1104 ((OUTPUTSET) == HRTIM_OUTPUTSET_RESYNC) || \
mbed_official 381:5460fc57b6e4 1105 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMPER) || \
mbed_official 381:5460fc57b6e4 1106 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMCMP1) || \
mbed_official 381:5460fc57b6e4 1107 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMCMP2) || \
mbed_official 381:5460fc57b6e4 1108 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMCMP3) || \
mbed_official 381:5460fc57b6e4 1109 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMCMP4) || \
mbed_official 381:5460fc57b6e4 1110 ((OUTPUTSET) == HRTIM_OUTPUTSET_MASTERPER) || \
mbed_official 381:5460fc57b6e4 1111 ((OUTPUTSET) == HRTIM_OUTPUTSET_MASTERCMP1) || \
mbed_official 381:5460fc57b6e4 1112 ((OUTPUTSET) == HRTIM_OUTPUTSET_MASTERCMP2) || \
mbed_official 381:5460fc57b6e4 1113 ((OUTPUTSET) == HRTIM_OUTPUTSET_MASTERCMP3) || \
mbed_official 381:5460fc57b6e4 1114 ((OUTPUTSET) == HRTIM_OUTPUTSET_MASTERCMP4) || \
mbed_official 381:5460fc57b6e4 1115 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_1) || \
mbed_official 381:5460fc57b6e4 1116 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_2) || \
mbed_official 381:5460fc57b6e4 1117 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_3) || \
mbed_official 381:5460fc57b6e4 1118 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_4) || \
mbed_official 381:5460fc57b6e4 1119 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_5) || \
mbed_official 381:5460fc57b6e4 1120 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_6) || \
mbed_official 381:5460fc57b6e4 1121 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_7) || \
mbed_official 381:5460fc57b6e4 1122 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_8) || \
mbed_official 381:5460fc57b6e4 1123 ((OUTPUTSET) == HRTIM_OUTPUTSET_TIMEV_9) || \
mbed_official 381:5460fc57b6e4 1124 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_1) || \
mbed_official 381:5460fc57b6e4 1125 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_2) || \
mbed_official 381:5460fc57b6e4 1126 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_3) || \
mbed_official 381:5460fc57b6e4 1127 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_4) || \
mbed_official 381:5460fc57b6e4 1128 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_5) || \
mbed_official 381:5460fc57b6e4 1129 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_6) || \
mbed_official 381:5460fc57b6e4 1130 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_7) || \
mbed_official 381:5460fc57b6e4 1131 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_8) || \
mbed_official 381:5460fc57b6e4 1132 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_9) || \
mbed_official 381:5460fc57b6e4 1133 ((OUTPUTSET) == HRTIM_OUTPUTSET_EEV_10) || \
mbed_official 381:5460fc57b6e4 1134 ((OUTPUTSET) == HRTIM_OUTPUTSET_UPDATE))
mbed_official 381:5460fc57b6e4 1135 /**
mbed_official 381:5460fc57b6e4 1136 * @}
mbed_official 381:5460fc57b6e4 1137 */
mbed_official 381:5460fc57b6e4 1138
mbed_official 381:5460fc57b6e4 1139 /** @defgroup HRTIM_Output_Reset_Source HRTIM Output Reset Source
mbed_official 381:5460fc57b6e4 1140 * @{
mbed_official 381:5460fc57b6e4 1141 * @brief Constants defining the events that can be selected to configure the
mbed_official 381:5460fc57b6e4 1142 * set crossbar of a timer output
mbed_official 381:5460fc57b6e4 1143 */
mbed_official 381:5460fc57b6e4 1144 #define HRTIM_OUTPUTRESET_NONE (uint32_t)0x00000000 /*!< Reset the output reset crossbar */
mbed_official 381:5460fc57b6e4 1145 #define HRTIM_OUTPUTRESET_RESYNC (HRTIM_RST1R_RESYNC) /*!< Timer reset event coming solely from software or SYNC input forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1146 #define HRTIM_OUTPUTRESET_TIMPER (HRTIM_RST1R_PER) /*!< Timer period event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1147 #define HRTIM_OUTPUTRESET_TIMCMP1 (HRTIM_RST1R_CMP1) /*!< Timer compare 1 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1148 #define HRTIM_OUTPUTRESET_TIMCMP2 (HRTIM_RST1R_CMP2) /*!< Timer compare 2 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1149 #define HRTIM_OUTPUTRESET_TIMCMP3 (HRTIM_RST1R_CMP3) /*!< Timer compare 3 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1150 #define HRTIM_OUTPUTRESET_TIMCMP4 (HRTIM_RST1R_CMP4) /*!< Timer compare 4 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1151 #define HRTIM_OUTPUTRESET_MASTERPER (HRTIM_RST1R_MSTPER) /*!< The master timer period event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1152 #define HRTIM_OUTPUTRESET_MASTERCMP1 (HRTIM_RST1R_MSTCMP1) /*!< Master Timer compare 1 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1153 #define HRTIM_OUTPUTRESET_MASTERCMP2 (HRTIM_RST1R_MSTCMP2) /*!< Master Timer compare 2 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1154 #define HRTIM_OUTPUTRESET_MASTERCMP3 (HRTIM_RST1R_MSTCMP3) /*!< Master Timer compare 3 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1155 #define HRTIM_OUTPUTRESET_MASTERCMP4 (HRTIM_RST1R_MSTCMP4) /*!< Master Timer compare 4 event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1156 #define HRTIM_OUTPUTRESET_TIMEV_1 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1157 #define HRTIM_OUTPUTRESET_TIMEV_2 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1158 #define HRTIM_OUTPUTRESET_TIMEV_3 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1159 #define HRTIM_OUTPUTRESET_TIMEV_4 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1160 #define HRTIM_OUTPUTRESET_TIMEV_5 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1161 #define HRTIM_OUTPUTRESET_TIMEV_6 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1162 #define HRTIM_OUTPUTRESET_TIMEV_7 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1163 #define HRTIM_OUTPUTRESET_TIMEV_8 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1164 #define HRTIM_OUTPUTRESET_TIMEV_9 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1165 #define HRTIM_OUTPUTRESET_EEV_1 (HRTIM_RST1R_EXTVNT1) /*!< External event 1 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1166 #define HRTIM_OUTPUTRESET_EEV_2 (HRTIM_RST1R_EXTVNT2) /*!< External event 2 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1167 #define HRTIM_OUTPUTRESET_EEV_3 (HRTIM_RST1R_EXTVNT3) /*!< External event 3 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1168 #define HRTIM_OUTPUTRESET_EEV_4 (HRTIM_RST1R_EXTVNT4) /*!< External event 4 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1169 #define HRTIM_OUTPUTRESET_EEV_5 (HRTIM_RST1R_EXTVNT5) /*!< External event 5 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1170 #define HRTIM_OUTPUTRESET_EEV_6 (HRTIM_RST1R_EXTVNT6) /*!< External event 6 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1171 #define HRTIM_OUTPUTRESET_EEV_7 (HRTIM_RST1R_EXTVNT7) /*!< External event 7 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1172 #define HRTIM_OUTPUTRESET_EEV_8 (HRTIM_RST1R_EXTVNT8) /*!< External event 8 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1173 #define HRTIM_OUTPUTRESET_EEV_9 (HRTIM_RST1R_EXTVNT9) /*!< External event 9 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1174 #define HRTIM_OUTPUTRESET_EEV_10 (HRTIM_RST1R_EXTVNT10) /*!< External event 10 forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1175 #define HRTIM_OUTPUTRESET_UPDATE (HRTIM_RST1R_UPDATE) /*!< Timer register update event forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 1176
mbed_official 381:5460fc57b6e4 1177 #define IS_HRTIM_OUTPUTRESET(OUTPUTRESET)\
mbed_official 381:5460fc57b6e4 1178 (((OUTPUTRESET) == HRTIM_OUTPUTRESET_NONE) || \
mbed_official 381:5460fc57b6e4 1179 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_RESYNC) || \
mbed_official 381:5460fc57b6e4 1180 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMPER) || \
mbed_official 381:5460fc57b6e4 1181 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMCMP1) || \
mbed_official 381:5460fc57b6e4 1182 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMCMP2) || \
mbed_official 381:5460fc57b6e4 1183 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMCMP3) || \
mbed_official 381:5460fc57b6e4 1184 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMCMP4) || \
mbed_official 381:5460fc57b6e4 1185 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_MASTERPER) || \
mbed_official 381:5460fc57b6e4 1186 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_MASTERCMP1) || \
mbed_official 381:5460fc57b6e4 1187 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_MASTERCMP2) || \
mbed_official 381:5460fc57b6e4 1188 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_MASTERCMP3) || \
mbed_official 381:5460fc57b6e4 1189 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_MASTERCMP4) || \
mbed_official 381:5460fc57b6e4 1190 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_1) || \
mbed_official 381:5460fc57b6e4 1191 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_2) || \
mbed_official 381:5460fc57b6e4 1192 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_3) || \
mbed_official 381:5460fc57b6e4 1193 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_4) || \
mbed_official 381:5460fc57b6e4 1194 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_5) || \
mbed_official 381:5460fc57b6e4 1195 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_6) || \
mbed_official 381:5460fc57b6e4 1196 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_7) || \
mbed_official 381:5460fc57b6e4 1197 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_8) || \
mbed_official 381:5460fc57b6e4 1198 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_TIMEV_9) || \
mbed_official 381:5460fc57b6e4 1199 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_1) || \
mbed_official 381:5460fc57b6e4 1200 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_2) || \
mbed_official 381:5460fc57b6e4 1201 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_3) || \
mbed_official 381:5460fc57b6e4 1202 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_4) || \
mbed_official 381:5460fc57b6e4 1203 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_5) || \
mbed_official 381:5460fc57b6e4 1204 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_6) || \
mbed_official 381:5460fc57b6e4 1205 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_7) || \
mbed_official 381:5460fc57b6e4 1206 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_8) || \
mbed_official 381:5460fc57b6e4 1207 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_9) || \
mbed_official 381:5460fc57b6e4 1208 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_EEV_10) || \
mbed_official 381:5460fc57b6e4 1209 ((OUTPUTRESET) == HRTIM_OUTPUTRESET_UPDATE))
mbed_official 381:5460fc57b6e4 1210 /**
mbed_official 381:5460fc57b6e4 1211 * @}
mbed_official 381:5460fc57b6e4 1212 */
mbed_official 381:5460fc57b6e4 1213
mbed_official 381:5460fc57b6e4 1214 /** @defgroup HRTIM_Output_Idle_Mode HRTIM Output Idle Mode
mbed_official 381:5460fc57b6e4 1215 * @{
mbed_official 381:5460fc57b6e4 1216 * @brief Constants defining whether or not the timer output transition to its
mbed_official 381:5460fc57b6e4 1217 IDLE state when burst mode is entered
mbed_official 381:5460fc57b6e4 1218 */
mbed_official 381:5460fc57b6e4 1219 #define HRTIM_OUTPUTIDLEMODE_NONE (uint32_t)0x00000000 /*!< The output is not affected by the burst mode operation */
mbed_official 381:5460fc57b6e4 1220 #define HRTIM_OUTPUTIDLEMODE_IDLE (HRTIM_OUTR_IDLM1) /*!< The output is in idle state when requested by the burst mode controller */
mbed_official 381:5460fc57b6e4 1221
mbed_official 381:5460fc57b6e4 1222 #define IS_HRTIM_OUTPUTIDLEMODE(OUTPUTIDLEMODE)\
mbed_official 381:5460fc57b6e4 1223 (((OUTPUTIDLEMODE) == HRTIM_OUTPUTIDLEMODE_NONE) || \
mbed_official 381:5460fc57b6e4 1224 ((OUTPUTIDLEMODE) == HRTIM_OUTPUTIDLEMODE_IDLE))
mbed_official 381:5460fc57b6e4 1225 /**
mbed_official 381:5460fc57b6e4 1226 * @}
mbed_official 381:5460fc57b6e4 1227 */
mbed_official 381:5460fc57b6e4 1228
mbed_official 381:5460fc57b6e4 1229 /** @defgroup HRTIM_Output_IDLE_Level HRTIM Output IDLE Level
mbed_official 381:5460fc57b6e4 1230 * @{
mbed_official 381:5460fc57b6e4 1231 * @brief Constants defining the output level when output is in IDLE state
mbed_official 381:5460fc57b6e4 1232 */
mbed_official 381:5460fc57b6e4 1233 #define HRTIM_OUTPUTIDLELEVEL_INACTIVE (uint32_t)0x00000000 /*!< Output at inactive level when in IDLE state */
mbed_official 381:5460fc57b6e4 1234 #define HRTIM_OUTPUTIDLELEVEL_ACTIVE (HRTIM_OUTR_IDLES1) /*!< Output at active level when in IDLE state */
mbed_official 381:5460fc57b6e4 1235
mbed_official 381:5460fc57b6e4 1236 #define IS_HRTIM_OUTPUTIDLELEVEL(OUTPUTIDLELEVEL)\
mbed_official 381:5460fc57b6e4 1237 (((OUTPUTIDLELEVEL) == HRTIM_OUTPUTIDLELEVEL_INACTIVE) || \
mbed_official 381:5460fc57b6e4 1238 ((OUTPUTIDLELEVEL) == HRTIM_OUTPUTIDLELEVEL_ACTIVE))
mbed_official 381:5460fc57b6e4 1239 /**
mbed_official 381:5460fc57b6e4 1240 * @}
mbed_official 381:5460fc57b6e4 1241 */
mbed_official 381:5460fc57b6e4 1242
mbed_official 381:5460fc57b6e4 1243 /** @defgroup HRTIM_Output_FAULT_Level HRTIM Output FAULT Level
mbed_official 381:5460fc57b6e4 1244 * @{
mbed_official 381:5460fc57b6e4 1245 * @brief Constants defining the output level when output is in FAULT state
mbed_official 381:5460fc57b6e4 1246 */
mbed_official 381:5460fc57b6e4 1247 #define HRTIM_OUTPUTFAULTLEVEL_NONE (uint32_t)0x00000000 /*!< The output is not affected by the fault input */
mbed_official 381:5460fc57b6e4 1248 #define HRTIM_OUTPUTFAULTLEVEL_ACTIVE (HRTIM_OUTR_FAULT1_0) /*!< Output at active level when in FAULT state */
mbed_official 381:5460fc57b6e4 1249 #define HRTIM_OUTPUTFAULTLEVEL_INACTIVE (HRTIM_OUTR_FAULT1_1) /*!< Output at inactive level when in FAULT state */
mbed_official 381:5460fc57b6e4 1250 #define HRTIM_OUTPUTFAULTLEVEL_HIGHZ (HRTIM_OUTR_FAULT1_1 | HRTIM_OUTR_FAULT1_0) /*!< Output is tri-stated when in FAULT state */
mbed_official 381:5460fc57b6e4 1251
mbed_official 381:5460fc57b6e4 1252 #define IS_HRTIM_OUTPUTFAULTLEVEL(OUTPUTFAULTLEVEL)\
mbed_official 381:5460fc57b6e4 1253 (((OUTPUTFAULTLEVEL) == HRTIM_OUTPUTFAULTLEVEL_NONE) || \
mbed_official 381:5460fc57b6e4 1254 ((OUTPUTFAULTLEVEL) == HRTIM_OUTPUTFAULTLEVEL_ACTIVE) || \
mbed_official 381:5460fc57b6e4 1255 ((OUTPUTFAULTLEVEL) == HRTIM_OUTPUTFAULTLEVEL_INACTIVE) || \
mbed_official 381:5460fc57b6e4 1256 ((OUTPUTFAULTLEVEL) == HRTIM_OUTPUTFAULTLEVEL_HIGHZ))
mbed_official 381:5460fc57b6e4 1257 /**
mbed_official 381:5460fc57b6e4 1258 * @}
mbed_official 381:5460fc57b6e4 1259 */
mbed_official 381:5460fc57b6e4 1260
mbed_official 381:5460fc57b6e4 1261 /** @defgroup HRTIM_Output_Chopper_Mode_Enable HRTIM Output Chopper Mode Enable
mbed_official 381:5460fc57b6e4 1262 * @{
mbed_official 381:5460fc57b6e4 1263 * @brief Constants defining whether or not chopper mode is enabled for a timer
mbed_official 381:5460fc57b6e4 1264 output
mbed_official 381:5460fc57b6e4 1265 */
mbed_official 381:5460fc57b6e4 1266 #define HRTIM_OUTPUTCHOPPERMODE_DISABLED (uint32_t)0x00000000 /*!< Output signal is not altered */
mbed_official 381:5460fc57b6e4 1267 #define HRTIM_OUTPUTCHOPPERMODE_ENABLED (HRTIM_OUTR_CHP1) /*!< Output signal is chopped by a carrier signal */
mbed_official 381:5460fc57b6e4 1268
mbed_official 381:5460fc57b6e4 1269 #define IS_HRTIM_OUTPUTCHOPPERMODE(OUTPUTCHOPPERMODE)\
mbed_official 381:5460fc57b6e4 1270 (((OUTPUTCHOPPERMODE) == HRTIM_OUTPUTCHOPPERMODE_DISABLED) || \
mbed_official 381:5460fc57b6e4 1271 ((OUTPUTCHOPPERMODE) == HRTIM_OUTPUTCHOPPERMODE_ENABLED))
mbed_official 381:5460fc57b6e4 1272 /**
mbed_official 381:5460fc57b6e4 1273 * @}
mbed_official 381:5460fc57b6e4 1274 */
mbed_official 381:5460fc57b6e4 1275
mbed_official 381:5460fc57b6e4 1276 /** @defgroup HRTIM_Output_Burst_Mode_Entry_Delayed HRTIM Output Burst Mode Entry Delayed
mbed_official 381:5460fc57b6e4 1277 * @{
mbed_official 381:5460fc57b6e4 1278 * @brief Constants defining the idle mode entry is delayed by forcing a
mbed_official 381:5460fc57b6e4 1279 deadtime insertion before switching the outputs to their idle state
mbed_official 381:5460fc57b6e4 1280 */
mbed_official 381:5460fc57b6e4 1281 #define HRTIM_OUTPUTBURSTMODEENTRY_REGULAR (uint32_t)0x00000000 /*!< The programmed Idle state is applied immediately to the Output */
mbed_official 381:5460fc57b6e4 1282 #define HRTIM_OUTPUTBURSTMODEENTRY_DELAYED (HRTIM_OUTR_DIDL1) /*!< Deadtime is inserted on output before entering the idle mode */
mbed_official 381:5460fc57b6e4 1283
mbed_official 381:5460fc57b6e4 1284 #define IS_HRTIM_OUTPUTBURSTMODEENTRY(OUTPUTBURSTMODEENTRY)\
mbed_official 381:5460fc57b6e4 1285 (((OUTPUTBURSTMODEENTRY) == HRTIM_OUTPUTBURSTMODEENTRY_REGULAR) || \
mbed_official 381:5460fc57b6e4 1286 ((OUTPUTBURSTMODEENTRY) == HRTIM_OUTPUTBURSTMODEENTRY_DELAYED))
mbed_official 381:5460fc57b6e4 1287 /**
mbed_official 381:5460fc57b6e4 1288 * @}
mbed_official 381:5460fc57b6e4 1289 */
mbed_official 381:5460fc57b6e4 1290
mbed_official 381:5460fc57b6e4 1291 /** @defgroup HRTIM_Capture_Unit_Trigger HRTIM Capture Unit Trigger
mbed_official 381:5460fc57b6e4 1292 * @{
mbed_official 381:5460fc57b6e4 1293 * @brief Constants defining the events that can be selected to trigger the
mbed_official 381:5460fc57b6e4 1294 * capture of the timing unit counter
mbed_official 381:5460fc57b6e4 1295 */
mbed_official 381:5460fc57b6e4 1296 #define HRTIM_CAPTURETRIGGER_NONE (uint32_t)0x00000000 /*!< Capture trigger is disabled */
mbed_official 381:5460fc57b6e4 1297 #define HRTIM_CAPTURETRIGGER_UPDATE (HRTIM_CPT1CR_UPDCPT) /*!< The update event triggers the Capture */
mbed_official 381:5460fc57b6e4 1298 #define HRTIM_CAPTURETRIGGER_EEV_1 (HRTIM_CPT1CR_EXEV1CPT) /*!< The External event 1 triggers the Capture */
mbed_official 381:5460fc57b6e4 1299 #define HRTIM_CAPTURETRIGGER_EEV_2 (HRTIM_CPT1CR_EXEV2CPT) /*!< The External event 2 triggers the Capture */
mbed_official 381:5460fc57b6e4 1300 #define HRTIM_CAPTURETRIGGER_EEV_3 (HRTIM_CPT1CR_EXEV3CPT) /*!< The External event 3 triggers the Capture */
mbed_official 381:5460fc57b6e4 1301 #define HRTIM_CAPTURETRIGGER_EEV_4 (HRTIM_CPT1CR_EXEV4CPT) /*!< The External event 4 triggers the Capture */
mbed_official 381:5460fc57b6e4 1302 #define HRTIM_CAPTURETRIGGER_EEV_5 (HRTIM_CPT1CR_EXEV5CPT) /*!< The External event 5 triggers the Capture */
mbed_official 381:5460fc57b6e4 1303 #define HRTIM_CAPTURETRIGGER_EEV_6 (HRTIM_CPT1CR_EXEV6CPT) /*!< The External event 6 triggers the Capture */
mbed_official 381:5460fc57b6e4 1304 #define HRTIM_CAPTURETRIGGER_EEV_7 (HRTIM_CPT1CR_EXEV7CPT) /*!< The External event 7 triggers the Capture */
mbed_official 381:5460fc57b6e4 1305 #define HRTIM_CAPTURETRIGGER_EEV_8 (HRTIM_CPT1CR_EXEV8CPT) /*!< The External event 8 triggers the Capture */
mbed_official 381:5460fc57b6e4 1306 #define HRTIM_CAPTURETRIGGER_EEV_9 (HRTIM_CPT1CR_EXEV9CPT) /*!< The External event 9 triggers the Capture */
mbed_official 381:5460fc57b6e4 1307 #define HRTIM_CAPTURETRIGGER_EEV_10 (HRTIM_CPT1CR_EXEV10CPT) /*!< The External event 10 triggers the Capture */
mbed_official 381:5460fc57b6e4 1308 #define HRTIM_CAPTURETRIGGER_TA1_SET (HRTIM_CPT1CR_TA1SET) /*!< Capture is triggered by TA1 output inactive to active transition */
mbed_official 381:5460fc57b6e4 1309 #define HRTIM_CAPTURETRIGGER_TA1_RESET (HRTIM_CPT1CR_TA1RST) /*!< Capture is triggered by TA1 output active to inactive transition */
mbed_official 381:5460fc57b6e4 1310 #define HRTIM_CAPTURETRIGGER_TIMERA_CMP1 (HRTIM_CPT1CR_TIMACMP1) /*!< Timer A Compare 1 triggers Capture */
mbed_official 381:5460fc57b6e4 1311 #define HRTIM_CAPTURETRIGGER_TIMERA_CMP2 (HRTIM_CPT1CR_TIMACMP2) /*!< Timer A Compare 2 triggers Capture */
mbed_official 381:5460fc57b6e4 1312 #define HRTIM_CAPTURETRIGGER_TB1_SET (HRTIM_CPT1CR_TB1SET) /*!< Capture is triggered by TB1 output inactive to active transition */
mbed_official 381:5460fc57b6e4 1313 #define HRTIM_CAPTURETRIGGER_TB1_RESET (HRTIM_CPT1CR_TB1RST) /*!< Capture is triggered by TB1 output active to inactive transition */
mbed_official 381:5460fc57b6e4 1314 #define HRTIM_CAPTURETRIGGER_TIMERB_CMP1 (HRTIM_CPT1CR_TIMBCMP1) /*!< Timer B Compare 1 triggers Capture */
mbed_official 381:5460fc57b6e4 1315 #define HRTIM_CAPTURETRIGGER_TIMERB_CMP2 (HRTIM_CPT1CR_TIMBCMP2) /*!< Timer B Compare 2 triggers Capture */
mbed_official 381:5460fc57b6e4 1316 #define HRTIM_CAPTURETRIGGER_TC1_SET (HRTIM_CPT1CR_TC1SET) /*!< Capture is triggered by TC1 output inactive to active transition */
mbed_official 381:5460fc57b6e4 1317 #define HRTIM_CAPTURETRIGGER_TC1_RESET (HRTIM_CPT1CR_TC1RST) /*!< Capture is triggered by TC1 output active to inactive transition */
mbed_official 381:5460fc57b6e4 1318 #define HRTIM_CAPTURETRIGGER_TIMERC_CMP1 (HRTIM_CPT1CR_TIMCCMP1) /*!< Timer C Compare 1 triggers Capture */
mbed_official 381:5460fc57b6e4 1319 #define HRTIM_CAPTURETRIGGER_TIMERC_CMP2 (HRTIM_CPT1CR_TIMCCMP2) /*!< Timer C Compare 2 triggers Capture */
mbed_official 381:5460fc57b6e4 1320 #define HRTIM_CAPTURETRIGGER_TD1_SET (HRTIM_CPT1CR_TD1SET) /*!< Capture is triggered by TD1 output inactive to active transition */
mbed_official 381:5460fc57b6e4 1321 #define HRTIM_CAPTURETRIGGER_TD1_RESET (HRTIM_CPT1CR_TD1RST) /*!< Capture is triggered by TD1 output active to inactive transition */
mbed_official 381:5460fc57b6e4 1322 #define HRTIM_CAPTURETRIGGER_TIMERD_CMP1 (HRTIM_CPT1CR_TIMDCMP1) /*!< Timer D Compare 1 triggers Capture */
mbed_official 381:5460fc57b6e4 1323 #define HRTIM_CAPTURETRIGGER_TIMERD_CMP2 (HRTIM_CPT1CR_TIMDCMP2) /*!< Timer D Compare 2 triggers Capture */
mbed_official 381:5460fc57b6e4 1324 #define HRTIM_CAPTURETRIGGER_TE1_SET (HRTIM_CPT1CR_TE1SET) /*!< Capture is triggered by TE1 output inactive to active transition */
mbed_official 381:5460fc57b6e4 1325 #define HRTIM_CAPTURETRIGGER_TE1_RESET (HRTIM_CPT1CR_TE1RST) /*!< Capture is triggered by TE1 output active to inactive transition */
mbed_official 381:5460fc57b6e4 1326 #define HRTIM_CAPTURETRIGGER_TIMERE_CMP1 (HRTIM_CPT1CR_TIMECMP1) /*!< Timer E Compare 1 triggers Capture */
mbed_official 381:5460fc57b6e4 1327 #define HRTIM_CAPTURETRIGGER_TIMERE_CMP2 (HRTIM_CPT1CR_TIMECMP2) /*!< Timer E Compare 2 triggers Capture */
mbed_official 381:5460fc57b6e4 1328
mbed_official 381:5460fc57b6e4 1329 #define IS_HRTIM_TIMER_CAPTURETRIGGER(TIMER, CAPTURETRIGGER) \
mbed_official 381:5460fc57b6e4 1330 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_NONE) || \
mbed_official 381:5460fc57b6e4 1331 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_UPDATE) || \
mbed_official 381:5460fc57b6e4 1332 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_1) || \
mbed_official 381:5460fc57b6e4 1333 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_2) || \
mbed_official 381:5460fc57b6e4 1334 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_3) || \
mbed_official 381:5460fc57b6e4 1335 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_4) || \
mbed_official 381:5460fc57b6e4 1336 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_5) || \
mbed_official 381:5460fc57b6e4 1337 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_6) || \
mbed_official 381:5460fc57b6e4 1338 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_7) || \
mbed_official 381:5460fc57b6e4 1339 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_8) || \
mbed_official 381:5460fc57b6e4 1340 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_9) || \
mbed_official 381:5460fc57b6e4 1341 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_EEV_10) \
mbed_official 381:5460fc57b6e4 1342 || \
mbed_official 381:5460fc57b6e4 1343 (((TIMER) == HRTIM_TIMERINDEX_TIMER_A) && \
mbed_official 381:5460fc57b6e4 1344 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_SET) || \
mbed_official 381:5460fc57b6e4 1345 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_RESET) || \
mbed_official 381:5460fc57b6e4 1346 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP1) || \
mbed_official 381:5460fc57b6e4 1347 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP2) || \
mbed_official 381:5460fc57b6e4 1348 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_SET) || \
mbed_official 381:5460fc57b6e4 1349 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_RESET) || \
mbed_official 381:5460fc57b6e4 1350 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP1) || \
mbed_official 381:5460fc57b6e4 1351 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP2) || \
mbed_official 381:5460fc57b6e4 1352 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_SET) || \
mbed_official 381:5460fc57b6e4 1353 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_RESET) || \
mbed_official 381:5460fc57b6e4 1354 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP1) || \
mbed_official 381:5460fc57b6e4 1355 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP2) || \
mbed_official 381:5460fc57b6e4 1356 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_SET) || \
mbed_official 381:5460fc57b6e4 1357 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_RESET) || \
mbed_official 381:5460fc57b6e4 1358 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP1) || \
mbed_official 381:5460fc57b6e4 1359 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP2))) \
mbed_official 381:5460fc57b6e4 1360 || \
mbed_official 381:5460fc57b6e4 1361 (((TIMER) == HRTIM_TIMERINDEX_TIMER_B) && \
mbed_official 381:5460fc57b6e4 1362 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_SET) || \
mbed_official 381:5460fc57b6e4 1363 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_RESET) || \
mbed_official 381:5460fc57b6e4 1364 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP1) || \
mbed_official 381:5460fc57b6e4 1365 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP2) || \
mbed_official 381:5460fc57b6e4 1366 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_SET) || \
mbed_official 381:5460fc57b6e4 1367 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_RESET) || \
mbed_official 381:5460fc57b6e4 1368 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP1) || \
mbed_official 381:5460fc57b6e4 1369 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP2) || \
mbed_official 381:5460fc57b6e4 1370 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_SET) || \
mbed_official 381:5460fc57b6e4 1371 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_RESET) || \
mbed_official 381:5460fc57b6e4 1372 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP1) || \
mbed_official 381:5460fc57b6e4 1373 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP2) || \
mbed_official 381:5460fc57b6e4 1374 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_SET) || \
mbed_official 381:5460fc57b6e4 1375 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_RESET) || \
mbed_official 381:5460fc57b6e4 1376 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP1) || \
mbed_official 381:5460fc57b6e4 1377 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP2))) \
mbed_official 381:5460fc57b6e4 1378 || \
mbed_official 381:5460fc57b6e4 1379 (((TIMER) == HRTIM_TIMERINDEX_TIMER_C) && \
mbed_official 381:5460fc57b6e4 1380 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_SET) || \
mbed_official 381:5460fc57b6e4 1381 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_RESET) || \
mbed_official 381:5460fc57b6e4 1382 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP1) || \
mbed_official 381:5460fc57b6e4 1383 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP2) || \
mbed_official 381:5460fc57b6e4 1384 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_SET) || \
mbed_official 381:5460fc57b6e4 1385 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_RESET) || \
mbed_official 381:5460fc57b6e4 1386 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP1) || \
mbed_official 381:5460fc57b6e4 1387 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP2) || \
mbed_official 381:5460fc57b6e4 1388 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_SET) || \
mbed_official 381:5460fc57b6e4 1389 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_RESET) || \
mbed_official 381:5460fc57b6e4 1390 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP1) || \
mbed_official 381:5460fc57b6e4 1391 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP2) || \
mbed_official 381:5460fc57b6e4 1392 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_SET) || \
mbed_official 381:5460fc57b6e4 1393 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_RESET) || \
mbed_official 381:5460fc57b6e4 1394 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP1) || \
mbed_official 381:5460fc57b6e4 1395 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP2))) \
mbed_official 381:5460fc57b6e4 1396 || \
mbed_official 381:5460fc57b6e4 1397 (((TIMER) == HRTIM_TIMERINDEX_TIMER_D) && \
mbed_official 381:5460fc57b6e4 1398 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_SET) || \
mbed_official 381:5460fc57b6e4 1399 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_RESET) || \
mbed_official 381:5460fc57b6e4 1400 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP1) || \
mbed_official 381:5460fc57b6e4 1401 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP2) || \
mbed_official 381:5460fc57b6e4 1402 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_SET) || \
mbed_official 381:5460fc57b6e4 1403 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_RESET) || \
mbed_official 381:5460fc57b6e4 1404 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP1) || \
mbed_official 381:5460fc57b6e4 1405 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP2) || \
mbed_official 381:5460fc57b6e4 1406 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_SET) || \
mbed_official 381:5460fc57b6e4 1407 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_RESET) || \
mbed_official 381:5460fc57b6e4 1408 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP1) || \
mbed_official 381:5460fc57b6e4 1409 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP2) || \
mbed_official 381:5460fc57b6e4 1410 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_SET) || \
mbed_official 381:5460fc57b6e4 1411 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TE1_RESET) || \
mbed_official 381:5460fc57b6e4 1412 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP1) || \
mbed_official 381:5460fc57b6e4 1413 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERE_CMP2))) \
mbed_official 381:5460fc57b6e4 1414 || \
mbed_official 381:5460fc57b6e4 1415 (((TIMER) == HRTIM_TIMERINDEX_TIMER_E) && \
mbed_official 381:5460fc57b6e4 1416 (((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_SET) || \
mbed_official 381:5460fc57b6e4 1417 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TA1_RESET) || \
mbed_official 381:5460fc57b6e4 1418 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP1) || \
mbed_official 381:5460fc57b6e4 1419 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERA_CMP2) || \
mbed_official 381:5460fc57b6e4 1420 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_SET) || \
mbed_official 381:5460fc57b6e4 1421 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TB1_RESET) || \
mbed_official 381:5460fc57b6e4 1422 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP1) || \
mbed_official 381:5460fc57b6e4 1423 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERB_CMP2) || \
mbed_official 381:5460fc57b6e4 1424 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_SET) || \
mbed_official 381:5460fc57b6e4 1425 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TC1_RESET) || \
mbed_official 381:5460fc57b6e4 1426 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP1) || \
mbed_official 381:5460fc57b6e4 1427 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERC_CMP2) || \
mbed_official 381:5460fc57b6e4 1428 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_SET) || \
mbed_official 381:5460fc57b6e4 1429 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TD1_RESET) || \
mbed_official 381:5460fc57b6e4 1430 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP1) || \
mbed_official 381:5460fc57b6e4 1431 ((CAPTURETRIGGER) == HRTIM_CAPTURETRIGGER_TIMERD_CMP2))))
mbed_official 381:5460fc57b6e4 1432 /**
mbed_official 381:5460fc57b6e4 1433 * @}
mbed_official 381:5460fc57b6e4 1434 */
mbed_official 381:5460fc57b6e4 1435
mbed_official 381:5460fc57b6e4 1436 /** @defgroup HRTIM_Timer_External_Event_Filter HRTIM Timer External Event Filter
mbed_official 381:5460fc57b6e4 1437 * @{
mbed_official 381:5460fc57b6e4 1438 * @brief Constants defining the event filtering apploed to external events
mbed_official 381:5460fc57b6e4 1439 * by a timer
mbed_official 381:5460fc57b6e4 1440 */
mbed_official 381:5460fc57b6e4 1441 #define HRTIM_TIMEVENTFILTER_NONE (0x00000000)
mbed_official 381:5460fc57b6e4 1442 #define HRTIM_TIMEVENTFILTER_BLANKINGCMP1 (HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 1 */
mbed_official 381:5460fc57b6e4 1443 #define HRTIM_TIMEVENTFILTER_BLANKINGCMP2 (HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from counter reset/roll-over to Compare 2 */
mbed_official 381:5460fc57b6e4 1444 #define HRTIM_TIMEVENTFILTER_BLANKINGCMP3 (HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 3 */
mbed_official 381:5460fc57b6e4 1445 #define HRTIM_TIMEVENTFILTER_BLANKINGCMP4 (HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from counter reset/roll-over to Compare 4 */
mbed_official 381:5460fc57b6e4 1446 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR1 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR1 source */
mbed_official 381:5460fc57b6e4 1447 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR2 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR2 source */
mbed_official 381:5460fc57b6e4 1448 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR3 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR3 source */
mbed_official 381:5460fc57b6e4 1449 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR4 (HRTIM_EEFR1_EE1FLTR_3) /*!< Blanking from another timing unit: TIMFLTR4 source */
mbed_official 381:5460fc57b6e4 1450 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR5 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR5 source */
mbed_official 381:5460fc57b6e4 1451 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR6 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR6 source */
mbed_official 381:5460fc57b6e4 1452 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR7 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR7 source */
mbed_official 381:5460fc57b6e4 1453 #define HRTIM_TIMEVENTFILTER_BLANKINGFLTR8 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from another timing unit: TIMFLTR8 source */
mbed_official 381:5460fc57b6e4 1454 #define HRTIM_TIMEVENTFILTER_WINDOWINGCMP2 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from counter reset/roll-over to Compare 2 */
mbed_official 381:5460fc57b6e4 1455 #define HRTIM_TIMEVENTFILTER_WINDOWINGCMP3 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Windowing from counter reset/roll-over to Compare 3 */
mbed_official 381:5460fc57b6e4 1456 #define HRTIM_TIMEVENTFILTER_WINDOWINGTIM (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from another timing unit: TIMWIN source */
mbed_official 381:5460fc57b6e4 1457
mbed_official 381:5460fc57b6e4 1458 #define IS_HRTIM_TIMEVENTFILTER(TIMEVENTFILTER)\
mbed_official 381:5460fc57b6e4 1459 (((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_NONE) || \
mbed_official 381:5460fc57b6e4 1460 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGCMP1) || \
mbed_official 381:5460fc57b6e4 1461 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGCMP2) || \
mbed_official 381:5460fc57b6e4 1462 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGCMP3) || \
mbed_official 381:5460fc57b6e4 1463 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGCMP4) || \
mbed_official 381:5460fc57b6e4 1464 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR1) || \
mbed_official 381:5460fc57b6e4 1465 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR2) || \
mbed_official 381:5460fc57b6e4 1466 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR3) || \
mbed_official 381:5460fc57b6e4 1467 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR4) || \
mbed_official 381:5460fc57b6e4 1468 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR5) || \
mbed_official 381:5460fc57b6e4 1469 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR6) || \
mbed_official 381:5460fc57b6e4 1470 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR7) || \
mbed_official 381:5460fc57b6e4 1471 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_BLANKINGFLTR8) || \
mbed_official 381:5460fc57b6e4 1472 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGCMP2) || \
mbed_official 381:5460fc57b6e4 1473 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGCMP3) || \
mbed_official 381:5460fc57b6e4 1474 ((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGTIM))
mbed_official 381:5460fc57b6e4 1475 /**
mbed_official 381:5460fc57b6e4 1476 * @}
mbed_official 381:5460fc57b6e4 1477 */
mbed_official 381:5460fc57b6e4 1478
mbed_official 381:5460fc57b6e4 1479 /** @defgroup HRTIM_Timer_External_Event_Latch HRTIM Timer External Event Latch
mbed_official 381:5460fc57b6e4 1480 * @{
mbed_official 381:5460fc57b6e4 1481 * @brief Constants defining whether or not the external event is
mbed_official 381:5460fc57b6e4 1482 * memorized (latched) and generated as soon as the blanking period
mbed_official 381:5460fc57b6e4 1483 * is completed or the window ends
mbed_official 381:5460fc57b6e4 1484 */
mbed_official 381:5460fc57b6e4 1485 #define HRTIM_TIMEVENTLATCH_DISABLED ((uint32_t)0x00000000) /*!< Event is ignored if it happens during a blank, or passed through during a window */
mbed_official 381:5460fc57b6e4 1486 #define HRTIM_TIMEVENTLATCH_ENABLED HRTIM_EEFR1_EE1LTCH /*!< Event is latched and delayed till the end of the blanking or windowing period */
mbed_official 381:5460fc57b6e4 1487
mbed_official 381:5460fc57b6e4 1488 #define IS_HRTIM_TIMEVENTLATCH(TIMEVENTLATCH)\
mbed_official 381:5460fc57b6e4 1489 (((TIMEVENTLATCH) == HRTIM_TIMEVENTLATCH_DISABLED) || \
mbed_official 381:5460fc57b6e4 1490 ((TIMEVENTLATCH) == HRTIM_TIMEVENTLATCH_ENABLED))
mbed_official 381:5460fc57b6e4 1491 /**
mbed_official 381:5460fc57b6e4 1492 * @}
mbed_official 381:5460fc57b6e4 1493 */
mbed_official 381:5460fc57b6e4 1494
mbed_official 381:5460fc57b6e4 1495 /** @defgroup HRTIM_Deadtime_Prescaler_Ratio HRTIM Deadtime Prescaler Ratio
mbed_official 381:5460fc57b6e4 1496 * @{
mbed_official 381:5460fc57b6e4 1497 * @brief Constants defining division ratio between the timer clock frequency
mbed_official 381:5460fc57b6e4 1498 * (fHRTIM) and the deadtime generator clock (fDTG)
mbed_official 381:5460fc57b6e4 1499 */
mbed_official 381:5460fc57b6e4 1500 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL8 ((uint32_t)0x00000000) /*!< fDTG = fHRTIM * 8 */
mbed_official 381:5460fc57b6e4 1501 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL4 (HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM * 4 */
mbed_official 381:5460fc57b6e4 1502 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL2 (HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM * 2 */
mbed_official 381:5460fc57b6e4 1503 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV1 (HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM */
mbed_official 381:5460fc57b6e4 1504 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV2 (HRTIM_DTR_DTPRSC_2) /*!< fDTG = fHRTIM / 2 */
mbed_official 381:5460fc57b6e4 1505 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV4 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 4 */
mbed_official 381:5460fc57b6e4 1506 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV8 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM / 8 */
mbed_official 381:5460fc57b6e4 1507 #define HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV16 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1508
mbed_official 381:5460fc57b6e4 1509 #define IS_HRTIM_TIMDEADTIME_PRESCALERRATIO(PRESCALERRATIO)\
mbed_official 381:5460fc57b6e4 1510 (((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL8) || \
mbed_official 381:5460fc57b6e4 1511 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL4) || \
mbed_official 381:5460fc57b6e4 1512 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL2) || \
mbed_official 381:5460fc57b6e4 1513 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV1) || \
mbed_official 381:5460fc57b6e4 1514 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV2) || \
mbed_official 381:5460fc57b6e4 1515 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV4) || \
mbed_official 381:5460fc57b6e4 1516 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV8) || \
mbed_official 381:5460fc57b6e4 1517 ((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV16))
mbed_official 381:5460fc57b6e4 1518 /**
mbed_official 381:5460fc57b6e4 1519 * @}
mbed_official 381:5460fc57b6e4 1520 */
mbed_official 381:5460fc57b6e4 1521
mbed_official 381:5460fc57b6e4 1522 /** @defgroup HRTIM_Deadtime_Rising_Sign HRTIM Deadtime Rising Sign
mbed_official 381:5460fc57b6e4 1523 * @{
mbed_official 381:5460fc57b6e4 1524 * @brief Constants defining whether the deadtime is positive or negative
mbed_official 381:5460fc57b6e4 1525 * (overlapping signal) on rising edge
mbed_official 381:5460fc57b6e4 1526 */
mbed_official 381:5460fc57b6e4 1527 #define HRTIM_TIMDEADTIME_RISINGSIGN_POSITIVE ((uint32_t)0x00000000) /*!< Positive deadtime on rising edge */
mbed_official 381:5460fc57b6e4 1528 #define HRTIM_TIMDEADTIME_RISINGSIGN_NEGATIVE (HRTIM_DTR_SDTR) /*!< Negative deadtime on rising edge */
mbed_official 381:5460fc57b6e4 1529
mbed_official 381:5460fc57b6e4 1530 #define IS_HRTIM_TIMDEADTIME_RISINGSIGN(RISINGSIGN)\
mbed_official 381:5460fc57b6e4 1531 (((RISINGSIGN) == HRTIM_TIMDEADTIME_RISINGSIGN_POSITIVE) || \
mbed_official 381:5460fc57b6e4 1532 ((RISINGSIGN) == HRTIM_TIMDEADTIME_RISINGSIGN_NEGATIVE))
mbed_official 381:5460fc57b6e4 1533 /**
mbed_official 381:5460fc57b6e4 1534 * @}
mbed_official 381:5460fc57b6e4 1535 */
mbed_official 381:5460fc57b6e4 1536
mbed_official 381:5460fc57b6e4 1537 /** @defgroup HRTIM_Deadtime_Rising_Lock HRTIM Deadtime Rising Lock
mbed_official 381:5460fc57b6e4 1538 * @{
mbed_official 381:5460fc57b6e4 1539 * @brief Constants defining whether or not the deadtime (rising sign and
mbed_official 381:5460fc57b6e4 1540 * value) is write protected
mbed_official 381:5460fc57b6e4 1541 */
mbed_official 381:5460fc57b6e4 1542 #define HRTIM_TIMDEADTIME_RISINGLOCK_WRITE ((uint32_t)0x00000000) /*!< Deadtime rising value and sign is writable */
mbed_official 381:5460fc57b6e4 1543 #define HRTIM_TIMDEADTIME_RISINGLOCK_READONLY (HRTIM_DTR_DTRLK) /*!< Deadtime rising value and sign is read-only */
mbed_official 381:5460fc57b6e4 1544
mbed_official 381:5460fc57b6e4 1545 #define IS_HRTIM_TIMDEADTIME_RISINGLOCK(RISINGLOCK)\
mbed_official 381:5460fc57b6e4 1546 (((RISINGLOCK) == HRTIM_TIMDEADTIME_RISINGLOCK_WRITE) || \
mbed_official 381:5460fc57b6e4 1547 ((RISINGLOCK) == HRTIM_TIMDEADTIME_RISINGLOCK_READONLY))
mbed_official 381:5460fc57b6e4 1548 /**
mbed_official 381:5460fc57b6e4 1549 * @}
mbed_official 381:5460fc57b6e4 1550 */
mbed_official 381:5460fc57b6e4 1551
mbed_official 381:5460fc57b6e4 1552 /** @defgroup HRTIM_Deadtime_Rising_Sign_Lock HRTIM Deadtime Rising Sign Lock
mbed_official 381:5460fc57b6e4 1553 * @{
mbed_official 381:5460fc57b6e4 1554 * @brief Constants defining whether or not the deadtime rising sign is write
mbed_official 381:5460fc57b6e4 1555 * protected
mbed_official 381:5460fc57b6e4 1556 */
mbed_official 381:5460fc57b6e4 1557 #define HRTIM_TIMDEADTIME_RISINGSIGNLOCK_WRITE ((uint32_t)0x00000000) /*!< Deadtime rising sign is writable */
mbed_official 381:5460fc57b6e4 1558 #define HRTIM_TIMDEADTIME_RISINGSIGNLOCK_READONLY (HRTIM_DTR_DTRSLK) /*!< Deadtime rising sign is read-only */
mbed_official 381:5460fc57b6e4 1559
mbed_official 381:5460fc57b6e4 1560 #define IS_HRTIM_TIMDEADTIME_RISINGSIGNLOCK(RISINGSIGNLOCK)\
mbed_official 381:5460fc57b6e4 1561 (((RISINGSIGNLOCK) == HRTIM_TIMDEADTIME_RISINGSIGNLOCK_WRITE) || \
mbed_official 381:5460fc57b6e4 1562 ((RISINGSIGNLOCK) == HRTIM_TIMDEADTIME_RISINGSIGNLOCK_READONLY))
mbed_official 381:5460fc57b6e4 1563 /**
mbed_official 381:5460fc57b6e4 1564 * @}
mbed_official 381:5460fc57b6e4 1565 */
mbed_official 381:5460fc57b6e4 1566
mbed_official 381:5460fc57b6e4 1567 /** @defgroup HRTIM_Deadtime_Falling_Sign HRTIM Deadtime Falling Sign
mbed_official 381:5460fc57b6e4 1568 * @{
mbed_official 381:5460fc57b6e4 1569 * @brief Constants defining whether the deadtime is positive or negative
mbed_official 381:5460fc57b6e4 1570 * (overlapping signal) on falling edge
mbed_official 381:5460fc57b6e4 1571 */
mbed_official 381:5460fc57b6e4 1572 #define HRTIM_TIMDEADTIME_FALLINGSIGN_POSITIVE ((uint32_t)0x00000000) /*!< Positive deadtime on falling edge */
mbed_official 381:5460fc57b6e4 1573 #define HRTIM_TIMDEADTIME_FALLINGSIGN_NEGATIVE (HRTIM_DTR_SDTF) /*!< Negative deadtime on falling edge */
mbed_official 381:5460fc57b6e4 1574
mbed_official 381:5460fc57b6e4 1575 #define IS_HRTIM_TIMDEADTIME_FALLINGSIGN(FALLINGSIGN)\
mbed_official 381:5460fc57b6e4 1576 (((FALLINGSIGN) == HRTIM_TIMDEADTIME_FALLINGSIGN_POSITIVE) || \
mbed_official 381:5460fc57b6e4 1577 ((FALLINGSIGN) == HRTIM_TIMDEADTIME_FALLINGSIGN_NEGATIVE))
mbed_official 381:5460fc57b6e4 1578 /**
mbed_official 381:5460fc57b6e4 1579 * @}
mbed_official 381:5460fc57b6e4 1580 */
mbed_official 381:5460fc57b6e4 1581
mbed_official 381:5460fc57b6e4 1582 /** @defgroup HRTIM_Deadtime_Falling_Lock HRTIM Deadtime Falling Lock
mbed_official 381:5460fc57b6e4 1583 * @{
mbed_official 381:5460fc57b6e4 1584 * @brief Constants defining whether or not the deadtime (falling sign and
mbed_official 381:5460fc57b6e4 1585 * value) is write protected
mbed_official 381:5460fc57b6e4 1586 */
mbed_official 381:5460fc57b6e4 1587 #define HRTIM_TIMDEADTIME_FALLINGLOCK_WRITE ((uint32_t)0x00000000) /*!< Deadtime falling value and sign is writable */
mbed_official 381:5460fc57b6e4 1588 #define HRTIM_TIMDEADTIME_FALLINGLOCK_READONLY (HRTIM_DTR_DTFLK) /*!< Deadtime falling value and sign is read-only */
mbed_official 381:5460fc57b6e4 1589
mbed_official 381:5460fc57b6e4 1590 #define IS_HRTIM_TIMDEADTIME_FALLINGLOCK(FALLINGLOCK)\
mbed_official 381:5460fc57b6e4 1591 (((FALLINGLOCK) == HRTIM_TIMDEADTIME_FALLINGLOCK_WRITE) || \
mbed_official 381:5460fc57b6e4 1592 ((FALLINGLOCK) == HRTIM_TIMDEADTIME_FALLINGLOCK_READONLY))
mbed_official 381:5460fc57b6e4 1593 /**
mbed_official 381:5460fc57b6e4 1594 * @}
mbed_official 381:5460fc57b6e4 1595 */
mbed_official 381:5460fc57b6e4 1596
mbed_official 381:5460fc57b6e4 1597 /** @defgroup HRTIM_Deadtime_Falling_Sign_Lock HRTIM Deadtime Falling Sign Lock
mbed_official 381:5460fc57b6e4 1598 * @{
mbed_official 381:5460fc57b6e4 1599 * @brief Constants defining whether or not the deadtime falling sign is write
mbed_official 381:5460fc57b6e4 1600 * protected
mbed_official 381:5460fc57b6e4 1601 */
mbed_official 381:5460fc57b6e4 1602 #define HRTIM_TIMDEADTIME_FALLINGSIGNLOCK_WRITE ((uint32_t)0x00000000) /*!< Deadtime falling sign is writable */
mbed_official 381:5460fc57b6e4 1603 #define HRTIM_TIMDEADTIME_FALLINGSIGNLOCK_READONLY (HRTIM_DTR_DTFSLK) /*!< Deadtime falling sign is read-only */
mbed_official 381:5460fc57b6e4 1604
mbed_official 381:5460fc57b6e4 1605 #define IS_HRTIM_TIMDEADTIME_FALLINGSIGNLOCK(FALLINGSIGNLOCK)\
mbed_official 381:5460fc57b6e4 1606 (((FALLINGSIGNLOCK) == HRTIM_TIMDEADTIME_FALLINGSIGNLOCK_WRITE) || \
mbed_official 381:5460fc57b6e4 1607 ((FALLINGSIGNLOCK) == HRTIM_TIMDEADTIME_FALLINGSIGNLOCK_READONLY))
mbed_official 381:5460fc57b6e4 1608 /**
mbed_official 381:5460fc57b6e4 1609 * @}
mbed_official 381:5460fc57b6e4 1610 */
mbed_official 381:5460fc57b6e4 1611
mbed_official 381:5460fc57b6e4 1612 /** @defgroup HRTIM_Chopper_Frequency HRTIM Chopper Frequency
mbed_official 381:5460fc57b6e4 1613 * @{
mbed_official 381:5460fc57b6e4 1614 * @brief Constants defining the frequency of the generated high frequency carrier
mbed_official 381:5460fc57b6e4 1615 */
mbed_official 381:5460fc57b6e4 1616 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV16 ((uint32_t)0x000000) /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1617 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV32 (HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 32 */
mbed_official 381:5460fc57b6e4 1618 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV48 (HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 48 */
mbed_official 381:5460fc57b6e4 1619 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV64 (HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 64 */
mbed_official 381:5460fc57b6e4 1620 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV80 (HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 80 */
mbed_official 381:5460fc57b6e4 1621 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV96 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 96 */
mbed_official 381:5460fc57b6e4 1622 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV112 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 112 */
mbed_official 381:5460fc57b6e4 1623 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV128 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 128 */
mbed_official 381:5460fc57b6e4 1624 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV144 (HRTIM_CHPR_CARFRQ_3) /*!< fCHPFRQ = fHRTIM / 144 */
mbed_official 381:5460fc57b6e4 1625 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV160 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 160 */
mbed_official 381:5460fc57b6e4 1626 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV176 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 176 */
mbed_official 381:5460fc57b6e4 1627 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV192 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 192 */
mbed_official 381:5460fc57b6e4 1628 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV208 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 208 */
mbed_official 381:5460fc57b6e4 1629 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV224 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 224 */
mbed_official 381:5460fc57b6e4 1630 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV240 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 240 */
mbed_official 381:5460fc57b6e4 1631 #define HRTIM_CHOPPER_PRESCALERRATIO_DIV256 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 256 */
mbed_official 381:5460fc57b6e4 1632
mbed_official 381:5460fc57b6e4 1633 #define IS_HRTIM_CHOPPER_PRESCALERRATIO(PRESCALERRATIO)\
mbed_official 381:5460fc57b6e4 1634 (((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV16) || \
mbed_official 381:5460fc57b6e4 1635 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV32) || \
mbed_official 381:5460fc57b6e4 1636 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV48) || \
mbed_official 381:5460fc57b6e4 1637 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV64) || \
mbed_official 381:5460fc57b6e4 1638 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV80) || \
mbed_official 381:5460fc57b6e4 1639 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV96) || \
mbed_official 381:5460fc57b6e4 1640 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV112) || \
mbed_official 381:5460fc57b6e4 1641 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV128) || \
mbed_official 381:5460fc57b6e4 1642 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV144) || \
mbed_official 381:5460fc57b6e4 1643 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV160) || \
mbed_official 381:5460fc57b6e4 1644 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV176) || \
mbed_official 381:5460fc57b6e4 1645 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV192) || \
mbed_official 381:5460fc57b6e4 1646 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV208) || \
mbed_official 381:5460fc57b6e4 1647 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV224) || \
mbed_official 381:5460fc57b6e4 1648 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV240) || \
mbed_official 381:5460fc57b6e4 1649 ((PRESCALERRATIO) == HRTIM_CHOPPER_PRESCALERRATIO_DIV256))
mbed_official 381:5460fc57b6e4 1650 /**
mbed_official 381:5460fc57b6e4 1651 * @}
mbed_official 381:5460fc57b6e4 1652 */
mbed_official 381:5460fc57b6e4 1653
mbed_official 381:5460fc57b6e4 1654 /** @defgroup HRTIM_Chopper_Duty_Cycle HRTIM Chopper Duty Cycle
mbed_official 381:5460fc57b6e4 1655 * @{
mbed_official 381:5460fc57b6e4 1656 * @brief Constants defining the duty cycle of the generated high frequency carrier
mbed_official 381:5460fc57b6e4 1657 * Duty cycle can be adjusted by 1/8 step (from 0/8 up to 7/8)
mbed_official 381:5460fc57b6e4 1658 */
mbed_official 381:5460fc57b6e4 1659 #define HRTIM_CHOPPER_DUTYCYCLE_0 ((uint32_t)0x000000) /*!< 0/8 (i.e. only 1st pulse is present) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1660 #define HRTIM_CHOPPER_DUTYCYCLE_125 (HRTIM_CHPR_CARDTY_0) /*!< 1/8 (12.5 %)*/ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1661 #define HRTIM_CHOPPER_DUTYCYCLE_250 (HRTIM_CHPR_CARDTY_1) /*!< 2/8 (25 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1662 #define HRTIM_CHOPPER_DUTYCYCLE_375 (HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< 3/8 (37.5 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1663 #define HRTIM_CHOPPER_DUTYCYCLE_500 (HRTIM_CHPR_CARDTY_2) /*!< 4/8 (50 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1664 #define HRTIM_CHOPPER_DUTYCYCLE_625 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_0) /*!< 5/8 (62.5 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1665 #define HRTIM_CHOPPER_DUTYCYCLE_750 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1) /*!< 6/8 (75 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1666 #define HRTIM_CHOPPER_DUTYCYCLE_875 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< 7/8 (87.5 %) */ /*!< fCHPFRQ = fHRTIM / 16 */
mbed_official 381:5460fc57b6e4 1667
mbed_official 381:5460fc57b6e4 1668 #define IS_HRTIM_CHOPPER_DUTYCYCLE(DUTYCYCLE)\
mbed_official 381:5460fc57b6e4 1669 (((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_0) || \
mbed_official 381:5460fc57b6e4 1670 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_125) || \
mbed_official 381:5460fc57b6e4 1671 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_250) || \
mbed_official 381:5460fc57b6e4 1672 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_375) || \
mbed_official 381:5460fc57b6e4 1673 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_500) || \
mbed_official 381:5460fc57b6e4 1674 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_625) || \
mbed_official 381:5460fc57b6e4 1675 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_750) || \
mbed_official 381:5460fc57b6e4 1676 ((DUTYCYCLE) == HRTIM_CHOPPER_DUTYCYCLE_875))
mbed_official 381:5460fc57b6e4 1677 /**
mbed_official 381:5460fc57b6e4 1678 * @}
mbed_official 381:5460fc57b6e4 1679 */
mbed_official 381:5460fc57b6e4 1680
mbed_official 381:5460fc57b6e4 1681 /** @defgroup HRTIM_Chopper_Start_Pulse_Width HRTIM Chopper Start Pulse Width
mbed_official 381:5460fc57b6e4 1682 * @{
mbed_official 381:5460fc57b6e4 1683 * @brief Constants defining the pulse width of the first pulse of the generated
mbed_official 381:5460fc57b6e4 1684 * high frequency carrier
mbed_official 381:5460fc57b6e4 1685 */
mbed_official 381:5460fc57b6e4 1686 #define HRTIM_CHOPPER_PULSEWIDTH_16 ((uint32_t)0x000000) /*!< tSTPW = tHRTIM x 16 */
mbed_official 381:5460fc57b6e4 1687 #define HRTIM_CHOPPER_PULSEWIDTH_32 (HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 32 */
mbed_official 381:5460fc57b6e4 1688 #define HRTIM_CHOPPER_PULSEWIDTH_48 (HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 48 */
mbed_official 381:5460fc57b6e4 1689 #define HRTIM_CHOPPER_PULSEWIDTH_64 (HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 64 */
mbed_official 381:5460fc57b6e4 1690 #define HRTIM_CHOPPER_PULSEWIDTH_80 (HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 80 */
mbed_official 381:5460fc57b6e4 1691 #define HRTIM_CHOPPER_PULSEWIDTH_96 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 96 */
mbed_official 381:5460fc57b6e4 1692 #define HRTIM_CHOPPER_PULSEWIDTH_112 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 112 */
mbed_official 381:5460fc57b6e4 1693 #define HRTIM_CHOPPER_PULSEWIDTH_128 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 128 */
mbed_official 381:5460fc57b6e4 1694 #define HRTIM_CHOPPER_PULSEWIDTH_144 (HRTIM_CHPR_STRPW_3) /*!< tSTPW = tHRTIM x 144 */
mbed_official 381:5460fc57b6e4 1695 #define HRTIM_CHOPPER_PULSEWIDTH_160 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 160 */
mbed_official 381:5460fc57b6e4 1696 #define HRTIM_CHOPPER_PULSEWIDTH_176 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 176 */
mbed_official 381:5460fc57b6e4 1697 #define HRTIM_CHOPPER_PULSEWIDTH_192 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 192 */
mbed_official 381:5460fc57b6e4 1698 #define HRTIM_CHOPPER_PULSEWIDTH_208 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 208 */
mbed_official 381:5460fc57b6e4 1699 #define HRTIM_CHOPPER_PULSEWIDTH_224 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 224 */
mbed_official 381:5460fc57b6e4 1700 #define HRTIM_CHOPPER_PULSEWIDTH_240 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 240 */
mbed_official 381:5460fc57b6e4 1701 #define HRTIM_CHOPPER_PULSEWIDTH_256 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 256 */
mbed_official 381:5460fc57b6e4 1702
mbed_official 381:5460fc57b6e4 1703 #define IS_HRTIM_CHOPPER_PULSEWIDTH(PULSEWIDTH)\
mbed_official 381:5460fc57b6e4 1704 (((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_16) || \
mbed_official 381:5460fc57b6e4 1705 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_32) || \
mbed_official 381:5460fc57b6e4 1706 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_48) || \
mbed_official 381:5460fc57b6e4 1707 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_64) || \
mbed_official 381:5460fc57b6e4 1708 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_80) || \
mbed_official 381:5460fc57b6e4 1709 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_96) || \
mbed_official 381:5460fc57b6e4 1710 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_112) || \
mbed_official 381:5460fc57b6e4 1711 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_128) || \
mbed_official 381:5460fc57b6e4 1712 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_144) || \
mbed_official 381:5460fc57b6e4 1713 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_160) || \
mbed_official 381:5460fc57b6e4 1714 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_176) || \
mbed_official 381:5460fc57b6e4 1715 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_192) || \
mbed_official 381:5460fc57b6e4 1716 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_208) || \
mbed_official 381:5460fc57b6e4 1717 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_224) || \
mbed_official 381:5460fc57b6e4 1718 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_240) || \
mbed_official 381:5460fc57b6e4 1719 ((PULSEWIDTH) == HRTIM_CHOPPER_PULSEWIDTH_256))
mbed_official 381:5460fc57b6e4 1720 /**
mbed_official 381:5460fc57b6e4 1721 * @}
mbed_official 381:5460fc57b6e4 1722 */
mbed_official 381:5460fc57b6e4 1723
mbed_official 381:5460fc57b6e4 1724 /** @defgroup HRTIM_Synchronization_Options HRTIM Synchronization Options
mbed_official 381:5460fc57b6e4 1725 * @{
mbed_official 381:5460fc57b6e4 1726 * @brief Constants defining the options for synchronizing multiple HRTIM
mbed_official 381:5460fc57b6e4 1727 * instances, as a master unit (generating a synchronization signal)
mbed_official 381:5460fc57b6e4 1728 * or as a slave (waiting for a trigger to be synchronized)
mbed_official 381:5460fc57b6e4 1729 */
mbed_official 381:5460fc57b6e4 1730 #define HRTIM_SYNCOPTION_NONE (uint32_t)0x00000000 /*!< HRTIM instance doesn't handle external synchronization signals (SYNCIN, SYNCOUT) */
mbed_official 381:5460fc57b6e4 1731 #define HRTIM_SYNCOPTION_MASTER (uint32_t)0x00000001 /*!< HRTIM instance acts as a MASTER, i.e. generates external synchronization output (SYNCOUT)*/
mbed_official 381:5460fc57b6e4 1732 #define HRTIM_SYNCOPTION_SLAVE (uint32_t)0x00000002 /*!< HRTIM instance acts as a SLAVE, i.e. it is synchronized by external sources (SYNCIN) */
mbed_official 381:5460fc57b6e4 1733 /**
mbed_official 381:5460fc57b6e4 1734 * @}
mbed_official 381:5460fc57b6e4 1735 */
mbed_official 381:5460fc57b6e4 1736
mbed_official 381:5460fc57b6e4 1737 /** @defgroup HRTIM_Synchronization_Input_Source HRTIM Synchronization Input Source
mbed_official 381:5460fc57b6e4 1738 * @{
mbed_official 381:5460fc57b6e4 1739 * @brief Constants defining defining the synchronization input source
mbed_official 381:5460fc57b6e4 1740 */
mbed_official 381:5460fc57b6e4 1741 #define HRTIM_SYNCINPUTSOURCE_NONE (uint32_t)0x00000000 /*!< disabled. HRTIM is not synchronized and runs in standalone mode */
mbed_official 381:5460fc57b6e4 1742 #define HRTIM_SYNCINPUTSOURCE_INTERNALEVENT HRTIM_MCR_SYNC_IN_1 /*!< The HRTIM is synchronized with the on-chip timer */
mbed_official 381:5460fc57b6e4 1743 #define HRTIM_SYNCINPUTSOURCE_EXTERNALEVENT (HRTIM_MCR_SYNC_IN_1 | HRTIM_MCR_SYNC_IN_0) /*!< A positive pulse on SYNCIN input triggers the HRTIM */
mbed_official 381:5460fc57b6e4 1744
mbed_official 381:5460fc57b6e4 1745 #define IS_HRTIM_SYNCINPUTSOURCE(SYNCINPUTSOURCE)\
mbed_official 381:5460fc57b6e4 1746 (((SYNCINPUTSOURCE) == HRTIM_SYNCINPUTSOURCE_NONE) || \
mbed_official 381:5460fc57b6e4 1747 ((SYNCINPUTSOURCE) == HRTIM_SYNCINPUTSOURCE_INTERNALEVENT) || \
mbed_official 381:5460fc57b6e4 1748 ((SYNCINPUTSOURCE) == HRTIM_SYNCINPUTSOURCE_EXTERNALEVENT))
mbed_official 381:5460fc57b6e4 1749 /**
mbed_official 381:5460fc57b6e4 1750 * @}
mbed_official 381:5460fc57b6e4 1751 */
mbed_official 381:5460fc57b6e4 1752
mbed_official 381:5460fc57b6e4 1753 /** @defgroup HRTIM_Synchronization_Output_Source HRTIM Synchronization Output Source
mbed_official 381:5460fc57b6e4 1754 * @{
mbed_official 381:5460fc57b6e4 1755 * @brief Constants defining the source and event to be sent on the
mbed_official 381:5460fc57b6e4 1756 * synchronization outputs
mbed_official 381:5460fc57b6e4 1757 */
mbed_official 381:5460fc57b6e4 1758 #define HRTIM_SYNCOUTPUTSOURCE_MASTER_START (uint32_t)0x00000000 /*!< A pulse is sent on the SYNCOUT output (16x fHRTIM clock cycles) upon master timer start event */
mbed_official 381:5460fc57b6e4 1759 #define HRTIM_SYNCOUTPUTSOURCE_MASTER_CMP1 (HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output (16x fHRTIM clock cycles) upon master timer compare 1 event*/
mbed_official 381:5460fc57b6e4 1760 #define HRTIM_SYNCOUTPUTSOURCE_TIMA_START (HRTIM_MCR_SYNC_SRC_1) /*!< A pulse is sent on the SYNCOUT output (16x fHRTIM clock cycles) upon timer A start or reset events */
mbed_official 381:5460fc57b6e4 1761 #define HRTIM_SYNCOUTPUTSOURCE_TIMA_CMP1 (HRTIM_MCR_SYNC_SRC_1 | HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output (16x fHRTIM clock cycles) upon timer A compare 1 event */
mbed_official 381:5460fc57b6e4 1762
mbed_official 381:5460fc57b6e4 1763 #define IS_HRTIM_SYNCOUTPUTSOURCE(SYNCOUTPUTSOURCE)\
mbed_official 381:5460fc57b6e4 1764 (((SYNCOUTPUTSOURCE) == HRTIM_SYNCOUTPUTSOURCE_MASTER_START) || \
mbed_official 381:5460fc57b6e4 1765 ((SYNCOUTPUTSOURCE) == HRTIM_SYNCOUTPUTSOURCE_MASTER_CMP1) || \
mbed_official 381:5460fc57b6e4 1766 ((SYNCOUTPUTSOURCE) == HRTIM_SYNCOUTPUTSOURCE_TIMA_START) || \
mbed_official 381:5460fc57b6e4 1767 ((SYNCOUTPUTSOURCE) == HRTIM_SYNCOUTPUTSOURCE_TIMA_CMP1))
mbed_official 381:5460fc57b6e4 1768 /**
mbed_official 381:5460fc57b6e4 1769 * @}
mbed_official 381:5460fc57b6e4 1770 */
mbed_official 381:5460fc57b6e4 1771
mbed_official 381:5460fc57b6e4 1772 /** @defgroup HRTIM_Synchronization_Output_Polarity HRTIM Synchronization Output Polarity
mbed_official 381:5460fc57b6e4 1773 * @{
mbed_official 381:5460fc57b6e4 1774 * @brief Constants defining the routing and conditioning of the synchronization output event
mbed_official 381:5460fc57b6e4 1775 */
mbed_official 381:5460fc57b6e4 1776 #define HRTIM_SYNCOUTPUTPOLARITY_NONE (uint32_t)0x00000000 /*!< Synchronization output event is disabled */
mbed_official 381:5460fc57b6e4 1777 #define HRTIM_SYNCOUTPUTPOLARITY_POSITIVE (HRTIM_MCR_SYNC_OUT_1) /*!< Positive pulse on SCOUT output (16x fHRTIM clock cycles) */
mbed_official 381:5460fc57b6e4 1778 #define HRTIM_SYNCOUTPUTPOLARITY_NEGATIVE (HRTIM_MCR_SYNC_OUT_1 | HRTIM_MCR_SYNC_OUT_0) /*!< Positive pulse on SCOUT output (16x fHRTIM clock cycles) */
mbed_official 381:5460fc57b6e4 1779
mbed_official 381:5460fc57b6e4 1780 #define IS_HRTIM_SYNCOUTPUTPOLARITY(SYNCOUTPUTPOLARITY)\
mbed_official 381:5460fc57b6e4 1781 (((SYNCOUTPUTPOLARITY) == HRTIM_SYNCOUTPUTPOLARITY_NONE) || \
mbed_official 381:5460fc57b6e4 1782 ((SYNCOUTPUTPOLARITY) == HRTIM_SYNCOUTPUTPOLARITY_POSITIVE) || \
mbed_official 381:5460fc57b6e4 1783 ((SYNCOUTPUTPOLARITY) == HRTIM_SYNCOUTPUTPOLARITY_NEGATIVE))
mbed_official 381:5460fc57b6e4 1784 /**
mbed_official 381:5460fc57b6e4 1785 * @}
mbed_official 381:5460fc57b6e4 1786 */
mbed_official 381:5460fc57b6e4 1787
mbed_official 381:5460fc57b6e4 1788 /** @defgroup HRTIM_External_Event_Sources HRTIM External Event Sources
mbed_official 381:5460fc57b6e4 1789 * @{
mbed_official 381:5460fc57b6e4 1790 * @brief Constants defining available sources associated to external events
mbed_official 381:5460fc57b6e4 1791 */
mbed_official 381:5460fc57b6e4 1792 #define HRTIM_EVENTSRC_1 ((uint32_t)0x00000000) /*!< External event source 1 */
mbed_official 381:5460fc57b6e4 1793 #define HRTIM_EVENTSRC_2 (HRTIM_EECR1_EE1SRC_0) /*!< External event source 2 */
mbed_official 381:5460fc57b6e4 1794 #define HRTIM_EVENTSRC_3 (HRTIM_EECR1_EE1SRC_1) /*!< External event source 3 */
mbed_official 381:5460fc57b6e4 1795 #define HRTIM_EVENTSRC_4 (HRTIM_EECR1_EE1SRC_1 | HRTIM_EECR1_EE1SRC_0) /*!< External event source 4 */
mbed_official 381:5460fc57b6e4 1796
mbed_official 381:5460fc57b6e4 1797 #define IS_HRTIM_EVENTSRC(EVENTSRC)\
mbed_official 381:5460fc57b6e4 1798 (((EVENTSRC) == HRTIM_EVENTSRC_1) || \
mbed_official 381:5460fc57b6e4 1799 ((EVENTSRC) == HRTIM_EVENTSRC_2) || \
mbed_official 381:5460fc57b6e4 1800 ((EVENTSRC) == HRTIM_EVENTSRC_3) || \
mbed_official 381:5460fc57b6e4 1801 ((EVENTSRC) == HRTIM_EVENTSRC_4))
mbed_official 381:5460fc57b6e4 1802 /**
mbed_official 381:5460fc57b6e4 1803 * @}
mbed_official 381:5460fc57b6e4 1804 */
mbed_official 381:5460fc57b6e4 1805
mbed_official 381:5460fc57b6e4 1806 /** @defgroup HRTIM_External_Event_Polarity HRTIM External Event Polarity
mbed_official 381:5460fc57b6e4 1807 * @{
mbed_official 381:5460fc57b6e4 1808 * @brief Constants defining the polarity of an external event
mbed_official 381:5460fc57b6e4 1809 */
mbed_official 381:5460fc57b6e4 1810 #define HRTIM_EVENTPOLARITY_HIGH ((uint32_t)0x00000000) /*!< External event is active high */
mbed_official 381:5460fc57b6e4 1811 #define HRTIM_EVENTPOLARITY_LOW (HRTIM_EECR1_EE1POL) /*!< External event is active low */
mbed_official 381:5460fc57b6e4 1812
mbed_official 381:5460fc57b6e4 1813 #define IS_HRTIM_EVENTPOLARITY(EVENTSENSITIVITY, EVENTPOLARITY)\
mbed_official 381:5460fc57b6e4 1814 ((((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_LEVEL) && \
mbed_official 381:5460fc57b6e4 1815 (((EVENTPOLARITY) == HRTIM_EVENTPOLARITY_HIGH) || \
mbed_official 381:5460fc57b6e4 1816 ((EVENTPOLARITY) == HRTIM_EVENTPOLARITY_LOW))) \
mbed_official 381:5460fc57b6e4 1817 || \
mbed_official 381:5460fc57b6e4 1818 (((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_RISINGEDGE) || \
mbed_official 381:5460fc57b6e4 1819 ((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_FALLINGEDGE)|| \
mbed_official 381:5460fc57b6e4 1820 ((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_BOTHEDGES)))
mbed_official 381:5460fc57b6e4 1821 /**
mbed_official 381:5460fc57b6e4 1822 * @}
mbed_official 381:5460fc57b6e4 1823 */
mbed_official 381:5460fc57b6e4 1824
mbed_official 381:5460fc57b6e4 1825 /** @defgroup HRTIM_External_Event_Sensitivity HRTIM External Event Sensitivity
mbed_official 381:5460fc57b6e4 1826 * @{
mbed_official 381:5460fc57b6e4 1827 * @brief Constants defining the sensitivity (level-sensitive or edge-sensitive)
mbed_official 381:5460fc57b6e4 1828 * of an external event
mbed_official 381:5460fc57b6e4 1829 */
mbed_official 381:5460fc57b6e4 1830 #define HRTIM_EVENTSENSITIVITY_LEVEL ((uint32_t)0x00000000) /*!< External event is active on level */
mbed_official 381:5460fc57b6e4 1831 #define HRTIM_EVENTSENSITIVITY_RISINGEDGE (HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising edge */
mbed_official 381:5460fc57b6e4 1832 #define HRTIM_EVENTSENSITIVITY_FALLINGEDGE (HRTIM_EECR1_EE1SNS_1) /*!< External event is active on Falling edge */
mbed_official 381:5460fc57b6e4 1833 #define HRTIM_EVENTSENSITIVITY_BOTHEDGES (HRTIM_EECR1_EE1SNS_1 | HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising and Falling edges */
mbed_official 381:5460fc57b6e4 1834
mbed_official 381:5460fc57b6e4 1835 #define IS_HRTIM_EVENTSENSITIVITY(EVENTSENSITIVITY)\
mbed_official 381:5460fc57b6e4 1836 (((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_LEVEL) || \
mbed_official 381:5460fc57b6e4 1837 ((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_RISINGEDGE) || \
mbed_official 381:5460fc57b6e4 1838 ((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_FALLINGEDGE) || \
mbed_official 381:5460fc57b6e4 1839 ((EVENTSENSITIVITY) == HRTIM_EVENTSENSITIVITY_BOTHEDGES))
mbed_official 381:5460fc57b6e4 1840 /**
mbed_official 381:5460fc57b6e4 1841 * @}
mbed_official 381:5460fc57b6e4 1842 */
mbed_official 381:5460fc57b6e4 1843
mbed_official 381:5460fc57b6e4 1844 /** @defgroup HRTIM_External_Event_Fast_Mode HRTIM External Event Fast Mode
mbed_official 381:5460fc57b6e4 1845 * @{
mbed_official 381:5460fc57b6e4 1846 * @brief Constants defining whether or not an external event is programmed in
mbed_official 381:5460fc57b6e4 1847 fast mode
mbed_official 381:5460fc57b6e4 1848 */
mbed_official 381:5460fc57b6e4 1849 #define HRTIM_EVENTFASTMODE_DISABLE ((uint32_t)0x00000000) /*!< External Event is acting asynchronously on outputs (low latency mode) */
mbed_official 381:5460fc57b6e4 1850 #define HRTIM_EVENTFASTMODE_ENABLE (HRTIM_EECR1_EE1FAST) /*!< External Event is re-synchronized by the HRTIM logic before acting on outputs */
mbed_official 381:5460fc57b6e4 1851
mbed_official 381:5460fc57b6e4 1852 #define IS_HRTIM_EVENTFASTMODE(EVENT, FASTMODE)\
mbed_official 381:5460fc57b6e4 1853 (((((EVENT) == HRTIM_EVENT_1) || \
mbed_official 381:5460fc57b6e4 1854 ((EVENT) == HRTIM_EVENT_2) || \
mbed_official 381:5460fc57b6e4 1855 ((EVENT) == HRTIM_EVENT_3) || \
mbed_official 381:5460fc57b6e4 1856 ((EVENT) == HRTIM_EVENT_4) || \
mbed_official 381:5460fc57b6e4 1857 ((EVENT) == HRTIM_EVENT_5)) && \
mbed_official 381:5460fc57b6e4 1858 (((FASTMODE) == HRTIM_EVENTFASTMODE_ENABLE) || \
mbed_official 381:5460fc57b6e4 1859 ((FASTMODE) == HRTIM_EVENTFASTMODE_DISABLE))) \
mbed_official 381:5460fc57b6e4 1860 || \
mbed_official 381:5460fc57b6e4 1861 (((EVENT) == HRTIM_EVENT_6) || \
mbed_official 381:5460fc57b6e4 1862 ((EVENT) == HRTIM_EVENT_7) || \
mbed_official 381:5460fc57b6e4 1863 ((EVENT) == HRTIM_EVENT_8) || \
mbed_official 381:5460fc57b6e4 1864 ((EVENT) == HRTIM_EVENT_9) || \
mbed_official 381:5460fc57b6e4 1865 ((EVENT) == HRTIM_EVENT_10)))
mbed_official 381:5460fc57b6e4 1866
mbed_official 381:5460fc57b6e4 1867 /**
mbed_official 381:5460fc57b6e4 1868 * @}
mbed_official 381:5460fc57b6e4 1869 */
mbed_official 381:5460fc57b6e4 1870
mbed_official 381:5460fc57b6e4 1871 /** @defgroup HRTIM_External_Event_Filter HRTIM External Event Filter
mbed_official 381:5460fc57b6e4 1872 * @{
mbed_official 381:5460fc57b6e4 1873 * @brief Constants defining the frequency used to sample an external event 6
mbed_official 381:5460fc57b6e4 1874 * input and the length (N) of the digital filter applied
mbed_official 381:5460fc57b6e4 1875 */
mbed_official 381:5460fc57b6e4 1876 #define HRTIM_EVENTFILTER_NONE ((uint32_t)0x00000000) /*!< Filter disabled */
mbed_official 381:5460fc57b6e4 1877 #define HRTIM_EVENTFILTER_1 (HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fHRTIM, N=2 */
mbed_official 381:5460fc57b6e4 1878 #define HRTIM_EVENTFILTER_2 (HRTIM_EECR3_EE6F_1) /*!< fSAMPLING= fHRTIM, N=4 */
mbed_official 381:5460fc57b6e4 1879 #define HRTIM_EVENTFILTER_3 (HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fHRTIM, N=8 */
mbed_official 381:5460fc57b6e4 1880 #define HRTIM_EVENTFILTER_4 (HRTIM_EECR3_EE6F_2) /*!< fSAMPLING= fEEVS/2, N=6 */
mbed_official 381:5460fc57b6e4 1881 #define HRTIM_EVENTFILTER_5 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/2, N=8 */
mbed_official 381:5460fc57b6e4 1882 #define HRTIM_EVENTFILTER_6 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING= fEEVS/4, N=6 */
mbed_official 381:5460fc57b6e4 1883 #define HRTIM_EVENTFILTER_7 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/4, N=8 */
mbed_official 381:5460fc57b6e4 1884 #define HRTIM_EVENTFILTER_8 (HRTIM_EECR3_EE6F_3) /*!< fSAMPLING= fEEVS/8, N=6 */
mbed_official 381:5460fc57b6e4 1885 #define HRTIM_EVENTFILTER_9 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/8, N=8 */
mbed_official 381:5460fc57b6e4 1886 #define HRTIM_EVENTFILTER_10 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING= fEEVS/16, N=5 */
mbed_official 381:5460fc57b6e4 1887 #define HRTIM_EVENTFILTER_11 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/16, N=6 */
mbed_official 381:5460fc57b6e4 1888 #define HRTIM_EVENTFILTER_12 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2) /*!< fSAMPLING= fEEVS/16, N=8 */
mbed_official 381:5460fc57b6e4 1889 #define HRTIM_EVENTFILTER_13 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/32, N=5 */
mbed_official 381:5460fc57b6e4 1890 #define HRTIM_EVENTFILTER_14 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING= fEEVS/32, N=6 */
mbed_official 381:5460fc57b6e4 1891 #define HRTIM_EVENTFILTER_15 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING= fEEVS/32, N=8 */
mbed_official 381:5460fc57b6e4 1892
mbed_official 381:5460fc57b6e4 1893 #define IS_HRTIM_EVENTFILTER(EVENT, FILTER)\
mbed_official 381:5460fc57b6e4 1894 ((((EVENT) == HRTIM_EVENT_1) || \
mbed_official 381:5460fc57b6e4 1895 ((EVENT) == HRTIM_EVENT_2) || \
mbed_official 381:5460fc57b6e4 1896 ((EVENT) == HRTIM_EVENT_3) || \
mbed_official 381:5460fc57b6e4 1897 ((EVENT) == HRTIM_EVENT_4) || \
mbed_official 381:5460fc57b6e4 1898 ((EVENT) == HRTIM_EVENT_5)) \
mbed_official 381:5460fc57b6e4 1899 || \
mbed_official 381:5460fc57b6e4 1900 ((((EVENT) == HRTIM_EVENT_6) || \
mbed_official 381:5460fc57b6e4 1901 ((EVENT) == HRTIM_EVENT_7) || \
mbed_official 381:5460fc57b6e4 1902 ((EVENT) == HRTIM_EVENT_8) || \
mbed_official 381:5460fc57b6e4 1903 ((EVENT) == HRTIM_EVENT_9) || \
mbed_official 381:5460fc57b6e4 1904 ((EVENT) == HRTIM_EVENT_10)) && \
mbed_official 381:5460fc57b6e4 1905 (((FILTER) == HRTIM_EVENTFILTER_NONE) || \
mbed_official 381:5460fc57b6e4 1906 ((FILTER) == HRTIM_EVENTFILTER_1) || \
mbed_official 381:5460fc57b6e4 1907 ((FILTER) == HRTIM_EVENTFILTER_2) || \
mbed_official 381:5460fc57b6e4 1908 ((FILTER) == HRTIM_EVENTFILTER_3) || \
mbed_official 381:5460fc57b6e4 1909 ((FILTER) == HRTIM_EVENTFILTER_4) || \
mbed_official 381:5460fc57b6e4 1910 ((FILTER) == HRTIM_EVENTFILTER_5) || \
mbed_official 381:5460fc57b6e4 1911 ((FILTER) == HRTIM_EVENTFILTER_6) || \
mbed_official 381:5460fc57b6e4 1912 ((FILTER) == HRTIM_EVENTFILTER_7) || \
mbed_official 381:5460fc57b6e4 1913 ((FILTER) == HRTIM_EVENTFILTER_8) || \
mbed_official 381:5460fc57b6e4 1914 ((FILTER) == HRTIM_EVENTFILTER_9) || \
mbed_official 381:5460fc57b6e4 1915 ((FILTER) == HRTIM_EVENTFILTER_10) || \
mbed_official 381:5460fc57b6e4 1916 ((FILTER) == HRTIM_EVENTFILTER_11) || \
mbed_official 381:5460fc57b6e4 1917 ((FILTER) == HRTIM_EVENTFILTER_12) || \
mbed_official 381:5460fc57b6e4 1918 ((FILTER) == HRTIM_EVENTFILTER_13) || \
mbed_official 381:5460fc57b6e4 1919 ((FILTER) == HRTIM_EVENTFILTER_14) || \
mbed_official 381:5460fc57b6e4 1920 ((FILTER) == HRTIM_EVENTFILTER_15))))
mbed_official 381:5460fc57b6e4 1921 /**
mbed_official 381:5460fc57b6e4 1922 * @}
mbed_official 381:5460fc57b6e4 1923 */
mbed_official 381:5460fc57b6e4 1924
mbed_official 381:5460fc57b6e4 1925 /** @defgroup HRTIM_External_Event_Prescaler HRTIM External Event Prescaler
mbed_official 381:5460fc57b6e4 1926 * @{
mbed_official 381:5460fc57b6e4 1927 * @brief Constants defining division ratio between the timer clock frequency
mbed_official 381:5460fc57b6e4 1928 * fHRTIM) and the external event signal sampling clock (fEEVS)
mbed_official 381:5460fc57b6e4 1929 * used by the digital filters
mbed_official 381:5460fc57b6e4 1930 */
mbed_official 381:5460fc57b6e4 1931 #define HRTIM_EVENTPRESCALER_DIV1 ((uint32_t)0x00000000) /*!< fEEVS=fHRTIM */
mbed_official 381:5460fc57b6e4 1932 #define HRTIM_EVENTPRESCALER_DIV2 (HRTIM_EECR3_EEVSD_0) /*!< fEEVS=fHRTIM / 2 */
mbed_official 381:5460fc57b6e4 1933 #define HRTIM_EVENTPRESCALER_DIV4 (HRTIM_EECR3_EEVSD_1) /*!< fEEVS=fHRTIM / 4 */
mbed_official 381:5460fc57b6e4 1934 #define HRTIM_EVENTPRESCALER_DIV8 (HRTIM_EECR3_EEVSD_1 | HRTIM_EECR3_EEVSD_0) /*!< fEEVS=fHRTIM / 8 */
mbed_official 381:5460fc57b6e4 1935
mbed_official 381:5460fc57b6e4 1936 #define IS_HRTIM_EVENTPRESCALER(EVENTPRESCALER)\
mbed_official 381:5460fc57b6e4 1937 (((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV1) || \
mbed_official 381:5460fc57b6e4 1938 ((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV2) || \
mbed_official 381:5460fc57b6e4 1939 ((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV4) || \
mbed_official 381:5460fc57b6e4 1940 ((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV8))
mbed_official 381:5460fc57b6e4 1941 /**
mbed_official 381:5460fc57b6e4 1942 * @}
mbed_official 381:5460fc57b6e4 1943 */
mbed_official 381:5460fc57b6e4 1944
mbed_official 381:5460fc57b6e4 1945 /** @defgroup HRTIM_Fault_Sources HRTIM Fault Sources
mbed_official 381:5460fc57b6e4 1946 * @{
mbed_official 381:5460fc57b6e4 1947 * @brief Constants defining whether a faults is be triggered by any external
mbed_official 381:5460fc57b6e4 1948 * or internal fault source
mbed_official 381:5460fc57b6e4 1949 */
mbed_official 381:5460fc57b6e4 1950 #define HRTIM_FAULTSOURCE_DIGITALINPUT ((uint32_t)0x00000000) /*!< Fault input is FLT input pin */
mbed_official 381:5460fc57b6e4 1951 #define HRTIM_FAULTSOURCE_INTERNAL (HRTIM_FLTINR1_FLT1SRC) /*!< Fault input is FLT_Int signal (e.g. internal comparator) */
mbed_official 381:5460fc57b6e4 1952
mbed_official 381:5460fc57b6e4 1953
mbed_official 381:5460fc57b6e4 1954 #define IS_HRTIM_FAULTSOURCE(FAULTSOURCE)\
mbed_official 381:5460fc57b6e4 1955 (((FAULTSOURCE) == HRTIM_FAULTSOURCE_DIGITALINPUT) || \
mbed_official 381:5460fc57b6e4 1956 ((FAULTSOURCE) == HRTIM_FAULTSOURCE_INTERNAL))
mbed_official 381:5460fc57b6e4 1957 /**
mbed_official 381:5460fc57b6e4 1958 * @}
mbed_official 381:5460fc57b6e4 1959 */
mbed_official 381:5460fc57b6e4 1960
mbed_official 381:5460fc57b6e4 1961 /** @defgroup HRTIM_Fault_Polarity HRTIM Fault Polarity
mbed_official 381:5460fc57b6e4 1962 * @{
mbed_official 381:5460fc57b6e4 1963 * @brief Constants defining the polarity of a fault event
mbed_official 381:5460fc57b6e4 1964 */
mbed_official 381:5460fc57b6e4 1965 #define HRTIM_FAULTPOLARITY_LOW ((uint32_t)0x00000000) /*!< Fault input is active low */
mbed_official 381:5460fc57b6e4 1966 #define HRTIM_FAULTPOLARITY_HIGH (HRTIM_FLTINR1_FLT1P) /*!< Fault input is active high */
mbed_official 381:5460fc57b6e4 1967
mbed_official 381:5460fc57b6e4 1968 #define IS_HRTIM_FAULTPOLARITY(HRTIM_FAULTPOLARITY)\
mbed_official 381:5460fc57b6e4 1969 (((HRTIM_FAULTPOLARITY) == HRTIM_FAULTPOLARITY_LOW) || \
mbed_official 381:5460fc57b6e4 1970 ((HRTIM_FAULTPOLARITY) == HRTIM_FAULTPOLARITY_HIGH))
mbed_official 381:5460fc57b6e4 1971 /**
mbed_official 381:5460fc57b6e4 1972 * @}
mbed_official 381:5460fc57b6e4 1973 */
mbed_official 381:5460fc57b6e4 1974
mbed_official 381:5460fc57b6e4 1975 /** @defgroup HRTIM_Fault_Filter HRTIM Fault Filter
mbed_official 381:5460fc57b6e4 1976 * @{
mbed_official 381:5460fc57b6e4 1977 * @ brief Constants defining the frequency used to sample the fault input and
mbed_official 381:5460fc57b6e4 1978 * the length (N) of the digital filter applied
mbed_official 381:5460fc57b6e4 1979 */
mbed_official 381:5460fc57b6e4 1980 #define HRTIM_FAULTFILTER_NONE ((uint32_t)0x00000000) /*!< Filter disabled */
mbed_official 381:5460fc57b6e4 1981 #define HRTIM_FAULTFILTER_1 (HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=2 */
mbed_official 381:5460fc57b6e4 1982 #define HRTIM_FAULTFILTER_2 (HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fHRTIM, N=4 */
mbed_official 381:5460fc57b6e4 1983 #define HRTIM_FAULTFILTER_3 (HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=8 */
mbed_official 381:5460fc57b6e4 1984 #define HRTIM_FAULTFILTER_4 (HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/2, N=6 */
mbed_official 381:5460fc57b6e4 1985 #define HRTIM_FAULTFILTER_5 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/2, N=8 */
mbed_official 381:5460fc57b6e4 1986 #define HRTIM_FAULTFILTER_6 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/4, N=6 */
mbed_official 381:5460fc57b6e4 1987 #define HRTIM_FAULTFILTER_7 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/4, N=8 */
mbed_official 381:5460fc57b6e4 1988 #define HRTIM_FAULTFILTER_8 (HRTIM_FLTINR1_FLT1F_3) /*!< fSAMPLING= fFLTS/8, N=6 */
mbed_official 381:5460fc57b6e4 1989 #define HRTIM_FAULTFILTER_9 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/8, N=8 */
mbed_official 381:5460fc57b6e4 1990 #define HRTIM_FAULTFILTER_10 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/16, N=5 */
mbed_official 381:5460fc57b6e4 1991 #define HRTIM_FAULTFILTER_11 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/16, N=6 */
mbed_official 381:5460fc57b6e4 1992 #define HRTIM_FAULTFILTER_12 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/16, N=8 */
mbed_official 381:5460fc57b6e4 1993 #define HRTIM_FAULTFILTER_13 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=5 */
mbed_official 381:5460fc57b6e4 1994 #define HRTIM_FAULTFILTER_14 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/32, N=6 */
mbed_official 381:5460fc57b6e4 1995 #define HRTIM_FAULTFILTER_15 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=8 */
mbed_official 381:5460fc57b6e4 1996
mbed_official 381:5460fc57b6e4 1997 #define IS_HRTIM_FAULTFILTER(FAULTFILTER)\
mbed_official 381:5460fc57b6e4 1998 (((FAULTFILTER) == HRTIM_FAULTFILTER_NONE) || \
mbed_official 381:5460fc57b6e4 1999 ((FAULTFILTER) == HRTIM_FAULTFILTER_1) || \
mbed_official 381:5460fc57b6e4 2000 ((FAULTFILTER) == HRTIM_FAULTFILTER_2) || \
mbed_official 381:5460fc57b6e4 2001 ((FAULTFILTER) == HRTIM_FAULTFILTER_3) || \
mbed_official 381:5460fc57b6e4 2002 ((FAULTFILTER) == HRTIM_FAULTFILTER_4) || \
mbed_official 381:5460fc57b6e4 2003 ((FAULTFILTER) == HRTIM_FAULTFILTER_5) || \
mbed_official 381:5460fc57b6e4 2004 ((FAULTFILTER) == HRTIM_FAULTFILTER_6) || \
mbed_official 381:5460fc57b6e4 2005 ((FAULTFILTER) == HRTIM_FAULTFILTER_7) || \
mbed_official 381:5460fc57b6e4 2006 ((FAULTFILTER) == HRTIM_FAULTFILTER_8) || \
mbed_official 381:5460fc57b6e4 2007 ((FAULTFILTER) == HRTIM_FAULTFILTER_9) || \
mbed_official 381:5460fc57b6e4 2008 ((FAULTFILTER) == HRTIM_FAULTFILTER_10) || \
mbed_official 381:5460fc57b6e4 2009 ((FAULTFILTER) == HRTIM_FAULTFILTER_11) || \
mbed_official 381:5460fc57b6e4 2010 ((FAULTFILTER) == HRTIM_FAULTFILTER_12) || \
mbed_official 381:5460fc57b6e4 2011 ((FAULTFILTER) == HRTIM_FAULTFILTER_13) || \
mbed_official 381:5460fc57b6e4 2012 ((FAULTFILTER) == HRTIM_FAULTFILTER_14) || \
mbed_official 381:5460fc57b6e4 2013 ((FAULTFILTER) == HRTIM_FAULTFILTER_15))
mbed_official 381:5460fc57b6e4 2014 /**
mbed_official 381:5460fc57b6e4 2015 * @}
mbed_official 381:5460fc57b6e4 2016 */
mbed_official 381:5460fc57b6e4 2017
mbed_official 381:5460fc57b6e4 2018 /** @defgroup HRTIM_Fault_Lock HRTIM Fault Lock
mbed_official 381:5460fc57b6e4 2019 * @{
mbed_official 381:5460fc57b6e4 2020 * @brief Constants defining whether or not the fault programming bits are
mbed_official 381:5460fc57b6e4 2021 write protected
mbed_official 381:5460fc57b6e4 2022 */
mbed_official 381:5460fc57b6e4 2023 #define HRTIM_FAULTLOCK_READWRITE ((uint32_t)0x00000000) /*!< Fault settings bits are read/write */
mbed_official 381:5460fc57b6e4 2024 #define HRTIM_FAULTLOCK_READONLY (HRTIM_FLTINR1_FLT1LCK) /*!< Fault settings bits are read only */
mbed_official 381:5460fc57b6e4 2025
mbed_official 381:5460fc57b6e4 2026 #define IS_HRTIM_FAULTLOCK(FAULTLOCK)\
mbed_official 381:5460fc57b6e4 2027 (((FAULTLOCK) == HRTIM_FAULTLOCK_READWRITE) || \
mbed_official 381:5460fc57b6e4 2028 ((FAULTLOCK) == HRTIM_FAULTLOCK_READONLY))
mbed_official 381:5460fc57b6e4 2029 /**
mbed_official 381:5460fc57b6e4 2030 * @}
mbed_official 381:5460fc57b6e4 2031 */
mbed_official 381:5460fc57b6e4 2032
mbed_official 381:5460fc57b6e4 2033 /** @defgroup HRTIM_External_Fault_Prescaler HRTIM External Fault Prescaler
mbed_official 381:5460fc57b6e4 2034 * @{
mbed_official 381:5460fc57b6e4 2035 * @brief Constants defining the division ratio between the timer clock
mbed_official 381:5460fc57b6e4 2036 * frequency (fHRTIM) and the fault signal sampling clock (fFLTS) used
mbed_official 381:5460fc57b6e4 2037 * by the digital filters.
mbed_official 381:5460fc57b6e4 2038 */
mbed_official 381:5460fc57b6e4 2039 #define HRTIM_FAULTPRESCALER_DIV1 ((uint32_t)0x00000000) /*!< fFLTS=fHRTIM */
mbed_official 381:5460fc57b6e4 2040 #define HRTIM_FAULTPRESCALER_DIV2 (HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS=fHRTIM / 2 */
mbed_official 381:5460fc57b6e4 2041 #define HRTIM_FAULTPRESCALER_DIV4 (HRTIM_FLTINR2_FLTSD_1) /*!< fFLTS=fHRTIM / 4 */
mbed_official 381:5460fc57b6e4 2042 #define HRTIM_FAULTPRESCALER_DIV8 (HRTIM_FLTINR2_FLTSD_1 | HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS=fHRTIM / 8 */
mbed_official 381:5460fc57b6e4 2043
mbed_official 381:5460fc57b6e4 2044 #define IS_HRTIM_FAULTPRESCALER(FAULTPRESCALER)\
mbed_official 381:5460fc57b6e4 2045 (((FAULTPRESCALER) == HRTIM_FAULTPRESCALER_DIV1) || \
mbed_official 381:5460fc57b6e4 2046 ((FAULTPRESCALER) == HRTIM_FAULTPRESCALER_DIV2) || \
mbed_official 381:5460fc57b6e4 2047 ((FAULTPRESCALER) == HRTIM_FAULTPRESCALER_DIV4) || \
mbed_official 381:5460fc57b6e4 2048 ((FAULTPRESCALER) == HRTIM_FAULTPRESCALER_DIV8))
mbed_official 381:5460fc57b6e4 2049 /**
mbed_official 381:5460fc57b6e4 2050 * @}
mbed_official 381:5460fc57b6e4 2051 */
mbed_official 381:5460fc57b6e4 2052
mbed_official 381:5460fc57b6e4 2053 /** @defgroup HRTIM_Burst_Mode_Operating_Mode HRTIM Burst Mode Operating Mode
mbed_official 381:5460fc57b6e4 2054 * @{
mbed_official 381:5460fc57b6e4 2055 * @brief Constants defining if the burst mode is entered once or if it is
mbed_official 381:5460fc57b6e4 2056 * continuously operating
mbed_official 381:5460fc57b6e4 2057 */
mbed_official 381:5460fc57b6e4 2058 #define HRTIM_BURSTMODE_SINGLESHOT ((uint32_t)0x00000000) /*!< Burst mode operates in single shot mode */
mbed_official 381:5460fc57b6e4 2059 #define HRTIM_BURSTMODE_CONTINOUS (HRTIM_BMCR_BMOM) /*!< Burst mode operates in continuous mode */
mbed_official 381:5460fc57b6e4 2060
mbed_official 381:5460fc57b6e4 2061 #define IS_HRTIM_BURSTMODE(BURSTMODE)\
mbed_official 381:5460fc57b6e4 2062 (((BURSTMODE) == HRTIM_BURSTMODE_SINGLESHOT) || \
mbed_official 381:5460fc57b6e4 2063 ((BURSTMODE) == HRTIM_BURSTMODE_CONTINOUS))
mbed_official 381:5460fc57b6e4 2064 /**
mbed_official 381:5460fc57b6e4 2065 * @}
mbed_official 381:5460fc57b6e4 2066 */
mbed_official 381:5460fc57b6e4 2067
mbed_official 381:5460fc57b6e4 2068 /** @defgroup HRTIM_Burst_Mode_Clock_Source HRTIM Burst Mode Clock Source
mbed_official 381:5460fc57b6e4 2069 * @{
mbed_official 381:5460fc57b6e4 2070 * @brief Constants defining the clock source for the burst mode counter
mbed_official 381:5460fc57b6e4 2071 */
mbed_official 381:5460fc57b6e4 2072 #define HRTIM_BURSTMODECLOCKSOURCE_MASTER ((uint32_t)0x00000000) /*!< Master timer counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2073 #define HRTIM_BURSTMODECLOCKSOURCE_TIMER_A (HRTIM_BMCR_BMCLK_0) /*!< Timer A counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2074 #define HRTIM_BURSTMODECLOCKSOURCE_TIMER_B (HRTIM_BMCR_BMCLK_1) /*!< Timer B counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2075 #define HRTIM_BURSTMODECLOCKSOURCE_TIMER_C (HRTIM_BMCR_BMCLK_1 | HRTIM_BMCR_BMCLK_0) /*!< Timer C counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2076 #define HRTIM_BURSTMODECLOCKSOURCE_TIMER_D (HRTIM_BMCR_BMCLK_2) /*!< Timer D counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2077 #define HRTIM_BURSTMODECLOCKSOURCE_TIMER_E (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_0) /*!< Timer E counter reset/roll-over is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2078 #define HRTIM_BURSTMODECLOCKSOURCE_TIM16_OC (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_1) /*!< On-chip Event 1 (BMClk[1]), acting as a burst mode counter clock */
mbed_official 381:5460fc57b6e4 2079 #define HRTIM_BURSTMODECLOCKSOURCE_TIM17_OC (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_1 | HRTIM_BMCR_BMCLK_0) /*!< On-chip Event 2 (BMClk[2]), acting as a burst mode counter clock */
mbed_official 381:5460fc57b6e4 2080 #define HRTIM_BURSTMODECLOCKSOURCE_TIM7_TRGO (HRTIM_BMCR_BMCLK_3) /*!< On-chip Event 3 (BMClk[3]), acting as a burst mode counter clock */
mbed_official 381:5460fc57b6e4 2081 #define HRTIM_BURSTMODECLOCKSOURCE_FHRTIM (HRTIM_BMCR_BMCLK_3 | HRTIM_BMCR_BMCLK_1) /*!< Prescaled fHRTIM clock is used as clock source for the burst mode counter */
mbed_official 381:5460fc57b6e4 2082
mbed_official 381:5460fc57b6e4 2083 #define IS_HRTIM_BURSTMODECLOCKSOURCE(BURSTMODECLOCKSOURCE)\
mbed_official 381:5460fc57b6e4 2084 (((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_MASTER) || \
mbed_official 381:5460fc57b6e4 2085 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIMER_A) || \
mbed_official 381:5460fc57b6e4 2086 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIMER_B) || \
mbed_official 381:5460fc57b6e4 2087 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIMER_C) || \
mbed_official 381:5460fc57b6e4 2088 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIMER_D) || \
mbed_official 381:5460fc57b6e4 2089 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIMER_E) || \
mbed_official 381:5460fc57b6e4 2090 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIM16_OC) || \
mbed_official 381:5460fc57b6e4 2091 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIM17_OC) || \
mbed_official 381:5460fc57b6e4 2092 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_TIM7_TRGO) || \
mbed_official 381:5460fc57b6e4 2093 ((BURSTMODECLOCKSOURCE) == HRTIM_BURSTMODECLOCKSOURCE_FHRTIM))
mbed_official 381:5460fc57b6e4 2094 /**
mbed_official 381:5460fc57b6e4 2095 * @}
mbed_official 381:5460fc57b6e4 2096 */
mbed_official 381:5460fc57b6e4 2097
mbed_official 381:5460fc57b6e4 2098 /** @defgroup HRTIM_Burst_Mode_Prescaler HRTIM Burst Mode Prescaler
mbed_official 381:5460fc57b6e4 2099 * @{
mbed_official 381:5460fc57b6e4 2100 * @brief Constants defining the prescaling ratio of the fHRTIM clock
mbed_official 381:5460fc57b6e4 2101 * for the burst mode controller
mbed_official 381:5460fc57b6e4 2102 */
mbed_official 381:5460fc57b6e4 2103 #define HRTIM_BURSTMODEPRESCALER_DIV1 ((uint32_t)0x00000000) /*!< fBRST = fHRTIM */
mbed_official 381:5460fc57b6e4 2104 #define HRTIM_BURSTMODEPRESCALER_DIV2 (HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2 */
mbed_official 381:5460fc57b6e4 2105 #define HRTIM_BURSTMODEPRESCALER_DIV4 (HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/4 */
mbed_official 381:5460fc57b6e4 2106 #define HRTIM_BURSTMODEPRESCALER_DIV8 (HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8 */
mbed_official 381:5460fc57b6e4 2107 #define HRTIM_BURSTMODEPRESCALER_DIV16 (HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/16 */
mbed_official 381:5460fc57b6e4 2108 #define HRTIM_BURSTMODEPRESCALER_DIV32 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32 */
mbed_official 381:5460fc57b6e4 2109 #define HRTIM_BURSTMODEPRESCALER_DIV64 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/64 */
mbed_official 381:5460fc57b6e4 2110 #define HRTIM_BURSTMODEPRESCALER_DIV128 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/128 */
mbed_official 381:5460fc57b6e4 2111 #define HRTIM_BURSTMODEPRESCALER_DIV256 (HRTIM_BMCR_BMPRSC_3) /*!< fBRST = fHRTIM/256 */
mbed_official 381:5460fc57b6e4 2112 #define HRTIM_BURSTMODEPRESCALER_DIV512 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/512 */
mbed_official 381:5460fc57b6e4 2113 #define HRTIM_BURSTMODEPRESCALER_DIV1024 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/1024 */
mbed_official 381:5460fc57b6e4 2114 #define HRTIM_BURSTMODEPRESCALER_DIV2048 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2048*/
mbed_official 381:5460fc57b6e4 2115 #define HRTIM_BURSTMODEPRESCALER_DIV4096 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/4096 */
mbed_official 381:5460fc57b6e4 2116 #define HRTIM_BURSTMODEPRESCALER_DIV8192 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8192 */
mbed_official 381:5460fc57b6e4 2117 #define HRTIM_BURSTMODEPRESCALER_DIV16384 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/16384 */
mbed_official 381:5460fc57b6e4 2118 #define HRTIM_BURSTMODEPRESCALER_DIV32768 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32768 */
mbed_official 381:5460fc57b6e4 2119
mbed_official 381:5460fc57b6e4 2120 #define IS_HRTIM_HRTIM_BURSTMODEPRESCALER(BURSTMODEPRESCALER)\
mbed_official 381:5460fc57b6e4 2121 (((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV1) || \
mbed_official 381:5460fc57b6e4 2122 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV2) || \
mbed_official 381:5460fc57b6e4 2123 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV4) || \
mbed_official 381:5460fc57b6e4 2124 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV8) || \
mbed_official 381:5460fc57b6e4 2125 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV16) || \
mbed_official 381:5460fc57b6e4 2126 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV32) || \
mbed_official 381:5460fc57b6e4 2127 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV64) || \
mbed_official 381:5460fc57b6e4 2128 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV128) || \
mbed_official 381:5460fc57b6e4 2129 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV256) || \
mbed_official 381:5460fc57b6e4 2130 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV512) || \
mbed_official 381:5460fc57b6e4 2131 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV1024) || \
mbed_official 381:5460fc57b6e4 2132 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV2048) || \
mbed_official 381:5460fc57b6e4 2133 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV4096) || \
mbed_official 381:5460fc57b6e4 2134 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV8192) || \
mbed_official 381:5460fc57b6e4 2135 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV16384) || \
mbed_official 381:5460fc57b6e4 2136 ((BURSTMODEPRESCALER) == HRTIM_BURSTMODEPRESCALER_DIV32768))
mbed_official 381:5460fc57b6e4 2137 /**
mbed_official 381:5460fc57b6e4 2138 * @}
mbed_official 381:5460fc57b6e4 2139 */
mbed_official 381:5460fc57b6e4 2140
mbed_official 381:5460fc57b6e4 2141 /** @defgroup HRTIM_Burst_Mode_Register_Preload_Enable HRTIM Burst Mode Register Preload Enable
mbed_official 381:5460fc57b6e4 2142 * @{
mbed_official 381:5460fc57b6e4 2143 * @brief Constants defining whether or not burst mode registers preload
mbed_official 381:5460fc57b6e4 2144 mechanism is enabled, i.e. a write access into a preloadable register
mbed_official 381:5460fc57b6e4 2145 (HRTIM_BMCMPR, HRTIM_BMPER) is done into the active or the preload register
mbed_official 381:5460fc57b6e4 2146 */
mbed_official 381:5460fc57b6e4 2147 #define HRIM_BURSTMODEPRELOAD_DISABLED ((uint32_t)0x00000000) /*!< Preload disabled: the write access is directly done into active registers */
mbed_official 381:5460fc57b6e4 2148 #define HRIM_BURSTMODEPRELOAD_ENABLED (HRTIM_BMCR_BMPREN) /*!< Preload enabled: the write access is done into preload registers */
mbed_official 381:5460fc57b6e4 2149
mbed_official 381:5460fc57b6e4 2150 #define IS_HRTIM_BURSTMODEPRELOAD(BURSTMODEPRELOAD)\
mbed_official 381:5460fc57b6e4 2151 (((BURSTMODEPRELOAD) == HRIM_BURSTMODEPRELOAD_DISABLED) || \
mbed_official 381:5460fc57b6e4 2152 ((BURSTMODEPRELOAD) == HRIM_BURSTMODEPRELOAD_ENABLED))
mbed_official 381:5460fc57b6e4 2153 /**
mbed_official 381:5460fc57b6e4 2154 * @}
mbed_official 381:5460fc57b6e4 2155 */
mbed_official 381:5460fc57b6e4 2156
mbed_official 381:5460fc57b6e4 2157 /** @defgroup HRTIM_Burst_Mode_Trigger HRTIM Burst Mode Trigger
mbed_official 381:5460fc57b6e4 2158 * @{
mbed_official 381:5460fc57b6e4 2159 * @brief Constants defining the events that can be used tor trig the burst
mbed_official 381:5460fc57b6e4 2160 * mode operation
mbed_official 381:5460fc57b6e4 2161 */
mbed_official 381:5460fc57b6e4 2162 #define HRTIM_BURSTMODETRIGGER_NONE (uint32_t)0x00000000 /*!< No trigger */
mbed_official 381:5460fc57b6e4 2163 #define HRTIM_BURSTMODETRIGGER_MASTER_RESET (HRTIM_BMTRGR_MSTRST) /*!< Master reset */
mbed_official 381:5460fc57b6e4 2164 #define HRTIM_BURSTMODETRIGGER_MASTER_REPETITION (HRTIM_BMTRGR_MSTREP) /*!< Master repetition */
mbed_official 381:5460fc57b6e4 2165 #define HRTIM_BURSTMODETRIGGER_MASTER_CMP1 (HRTIM_BMTRGR_MSTCMP1) /*!< Master compare 1 */
mbed_official 381:5460fc57b6e4 2166 #define HRTIM_BURSTMODETRIGGER_MASTER_CMP2 (HRTIM_BMTRGR_MSTCMP2) /*!< Master compare 2 */
mbed_official 381:5460fc57b6e4 2167 #define HRTIM_BURSTMODETRIGGER_MASTER_CMP3 (HRTIM_BMTRGR_MSTCMP3) /*!< Master compare 3 */
mbed_official 381:5460fc57b6e4 2168 #define HRTIM_BURSTMODETRIGGER_MASTER_CMP4 (HRTIM_BMTRGR_MSTCMP4) /*!< Master compare 4 */
mbed_official 381:5460fc57b6e4 2169 #define HRTIM_BURSTMODETRIGGER_TIMERA_RESET (HRTIM_BMTRGR_TARST) /*!< Timer A reset */
mbed_official 381:5460fc57b6e4 2170 #define HRTIM_BURSTMODETRIGGER_TIMERA_REPETITION (HRTIM_BMTRGR_TAREP) /*!< Timer A repetition */
mbed_official 381:5460fc57b6e4 2171 #define HRTIM_BURSTMODETRIGGER_TIMERA_CMP1 (HRTIM_BMTRGR_TACMP1) /*!< Timer A compare 1 */
mbed_official 381:5460fc57b6e4 2172 #define HRTIM_BURSTMODETRIGGER_TIMERA_CMP2 (HRTIM_BMTRGR_TACMP2) /*!< Timer A compare 2 */
mbed_official 381:5460fc57b6e4 2173 #define HRTIM_BURSTMODETRIGGER_TIMERB_RESET (HRTIM_BMTRGR_TBRST) /*!< Timer B reset */
mbed_official 381:5460fc57b6e4 2174 #define HRTIM_BURSTMODETRIGGER_TIMERB_REPETITION (HRTIM_BMTRGR_TBREP) /*!< Timer B repetition */
mbed_official 381:5460fc57b6e4 2175 #define HRTIM_BURSTMODETRIGGER_TIMERB_CMP1 (HRTIM_BMTRGR_TBCMP1) /*!< Timer B compare 1 */
mbed_official 381:5460fc57b6e4 2176 #define HRTIM_BURSTMODETRIGGER_TIMERB_CMP2 (HRTIM_BMTRGR_TBCMP2) /*!< Timer B compare 2 */
mbed_official 381:5460fc57b6e4 2177 #define HRTIM_BURSTMODETRIGGER_TIMERC_RESET (HRTIM_BMTRGR_TCRST) /*!< Timer C reset */
mbed_official 381:5460fc57b6e4 2178 #define HRTIM_BURSTMODETRIGGER_TIMERC_REPETITION (HRTIM_BMTRGR_TCREP) /*!< Timer C repetition */
mbed_official 381:5460fc57b6e4 2179 #define HRTIM_BURSTMODETRIGGER_TIMERC_CMP1 (HRTIM_BMTRGR_TCCMP1) /*!< Timer C compare 1 */
mbed_official 381:5460fc57b6e4 2180 #define HRTIM_BURSTMODETRIGGER_TIMERC_CMP2 (HRTIM_BMTRGR_TCCMP2) /*!< Timer C compare 2 */
mbed_official 381:5460fc57b6e4 2181 #define HRTIM_BURSTMODETRIGGER_TIMERD_RESET (HRTIM_BMTRGR_TDRST) /*!< Timer D reset */
mbed_official 381:5460fc57b6e4 2182 #define HRTIM_BURSTMODETRIGGER_TIMERD_REPETITION (HRTIM_BMTRGR_TDREP) /*!< Timer D repetition */
mbed_official 381:5460fc57b6e4 2183 #define HRTIM_BURSTMODETRIGGER_TIMERD_CMP1 (HRTIM_BMTRGR_TDCMP1) /*!< Timer D compare 1 */
mbed_official 381:5460fc57b6e4 2184 #define HRTIM_BURSTMODETRIGGER_TIMERD_CMP2 (HRTIM_BMTRGR_TDCMP2) /*!< Timer D compare 2 */
mbed_official 381:5460fc57b6e4 2185 #define HRTIM_BURSTMODETRIGGER_TIMERE_RESET (HRTIM_BMTRGR_TERST) /*!< Timer E reset */
mbed_official 381:5460fc57b6e4 2186 #define HRTIM_BURSTMODETRIGGER_TIMERE_REPETITION (HRTIM_BMTRGR_TEREP) /*!< Timer E repetition */
mbed_official 381:5460fc57b6e4 2187 #define HRTIM_BURSTMODETRIGGER_TIMERE_CMP1 (HRTIM_BMTRGR_TECMP1) /*!< Timer E compare 1 */
mbed_official 381:5460fc57b6e4 2188 #define HRTIM_BURSTMODETRIGGER_TIMERE_CMP2 (HRTIM_BMTRGR_TECMP2) /*!< Timer E compare 2 */
mbed_official 381:5460fc57b6e4 2189 #define HRTIM_BURSTMODETRIGGER_TIMERA_EVENT7 (HRTIM_BMTRGR_TAEEV7) /*!< Timer A period following External Event 7 */
mbed_official 381:5460fc57b6e4 2190 #define HRTIM_BURSTMODETRIGGER_TIMERD_EVENT8 (HRTIM_BMTRGR_TDEEV8) /*!< Timer D period following External Event 8 */
mbed_official 381:5460fc57b6e4 2191 #define HRTIM_BURSTMODETRIGGER_EVENT_7 (HRTIM_BMTRGR_EEV7) /*!< External Event 7 (timer A filters applied) */
mbed_official 381:5460fc57b6e4 2192 #define HRTIM_BURSTMODETRIGGER_EVENT_8 (HRTIM_BMTRGR_EEV8) /*!< External Event 8 (timer D filters applied)*/
mbed_official 381:5460fc57b6e4 2193 #define HRTIM_BURSTMODETRIGGER_EVENT_ONCHIP (HRTIM_BMTRGR_OCHPEV) /*!< On-chip Event */
mbed_official 381:5460fc57b6e4 2194
mbed_official 381:5460fc57b6e4 2195 #define IS_HRTIM_BURSTMODETRIGGER(BURSTMODETRIGGER)\
mbed_official 381:5460fc57b6e4 2196 (((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_NONE) || \
mbed_official 381:5460fc57b6e4 2197 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_RESET) || \
mbed_official 381:5460fc57b6e4 2198 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_REPETITION) || \
mbed_official 381:5460fc57b6e4 2199 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_CMP1) || \
mbed_official 381:5460fc57b6e4 2200 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_CMP2) || \
mbed_official 381:5460fc57b6e4 2201 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_CMP3) || \
mbed_official 381:5460fc57b6e4 2202 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_MASTER_CMP4) || \
mbed_official 381:5460fc57b6e4 2203 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERA_RESET) || \
mbed_official 381:5460fc57b6e4 2204 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERA_REPETITION) || \
mbed_official 381:5460fc57b6e4 2205 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERA_CMP1) || \
mbed_official 381:5460fc57b6e4 2206 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERA_CMP2) || \
mbed_official 381:5460fc57b6e4 2207 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERB_RESET) || \
mbed_official 381:5460fc57b6e4 2208 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERB_REPETITION) || \
mbed_official 381:5460fc57b6e4 2209 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERB_CMP1) || \
mbed_official 381:5460fc57b6e4 2210 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERB_CMP2) || \
mbed_official 381:5460fc57b6e4 2211 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERC_RESET) || \
mbed_official 381:5460fc57b6e4 2212 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERC_REPETITION) || \
mbed_official 381:5460fc57b6e4 2213 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERC_CMP1) || \
mbed_official 381:5460fc57b6e4 2214 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERC_CMP2) || \
mbed_official 381:5460fc57b6e4 2215 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERD_RESET) || \
mbed_official 381:5460fc57b6e4 2216 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERD_REPETITION) || \
mbed_official 381:5460fc57b6e4 2217 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERD_CMP1) || \
mbed_official 381:5460fc57b6e4 2218 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERD_CMP2) || \
mbed_official 381:5460fc57b6e4 2219 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERE_RESET) || \
mbed_official 381:5460fc57b6e4 2220 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERE_REPETITION) || \
mbed_official 381:5460fc57b6e4 2221 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERE_CMP1) || \
mbed_official 381:5460fc57b6e4 2222 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERE_CMP2) || \
mbed_official 381:5460fc57b6e4 2223 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERA_EVENT7) || \
mbed_official 381:5460fc57b6e4 2224 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_TIMERD_EVENT8) || \
mbed_official 381:5460fc57b6e4 2225 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_EVENT_7) || \
mbed_official 381:5460fc57b6e4 2226 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_EVENT_8) || \
mbed_official 381:5460fc57b6e4 2227 ((BURSTMODETRIGGER) == HRTIM_BURSTMODETRIGGER_EVENT_ONCHIP))
mbed_official 381:5460fc57b6e4 2228 /**
mbed_official 381:5460fc57b6e4 2229 * @}
mbed_official 381:5460fc57b6e4 2230 */
mbed_official 381:5460fc57b6e4 2231
mbed_official 381:5460fc57b6e4 2232 /** @defgroup HRTIM_ADC_Trigger_Update_Source HRTIM ADC Trigger Update Source
mbed_official 381:5460fc57b6e4 2233 * @{
mbed_official 381:5460fc57b6e4 2234 * @brief constants defining the source triggering the update of the
mbed_official 381:5460fc57b6e4 2235 HRTIM_ADCxR register (transfer from preload to active register).
mbed_official 381:5460fc57b6e4 2236 */
mbed_official 381:5460fc57b6e4 2237 #define HRTIM_ADCTRIGGERUPDATE_MASTER (uint32_t)0x00000000 /*!< Master timer */
mbed_official 381:5460fc57b6e4 2238 #define HRTIM_ADCTRIGGERUPDATE_TIMER_A (HRTIM_CR1_ADC1USRC_0) /*!< Timer A */
mbed_official 381:5460fc57b6e4 2239 #define HRTIM_ADCTRIGGERUPDATE_TIMER_B (HRTIM_CR1_ADC1USRC_1) /*!< Timer B */
mbed_official 381:5460fc57b6e4 2240 #define HRTIM_ADCTRIGGERUPDATE_TIMER_C (HRTIM_CR1_ADC1USRC_1 | HRTIM_CR1_ADC1USRC_0) /*!< Timer C */
mbed_official 381:5460fc57b6e4 2241 #define HRTIM_ADCTRIGGERUPDATE_TIMER_D (HRTIM_CR1_ADC1USRC_2) /*!< Timer D */
mbed_official 381:5460fc57b6e4 2242 #define HRTIM_ADCTRIGGERUPDATE_TIMER_E (HRTIM_CR1_ADC1USRC_2 | HRTIM_CR1_ADC1USRC_0) /*!< Timer E */
mbed_official 381:5460fc57b6e4 2243
mbed_official 381:5460fc57b6e4 2244 #define IS_HRTIM_ADCTRIGGERUPDATE(ADCTRIGGERUPDATE)\
mbed_official 381:5460fc57b6e4 2245 (((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_MASTER) || \
mbed_official 381:5460fc57b6e4 2246 ((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_TIMER_A) || \
mbed_official 381:5460fc57b6e4 2247 ((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_TIMER_B) || \
mbed_official 381:5460fc57b6e4 2248 ((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_TIMER_C) || \
mbed_official 381:5460fc57b6e4 2249 ((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_TIMER_D) || \
mbed_official 381:5460fc57b6e4 2250 ((ADCTRIGGERUPDATE) == HRTIM_ADCTRIGGERUPDATE_TIMER_E))
mbed_official 381:5460fc57b6e4 2251 /**
mbed_official 381:5460fc57b6e4 2252 * @}
mbed_official 381:5460fc57b6e4 2253 */
mbed_official 381:5460fc57b6e4 2254
mbed_official 381:5460fc57b6e4 2255 /** @defgroup HRTIM_ADC_Trigger_Event HRTIM ADC Trigger Event
mbed_official 381:5460fc57b6e4 2256 * @{
mbed_official 381:5460fc57b6e4 2257 * @brief constants defining the events triggering ADC conversion.
mbed_official 381:5460fc57b6e4 2258 * HRTIM_ADCTRIGGEREVENT13_*: ADC Triggers 1 and 3
mbed_official 381:5460fc57b6e4 2259 * HRTIM_ADCTRIGGEREVENT24_*: ADC Triggers 2 and 4
mbed_official 381:5460fc57b6e4 2260 */
mbed_official 381:5460fc57b6e4 2261 #define HRTIM_ADCTRIGGEREVENT13_NONE (uint32_t)0x00000000 /*!< No ADC trigger event */
mbed_official 381:5460fc57b6e4 2262 #define HRTIM_ADCTRIGGEREVENT13_MASTER_CMP1 (HRTIM_ADC1R_AD1MC1) /*!< ADC Trigger on master compare 1 */
mbed_official 381:5460fc57b6e4 2263 #define HRTIM_ADCTRIGGEREVENT13_MASTER_CMP2 (HRTIM_ADC1R_AD1MC2) /*!< ADC Trigger on master compare 2 */
mbed_official 381:5460fc57b6e4 2264 #define HRTIM_ADCTRIGGEREVENT13_MASTER_CMP3 (HRTIM_ADC1R_AD1MC3) /*!< ADC Trigger on master compare 3 */
mbed_official 381:5460fc57b6e4 2265 #define HRTIM_ADCTRIGGEREVENT13_MASTER_CMP4 (HRTIM_ADC1R_AD1MC4) /*!< ADC Trigger on master compare 4 */
mbed_official 381:5460fc57b6e4 2266 #define HRTIM_ADCTRIGGEREVENT13_MASTER_PERIOD (HRTIM_ADC1R_AD1MPER) /*!< ADC Trigger on master period */
mbed_official 381:5460fc57b6e4 2267 #define HRTIM_ADCTRIGGEREVENT13_EVENT_1 (HRTIM_ADC1R_AD1EEV1) /*!< ADC Trigger on external event 1 */
mbed_official 381:5460fc57b6e4 2268 #define HRTIM_ADCTRIGGEREVENT13_EVENT_2 (HRTIM_ADC1R_AD1EEV2) /*!< ADC Trigger on external event 2 */
mbed_official 381:5460fc57b6e4 2269 #define HRTIM_ADCTRIGGEREVENT13_EVENT_3 (HRTIM_ADC1R_AD1EEV3) /*!< ADC Trigger on external event 3 */
mbed_official 381:5460fc57b6e4 2270 #define HRTIM_ADCTRIGGEREVENT13_EVENT_4 (HRTIM_ADC1R_AD1EEV4) /*!< ADC Trigger on external event 4 */
mbed_official 381:5460fc57b6e4 2271 #define HRTIM_ADCTRIGGEREVENT13_EVENT_5 (HRTIM_ADC1R_AD1EEV5) /*!< ADC Trigger on external event 5 */
mbed_official 381:5460fc57b6e4 2272 #define HRTIM_ADCTRIGGEREVENT13_TIMERA_CMP2 (HRTIM_ADC1R_AD1TAC2) /*!< ADC Trigger on Timer A compare 2 */
mbed_official 381:5460fc57b6e4 2273 #define HRTIM_ADCTRIGGEREVENT13_TIMERA_CMP3 (HRTIM_ADC1R_AD1TAC3) /*!< ADC Trigger on Timer A compare 3 */
mbed_official 381:5460fc57b6e4 2274 #define HRTIM_ADCTRIGGEREVENT13_TIMERA_CMP4 (HRTIM_ADC1R_AD1TAC4) /*!< ADC Trigger on Timer A compare 4 */
mbed_official 381:5460fc57b6e4 2275 #define HRTIM_ADCTRIGGEREVENT13_TIMERA_PERIOD (HRTIM_ADC1R_AD1TAPER) /*!< ADC Trigger on Timer A period */
mbed_official 381:5460fc57b6e4 2276 #define HRTIM_ADCTRIGGEREVENT13_TIMERA_RESET (HRTIM_ADC1R_AD1TARST) /*!< ADC Trigger on Timer A reset */
mbed_official 381:5460fc57b6e4 2277 #define HRTIM_ADCTRIGGEREVENT13_TIMERB_CMP2 (HRTIM_ADC1R_AD1TBC2) /*!< ADC Trigger on Timer B compare 2 */
mbed_official 381:5460fc57b6e4 2278 #define HRTIM_ADCTRIGGEREVENT13_TIMERB_CMP3 (HRTIM_ADC1R_AD1TBC3) /*!< ADC Trigger on Timer B compare 3 */
mbed_official 381:5460fc57b6e4 2279 #define HRTIM_ADCTRIGGEREVENT13_TIMERB_CMP4 (HRTIM_ADC1R_AD1TBC4) /*!< ADC Trigger on Timer B compare 4 */
mbed_official 381:5460fc57b6e4 2280 #define HRTIM_ADCTRIGGEREVENT13_TIMERB_PERIOD (HRTIM_ADC1R_AD1TBPER) /*!< ADC Trigger on Timer B period */
mbed_official 381:5460fc57b6e4 2281 #define HRTIM_ADCTRIGGEREVENT13_TIMERB_RESET (HRTIM_ADC1R_AD1TBRST) /*!< ADC Trigger on Timer B reset */
mbed_official 381:5460fc57b6e4 2282 #define HRTIM_ADCTRIGGEREVENT13_TIMERC_CMP2 (HRTIM_ADC1R_AD1TCC2) /*!< ADC Trigger on Timer C compare 2 */
mbed_official 381:5460fc57b6e4 2283 #define HRTIM_ADCTRIGGEREVENT13_TIMERC_CMP3 (HRTIM_ADC1R_AD1TCC3) /*!< ADC Trigger on Timer C compare 3 */
mbed_official 381:5460fc57b6e4 2284 #define HRTIM_ADCTRIGGEREVENT13_TIMERC_CMP4 (HRTIM_ADC1R_AD1TCC4) /*!< ADC Trigger on Timer C compare 4 */
mbed_official 381:5460fc57b6e4 2285 #define HRTIM_ADCTRIGGEREVENT13_TIMERC_PERIOD (HRTIM_ADC1R_AD1TCPER) /*!< ADC Trigger on Timer C period */
mbed_official 381:5460fc57b6e4 2286 #define HRTIM_ADCTRIGGEREVENT13_TIMERD_CMP2 (HRTIM_ADC1R_AD1TDC2) /*!< ADC Trigger on Timer D compare 2 */
mbed_official 381:5460fc57b6e4 2287 #define HRTIM_ADCTRIGGEREVENT13_TIMERD_CMP3 (HRTIM_ADC1R_AD1TDC3) /*!< ADC Trigger on Timer D compare 3 */
mbed_official 381:5460fc57b6e4 2288 #define HRTIM_ADCTRIGGEREVENT13_TIMERD_CMP4 (HRTIM_ADC1R_AD1TDC4) /*!< ADC Trigger on Timer D compare 4 */
mbed_official 381:5460fc57b6e4 2289 #define HRTIM_ADCTRIGGEREVENT13_TIMERD_PERIOD (HRTIM_ADC1R_AD1TDPER) /*!< ADC Trigger on Timer D period */
mbed_official 381:5460fc57b6e4 2290 #define HRTIM_ADCTRIGGEREVENT13_TIMERE_CMP2 (HRTIM_ADC1R_AD1TEC2) /*!< ADC Trigger on Timer E compare 2 */
mbed_official 381:5460fc57b6e4 2291 #define HRTIM_ADCTRIGGEREVENT13_TIMERE_CMP3 (HRTIM_ADC1R_AD1TEC3) /*!< ADC Trigger on Timer E compare 3 */
mbed_official 381:5460fc57b6e4 2292 #define HRTIM_ADCTRIGGEREVENT13_TIMERE_CMP4 (HRTIM_ADC1R_AD1TEC4) /*!< ADC Trigger on Timer E compare 4 */
mbed_official 381:5460fc57b6e4 2293 #define HRTIM_ADCTRIGGEREVENT13_TIMERE_PERIOD (HRTIM_ADC1R_AD1TEPER) /*!< ADC Trigger on Timer E period */
mbed_official 381:5460fc57b6e4 2294
mbed_official 381:5460fc57b6e4 2295 #define HRTIM_ADCTRIGGEREVENT24_NONE (uint32_t)0x00000000 /*!< No ADC trigger event */
mbed_official 381:5460fc57b6e4 2296 #define HRTIM_ADCTRIGGEREVENT24_MASTER_CMP1 (HRTIM_ADC2R_AD2MC1) /*!< ADC Trigger on master compare 1 */
mbed_official 381:5460fc57b6e4 2297 #define HRTIM_ADCTRIGGEREVENT24_MASTER_CMP2 (HRTIM_ADC2R_AD2MC2) /*!< ADC Trigger on master compare 2 */
mbed_official 381:5460fc57b6e4 2298 #define HRTIM_ADCTRIGGEREVENT24_MASTER_CMP3 (HRTIM_ADC2R_AD2MC3) /*!< ADC Trigger on master compare 3 */
mbed_official 381:5460fc57b6e4 2299 #define HRTIM_ADCTRIGGEREVENT24_MASTER_CMP4 (HRTIM_ADC2R_AD2MC4) /*!< ADC Trigger on master compare 4 */
mbed_official 381:5460fc57b6e4 2300 #define HRTIM_ADCTRIGGEREVENT24_MASTER_PERIOD (HRTIM_ADC2R_AD2MPER) /*!< ADC Trigger on master period */
mbed_official 381:5460fc57b6e4 2301 #define HRTIM_ADCTRIGGEREVENT24_EVENT_6 (HRTIM_ADC2R_AD2EEV6) /*!< ADC Trigger on external event 6 */
mbed_official 381:5460fc57b6e4 2302 #define HRTIM_ADCTRIGGEREVENT24_EVENT_7 (HRTIM_ADC2R_AD2EEV7) /*!< ADC Trigger on external event 7 */
mbed_official 381:5460fc57b6e4 2303 #define HRTIM_ADCTRIGGEREVENT24_EVENT_8 (HRTIM_ADC2R_AD2EEV8) /*!< ADC Trigger on external event 8 */
mbed_official 381:5460fc57b6e4 2304 #define HRTIM_ADCTRIGGEREVENT24_EVENT_9 (HRTIM_ADC2R_AD2EEV9) /*!< ADC Trigger on external event 9 */
mbed_official 381:5460fc57b6e4 2305 #define HRTIM_ADCTRIGGEREVENT24_EVENT_10 (HRTIM_ADC2R_AD2EEV10) /*!< ADC Trigger on external event 10 */
mbed_official 381:5460fc57b6e4 2306 #define HRTIM_ADCTRIGGEREVENT24_TIMERA_CMP2 (HRTIM_ADC2R_AD2TAC2) /*!< ADC Trigger on Timer A compare 2 */
mbed_official 381:5460fc57b6e4 2307 #define HRTIM_ADCTRIGGEREVENT24_TIMERA_CMP3 (HRTIM_ADC2R_AD2TAC3) /*!< ADC Trigger on Timer A compare 3 */
mbed_official 381:5460fc57b6e4 2308 #define HRTIM_ADCTRIGGEREVENT24_TIMERA_CMP4 (HRTIM_ADC2R_AD2TAC4) /*!< ADC Trigger on Timer A compare 4 */
mbed_official 381:5460fc57b6e4 2309 #define HRTIM_ADCTRIGGEREVENT24_TIMERA_PERIOD (HRTIM_ADC2R_AD2TAPER) /*!< ADC Trigger on Timer A period */
mbed_official 381:5460fc57b6e4 2310 #define HRTIM_ADCTRIGGEREVENT24_TIMERB_CMP2 (HRTIM_ADC2R_AD2TBC2) /*!< ADC Trigger on Timer B compare 2 */
mbed_official 381:5460fc57b6e4 2311 #define HRTIM_ADCTRIGGEREVENT24_TIMERB_CMP3 (HRTIM_ADC2R_AD2TBC3) /*!< ADC Trigger on Timer B compare 3 */
mbed_official 381:5460fc57b6e4 2312 #define HRTIM_ADCTRIGGEREVENT24_TIMERB_CMP4 (HRTIM_ADC2R_AD2TBC4) /*!< ADC Trigger on Timer B compare 4 */
mbed_official 381:5460fc57b6e4 2313 #define HRTIM_ADCTRIGGEREVENT24_TIMERB_PERIOD (HRTIM_ADC2R_AD2TBPER) /*!< ADC Trigger on Timer B period */
mbed_official 381:5460fc57b6e4 2314 #define HRTIM_ADCTRIGGEREVENT24_TIMERC_CMP2 (HRTIM_ADC2R_AD2TCC2) /*!< ADC Trigger on Timer C compare 2 */
mbed_official 381:5460fc57b6e4 2315 #define HRTIM_ADCTRIGGEREVENT24_TIMERC_CMP3 (HRTIM_ADC2R_AD2TCC3) /*!< ADC Trigger on Timer C compare 3 */
mbed_official 381:5460fc57b6e4 2316 #define HRTIM_ADCTRIGGEREVENT24_TIMERC_CMP4 (HRTIM_ADC2R_AD2TCC4) /*!< ADC Trigger on Timer C compare 4 */
mbed_official 381:5460fc57b6e4 2317 #define HRTIM_ADCTRIGGEREVENT24_TIMERC_PERIOD (HRTIM_ADC2R_AD2TCPER) /*!< ADC Trigger on Timer C period */
mbed_official 381:5460fc57b6e4 2318 #define HRTIM_ADCTRIGGEREVENT24_TIMERC_RESET (HRTIM_ADC2R_AD2TCRST) /*!< ADC Trigger on Timer C reset */
mbed_official 381:5460fc57b6e4 2319 #define HRTIM_ADCTRIGGEREVENT24_TIMERD_CMP2 (HRTIM_ADC2R_AD2TDC2) /*!< ADC Trigger on Timer D compare 2 */
mbed_official 381:5460fc57b6e4 2320 #define HRTIM_ADCTRIGGEREVENT24_TIMERD_CMP3 (HRTIM_ADC2R_AD2TDC3) /*!< ADC Trigger on Timer D compare 3 */
mbed_official 381:5460fc57b6e4 2321 #define HRTIM_ADCTRIGGEREVENT24_TIMERD_CMP4 (HRTIM_ADC2R_AD2TDC4) /*!< ADC Trigger on Timer D compare 4 */
mbed_official 381:5460fc57b6e4 2322 #define HRTIM_ADCTRIGGEREVENT24_TIMERD_PERIOD (HRTIM_ADC2R_AD2TDPER) /*!< ADC Trigger on Timer D period */
mbed_official 381:5460fc57b6e4 2323 #define HRTIM_ADCTRIGGEREVENT24_TIMERD_RESET (HRTIM_ADC2R_AD2TDRST) /*!< ADC Trigger on Timer D reset */
mbed_official 381:5460fc57b6e4 2324 #define HRTIM_ADCTRIGGEREVENT24_TIMERE_CMP2 (HRTIM_ADC2R_AD2TEC2) /*!< ADC Trigger on Timer E compare 2 */
mbed_official 381:5460fc57b6e4 2325 #define HRTIM_ADCTRIGGEREVENT24_TIMERE_CMP3 (HRTIM_ADC2R_AD2TEC3) /*!< ADC Trigger on Timer E compare 3 */
mbed_official 381:5460fc57b6e4 2326 #define HRTIM_ADCTRIGGEREVENT24_TIMERE_CMP4 (HRTIM_ADC2R_AD2TEC4) /*!< ADC Trigger on Timer E compare 4 */
mbed_official 381:5460fc57b6e4 2327 #define HRTIM_ADCTRIGGEREVENT24_TIMERE_RESET (HRTIM_ADC2R_AD2TERST) /*!< ADC Trigger on Timer E reset */
mbed_official 381:5460fc57b6e4 2328
mbed_official 381:5460fc57b6e4 2329 /**
mbed_official 381:5460fc57b6e4 2330 * @}
mbed_official 381:5460fc57b6e4 2331 */
mbed_official 381:5460fc57b6e4 2332
mbed_official 381:5460fc57b6e4 2333 /** @defgroup HRTIM_DLL_Calibration_Rate HRTIM DLL Calibration Rate
mbed_official 381:5460fc57b6e4 2334 * @{
mbed_official 381:5460fc57b6e4 2335 * @brief Constants defining the DLL calibration periods (in micro seconds)
mbed_official 381:5460fc57b6e4 2336 */
mbed_official 381:5460fc57b6e4 2337 #define HRTIM_SINGLE_CALIBRATION (uint32_t)0xFFFFFFFF /*!< Non periodic DLL calibration */
mbed_official 381:5460fc57b6e4 2338 #define HRTIM_CALIBRATIONRATE_7300 (uint32_t)0x00000000 /*!< Periodic DLL calibration: T = 1048576 * tHRTIM (7.3 ms) */
mbed_official 381:5460fc57b6e4 2339 #define HRTIM_CALIBRATIONRATE_910 (HRTIM_DLLCR_CALRTE_0) /*!< Periodic DLL calibration: T = 131072 * tHRTIM (910 µs) */
mbed_official 381:5460fc57b6e4 2340 #define HRTIM_CALIBRATIONRATE_114 (HRTIM_DLLCR_CALRTE_1) /*!< Periodic DLL calibration: T = 16384 * tHRTIM (114 µs) */
mbed_official 381:5460fc57b6e4 2341 #define HRTIM_CALIBRATIONRATE_14 (HRTIM_DLLCR_CALRTE_1 | HRTIM_DLLCR_CALRTE_0) /*!< Periodic DLL calibration: T = 2048 * tHRTIM (14 µs) */
mbed_official 381:5460fc57b6e4 2342
mbed_official 381:5460fc57b6e4 2343 #define IS_HRTIM_CALIBRATIONRATE(CALIBRATIONRATE)\
mbed_official 381:5460fc57b6e4 2344 (((CALIBRATIONRATE) == HRTIM_SINGLE_CALIBRATION) || \
mbed_official 381:5460fc57b6e4 2345 ((CALIBRATIONRATE) == HRTIM_CALIBRATIONRATE_7300) || \
mbed_official 381:5460fc57b6e4 2346 ((CALIBRATIONRATE) == HRTIM_CALIBRATIONRATE_910) || \
mbed_official 381:5460fc57b6e4 2347 ((CALIBRATIONRATE) == HRTIM_CALIBRATIONRATE_114) || \
mbed_official 381:5460fc57b6e4 2348 ((CALIBRATIONRATE) == HRTIM_CALIBRATIONRATE_14))
mbed_official 381:5460fc57b6e4 2349 /**
mbed_official 381:5460fc57b6e4 2350 * @}
mbed_official 381:5460fc57b6e4 2351 */
mbed_official 381:5460fc57b6e4 2352
mbed_official 381:5460fc57b6e4 2353 /** @defgroup HRTIM_Burst_DMA_Registers_Update HRTIM Burst DMA Registers Update
mbed_official 381:5460fc57b6e4 2354 * @{
mbed_official 381:5460fc57b6e4 2355 * @brief Constants defining the registers that can be written during a burst
mbed_official 381:5460fc57b6e4 2356 * DMA operation
mbed_official 381:5460fc57b6e4 2357 */
mbed_official 381:5460fc57b6e4 2358 #define HRTIM_BURSTDMA_NONE (uint32_t)0x00000000 /*!< No register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2359 #define HRTIM_BURSTDMA_CR (HRTIM_BDTUPR_TIMCR) /*!< MCR or TIMxCR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2360 #define HRTIM_BURSTDMA_ICR (HRTIM_BDTUPR_TIMICR) /*!< MICR or TIMxICR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2361 #define HRTIM_BURSTDMA_DIER (HRTIM_BDTUPR_TIMDIER) /*!< MDIER or TIMxDIER register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2362 #define HRTIM_BURSTDMA_CNT (HRTIM_BDTUPR_TIMCNT) /*!< MCNTR or CNTxCR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2363 #define HRTIM_BURSTDMA_PER (HRTIM_BDTUPR_TIMPER) /*!< MPER or PERxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2364 #define HRTIM_BURSTDMA_REP (HRTIM_BDTUPR_TIMREP) /*!< MREPR or REPxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2365 #define HRTIM_BURSTDMA_CMP1 (HRTIM_BDTUPR_TIMCMP1) /*!< MCMP1R or CMP1xR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2366 #define HRTIM_BURSTDMA_CMP2 (HRTIM_BDTUPR_TIMCMP2) /*!< MCMP2R or CMP2xR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2367 #define HRTIM_BURSTDMA_CMP3 (HRTIM_BDTUPR_TIMCMP3) /*!< MCMP3R or CMP3xR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2368 #define HRTIM_BURSTDMA_CMP4 (HRTIM_BDTUPR_TIMCMP4) /*!< MCMP4R or CMP4xR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2369 #define HRTIM_BURSTDMA_DTR (HRTIM_BDTUPR_TIMDTR) /*!< TDxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2370 #define HRTIM_BURSTDMA_SET1R (HRTIM_BDTUPR_TIMSET1R) /*!< SET1R register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2371 #define HRTIM_BURSTDMA_RST1R (HRTIM_BDTUPR_TIMRST1R) /*!< RST1R register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2372 #define HRTIM_BURSTDMA_SET2R (HRTIM_BDTUPR_TIMSET2R) /*!< SET2R register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2373 #define HRTIM_BURSTDMA_RST2R (HRTIM_BDTUPR_TIMRST2R) /*!< RST1R register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2374 #define HRTIM_BURSTDMA_EEFR1 (HRTIM_BDTUPR_TIMEEFR1) /*!< EEFxR1 register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2375 #define HRTIM_BURSTDMA_EEFR2 (HRTIM_BDTUPR_TIMEEFR2) /*!< EEFxR2 register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2376 #define HRTIM_BURSTDMA_RSTR (HRTIM_BDTUPR_TIMRSTR) /*!< RSTxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2377 #define HRTIM_BURSTDMA_CHPR (HRTIM_BDTUPR_TIMCHPR) /*!< CHPxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2378 #define HRTIM_BURSTDMA_OUTR (HRTIM_BDTUPR_TIMOUTR) /*!< OUTxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2379 #define HRTIM_BURSTDMA_FLTR (HRTIM_BDTUPR_TIMFLTR) /*!< FLTxR register is updated by Burst DMA accesses */
mbed_official 381:5460fc57b6e4 2380
mbed_official 381:5460fc57b6e4 2381 #define IS_HRTIM_TIMER_BURSTDMA(TIMER, BURSTDMA) \
mbed_official 381:5460fc57b6e4 2382 ((((TIMER) == HRTIM_TIMERINDEX_MASTER) && (((BURSTDMA) & 0xFFFFFC000) == 0x00000000)) \
mbed_official 381:5460fc57b6e4 2383 || \
mbed_official 381:5460fc57b6e4 2384 (((TIMER) == HRTIM_TIMERINDEX_TIMER_A) && (((BURSTDMA) & 0xFFE00000) == 0x00000000)) \
mbed_official 381:5460fc57b6e4 2385 || \
mbed_official 381:5460fc57b6e4 2386 (((TIMER) == HRTIM_TIMERINDEX_TIMER_B) && (((BURSTDMA) & 0xFFE00000) == 0x00000000)) \
mbed_official 381:5460fc57b6e4 2387 || \
mbed_official 381:5460fc57b6e4 2388 (((TIMER) == HRTIM_TIMERINDEX_TIMER_C) && (((BURSTDMA) & 0xFFE00000) == 0x00000000)) \
mbed_official 381:5460fc57b6e4 2389 || \
mbed_official 381:5460fc57b6e4 2390 (((TIMER) == HRTIM_TIMERINDEX_TIMER_D) && (((BURSTDMA) & 0xFFE00000) == 0x00000000)) \
mbed_official 381:5460fc57b6e4 2391 || \
mbed_official 381:5460fc57b6e4 2392 (((TIMER) == HRTIM_TIMERINDEX_TIMER_E) && (((BURSTDMA) & 0xFFE00000) == 0x00000000)))
mbed_official 381:5460fc57b6e4 2393 /**
mbed_official 381:5460fc57b6e4 2394 * @}
mbed_official 381:5460fc57b6e4 2395 */
mbed_official 381:5460fc57b6e4 2396
mbed_official 381:5460fc57b6e4 2397 /** @defgroup HRTIM_Burst_Mode_Control HRTIM Burst Mode Control
mbed_official 381:5460fc57b6e4 2398 * @{
mbed_official 381:5460fc57b6e4 2399 * @brief Constants used to enable or disable the burst mode controller
mbed_official 381:5460fc57b6e4 2400 */
mbed_official 381:5460fc57b6e4 2401 #define HRTIM_BURSTMODECTL_DISABLED (uint32_t)0x00000000 /*!< Burst mode disabled */
mbed_official 381:5460fc57b6e4 2402 #define HRTIM_BURSTMODECTL_ENABLED (HRTIM_BMCR_BME) /*!< Burst mode enabled */
mbed_official 381:5460fc57b6e4 2403
mbed_official 381:5460fc57b6e4 2404 #define IS_HRTIM_BURSTMODECTL(BURSTMODECTL)\
mbed_official 381:5460fc57b6e4 2405 (((BURSTMODECTL) == HRTIM_BURSTMODECTL_DISABLED) || \
mbed_official 381:5460fc57b6e4 2406 ((BURSTMODECTL) == HRTIM_BURSTMODECTL_ENABLED))
mbed_official 381:5460fc57b6e4 2407 /**
mbed_official 381:5460fc57b6e4 2408 * @}
mbed_official 381:5460fc57b6e4 2409 */
mbed_official 381:5460fc57b6e4 2410
mbed_official 381:5460fc57b6e4 2411 /** @defgroup HRTIM_Fault_Mode_Control HRTIM Fault Mode Control
mbed_official 381:5460fc57b6e4 2412 * @{
mbed_official 381:5460fc57b6e4 2413 * @brief Constants used to enable or disable a fault channel
mbed_official 381:5460fc57b6e4 2414 */
mbed_official 381:5460fc57b6e4 2415 #define HRTIM_FAULTMODECTL_DISABLED (uint32_t)0x00000000 /*!< Fault channel is disabled */
mbed_official 381:5460fc57b6e4 2416 #define HRTIM_FAULTMODECTL_ENABLED (uint32_t)0x00000001 /*!< Fault channel is enabled */
mbed_official 381:5460fc57b6e4 2417
mbed_official 381:5460fc57b6e4 2418 #define IS_HRTIM_FAULTMODECTL(FAULTMODECTL)\
mbed_official 381:5460fc57b6e4 2419 (((FAULTMODECTL) == HRTIM_FAULTMODECTL_DISABLED) || \
mbed_official 381:5460fc57b6e4 2420 ((FAULTMODECTL) == HRTIM_FAULTMODECTL_ENABLED))
mbed_official 381:5460fc57b6e4 2421 /**
mbed_official 381:5460fc57b6e4 2422 * @}
mbed_official 381:5460fc57b6e4 2423 */
mbed_official 381:5460fc57b6e4 2424
mbed_official 381:5460fc57b6e4 2425 /** @defgroup HRTIM_Software_Timer_Update HRTIM Software Timer Update
mbed_official 381:5460fc57b6e4 2426 * @{
mbed_official 381:5460fc57b6e4 2427 * @brief Constants used to force timer registers update
mbed_official 381:5460fc57b6e4 2428 */
mbed_official 381:5460fc57b6e4 2429 #define HRTIM_TIMERUPDATE_MASTER (HRTIM_CR2_MSWU) /*!< Forces an immediate transfer from the preload to the active register in the master timer */
mbed_official 381:5460fc57b6e4 2430 #define HRTIM_TIMERUPDATE_A (HRTIM_CR2_TASWU) /*!< Forces an immediate transfer from the preload to the active register in the timer A */
mbed_official 381:5460fc57b6e4 2431 #define HRTIM_TIMERUPDATE_B (HRTIM_CR2_TBSWU) /*!< Forces an immediate transfer from the preload to the active register in the timer B */
mbed_official 381:5460fc57b6e4 2432 #define HRTIM_TIMERUPDATE_C (HRTIM_CR2_TCSWU) /*!< Forces an immediate transfer from the preload to the active register in the timer C */
mbed_official 381:5460fc57b6e4 2433 #define HRTIM_TIMERUPDATE_D (HRTIM_CR2_TDSWU) /*!< Forces an immediate transfer from the preload to the active register in the timer D */
mbed_official 381:5460fc57b6e4 2434 #define HRTIM_TIMERUPDATE_E (HRTIM_CR2_TESWU) /*!< Forces an immediate transfer from the preload to the active register in the timer E */
mbed_official 381:5460fc57b6e4 2435
mbed_official 381:5460fc57b6e4 2436 #define IS_HRTIM_TIMERUPDATE(TIMERUPDATE) (((TIMERUPDATE) & 0xFFFFFFC0) == 0x00000000)
mbed_official 381:5460fc57b6e4 2437 /**
mbed_official 381:5460fc57b6e4 2438 * @}
mbed_official 381:5460fc57b6e4 2439 */
mbed_official 381:5460fc57b6e4 2440
mbed_official 381:5460fc57b6e4 2441 /** @defgroup HRTIM_Software_Timer_Reset HRTIM Software Timer Reset
mbed_official 381:5460fc57b6e4 2442 * @{
mbed_official 381:5460fc57b6e4 2443 * @brief Constants used to force timer counter reset
mbed_official 381:5460fc57b6e4 2444 */
mbed_official 381:5460fc57b6e4 2445 #define HRTIM_TIMERRESET_MASTER (HRTIM_CR2_MRST) /*!< Resets the master timer counter */
mbed_official 381:5460fc57b6e4 2446 #define HRTIM_TIMERRESET_TIMER_A (HRTIM_CR2_TARST) /*!< Resets the timer A counter */
mbed_official 381:5460fc57b6e4 2447 #define HRTIM_TIMERRESET_TIMER_B (HRTIM_CR2_TBRST) /*!< Resets the timer B counter */
mbed_official 381:5460fc57b6e4 2448 #define HRTIM_TIMERRESET_TIMER_C (HRTIM_CR2_TCRST) /*!< Resets the timer C counter */
mbed_official 381:5460fc57b6e4 2449 #define HRTIM_TIMERRESET_TIMER_D (HRTIM_CR2_TDRST) /*!< Resets the timer D counter */
mbed_official 381:5460fc57b6e4 2450 #define HRTIM_TIMERRESET_TIMER_E (HRTIM_CR2_TERST) /*!< Resets the timer E counter */
mbed_official 381:5460fc57b6e4 2451
mbed_official 381:5460fc57b6e4 2452 #define IS_HRTIM_TIMERRESET(TIMERRESET) (((TIMERRESET) & 0xFFFFC0FF) == 0x00000000)
mbed_official 381:5460fc57b6e4 2453 /**
mbed_official 381:5460fc57b6e4 2454 * @}
mbed_official 381:5460fc57b6e4 2455 */
mbed_official 381:5460fc57b6e4 2456
mbed_official 381:5460fc57b6e4 2457 /** @defgroup HRTIM_Output_Level HRTIM Output Level
mbed_official 381:5460fc57b6e4 2458 * @{
mbed_official 381:5460fc57b6e4 2459 * @brief Constants defining the level of a timer output
mbed_official 381:5460fc57b6e4 2460 */
mbed_official 381:5460fc57b6e4 2461 #define HRTIM_OUTPUTLEVEL_ACTIVE (uint32_t)0x00000001 /*!< Forces the output to its active state */
mbed_official 381:5460fc57b6e4 2462 #define HRTIM_OUTPUTLEVEL_INACTIVE (uint32_t)0x00000002 /*!< Forces the output to its inactive state */
mbed_official 381:5460fc57b6e4 2463
mbed_official 381:5460fc57b6e4 2464 #define IS_HRTIM_OUTPUTLEVEL(OUTPUTLEVEL)\
mbed_official 381:5460fc57b6e4 2465 (((OUTPUTLEVEL) == HRTIM_OUTPUTLEVEL_ACTIVE) || \
mbed_official 381:5460fc57b6e4 2466 ((OUTPUTLEVEL) == HRTIM_OUTPUTLEVEL_INACTIVE))
mbed_official 381:5460fc57b6e4 2467 /**
mbed_official 381:5460fc57b6e4 2468 * @}
mbed_official 381:5460fc57b6e4 2469 */
mbed_official 381:5460fc57b6e4 2470
mbed_official 381:5460fc57b6e4 2471 /** @defgroup HRTIM_Output_State HRTIM Output State
mbed_official 381:5460fc57b6e4 2472 * @{
mbed_official 381:5460fc57b6e4 2473 * @brief Constants defining the state of a timer output
mbed_official 381:5460fc57b6e4 2474 */
mbed_official 381:5460fc57b6e4 2475 #define HRTIM_OUTPUTSTATE_IDLE (uint32_t)0x00000001 /*!< Main operating mode, where the output can take the active or
mbed_official 381:5460fc57b6e4 2476 inactive level as programmed in the crossbar unit */
mbed_official 381:5460fc57b6e4 2477 #define HRTIM_OUTPUTSTATE_RUN (uint32_t)0x00000002 /*!< Default operating state (e.g. after an HRTIM reset, when the
mbed_official 381:5460fc57b6e4 2478 outputs are disabled by software or during a burst mode operation */
mbed_official 381:5460fc57b6e4 2479 #define HRTIM_OUTPUTSTATE_FAULT (uint32_t)0x00000003 /*!< Safety state, entered in case of a shut-down request on
mbed_official 381:5460fc57b6e4 2480 FAULTx inputs */
mbed_official 381:5460fc57b6e4 2481 /**
mbed_official 381:5460fc57b6e4 2482 * @}
mbed_official 381:5460fc57b6e4 2483 */
mbed_official 381:5460fc57b6e4 2484
mbed_official 381:5460fc57b6e4 2485 /** @defgroup HRTIM_Burst_Mode_Status HRTIM Burst Mode Status
mbed_official 381:5460fc57b6e4 2486 * @{
mbed_official 381:5460fc57b6e4 2487 * @brief Constants defining the operating state of the burst mode controller
mbed_official 381:5460fc57b6e4 2488 */
mbed_official 381:5460fc57b6e4 2489 #define HRTIM_BURSTMODESTATUS_NORMAL (uint32_t) 0x00000000 /*!< Normal operation */
mbed_official 381:5460fc57b6e4 2490 #define HRTIM_BURSTMODESTATUS_ONGOING (HRTIM_BMCR_BMSTAT) /*!< Burst operation on-going */
mbed_official 381:5460fc57b6e4 2491 /**
mbed_official 381:5460fc57b6e4 2492 * @}
mbed_official 381:5460fc57b6e4 2493 */
mbed_official 381:5460fc57b6e4 2494
mbed_official 381:5460fc57b6e4 2495 /** @defgroup HRTIM_Current_Push_Pull_Status HRTIM Current Push Pull Status
mbed_official 381:5460fc57b6e4 2496 * @{
mbed_official 381:5460fc57b6e4 2497 * @brief Constants defining on which output the signal is currently applied
mbed_official 381:5460fc57b6e4 2498 * in push-pull mode
mbed_official 381:5460fc57b6e4 2499 */
mbed_official 381:5460fc57b6e4 2500 #define HRTIM_PUSHPULL_CURRENTSTATUS_OUTPUT1 (uint32_t) 0x00000000 /*!< Signal applied on output 1 and output 2 forced inactive */
mbed_official 381:5460fc57b6e4 2501 #define HRTIM_PUSHPULL_CURRENTSTATUS_OUTPUT2 (HRTIM_TIMISR_CPPSTAT) /*!< Signal applied on output 2 and output 1 forced inactive */
mbed_official 381:5460fc57b6e4 2502 /**
mbed_official 381:5460fc57b6e4 2503 * @}
mbed_official 381:5460fc57b6e4 2504 */
mbed_official 381:5460fc57b6e4 2505
mbed_official 381:5460fc57b6e4 2506 /** @defgroup HRTIM_Idle_Push_Pull_Status HRTIM Idle Push Pull Status
mbed_official 381:5460fc57b6e4 2507 * @{
mbed_official 381:5460fc57b6e4 2508 * @brief Constants defining on which output the signal was applied, in
mbed_official 381:5460fc57b6e4 2509 * push-pull mode balanced fault mode or delayed idle mode, when the
mbed_official 381:5460fc57b6e4 2510 * protection was triggered
mbed_official 381:5460fc57b6e4 2511 */
mbed_official 381:5460fc57b6e4 2512 #define HRTIM_PUSHPULL_IDLESTATUS_OUTPUT1 (uint32_t) 0x00000000 /*!< Protection occurred when the output 1 was active and output 2 forced inactive */
mbed_official 381:5460fc57b6e4 2513 #define HRTIM_PUSHPULL_IDLESTATUS_OUTPUT2 (HRTIM_TIMISR_IPPSTAT) /*!< Protection occurred when the output 2 was active and output 1 forced inactive */
mbed_official 381:5460fc57b6e4 2514 /**
mbed_official 381:5460fc57b6e4 2515 * @}
mbed_official 381:5460fc57b6e4 2516 */
mbed_official 381:5460fc57b6e4 2517
mbed_official 381:5460fc57b6e4 2518 /** @defgroup HRTIM_Common_Interrupt_Enable HRTIM Common Interrupt Enable
mbed_official 381:5460fc57b6e4 2519 * @{
mbed_official 381:5460fc57b6e4 2520 */
mbed_official 381:5460fc57b6e4 2521 #define HRTIM_IT_NONE (uint32_t)0x00000000 /*!< No interrupt enabled */
mbed_official 381:5460fc57b6e4 2522 #define HRTIM_IT_FLT1 HRTIM_IER_FLT1 /*!< Fault 1 interrupt enable */
mbed_official 381:5460fc57b6e4 2523 #define HRTIM_IT_FLT2 HRTIM_IER_FLT2 /*!< Fault 2 interrupt enable */
mbed_official 381:5460fc57b6e4 2524 #define HRTIM_IT_FLT3 HRTIM_IER_FLT3 /*!< Fault 3 interrupt enable */
mbed_official 381:5460fc57b6e4 2525 #define HRTIM_IT_FLT4 HRTIM_IER_FLT4 /*!< Fault 4 interrupt enable */
mbed_official 381:5460fc57b6e4 2526 #define HRTIM_IT_FLT5 HRTIM_IER_FLT5 /*!< Fault 5 interrupt enable */
mbed_official 381:5460fc57b6e4 2527 #define HRTIM_IT_SYSFLT HRTIM_IER_SYSFLT /*!< System Fault interrupt enable */
mbed_official 381:5460fc57b6e4 2528 #define HRTIM_IT_DLLRDY HRTIM_IER_DLLRDY /*!< DLL ready interrupt enable */
mbed_official 381:5460fc57b6e4 2529 #define HRTIM_IT_BMPER HRTIM_IER_BMPER /*!< Burst mode period interrupt enable */
mbed_official 381:5460fc57b6e4 2530
mbed_official 381:5460fc57b6e4 2531 #define IS_HRTIM_IT(IT) (((IT) & 0xFFFCFFC0) == 0x00000000)
mbed_official 381:5460fc57b6e4 2532
mbed_official 381:5460fc57b6e4 2533 /**
mbed_official 381:5460fc57b6e4 2534 * @}
mbed_official 381:5460fc57b6e4 2535 */
mbed_official 381:5460fc57b6e4 2536
mbed_official 381:5460fc57b6e4 2537 /** @defgroup HRTIM_Master_Interrupt_Enable HRTIM Master Interrupt Enable
mbed_official 381:5460fc57b6e4 2538 * @{
mbed_official 381:5460fc57b6e4 2539 */
mbed_official 381:5460fc57b6e4 2540 #define HRTIM_MASTER_IT_NONE (uint32_t)0x00000000 /*!< No interrupt enabled */
mbed_official 381:5460fc57b6e4 2541 #define HRTIM_MASTER_IT_MCMP1 HRTIM_MDIER_MCMP1IE /*!< Master compare 1 interrupt enable */
mbed_official 381:5460fc57b6e4 2542 #define HRTIM_MASTER_IT_MCMP2 HRTIM_MDIER_MCMP2IE /*!< Master compare 2 interrupt enable */
mbed_official 381:5460fc57b6e4 2543 #define HRTIM_MASTER_IT_MCMP3 HRTIM_MDIER_MCMP3IE /*!< Master compare 3 interrupt enable */
mbed_official 381:5460fc57b6e4 2544 #define HRTIM_MASTER_IT_MCMP4 HRTIM_MDIER_MCMP4IE /*!< Master compare 4 interrupt enable */
mbed_official 381:5460fc57b6e4 2545 #define HRTIM_MASTER_IT_MREP HRTIM_MDIER_MREPIE /*!< Master Repetition interrupt enable */
mbed_official 381:5460fc57b6e4 2546 #define HRTIM_MASTER_IT_SYNC HRTIM_MDIER_SYNCIE /*!< Synchronization input interrupt enable */
mbed_official 381:5460fc57b6e4 2547 #define HRTIM_MASTER_IT_MUPD HRTIM_MDIER_MUPDIE /*!< Master update interrupt enable */
mbed_official 381:5460fc57b6e4 2548
mbed_official 381:5460fc57b6e4 2549 #define IS_HRTIM_MASTER_IT(MASTER_IT) (((MASTER_IT) & 0xFFFFFF80) == 0x00000000)
mbed_official 381:5460fc57b6e4 2550
mbed_official 381:5460fc57b6e4 2551 /**
mbed_official 381:5460fc57b6e4 2552 * @}
mbed_official 381:5460fc57b6e4 2553 */
mbed_official 381:5460fc57b6e4 2554
mbed_official 381:5460fc57b6e4 2555 /** @defgroup HRTIM_Timing_Unit_Interrupt_Enable HRTIM Timing Unit Interrupt Enable
mbed_official 381:5460fc57b6e4 2556 * @{
mbed_official 381:5460fc57b6e4 2557 */
mbed_official 381:5460fc57b6e4 2558 #define HRTIM_TIM_IT_NONE (uint32_t)0x00000000 /*!< No interrupt enabled */
mbed_official 381:5460fc57b6e4 2559 #define HRTIM_TIM_IT_CMP1 HRTIM_TIMDIER_CMP1IE /*!< Timer compare 1 interrupt enable */
mbed_official 381:5460fc57b6e4 2560 #define HRTIM_TIM_IT_CMP2 HRTIM_TIMDIER_CMP2IE /*!< Timer compare 2 interrupt enable */
mbed_official 381:5460fc57b6e4 2561 #define HRTIM_TIM_IT_CMP3 HRTIM_TIMDIER_CMP3IE /*!< Timer compare 3 interrupt enable */
mbed_official 381:5460fc57b6e4 2562 #define HRTIM_TIM_IT_CMP4 HRTIM_TIMDIER_CMP4IE /*!< Timer compare 4 interrupt enable */
mbed_official 381:5460fc57b6e4 2563 #define HRTIM_TIM_IT_REP HRTIM_TIMDIER_REPIE /*!< Timer repetition interrupt enable */
mbed_official 381:5460fc57b6e4 2564 #define HRTIM_TIM_IT_UPD HRTIM_TIMDIER_UPDIE /*!< Timer update interrupt enable */
mbed_official 381:5460fc57b6e4 2565 #define HRTIM_TIM_IT_CPT1 HRTIM_TIMDIER_CPT1IE /*!< Timer capture 1 interrupt enable */
mbed_official 381:5460fc57b6e4 2566 #define HRTIM_TIM_IT_CPT2 HRTIM_TIMDIER_CPT2IE /*!< Timer capture 2 interrupt enable */
mbed_official 381:5460fc57b6e4 2567 #define HRTIM_TIM_IT_SET1 HRTIM_TIMDIER_SET1IE /*!< Timer output 1 set interrupt enable */
mbed_official 381:5460fc57b6e4 2568 #define HRTIM_TIM_IT_RST1 HRTIM_TIMDIER_RST1IE /*!< Timer output 1 reset interrupt enable */
mbed_official 381:5460fc57b6e4 2569 #define HRTIM_TIM_IT_SET2 HRTIM_TIMDIER_SET2IE /*!< Timer output 2 set interrupt enable */
mbed_official 381:5460fc57b6e4 2570 #define HRTIM_TIM_IT_RST2 HRTIM_TIMDIER_RST2IE /*!< Timer output 2 reset interrupt enable */
mbed_official 381:5460fc57b6e4 2571 #define HRTIM_TIM_IT_RST HRTIM_TIMDIER_RSTIE /*!< Timer reset interrupt enable */
mbed_official 381:5460fc57b6e4 2572 #define HRTIM_TIM_IT_DLYPRT HRTIM_TIMDIER_DLYPRTIE /*!< Timer delay protection interrupt enable */
mbed_official 381:5460fc57b6e4 2573
mbed_official 381:5460fc57b6e4 2574 #define IS_HRTIM_TIM_IT(IS_HRTIM_TIM_IT) (((IS_HRTIM_TIM_IT) & 0xFFFF8020) == 0x00000000)
mbed_official 381:5460fc57b6e4 2575
mbed_official 381:5460fc57b6e4 2576 /**
mbed_official 381:5460fc57b6e4 2577 * @}
mbed_official 381:5460fc57b6e4 2578 */
mbed_official 381:5460fc57b6e4 2579
mbed_official 381:5460fc57b6e4 2580 /** @defgroup HRTIM_Common_Interrupt_Flag HRTIM Common Interrupt Flag
mbed_official 381:5460fc57b6e4 2581 * @{
mbed_official 381:5460fc57b6e4 2582 */
mbed_official 381:5460fc57b6e4 2583 #define HRTIM_FLAG_FLT1 HRTIM_ISR_FLT1 /*!< Fault 1 interrupt flag */
mbed_official 381:5460fc57b6e4 2584 #define HRTIM_FLAG_FLT2 HRTIM_ISR_FLT2 /*!< Fault 2 interrupt flag */
mbed_official 381:5460fc57b6e4 2585 #define HRTIM_FLAG_FLT3 HRTIM_ISR_FLT3 /*!< Fault 3 interrupt flag */
mbed_official 381:5460fc57b6e4 2586 #define HRTIM_FLAG_FLT4 HRTIM_ISR_FLT4 /*!< Fault 4 interrupt flag */
mbed_official 381:5460fc57b6e4 2587 #define HRTIM_FLAG_FLT5 HRTIM_ISR_FLT5 /*!< Fault 5 interrupt flag */
mbed_official 381:5460fc57b6e4 2588 #define HRTIM_FLAG_SYSFLT HRTIM_ISR_SYSFLT /*!< System Fault interrupt flag */
mbed_official 381:5460fc57b6e4 2589 #define HRTIM_FLAG_DLLRDY HRTIM_ISR_DLLRDY /*!< DLL ready interrupt flag */
mbed_official 381:5460fc57b6e4 2590 #define HRTIM_FLAG_BMPER HRTIM_ISR_BMPER /*!< Burst mode period interrupt flag */
mbed_official 381:5460fc57b6e4 2591
mbed_official 381:5460fc57b6e4 2592 /**
mbed_official 381:5460fc57b6e4 2593 * @}
mbed_official 381:5460fc57b6e4 2594 */
mbed_official 381:5460fc57b6e4 2595
mbed_official 381:5460fc57b6e4 2596 /** @defgroup HRTIM_Master_Interrupt_Flag HRTIM Master Interrupt Flag
mbed_official 381:5460fc57b6e4 2597 * @{
mbed_official 381:5460fc57b6e4 2598 */
mbed_official 381:5460fc57b6e4 2599 #define HRTIM_MASTER_FLAG_MCMP1 HRTIM_MISR_MCMP1 /*!< Master compare 1 interrupt flag */
mbed_official 381:5460fc57b6e4 2600 #define HRTIM_MASTER_FLAG_MCMP2 HRTIM_MISR_MCMP2 /*!< Master compare 2 interrupt flag */
mbed_official 381:5460fc57b6e4 2601 #define HRTIM_MASTER_FLAG_MCMP3 HRTIM_MISR_MCMP3 /*!< Master compare 3 interrupt flag */
mbed_official 381:5460fc57b6e4 2602 #define HRTIM_MASTER_FLAG_MCMP4 HRTIM_MISR_MCMP4 /*!< Master compare 4 interrupt flag */
mbed_official 381:5460fc57b6e4 2603 #define HRTIM_MASTER_FLAG_MREP HRTIM_MISR_MREP /*!< Master Repetition interrupt flag */
mbed_official 381:5460fc57b6e4 2604 #define HRTIM_MASTER_FLAG_SYNC HRTIM_MISR_SYNC /*!< Synchronization input interrupt flag */
mbed_official 381:5460fc57b6e4 2605 #define HRTIM_MASTER_FLAG_MUPD HRTIM_MISR_MUPD /*!< Master update interrupt flag */
mbed_official 381:5460fc57b6e4 2606
mbed_official 381:5460fc57b6e4 2607 /**
mbed_official 381:5460fc57b6e4 2608 * @}
mbed_official 381:5460fc57b6e4 2609 */
mbed_official 381:5460fc57b6e4 2610
mbed_official 381:5460fc57b6e4 2611 /** @defgroup HRTIM_Timing_Unit_Interrupt_Flag HRTIM Timing Unit Interrupt Flag
mbed_official 381:5460fc57b6e4 2612 * @{
mbed_official 381:5460fc57b6e4 2613 */
mbed_official 381:5460fc57b6e4 2614 #define HRTIM_TIM_FLAG_CMP1 HRTIM_TIMISR_CMP1 /*!< Timer compare 1 interrupt flag */
mbed_official 381:5460fc57b6e4 2615 #define HRTIM_TIM_FLAG_CMP2 HRTIM_TIMISR_CMP2 /*!< Timer compare 2 interrupt flag */
mbed_official 381:5460fc57b6e4 2616 #define HRTIM_TIM_FLAG_CMP3 HRTIM_TIMISR_CMP3 /*!< Timer compare 3 interrupt flag */
mbed_official 381:5460fc57b6e4 2617 #define HRTIM_TIM_FLAG_CMP4 HRTIM_TIMISR_CMP4 /*!< Timer compare 4 interrupt flag */
mbed_official 381:5460fc57b6e4 2618 #define HRTIM_TIM_FLAG_REP HRTIM_TIMISR_REP /*!< Timer repetition interrupt flag */
mbed_official 381:5460fc57b6e4 2619 #define HRTIM_TIM_FLAG_UPD HRTIM_TIMISR_UPD /*!< Timer update interrupt flag */
mbed_official 381:5460fc57b6e4 2620 #define HRTIM_TIM_FLAG_CPT1 HRTIM_TIMISR_CPT1 /*!< Timer capture 1 interrupt flag */
mbed_official 381:5460fc57b6e4 2621 #define HRTIM_TIM_FLAG_CPT2 HRTIM_TIMISR_CPT2 /*!< Timer capture 2 interrupt flag */
mbed_official 381:5460fc57b6e4 2622 #define HRTIM_TIM_FLAG_SET1 HRTIM_TIMISR_SET1 /*!< Timer output 1 set interrupt flag */
mbed_official 381:5460fc57b6e4 2623 #define HRTIM_TIM_FLAG_RST1 HRTIM_TIMISR_RST1 /*!< Timer output 1 reset interrupt flag */
mbed_official 381:5460fc57b6e4 2624 #define HRTIM_TIM_FLAG_SET2 HRTIM_TIMISR_SET2 /*!< Timer output 2 set interrupt flag */
mbed_official 381:5460fc57b6e4 2625 #define HRTIM_TIM_FLAG_RST2 HRTIM_TIMISR_RST2 /*!< Timer output 2 reset interrupt flag */
mbed_official 381:5460fc57b6e4 2626 #define HRTIM_TIM_FLAG_RST HRTIM_TIMISR_RST /*!< Timer reset interrupt flag */
mbed_official 381:5460fc57b6e4 2627 #define HRTIM_TIM_FLAG_DLYPRT HRTIM_TIMISR_DLYPRT /*!< Timer delay protection interrupt flag */
mbed_official 381:5460fc57b6e4 2628
mbed_official 381:5460fc57b6e4 2629 /**
mbed_official 381:5460fc57b6e4 2630 * @}
mbed_official 381:5460fc57b6e4 2631 */
mbed_official 381:5460fc57b6e4 2632
mbed_official 381:5460fc57b6e4 2633 /** @defgroup HRTIM_Master_DMA_Request_Enable HRTIM Master DMA Request Enable
mbed_official 381:5460fc57b6e4 2634 * @{
mbed_official 381:5460fc57b6e4 2635 */
mbed_official 381:5460fc57b6e4 2636 #define HRTIM_MASTER_DMA_NONE (uint32_t)0x00000000 /*!< No DMA request enable */
mbed_official 381:5460fc57b6e4 2637 #define HRTIM_MASTER_DMA_MCMP1 HRTIM_MDIER_MCMP1DE /*!< Master compare 1 DMA request enable */
mbed_official 381:5460fc57b6e4 2638 #define HRTIM_MASTER_DMA_MCMP2 HRTIM_MDIER_MCMP2DE /*!< Master compare 2 DMA request enable */
mbed_official 381:5460fc57b6e4 2639 #define HRTIM_MASTER_DMA_MCMP3 HRTIM_MDIER_MCMP3DE /*!< Master compare 3 DMA request enable */
mbed_official 381:5460fc57b6e4 2640 #define HRTIM_MASTER_DMA_MCMP4 HRTIM_MDIER_MCMP4DE /*!< Master compare 4 DMA request enable */
mbed_official 381:5460fc57b6e4 2641 #define HRTIM_MASTER_DMA_MREP HRTIM_MDIER_MREPDE /*!< Master Repetition DMA request enable */
mbed_official 381:5460fc57b6e4 2642 #define HRTIM_MASTER_DMA_SYNC HRTIM_MDIER_SYNCDE /*!< Synchronization input DMA request enable */
mbed_official 381:5460fc57b6e4 2643 #define HRTIM_MASTER_DMA_MUPD HRTIM_MDIER_MUPDDE /*!< Master update DMA request enable */
mbed_official 381:5460fc57b6e4 2644
mbed_official 381:5460fc57b6e4 2645 #define IS_HRTIM_MASTER_DMA(MASTER_DMA) (((MASTER_DMA) & 0xFF80FFFF) == 0x00000000)
mbed_official 381:5460fc57b6e4 2646 /**
mbed_official 381:5460fc57b6e4 2647 * @}
mbed_official 381:5460fc57b6e4 2648 */
mbed_official 381:5460fc57b6e4 2649
mbed_official 381:5460fc57b6e4 2650 /** @defgroup HRTIM_Timing_Unit_DMA_Request_Enable HRTIM Timing Unit DMA Request Enable
mbed_official 381:5460fc57b6e4 2651 * @{
mbed_official 381:5460fc57b6e4 2652 */
mbed_official 381:5460fc57b6e4 2653 #define HRTIM_TIM_DMA_NONE (uint32_t)0x00000000 /*!< No DMA request enable */
mbed_official 381:5460fc57b6e4 2654 #define HRTIM_TIM_DMA_CMP1 HRTIM_TIMDIER_CMP1DE /*!< Timer compare 1 DMA request enable */
mbed_official 381:5460fc57b6e4 2655 #define HRTIM_TIM_DMA_CMP2 HRTIM_TIMDIER_CMP2DE /*!< Timer compare 2 DMA request enable */
mbed_official 381:5460fc57b6e4 2656 #define HRTIM_TIM_DMA_CMP3 HRTIM_TIMDIER_CMP3DE /*!< Timer compare 3 DMA request enable */
mbed_official 381:5460fc57b6e4 2657 #define HRTIM_TIM_DMA_CMP4 HRTIM_TIMDIER_CMP4DE /*!< Timer compare 4 DMA request enable */
mbed_official 381:5460fc57b6e4 2658 #define HRTIM_TIM_DMA_REP HRTIM_TIMDIER_REPDE /*!< Timer repetition DMA request enable */
mbed_official 381:5460fc57b6e4 2659 #define HRTIM_TIM_DMA_UPD HRTIM_TIMDIER_UPDDE /*!< Timer update DMA request enable */
mbed_official 381:5460fc57b6e4 2660 #define HRTIM_TIM_DMA_CPT1 HRTIM_TIMDIER_CPT1DE /*!< Timer capture 1 DMA request enable */
mbed_official 381:5460fc57b6e4 2661 #define HRTIM_TIM_DMA_CPT2 HRTIM_TIMDIER_CPT2DE /*!< Timer capture 2 DMA request enable */
mbed_official 381:5460fc57b6e4 2662 #define HRTIM_TIM_DMA_SET1 HRTIM_TIMDIER_SET1DE /*!< Timer output 1 set DMA request enable */
mbed_official 381:5460fc57b6e4 2663 #define HRTIM_TIM_DMA_RST1 HRTIM_TIMDIER_RST1DE /*!< Timer output 1 reset DMA request enable */
mbed_official 381:5460fc57b6e4 2664 #define HRTIM_TIM_DMA_SET2 HRTIM_TIMDIER_SET2DE /*!< Timer output 2 set DMA request enable */
mbed_official 381:5460fc57b6e4 2665 #define HRTIM_TIM_DMA_RST2 HRTIM_TIMDIER_RST2DE /*!< Timer output 2 reset DMA request enable */
mbed_official 381:5460fc57b6e4 2666 #define HRTIM_TIM_DMA_RST HRTIM_TIMDIER_RSTDE /*!< Timer reset DMA request enable */
mbed_official 381:5460fc57b6e4 2667 #define HRTIM_TIM_DMA_DLYPRT HRTIM_TIMDIER_DLYPRTDE /*!< Timer delay protection DMA request enable */
mbed_official 381:5460fc57b6e4 2668
mbed_official 381:5460fc57b6e4 2669 #define IS_HRTIM_TIM_DMA(TIM_DMA) (((TIM_DMA) & 0x8020FFFF) == 0x00000000)
mbed_official 381:5460fc57b6e4 2670
mbed_official 381:5460fc57b6e4 2671 /**
mbed_official 381:5460fc57b6e4 2672 * @}
mbed_official 381:5460fc57b6e4 2673 */
mbed_official 381:5460fc57b6e4 2674
mbed_official 381:5460fc57b6e4 2675 /**
mbed_official 381:5460fc57b6e4 2676 * @}
mbed_official 381:5460fc57b6e4 2677 */
mbed_official 381:5460fc57b6e4 2678
mbed_official 381:5460fc57b6e4 2679 /* Exported macros -----------------------------------------------------------*/
mbed_official 381:5460fc57b6e4 2680 /** @defgroup HRTIM_Exported_Macros HRTIM Exported Macros
mbed_official 381:5460fc57b6e4 2681 * @{
mbed_official 381:5460fc57b6e4 2682 */
mbed_official 381:5460fc57b6e4 2683
mbed_official 381:5460fc57b6e4 2684 /** @brief Reset HRTIM handle state
mbed_official 381:5460fc57b6e4 2685 * @param __HANDLE__: HRTIM handle.
mbed_official 381:5460fc57b6e4 2686 * @retval None
mbed_official 381:5460fc57b6e4 2687 */
mbed_official 381:5460fc57b6e4 2688 #define __HAL_HRTIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HRTIM_STATE_RESET)
mbed_official 381:5460fc57b6e4 2689
mbed_official 381:5460fc57b6e4 2690 /** @brief Enables or disables the timer counter(s)
mbed_official 381:5460fc57b6e4 2691 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2692 * @param __TIMERS__: timersto enable/disable
mbed_official 381:5460fc57b6e4 2693 * This parameter can be any combinations of the following values:
mbed_official 381:5460fc57b6e4 2694 * @arg HRTIM_TIMERID_MASTER: Master timer identifier
mbed_official 381:5460fc57b6e4 2695 * @arg HRTIM_TIMERID_TIMER_A: Timer A identifier
mbed_official 381:5460fc57b6e4 2696 * @arg HRTIM_TIMERID_TIMER_B: Timer B identifier
mbed_official 381:5460fc57b6e4 2697 * @arg HRTIM_TIMERID_TIMER_C: Timer C identifier
mbed_official 381:5460fc57b6e4 2698 * @arg HRTIM_TIMERID_TIMER_D: Timer D identifier
mbed_official 381:5460fc57b6e4 2699 * @arg HRTIM_TIMERID_TIMER_E: Timer E identifier
mbed_official 381:5460fc57b6e4 2700 * @retval None
mbed_official 381:5460fc57b6e4 2701 */
mbed_official 381:5460fc57b6e4 2702 #define __HAL_HRTIM_ENABLE(__HANDLE__, __TIMERS__) ((__HANDLE__)->Instance->sMasterRegs.MCR |= (__TIMERS__))
mbed_official 381:5460fc57b6e4 2703
mbed_official 381:5460fc57b6e4 2704 /* The counter of a timing unit is disabled only if all the timer outputs */
mbed_official 381:5460fc57b6e4 2705 /* are disabled and no capture is configured */
mbed_official 381:5460fc57b6e4 2706 #define HRTIM_TAOEN_MASK (HRTIM_OENR_TA2OEN | HRTIM_OENR_TA1OEN)
mbed_official 381:5460fc57b6e4 2707 #define HRTIM_TBOEN_MASK (HRTIM_OENR_TB2OEN | HRTIM_OENR_TB1OEN)
mbed_official 381:5460fc57b6e4 2708 #define HRTIM_TCOEN_MASK (HRTIM_OENR_TC2OEN | HRTIM_OENR_TC1OEN)
mbed_official 381:5460fc57b6e4 2709 #define HRTIM_TDOEN_MASK (HRTIM_OENR_TD2OEN | HRTIM_OENR_TD1OEN)
mbed_official 381:5460fc57b6e4 2710 #define HRTIM_TEOEN_MASK (HRTIM_OENR_TE2OEN | HRTIM_OENR_TE1OEN)
mbed_official 381:5460fc57b6e4 2711 #define __HAL_HRTIM_DISABLE(__HANDLE__, __TIMERS__)\
mbed_official 381:5460fc57b6e4 2712 do {\
mbed_official 381:5460fc57b6e4 2713 if (((__TIMERS__) & HRTIM_TIMERID_MASTER) == HRTIM_TIMERID_MASTER)\
mbed_official 381:5460fc57b6e4 2714 {\
mbed_official 381:5460fc57b6e4 2715 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_MASTER);\
mbed_official 381:5460fc57b6e4 2716 }\
mbed_official 381:5460fc57b6e4 2717 if (((__TIMERS__) & HRTIM_TIMERID_TIMER_A) == HRTIM_TIMERID_TIMER_A)\
mbed_official 381:5460fc57b6e4 2718 {\
mbed_official 381:5460fc57b6e4 2719 if (((__HANDLE__)->Instance->sCommonRegs.OENR & HRTIM_TAOEN_MASK) == RESET)\
mbed_official 381:5460fc57b6e4 2720 {\
mbed_official 381:5460fc57b6e4 2721 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_TIMER_A);\
mbed_official 381:5460fc57b6e4 2722 }\
mbed_official 381:5460fc57b6e4 2723 }\
mbed_official 381:5460fc57b6e4 2724 if (((__TIMERS__) & HRTIM_TIMERID_TIMER_B) == HRTIM_TIMERID_TIMER_B)\
mbed_official 381:5460fc57b6e4 2725 {\
mbed_official 381:5460fc57b6e4 2726 if (((__HANDLE__)->Instance->sCommonRegs.OENR & HRTIM_TBOEN_MASK) == RESET)\
mbed_official 381:5460fc57b6e4 2727 {\
mbed_official 381:5460fc57b6e4 2728 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_TIMER_B);\
mbed_official 381:5460fc57b6e4 2729 }\
mbed_official 381:5460fc57b6e4 2730 }\
mbed_official 381:5460fc57b6e4 2731 if (((__TIMERS__) & HRTIM_TIMERID_TIMER_C) == HRTIM_TIMERID_TIMER_C)\
mbed_official 381:5460fc57b6e4 2732 {\
mbed_official 381:5460fc57b6e4 2733 if (((__HANDLE__)->Instance->sCommonRegs.OENR & HRTIM_TCOEN_MASK) == RESET)\
mbed_official 381:5460fc57b6e4 2734 {\
mbed_official 381:5460fc57b6e4 2735 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_TIMER_C);\
mbed_official 381:5460fc57b6e4 2736 }\
mbed_official 381:5460fc57b6e4 2737 }\
mbed_official 381:5460fc57b6e4 2738 if (((__TIMERS__) & HRTIM_TIMERID_TIMER_D) == HRTIM_TIMERID_TIMER_D)\
mbed_official 381:5460fc57b6e4 2739 {\
mbed_official 381:5460fc57b6e4 2740 if (((__HANDLE__)->Instance->sCommonRegs.OENR & HRTIM_TDOEN_MASK) == RESET)\
mbed_official 381:5460fc57b6e4 2741 {\
mbed_official 381:5460fc57b6e4 2742 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_TIMER_D);\
mbed_official 381:5460fc57b6e4 2743 }\
mbed_official 381:5460fc57b6e4 2744 }\
mbed_official 381:5460fc57b6e4 2745 if (((__TIMERS__) & HRTIM_TIMERID_TIMER_E) == HRTIM_TIMERID_TIMER_E)\
mbed_official 381:5460fc57b6e4 2746 {\
mbed_official 381:5460fc57b6e4 2747 if (((__HANDLE__)->Instance->sCommonRegs.OENR & HRTIM_TEOEN_MASK) == RESET)\
mbed_official 381:5460fc57b6e4 2748 {\
mbed_official 381:5460fc57b6e4 2749 ((__HANDLE__)->Instance->sMasterRegs.MCR &= ~HRTIM_TIMERID_TIMER_E);\
mbed_official 381:5460fc57b6e4 2750 }\
mbed_official 381:5460fc57b6e4 2751 }\
mbed_official 381:5460fc57b6e4 2752 } while(0)
mbed_official 381:5460fc57b6e4 2753
mbed_official 381:5460fc57b6e4 2754 /** @brief Enables or disables the specified HRTIM common interrupts.
mbed_official 381:5460fc57b6e4 2755 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2756 * @param __INTERRUPT__: specifies the interrupt source to enable or disable.
mbed_official 381:5460fc57b6e4 2757 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2758 * @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
mbed_official 381:5460fc57b6e4 2759 * @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
mbed_official 381:5460fc57b6e4 2760 * @arg HRTIM_IT_FLT3: Fault 3 interrupt enable
mbed_official 381:5460fc57b6e4 2761 * @arg HRTIM_IT_FLT4: Fault 4 interrupt enable
mbed_official 381:5460fc57b6e4 2762 * @arg HRTIM_IT_FLT5: Fault 5 interrupt enable
mbed_official 381:5460fc57b6e4 2763 * @arg HRTIM_IT_SYSFLT: System Fault interrupt enable
mbed_official 381:5460fc57b6e4 2764 * @arg HRTIM_IT_DLLRDY: DLL ready interrupt enable
mbed_official 381:5460fc57b6e4 2765 * @arg HRTIM_IT_BMPER: Burst mode period interrupt enable
mbed_official 381:5460fc57b6e4 2766 * @retval None
mbed_official 381:5460fc57b6e4 2767 */
mbed_official 381:5460fc57b6e4 2768 #define __HAL_HRTIM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER |= (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2769 #define __HAL_HRTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER &= ~(__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2770
mbed_official 381:5460fc57b6e4 2771 /** @brief Enables or disables the specified HRTIM Master timer interrupts.
mbed_official 381:5460fc57b6e4 2772 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2773 * @param __INTERRUPT__: specifies the interrupt source to enable or disable.
mbed_official 381:5460fc57b6e4 2774 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2775 * @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
mbed_official 381:5460fc57b6e4 2776 * @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
mbed_official 381:5460fc57b6e4 2777 * @arg HRTIM_MASTER_IT_MCMP3: Master compare 3 interrupt enable
mbed_official 381:5460fc57b6e4 2778 * @arg HRTIM_MASTER_IT_MCMP4: Master compare 4 interrupt enable
mbed_official 381:5460fc57b6e4 2779 * @arg HRTIM_MASTER_IT_MREP: Master Repetition interrupt enable
mbed_official 381:5460fc57b6e4 2780 * @arg HRTIM_MASTER_IT_SYNC: Synchronization input interrupt enable
mbed_official 381:5460fc57b6e4 2781 * @arg HRTIM_MASTER_IT_MUPD: Master update interrupt enable
mbed_official 381:5460fc57b6e4 2782 * @retval None
mbed_official 381:5460fc57b6e4 2783 */
mbed_official 381:5460fc57b6e4 2784 #define __HAL_HRTIM_MASTER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sMasterRegs.MDIER |= (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2785 #define __HAL_HRTIM_MASTER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sMasterRegs.MDIER &= ~(__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2786
mbed_official 381:5460fc57b6e4 2787 /** @brief Enables or disables the specified HRTIM Timerx interrupts.
mbed_official 381:5460fc57b6e4 2788 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2789 * @param __TIMER__: specified the timing unit (Timer A to E)
mbed_official 381:5460fc57b6e4 2790 * @param __INTERRUPT__: specifies the interrupt source to enable or disable.
mbed_official 381:5460fc57b6e4 2791 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2792 * @arg HRTIM_TIM_IT_CMP1: Timer compare 1 interrupt enable
mbed_official 381:5460fc57b6e4 2793 * @arg HRTIM_TIM_IT_CMP2: Timer compare 2 interrupt enable
mbed_official 381:5460fc57b6e4 2794 * @arg HRTIM_TIM_IT_CMP3: Timer compare 3 interrupt enable
mbed_official 381:5460fc57b6e4 2795 * @arg HRTIM_TIM_IT_CMP4: Timer compare 4 interrupt enable
mbed_official 381:5460fc57b6e4 2796 * @arg HRTIM_TIM_IT_REP: Timer repetition interrupt enable
mbed_official 381:5460fc57b6e4 2797 * @arg HRTIM_TIM_IT_UPD: Timer update interrupt enable
mbed_official 381:5460fc57b6e4 2798 * @arg HRTIM_TIM_IT_CPT1: Timer capture 1 interrupt enable
mbed_official 381:5460fc57b6e4 2799 * @arg HRTIM_TIM_IT_CPT2: Timer capture 2 interrupt enable
mbed_official 381:5460fc57b6e4 2800 * @arg HRTIM_TIM_IT_SET1: Timer output 1 set interrupt enable
mbed_official 381:5460fc57b6e4 2801 * @arg HRTIM_TIM_IT_RST1: Timer output 1 reset interrupt enable
mbed_official 381:5460fc57b6e4 2802 * @arg HRTIM_TIM_IT_SET2: Timer output 2 set interrupt enable
mbed_official 381:5460fc57b6e4 2803 * @arg HRTIM_TIM_IT_RST2: Timer output 2 reset interrupt enable
mbed_official 381:5460fc57b6e4 2804 * @arg HRTIM_TIM_IT_RST: Timer reset interrupt enable
mbed_official 381:5460fc57b6e4 2805 * @arg HRTIM_TIM_IT_DLYPRT: Timer delay protection interrupt enable
mbed_official 381:5460fc57b6e4 2806 * @retval None
mbed_official 381:5460fc57b6e4 2807 */
mbed_official 381:5460fc57b6e4 2808 #define __HAL_HRTIM_TIMER_ENABLE_IT(__HANDLE__, __TIMER__, __INTERRUPT__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER |= (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2809 #define __HAL_HRTIM_TIMER_DISABLE_IT(__HANDLE__, __TIMER__, __INTERRUPT__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER &= ~(__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2810
mbed_official 381:5460fc57b6e4 2811 /** @brief Checks if the specified HRTIM common interrupt source is enabled or disabled.
mbed_official 381:5460fc57b6e4 2812 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2813 * @param __INTERRUPT__: specifies the interrupt source to check.
mbed_official 381:5460fc57b6e4 2814 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2815 * @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
mbed_official 381:5460fc57b6e4 2816 * @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
mbed_official 381:5460fc57b6e4 2817 * @arg HRTIM_IT_FLT3: Fault 3 enable
mbed_official 381:5460fc57b6e4 2818 * @arg HRTIM_IT_FLT4: Fault 4 enable
mbed_official 381:5460fc57b6e4 2819 * @arg HRTIM_IT_FLT5: Fault 5 enable
mbed_official 381:5460fc57b6e4 2820 * @arg HRTIM_IT_SYSFLT: System Fault interrupt enable
mbed_official 381:5460fc57b6e4 2821 * @arg HRTIM_IT_DLLRDY: DLL ready interrupt enable
mbed_official 381:5460fc57b6e4 2822 * @arg HRTIM_IT_BMPER: Burst mode period interrupt enable
mbed_official 381:5460fc57b6e4 2823 * @retval The new state of __INTERRUPT__ (TRUE or FALSE).
mbed_official 381:5460fc57b6e4 2824 */
mbed_official 381:5460fc57b6e4 2825 #define __HAL_HRTIM_GET_ITSTATUS(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->sCommonRegs.IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
mbed_official 381:5460fc57b6e4 2826
mbed_official 381:5460fc57b6e4 2827 /** @brief Checks if the specified HRTIM Master interrupt source is enabled or disabled.
mbed_official 381:5460fc57b6e4 2828 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2829 * @param __INTERRUPT__: specifies the interrupt source to check.
mbed_official 381:5460fc57b6e4 2830 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2831 * @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
mbed_official 381:5460fc57b6e4 2832 * @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
mbed_official 381:5460fc57b6e4 2833 * @arg HRTIM_MASTER_IT_MCMP3: Master compare 3 interrupt enable
mbed_official 381:5460fc57b6e4 2834 * @arg HRTIM_MASTER_IT_MCMP4: Master compare 4 interrupt enable
mbed_official 381:5460fc57b6e4 2835 * @arg HRTIM_MASTER_IT_MREP: Master Repetition interrupt enable
mbed_official 381:5460fc57b6e4 2836 * @arg HRTIM_MASTER_IT_SYNC: Synchronization input interrupt enable
mbed_official 381:5460fc57b6e4 2837 * @arg HRTIM_MASTER_IT_MUPD: Master update interrupt enable
mbed_official 381:5460fc57b6e4 2838 * @retval The new state of __INTERRUPT__ (TRUE or FALSE).
mbed_official 381:5460fc57b6e4 2839 */
mbed_official 381:5460fc57b6e4 2840 #define __HAL_HRTIM_MASTER_GET_ITSTATUS(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->sMasterRegs.MDIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
mbed_official 381:5460fc57b6e4 2841
mbed_official 381:5460fc57b6e4 2842 /** @brief Checks if the specified HRTIM Timerx interrupt source is enabled or disabled.
mbed_official 381:5460fc57b6e4 2843 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2844 * @param __TIMER__: specified the timing unit (Timer A to E)
mbed_official 381:5460fc57b6e4 2845 * @param __INTERRUPT__: specifies the interrupt source to check.
mbed_official 381:5460fc57b6e4 2846 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2847 * @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
mbed_official 381:5460fc57b6e4 2848 * @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
mbed_official 381:5460fc57b6e4 2849 * @arg HRTIM_MASTER_IT_MCMP3: Master compare 3 interrupt enable
mbed_official 381:5460fc57b6e4 2850 * @arg HRTIM_MASTER_IT_MCMP4: Master compare 4 interrupt enable
mbed_official 381:5460fc57b6e4 2851 * @arg HRTIM_MASTER_IT_MREP: Master Repetition interrupt enable
mbed_official 381:5460fc57b6e4 2852 * @arg HRTIM_MASTER_IT_SYNC: Synchronization input interrupt enable
mbed_official 381:5460fc57b6e4 2853 * @arg HRTIM_MASTER_IT_MUPD: Master update interrupt enable
mbed_official 381:5460fc57b6e4 2854 * @arg HRTIM_TIM_IT_CMP1: Timer compare 1 interrupt enable
mbed_official 381:5460fc57b6e4 2855 * @arg HRTIM_TIM_IT_CMP2: Timer compare 2 interrupt enable
mbed_official 381:5460fc57b6e4 2856 * @arg HRTIM_TIM_IT_CMP3: Timer compare 3 interrupt enable
mbed_official 381:5460fc57b6e4 2857 * @arg HRTIM_TIM_IT_CMP4: Timer compare 4 interrupt enable
mbed_official 381:5460fc57b6e4 2858 * @arg HRTIM_TIM_IT_REP: Timer repetition interrupt enable
mbed_official 381:5460fc57b6e4 2859 * @arg HRTIM_TIM_IT_UPD: Timer update interrupt enable
mbed_official 381:5460fc57b6e4 2860 * @arg HRTIM_TIM_IT_CPT1: Timer capture 1 interrupt enable
mbed_official 381:5460fc57b6e4 2861 * @arg HRTIM_TIM_IT_CPT2: Timer capture 2 interrupt enable
mbed_official 381:5460fc57b6e4 2862 * @arg HRTIM_TIM_IT_SET1: Timer output 1 set interrupt enable
mbed_official 381:5460fc57b6e4 2863 * @arg HRTIM_TIM_IT_RST1: Timer output 1 reset interrupt enable
mbed_official 381:5460fc57b6e4 2864 * @arg HRTIM_TIM_IT_SET2: Timer output 2 set interrupt enable
mbed_official 381:5460fc57b6e4 2865 * @arg HRTIM_TIM_IT_RST2: Timer output 2 reset interrupt enable
mbed_official 381:5460fc57b6e4 2866 * @arg HRTIM_TIM_IT_RST: Timer reset interrupt enable
mbed_official 381:5460fc57b6e4 2867 * @arg HRTIM_TIM_IT_DLYPRT: Timer delay protection interrupt enable
mbed_official 381:5460fc57b6e4 2868 * @retval The new state of __INTERRUPT__ (TRUE or FALSE).
mbed_official 381:5460fc57b6e4 2869 */
mbed_official 381:5460fc57b6e4 2870 #define __HAL_HRTIM_TIMER_GET_ITSTATUS(__HANDLE__, __TIMER__, __INTERRUPT__) ((((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
mbed_official 381:5460fc57b6e4 2871
mbed_official 381:5460fc57b6e4 2872 /** @brief Clears the specified HRTIM common pending flag.
mbed_official 381:5460fc57b6e4 2873 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2874 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
mbed_official 381:5460fc57b6e4 2875 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2876 * @arg HRTIM_IT_FLT1: Fault 1 interrupt clear flag
mbed_official 381:5460fc57b6e4 2877 * @arg HRTIM_IT_FLT2: Fault 2 interrupt clear flag
mbed_official 381:5460fc57b6e4 2878 * @arg HRTIM_IT_FLT3: Fault 3 clear flag
mbed_official 381:5460fc57b6e4 2879 * @arg HRTIM_IT_FLT4: Fault 4 clear flag
mbed_official 381:5460fc57b6e4 2880 * @arg HRTIM_IT_FLT5: Fault 5 clear flag
mbed_official 381:5460fc57b6e4 2881 * @arg HRTIM_IT_SYSFLT: System Fault interrupt clear flag
mbed_official 381:5460fc57b6e4 2882 * @arg HRTIM_IT_DLLRDY: DLL ready interrupt clear flag
mbed_official 381:5460fc57b6e4 2883 * @arg HRTIM_IT_BMPER: Burst mode period interrupt clear flag
mbed_official 381:5460fc57b6e4 2884 * @retval None
mbed_official 381:5460fc57b6e4 2885 */
mbed_official 381:5460fc57b6e4 2886 #define __HAL_HRTIM_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.ICR = (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2887
mbed_official 381:5460fc57b6e4 2888 /** @brief Clears the specified HRTIM Master pending flag.
mbed_official 381:5460fc57b6e4 2889 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2890 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
mbed_official 381:5460fc57b6e4 2891 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2892 * @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt clear flag
mbed_official 381:5460fc57b6e4 2893 * @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt clear flag
mbed_official 381:5460fc57b6e4 2894 * @arg HRTIM_MASTER_IT_MCMP3: Master compare 3 interrupt clear flag
mbed_official 381:5460fc57b6e4 2895 * @arg HRTIM_MASTER_IT_MCMP4: Master compare 4 interrupt clear flag
mbed_official 381:5460fc57b6e4 2896 * @arg HRTIM_MASTER_IT_MREP: Master Repetition interrupt clear flag
mbed_official 381:5460fc57b6e4 2897 * @arg HRTIM_MASTER_IT_SYNC: Synchronization input interrupt clear flag
mbed_official 381:5460fc57b6e4 2898 * @arg HRTIM_MASTER_IT_MUPD: Master update interrupt clear flag
mbed_official 381:5460fc57b6e4 2899 * @retval None
mbed_official 381:5460fc57b6e4 2900 */
mbed_official 381:5460fc57b6e4 2901 #define __HAL_HRTIM_MASTER_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sMasterRegs.MICR = (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2902
mbed_official 381:5460fc57b6e4 2903 /** @brief Clears the specified HRTIM Timerx pending flag.
mbed_official 381:5460fc57b6e4 2904 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2905 * @param __TIMER__: specified the timing unit (Timer A to E)
mbed_official 381:5460fc57b6e4 2906 * @param __INTERRUPT__: specifies the interrupt pending bit to clear.
mbed_official 381:5460fc57b6e4 2907 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2908 * @arg HRTIM_TIM_IT_CMP1: Timer compare 1 interrupt clear flag
mbed_official 381:5460fc57b6e4 2909 * @arg HRTIM_TIM_IT_CMP2: Timer compare 2 interrupt clear flag
mbed_official 381:5460fc57b6e4 2910 * @arg HRTIM_TIM_IT_CMP3: Timer compare 3 interrupt clear flag
mbed_official 381:5460fc57b6e4 2911 * @arg HRTIM_TIM_IT_CMP4: Timer compare 4 interrupt clear flag
mbed_official 381:5460fc57b6e4 2912 * @arg HRTIM_TIM_IT_REP: Timer repetition interrupt clear flag
mbed_official 381:5460fc57b6e4 2913 * @arg HRTIM_TIM_IT_UPD: Timer update interrupt clear flag
mbed_official 381:5460fc57b6e4 2914 * @arg HRTIM_TIM_IT_CPT1: Timer capture 1 interrupt clear flag
mbed_official 381:5460fc57b6e4 2915 * @arg HRTIM_TIM_IT_CPT2: Timer capture 2 interrupt clear flag
mbed_official 381:5460fc57b6e4 2916 * @arg HRTIM_TIM_IT_SET1: Timer output 1 set interrupt clear flag
mbed_official 381:5460fc57b6e4 2917 * @arg HRTIM_TIM_IT_RST1: Timer output 1 reset interrupt clear flag
mbed_official 381:5460fc57b6e4 2918 * @arg HRTIM_TIM_IT_SET2: Timer output 2 set interrupt clear flag
mbed_official 381:5460fc57b6e4 2919 * @arg HRTIM_TIM_IT_RST2: Timer output 2 reset interrupt clear flag
mbed_official 381:5460fc57b6e4 2920 * @arg HRTIM_TIM_IT_RST: Timer reset interrupt clear flag
mbed_official 381:5460fc57b6e4 2921 * @arg HRTIM_TIM_IT_DLYPRT: Timer output 1 delay protection interrupt clear flag
mbed_official 381:5460fc57b6e4 2922 * @retval None
mbed_official 381:5460fc57b6e4 2923 */
mbed_official 381:5460fc57b6e4 2924 #define __HAL_HRTIM_TIMER_CLEAR_IT(__HANDLE__, __TIMER__, __INTERRUPT__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxICR = (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2925
mbed_official 381:5460fc57b6e4 2926 /* DMA HANDLING */
mbed_official 381:5460fc57b6e4 2927 /** @brief Enables or disables the specified HRTIM common interrupts.
mbed_official 381:5460fc57b6e4 2928 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2929 * @param __INTERRUPT__: specifies the interrupt source to enable or disable.
mbed_official 381:5460fc57b6e4 2930 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2931 * @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
mbed_official 381:5460fc57b6e4 2932 * @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
mbed_official 381:5460fc57b6e4 2933 * @arg HRTIM_IT_FLT3: Fault 3 interrupt enable
mbed_official 381:5460fc57b6e4 2934 * @arg HRTIM_IT_FLT4: Fault 4 interrupt enable
mbed_official 381:5460fc57b6e4 2935 * @arg HRTIM_IT_FLT5: Fault 5 interrupt enable
mbed_official 381:5460fc57b6e4 2936 * @arg HRTIM_IT_SYSFLT: System Fault interrupt enable
mbed_official 381:5460fc57b6e4 2937 * @arg HRTIM_IT_DLLRDY: DLL ready interrupt enable
mbed_official 381:5460fc57b6e4 2938 * @arg HRTIM_IT_BMPER: Burst mode period interrupt enable
mbed_official 381:5460fc57b6e4 2939 * @retval None
mbed_official 381:5460fc57b6e4 2940 */
mbed_official 381:5460fc57b6e4 2941 #define __HAL_HRTIM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER |= (__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2942 #define __HAL_HRTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER &= ~(__INTERRUPT__))
mbed_official 381:5460fc57b6e4 2943
mbed_official 381:5460fc57b6e4 2944 /** @brief Enables or disables the specified HRTIM Master timer DMA requets.
mbed_official 381:5460fc57b6e4 2945 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2946 * @param __DMA__: specifies the DMA request to enable or disable.
mbed_official 381:5460fc57b6e4 2947 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2948 * @arg HRTIM_MASTER_DMA_MCMP1: Master compare 1 DMA resquest enable
mbed_official 381:5460fc57b6e4 2949 * @arg HRTIM_MASTER_DMA_MCMP2: Master compare 2 DMA resquest enable
mbed_official 381:5460fc57b6e4 2950 * @arg HRTIM_MASTER_DMA_MCMP3: Master compare 3 DMA resquest enable
mbed_official 381:5460fc57b6e4 2951 * @arg HRTIM_MASTER_DMA_MCMP4: Master compare 4 DMA resquest enable
mbed_official 381:5460fc57b6e4 2952 * @arg HRTIM_MASTER_DMA_MREP: Master Repetition DMA resquest enable
mbed_official 381:5460fc57b6e4 2953 * @arg HRTIM_MASTER_DMA_SYNC: Synchronization input DMA resquest enable
mbed_official 381:5460fc57b6e4 2954 * @arg HRTIM_MASTER_DMA_MUPD: Master update DMA resquest enable
mbed_official 381:5460fc57b6e4 2955 * @retval None
mbed_official 381:5460fc57b6e4 2956 */
mbed_official 381:5460fc57b6e4 2957 #define __HAL_HRTIM_MASTER_ENABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->sMasterRegs.MDIER |= (__DMA__))
mbed_official 381:5460fc57b6e4 2958 #define __HAL_HRTIM_MASTER_DISABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->sMasterRegs.MDIER &= ~(__DMA__))
mbed_official 381:5460fc57b6e4 2959
mbed_official 381:5460fc57b6e4 2960 /** @brief Enables or disables the specified HRTIM Timerx DMA requests.
mbed_official 381:5460fc57b6e4 2961 * @param __HANDLE__: specifies the HRTIM Handle.
mbed_official 381:5460fc57b6e4 2962 * @param __TIMER__: specified the timing unit (Timer A to E)
mbed_official 381:5460fc57b6e4 2963 * @param __DMA__: specifies the DMA request to enable or disable.
mbed_official 381:5460fc57b6e4 2964 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2965 * @arg HRTIM_TIM_DMA_CMP1: Timer compare 1 DMA resquest enable
mbed_official 381:5460fc57b6e4 2966 * @arg HRTIM_TIM_DMA_CMP2: Timer compare 2 DMA resquest enable
mbed_official 381:5460fc57b6e4 2967 * @arg HRTIM_TIM_DMA_CMP3: Timer compare 3 DMA resquest enable
mbed_official 381:5460fc57b6e4 2968 * @arg HRTIM_TIM_DMA_CMP4: Timer compare 4 DMA resquest enable
mbed_official 381:5460fc57b6e4 2969 * @arg HRTIM_TIM_DMA_REP: Timer repetition DMA resquest enable
mbed_official 381:5460fc57b6e4 2970 * @arg HRTIM_TIM_DMA_UPD: Timer update DMA resquest enable
mbed_official 381:5460fc57b6e4 2971 * @arg HRTIM_TIM_DMA_CPT1: Timer capture 1 DMA resquest enable
mbed_official 381:5460fc57b6e4 2972 * @arg HRTIM_TIM_DMA_CPT2: Timer capture 2 DMA resquest enable
mbed_official 381:5460fc57b6e4 2973 * @arg HRTIM_TIM_DMA_SET1: Timer output 1 set DMA resquest enable
mbed_official 381:5460fc57b6e4 2974 * @arg HRTIM_TIM_DMA_RST1: Timer output 1 reset DMA resquest enable
mbed_official 381:5460fc57b6e4 2975 * @arg HRTIM_TIM_DMA_SET2: Timer output 2 set DMA resquest enable
mbed_official 381:5460fc57b6e4 2976 * @arg HRTIM_TIM_DMA_RST2: Timer output 2 reset DMA resquest enable
mbed_official 381:5460fc57b6e4 2977 * @arg HRTIM_TIM_DMA_RST: Timer reset DMA resquest enable
mbed_official 381:5460fc57b6e4 2978 * @arg HRTIM_TIM_DMA_DLYPRT: Timer delay protection DMA resquest enable
mbed_official 381:5460fc57b6e4 2979 * @retval None
mbed_official 381:5460fc57b6e4 2980 */
mbed_official 381:5460fc57b6e4 2981 #define __HAL_HRTIM_TIMER_ENABLE_DMA(__HANDLE__, __TIMER__, __DMA__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER |= (__DMA__))
mbed_official 381:5460fc57b6e4 2982 #define __HAL_HRTIM_TIMER_DISABLE_DMA(__HANDLE__, __TIMER__, __DMA__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER &= ~(__DMA__))
mbed_official 381:5460fc57b6e4 2983
mbed_official 381:5460fc57b6e4 2984 #define __HAL_HRTIM_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->sCommonRegs.ISR & (__FLAG__)) == (__FLAG__))
mbed_official 381:5460fc57b6e4 2985 #define __HAL_HRTIM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->sCommonRegs.ICR = (__FLAG__))
mbed_official 381:5460fc57b6e4 2986
mbed_official 381:5460fc57b6e4 2987 #define __HAL_HRTIM_MASTER_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->sMasterRegs.MISR & (__FLAG__)) == (__FLAG__))
mbed_official 381:5460fc57b6e4 2988 #define __HAL_HRTIM_MASTER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->sMasterRegs.MICR = (__FLAG__))
mbed_official 381:5460fc57b6e4 2989
mbed_official 381:5460fc57b6e4 2990 #define __HAL_HRTIM_TIMER_GET_FLAG(__HANDLE__, __TIMER__, __FLAG__) (((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxISR & (__FLAG__)) == (__FLAG__))
mbed_official 381:5460fc57b6e4 2991 #define __HAL_HRTIM_TIMER_CLEAR_FLAG(__HANDLE__, __TIMER__, __FLAG__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxICR = (__FLAG__))
mbed_official 381:5460fc57b6e4 2992
mbed_official 381:5460fc57b6e4 2993 /** @brief Sets the HRTIM timer Counter Register value on runtime
mbed_official 381:5460fc57b6e4 2994 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 2995 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 2996 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 2997 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 2998 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 2999 * @param __COUNTER__: specifies the Counter Register new value.
mbed_official 381:5460fc57b6e4 3000 * @retval None
mbed_official 381:5460fc57b6e4 3001 */
mbed_official 381:5460fc57b6e4 3002 #define __HAL_HRTIM_SetCounter(__HANDLE__, __TIMER__, __COUNTER__) \
mbed_official 381:5460fc57b6e4 3003 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MCNTR = (__COUNTER__)) :\
mbed_official 381:5460fc57b6e4 3004 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CNTxR = (__COUNTER__)))
mbed_official 381:5460fc57b6e4 3005
mbed_official 381:5460fc57b6e4 3006 /** @brief Gets the HRTIM timer Counter Register value on runtime
mbed_official 381:5460fc57b6e4 3007 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3008 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3009 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3010 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 3011 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3012 * @retval HRTIM timer Counter Register value
mbed_official 381:5460fc57b6e4 3013 */
mbed_official 381:5460fc57b6e4 3014 #define __HAL_HRTIM_GetCounter(__HANDLE__, __TIMER__) \
mbed_official 381:5460fc57b6e4 3015 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MCNTR) :\
mbed_official 381:5460fc57b6e4 3016 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CNTxR))
mbed_official 381:5460fc57b6e4 3017
mbed_official 381:5460fc57b6e4 3018 /** @brief Sets the HRTIM timer Period value on runtime
mbed_official 381:5460fc57b6e4 3019 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3020 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3021 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3022 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 3023 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3024 * @param __PERIOD__: specifies the Period Register new value.
mbed_official 381:5460fc57b6e4 3025 * @retval None
mbed_official 381:5460fc57b6e4 3026 */
mbed_official 381:5460fc57b6e4 3027 #define __HAL_HRTIM_SetPeriod(__HANDLE__, __TIMER__, __PERIOD__) \
mbed_official 381:5460fc57b6e4 3028 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MPER = (__PERIOD__)) :\
mbed_official 381:5460fc57b6e4 3029 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].PERxR = (__PERIOD__)))
mbed_official 381:5460fc57b6e4 3030
mbed_official 381:5460fc57b6e4 3031 /** @brief Gets the HRTIM timer Period Register value on runtime
mbed_official 381:5460fc57b6e4 3032 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3033 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3034 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3035 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 3036 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3037 * @retval timer Period Register
mbed_official 381:5460fc57b6e4 3038 */
mbed_official 381:5460fc57b6e4 3039 #define __HAL_HRTIM_GetPeriod(__HANDLE__, __TIMER__) \
mbed_official 381:5460fc57b6e4 3040 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MPER) :\
mbed_official 381:5460fc57b6e4 3041 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].PERxR))
mbed_official 381:5460fc57b6e4 3042
mbed_official 381:5460fc57b6e4 3043 /** @brief Sets the HRTIM timer clock prescaler value on runtime
mbed_official 381:5460fc57b6e4 3044 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3045 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3046 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3047 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 3048 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3049 * @param __PRESCALER__: specifies the clock prescaler new value.
mbed_official 381:5460fc57b6e4 3050 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3051 * @arg HRTIM_PRESCALERRATIO_MUL32: fHRCK: 4.608 GHz - Resolution: 217 ps - Min PWM frequency: 70.3 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3052 * @arg HRTIM_PRESCALERRATIO_MUL16: fHRCK: 2.304 GHz - Resolution: 434 ps - Min PWM frequency: 35.1 KHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3053 * @arg HRTIM_PRESCALERRATIO_MUL8: fHRCK: 1.152 GHz - Resolution: 868 ps - Min PWM frequency: 17.6 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3054 * @arg HRTIM_PRESCALERRATIO_MUL4: fHRCK: 576 MHz - Resolution: 1.73 ns - Min PWM frequency: 8.8 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3055 * @arg HRTIM_PRESCALERRATIO_MUL2: fHRCK: 288 MHz - Resolution: 3.47 ns - Min PWM frequency: 4.4 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3056 * @arg HRTIM_PRESCALERRATIO_DIV1: fHRCK: 144 MHz - Resolution: 6.95 ns - Min PWM frequency: 2.2 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3057 * @arg HRTIM_PRESCALERRATIO_DIV2: fHRCK: 72 MHz - Resolution: 13.88 ns- Min PWM frequency: 1.1 kHz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3058 * @arg HRTIM_PRESCALERRATIO_DIV4: fHRCK: 36 MHz - Resolution: 27.7 ns- Min PWM frequency: 550Hz (fHRTIM=144MHz)
mbed_official 381:5460fc57b6e4 3059 * @retval None
mbed_official 381:5460fc57b6e4 3060 */
mbed_official 381:5460fc57b6e4 3061 #define __HAL_HRTIM_SetClockPrescaler(__HANDLE__, __TIMER__, __PRESCALER__) \
mbed_official 381:5460fc57b6e4 3062 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MCR |= (__PRESCALER__)) :\
mbed_official 381:5460fc57b6e4 3063 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxCR |= (__PRESCALER__)))
mbed_official 381:5460fc57b6e4 3064
mbed_official 381:5460fc57b6e4 3065 /** @brief Gets the HRTIM timer clock prescaler value on runtime
mbed_official 381:5460fc57b6e4 3066 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3067 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3068 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3069 * @arg 0x5 for master timer
mbed_official 381:5460fc57b6e4 3070 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3071 * @retval timer clock prescaler value
mbed_official 381:5460fc57b6e4 3072 */
mbed_official 381:5460fc57b6e4 3073 #define __HAL_HRTIM_GetClockPrescaler(__HANDLE__, __TIMER__) \
mbed_official 381:5460fc57b6e4 3074 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MCR & HRTIM_MCR_CK_PSC) :\
mbed_official 381:5460fc57b6e4 3075 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxCR & HRTIM_TIMCR_CK_PSC))
mbed_official 381:5460fc57b6e4 3076
mbed_official 381:5460fc57b6e4 3077 /** @brief Sets the HRTIM timer Compare Register value on runtime
mbed_official 381:5460fc57b6e4 3078 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3079 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3080 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3081 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3082 * @param __COMPAREUNIT__: timer compare unit
mbed_official 381:5460fc57b6e4 3083 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3084 * @arg HRTIM_COMPAREUNIT_1: Compare unit 1
mbed_official 381:5460fc57b6e4 3085 * @arg HRTIM_COMPAREUNIT_2: Compare unit 2
mbed_official 381:5460fc57b6e4 3086 * @arg HRTIM_COMPAREUNIT_3: Compare unit 3
mbed_official 381:5460fc57b6e4 3087 * @arg HRTIM_COMPAREUNIT_4: Compare unit 4
mbed_official 381:5460fc57b6e4 3088 * @param __COMPARE__: specifies the Compare new value.
mbed_official 381:5460fc57b6e4 3089 * @retval None
mbed_official 381:5460fc57b6e4 3090 */
mbed_official 381:5460fc57b6e4 3091 #define __HAL_HRTIM_SetCompare(__HANDLE__, __TIMER__, __COMPAREUNIT__, __COMPARE__) \
mbed_official 381:5460fc57b6e4 3092 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? \
mbed_official 381:5460fc57b6e4 3093 (((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_1) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP1R = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3094 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_2) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP2R = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3095 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_3) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP3R = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3096 ((__HANDLE__)->Instance->sMasterRegs.MCMP4R = (__COMPARE__))) \
mbed_official 381:5460fc57b6e4 3097 : \
mbed_official 381:5460fc57b6e4 3098 (((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_1) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP1xR = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3099 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_2) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP2xR = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3100 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_3) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP3xR = (__COMPARE__)) :\
mbed_official 381:5460fc57b6e4 3101 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP4xR = (__COMPARE__))))
mbed_official 381:5460fc57b6e4 3102
mbed_official 381:5460fc57b6e4 3103 /** @brief Gets the HRTIM timer Compare Register value on runtime
mbed_official 381:5460fc57b6e4 3104 * @param __HANDLE__: HRTIM Handle.
mbed_official 381:5460fc57b6e4 3105 * @param __TIMER__: HRTIM timer
mbed_official 381:5460fc57b6e4 3106 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3107 * @arg 0x0 to 0x4 for timers A to E
mbed_official 381:5460fc57b6e4 3108 * @param __COMPAREUNIT__: timer compare unit
mbed_official 381:5460fc57b6e4 3109 * This parameter can be one of the following values:
mbed_official 381:5460fc57b6e4 3110 * @arg HRTIM_COMPAREUNIT_1: Compare unit 1
mbed_official 381:5460fc57b6e4 3111 * @arg HRTIM_COMPAREUNIT_2: Compare unit 2
mbed_official 381:5460fc57b6e4 3112 * @arg HRTIM_COMPAREUNIT_3: Compare unit 3
mbed_official 381:5460fc57b6e4 3113 * @arg HRTIM_COMPAREUNIT_4: Compare unit 4
mbed_official 381:5460fc57b6e4 3114 * @retval Compare value
mbed_official 381:5460fc57b6e4 3115 */
mbed_official 381:5460fc57b6e4 3116 #define __HAL_HRTIM_GetCompare(__HANDLE__, __TIMER__, __COMPAREUNIT__) \
mbed_official 381:5460fc57b6e4 3117 (((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? \
mbed_official 381:5460fc57b6e4 3118 (((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_1) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP1R) :\
mbed_official 381:5460fc57b6e4 3119 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_2) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP2R) :\
mbed_official 381:5460fc57b6e4 3120 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_3) ? ((__HANDLE__)->Instance->sMasterRegs.MCMP3R) :\
mbed_official 381:5460fc57b6e4 3121 ((__HANDLE__)->Instance->sMasterRegs.MCMP4R)) \
mbed_official 381:5460fc57b6e4 3122 : \
mbed_official 381:5460fc57b6e4 3123 (((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_1) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP1xR) :\
mbed_official 381:5460fc57b6e4 3124 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_2) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP2xR) :\
mbed_official 381:5460fc57b6e4 3125 ((__COMPAREUNIT__) == HRTIM_COMPAREUNIT_3) ? ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP3xR) :\
mbed_official 381:5460fc57b6e4 3126 ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP4xR)))
mbed_official 381:5460fc57b6e4 3127
mbed_official 381:5460fc57b6e4 3128 /**
mbed_official 381:5460fc57b6e4 3129 * @}
mbed_official 381:5460fc57b6e4 3130 */
mbed_official 381:5460fc57b6e4 3131
mbed_official 381:5460fc57b6e4 3132 /* Exported functions --------------------------------------------------------*/
mbed_official 381:5460fc57b6e4 3133 /** @addtogroup HRTIM_Exported_Functions HRTIM Exported Functions
mbed_official 381:5460fc57b6e4 3134 * @{
mbed_official 381:5460fc57b6e4 3135 */
mbed_official 381:5460fc57b6e4 3136
mbed_official 381:5460fc57b6e4 3137 /** @addtogroup HRTIM_Exported_Functions_Group1 Initialization and de-initialization functions
mbed_official 381:5460fc57b6e4 3138 * @{
mbed_official 381:5460fc57b6e4 3139 */
mbed_official 381:5460fc57b6e4 3140
mbed_official 381:5460fc57b6e4 3141 /* Initialization and Configuration functions ********************************/
mbed_official 381:5460fc57b6e4 3142 HAL_StatusTypeDef HAL_HRTIM_Init(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3143
mbed_official 381:5460fc57b6e4 3144 HAL_StatusTypeDef HAL_HRTIM_DeInit (HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3145
mbed_official 381:5460fc57b6e4 3146 void HAL_HRTIM_MspInit(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3147
mbed_official 381:5460fc57b6e4 3148 void HAL_HRTIM_MspDeInit(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3149
mbed_official 381:5460fc57b6e4 3150 HAL_StatusTypeDef HAL_HRTIM_TimeBaseConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3151 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3152 HRTIM_TimeBaseCfgTypeDef * pTimeBaseCfg);
mbed_official 381:5460fc57b6e4 3153
mbed_official 381:5460fc57b6e4 3154 HAL_StatusTypeDef HAL_HRTIM_DLLCalibrationStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3155 uint32_t CalibrationRate);
mbed_official 381:5460fc57b6e4 3156
mbed_official 381:5460fc57b6e4 3157 HAL_StatusTypeDef HAL_HRTIM_DLLCalibrationStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3158 uint32_t CalibrationRate);
mbed_official 381:5460fc57b6e4 3159
mbed_official 381:5460fc57b6e4 3160 HAL_StatusTypeDef HAL_HRTIM_PollForDLLCalibration(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3161 uint32_t Timeout);
mbed_official 381:5460fc57b6e4 3162
mbed_official 381:5460fc57b6e4 3163 /**
mbed_official 381:5460fc57b6e4 3164 * @}
mbed_official 381:5460fc57b6e4 3165 */
mbed_official 381:5460fc57b6e4 3166
mbed_official 381:5460fc57b6e4 3167 /** @addtogroup HRTIM_Exported_Functions_Group2 Simple time base mode functions
mbed_official 381:5460fc57b6e4 3168 * @{
mbed_official 381:5460fc57b6e4 3169 */
mbed_official 381:5460fc57b6e4 3170
mbed_official 381:5460fc57b6e4 3171 /* Simple time base related functions *****************************************/
mbed_official 381:5460fc57b6e4 3172 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3173 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3174
mbed_official 381:5460fc57b6e4 3175 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3176 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3177
mbed_official 381:5460fc57b6e4 3178 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3179 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3180
mbed_official 381:5460fc57b6e4 3181 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3182 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3183
mbed_official 381:5460fc57b6e4 3184 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStart_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3185 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3186 uint32_t SrcAddr,
mbed_official 381:5460fc57b6e4 3187 uint32_t DestAddr,
mbed_official 381:5460fc57b6e4 3188 uint32_t Length);
mbed_official 381:5460fc57b6e4 3189
mbed_official 381:5460fc57b6e4 3190 HAL_StatusTypeDef HAL_HRTIM_SimpleBaseStop_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3191 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3192
mbed_official 381:5460fc57b6e4 3193 /**
mbed_official 381:5460fc57b6e4 3194 * @}
mbed_official 381:5460fc57b6e4 3195 */
mbed_official 381:5460fc57b6e4 3196
mbed_official 381:5460fc57b6e4 3197 /** @addtogroup HRTIM_Exported_Functions_Group3 Simple output compare mode functions
mbed_official 381:5460fc57b6e4 3198 * @{
mbed_official 381:5460fc57b6e4 3199 */
mbed_official 381:5460fc57b6e4 3200 /* Simple output compare related functions ************************************/
mbed_official 381:5460fc57b6e4 3201 HAL_StatusTypeDef HAL_HRTIM_SimpleOCChannelConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3202 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3203 uint32_t OCChannel,
mbed_official 381:5460fc57b6e4 3204 HRTIM_SimpleOCChannelCfgTypeDef* pSimpleOCChannelCfg);
mbed_official 381:5460fc57b6e4 3205
mbed_official 381:5460fc57b6e4 3206 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3207 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3208 uint32_t OCChannel);
mbed_official 381:5460fc57b6e4 3209
mbed_official 381:5460fc57b6e4 3210 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3211 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3212 uint32_t OCChannel);
mbed_official 381:5460fc57b6e4 3213
mbed_official 381:5460fc57b6e4 3214 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3215 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3216 uint32_t OCChannel);
mbed_official 381:5460fc57b6e4 3217
mbed_official 381:5460fc57b6e4 3218 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3219 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3220 uint32_t OCChannel);
mbed_official 381:5460fc57b6e4 3221
mbed_official 381:5460fc57b6e4 3222 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStart_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3223 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3224 uint32_t OCChannel,
mbed_official 381:5460fc57b6e4 3225 uint32_t SrcAddr,
mbed_official 381:5460fc57b6e4 3226 uint32_t DestAddr,
mbed_official 381:5460fc57b6e4 3227 uint32_t Length);
mbed_official 381:5460fc57b6e4 3228
mbed_official 381:5460fc57b6e4 3229 HAL_StatusTypeDef HAL_HRTIM_SimpleOCStop_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3230 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3231 uint32_t OCChannel);
mbed_official 381:5460fc57b6e4 3232
mbed_official 381:5460fc57b6e4 3233 /**
mbed_official 381:5460fc57b6e4 3234 * @}
mbed_official 381:5460fc57b6e4 3235 */
mbed_official 381:5460fc57b6e4 3236
mbed_official 381:5460fc57b6e4 3237 /** @addtogroup HRTIM_Exported_Functions_Group4 Simple PWM output mode functions
mbed_official 381:5460fc57b6e4 3238 * @{
mbed_official 381:5460fc57b6e4 3239 */
mbed_official 381:5460fc57b6e4 3240 /* Simple PWM output related functions ****************************************/
mbed_official 381:5460fc57b6e4 3241 HAL_StatusTypeDef HAL_HRTIM_SimplePWMChannelConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3242 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3243 uint32_t PWMChannel,
mbed_official 381:5460fc57b6e4 3244 HRTIM_SimplePWMChannelCfgTypeDef* pSimplePWMChannelCfg);
mbed_official 381:5460fc57b6e4 3245
mbed_official 381:5460fc57b6e4 3246 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3247 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3248 uint32_t PWMChannel);
mbed_official 381:5460fc57b6e4 3249
mbed_official 381:5460fc57b6e4 3250 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3251 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3252 uint32_t PWMChannel);
mbed_official 381:5460fc57b6e4 3253
mbed_official 381:5460fc57b6e4 3254 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3255 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3256 uint32_t PWMChannel);
mbed_official 381:5460fc57b6e4 3257
mbed_official 381:5460fc57b6e4 3258 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3259 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3260 uint32_t PWMChannel);
mbed_official 381:5460fc57b6e4 3261
mbed_official 381:5460fc57b6e4 3262 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStart_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3263 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3264 uint32_t PWMChannel,
mbed_official 381:5460fc57b6e4 3265 uint32_t SrcAddr,
mbed_official 381:5460fc57b6e4 3266 uint32_t DestAddr,
mbed_official 381:5460fc57b6e4 3267 uint32_t Length);
mbed_official 381:5460fc57b6e4 3268
mbed_official 381:5460fc57b6e4 3269 HAL_StatusTypeDef HAL_HRTIM_SimplePWMStop_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3270 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3271 uint32_t PWMChannel);
mbed_official 381:5460fc57b6e4 3272
mbed_official 381:5460fc57b6e4 3273 /**
mbed_official 381:5460fc57b6e4 3274 * @}
mbed_official 381:5460fc57b6e4 3275 */
mbed_official 381:5460fc57b6e4 3276
mbed_official 381:5460fc57b6e4 3277 /** @addtogroup HRTIM_Exported_Functions_Group5 Simple input capture functions
mbed_official 381:5460fc57b6e4 3278 * @{
mbed_official 381:5460fc57b6e4 3279 */
mbed_official 381:5460fc57b6e4 3280 /* Simple capture related functions *******************************************/
mbed_official 381:5460fc57b6e4 3281 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureChannelConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3282 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3283 uint32_t CaptureChannel,
mbed_official 381:5460fc57b6e4 3284 HRTIM_SimpleCaptureChannelCfgTypeDef* pSimpleCaptureChannelCfg);
mbed_official 381:5460fc57b6e4 3285
mbed_official 381:5460fc57b6e4 3286 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3287 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3288 uint32_t CaptureChannel);
mbed_official 381:5460fc57b6e4 3289
mbed_official 381:5460fc57b6e4 3290 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3291 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3292 uint32_t CaptureChannel);
mbed_official 381:5460fc57b6e4 3293
mbed_official 381:5460fc57b6e4 3294 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3295 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3296 uint32_t CaptureChannel);
mbed_official 381:5460fc57b6e4 3297
mbed_official 381:5460fc57b6e4 3298 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3299 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3300 uint32_t CaptureChannel);
mbed_official 381:5460fc57b6e4 3301
mbed_official 381:5460fc57b6e4 3302 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStart_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3303 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3304 uint32_t CaptureChannel,
mbed_official 381:5460fc57b6e4 3305 uint32_t SrcAddr,
mbed_official 381:5460fc57b6e4 3306 uint32_t DestAddr,
mbed_official 381:5460fc57b6e4 3307 uint32_t Length);
mbed_official 381:5460fc57b6e4 3308
mbed_official 381:5460fc57b6e4 3309 HAL_StatusTypeDef HAL_HRTIM_SimpleCaptureStop_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3310 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3311 uint32_t CaptureChannel);
mbed_official 381:5460fc57b6e4 3312
mbed_official 381:5460fc57b6e4 3313 /**
mbed_official 381:5460fc57b6e4 3314 * @}
mbed_official 381:5460fc57b6e4 3315 */
mbed_official 381:5460fc57b6e4 3316
mbed_official 381:5460fc57b6e4 3317 /** @addtogroup HRTIM_Exported_Functions_Group6 Simple one pulse functions
mbed_official 381:5460fc57b6e4 3318 * @{
mbed_official 381:5460fc57b6e4 3319 */
mbed_official 381:5460fc57b6e4 3320 /* Simple one pulse related functions *****************************************/
mbed_official 381:5460fc57b6e4 3321 HAL_StatusTypeDef HAL_HRTIM_SimpleOnePulseChannelConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3322 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3323 uint32_t OnePulseChannel,
mbed_official 381:5460fc57b6e4 3324 HRTIM_SimpleOnePulseChannelCfgTypeDef* pSimpleOnePulseChannelCfg);
mbed_official 381:5460fc57b6e4 3325
mbed_official 381:5460fc57b6e4 3326 HAL_StatusTypeDef HAL_HRTIM_SimpleOnePulseStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3327 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3328 uint32_t OnePulseChannel);
mbed_official 381:5460fc57b6e4 3329
mbed_official 381:5460fc57b6e4 3330 HAL_StatusTypeDef HAL_HRTIM_SimpleOnePulseStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3331 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3332 uint32_t OnePulseChannel);
mbed_official 381:5460fc57b6e4 3333
mbed_official 381:5460fc57b6e4 3334 HAL_StatusTypeDef HAL_HRTIM_SimpleOnePulseStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3335 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3336 uint32_t OnePulseChannel);
mbed_official 381:5460fc57b6e4 3337
mbed_official 381:5460fc57b6e4 3338 HAL_StatusTypeDef HAL_HRTIM_SimpleOnePulseStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3339 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3340 uint32_t OnePulseChannel);
mbed_official 381:5460fc57b6e4 3341
mbed_official 381:5460fc57b6e4 3342 /**
mbed_official 381:5460fc57b6e4 3343 * @}
mbed_official 381:5460fc57b6e4 3344 */
mbed_official 381:5460fc57b6e4 3345
mbed_official 381:5460fc57b6e4 3346 /** @addtogroup HRTIM_Exported_Functions_Group7 Configuration functions
mbed_official 381:5460fc57b6e4 3347 * @{
mbed_official 381:5460fc57b6e4 3348 */
mbed_official 381:5460fc57b6e4 3349 HAL_StatusTypeDef HAL_HRTIM_BurstModeConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3350 HRTIM_BurstModeCfgTypeDef* pBurstModeCfg);
mbed_official 381:5460fc57b6e4 3351
mbed_official 381:5460fc57b6e4 3352 HAL_StatusTypeDef HAL_HRTIM_EventConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3353 uint32_t Event,
mbed_official 381:5460fc57b6e4 3354 HRTIM_EventCfgTypeDef* pEventCfg);
mbed_official 381:5460fc57b6e4 3355
mbed_official 381:5460fc57b6e4 3356 HAL_StatusTypeDef HAL_HRTIM_EventPrescalerConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3357 uint32_t Prescaler);
mbed_official 381:5460fc57b6e4 3358
mbed_official 381:5460fc57b6e4 3359 HAL_StatusTypeDef HAL_HRTIM_FaultConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3360 uint32_t Fault,
mbed_official 381:5460fc57b6e4 3361 HRTIM_FaultCfgTypeDef* pFaultCfg);
mbed_official 381:5460fc57b6e4 3362
mbed_official 381:5460fc57b6e4 3363 HAL_StatusTypeDef HAL_HRTIM_FaultPrescalerConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3364 uint32_t Prescaler);
mbed_official 381:5460fc57b6e4 3365
mbed_official 381:5460fc57b6e4 3366 void HAL_HRTIM_FaultModeCtl(HRTIM_HandleTypeDef * hhrtim,
mbed_official 381:5460fc57b6e4 3367 uint32_t Faults,
mbed_official 381:5460fc57b6e4 3368 uint32_t Enable);
mbed_official 381:5460fc57b6e4 3369
mbed_official 381:5460fc57b6e4 3370 HAL_StatusTypeDef HAL_HRTIM_ADCTriggerConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3371 uint32_t ADCTrigger,
mbed_official 381:5460fc57b6e4 3372 HRTIM_ADCTriggerCfgTypeDef* pADCTriggerCfg);
mbed_official 381:5460fc57b6e4 3373
mbed_official 381:5460fc57b6e4 3374 /**
mbed_official 381:5460fc57b6e4 3375 * @}
mbed_official 381:5460fc57b6e4 3376 */
mbed_official 381:5460fc57b6e4 3377
mbed_official 381:5460fc57b6e4 3378 /** @addtogroup HRTIM_Exported_Functions_Group8 Timer waveform configuration and functions
mbed_official 381:5460fc57b6e4 3379 * @{
mbed_official 381:5460fc57b6e4 3380 */
mbed_official 381:5460fc57b6e4 3381 /* Waveform related functions *************************************************/
mbed_official 381:5460fc57b6e4 3382 HAL_StatusTypeDef HAL_HRTIM_WaveformTimerConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3383 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3384 HRTIM_TimerCfgTypeDef * pTimerCfg);
mbed_official 381:5460fc57b6e4 3385
mbed_official 381:5460fc57b6e4 3386 HAL_StatusTypeDef HAL_HRTIM_WaveformCompareConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3387 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3388 uint32_t CompareUnit,
mbed_official 381:5460fc57b6e4 3389 HRTIM_CompareCfgTypeDef* pCompareCfg);
mbed_official 381:5460fc57b6e4 3390
mbed_official 381:5460fc57b6e4 3391 HAL_StatusTypeDef HAL_HRTIM_WaveformCaptureConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3392 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3393 uint32_t CaptureUnit,
mbed_official 381:5460fc57b6e4 3394 HRTIM_CaptureCfgTypeDef* pCaptureCfg);
mbed_official 381:5460fc57b6e4 3395
mbed_official 381:5460fc57b6e4 3396 HAL_StatusTypeDef HAL_HRTIM_WaveformOutputConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3397 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3398 uint32_t Output,
mbed_official 381:5460fc57b6e4 3399 HRTIM_OutputCfgTypeDef * pOutputCfg);
mbed_official 381:5460fc57b6e4 3400
mbed_official 381:5460fc57b6e4 3401 HAL_StatusTypeDef HAL_HRTIM_WaveformSetOutputLevel(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3402 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3403 uint32_t Output,
mbed_official 381:5460fc57b6e4 3404 uint32_t OutputLevel);
mbed_official 381:5460fc57b6e4 3405
mbed_official 381:5460fc57b6e4 3406 HAL_StatusTypeDef HAL_HRTIM_TimerEventFilteringConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3407 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3408 uint32_t Event,
mbed_official 381:5460fc57b6e4 3409 HRTIM_TimerEventFilteringCfgTypeDef * pTimerEventFilteringCfg);
mbed_official 381:5460fc57b6e4 3410
mbed_official 381:5460fc57b6e4 3411 HAL_StatusTypeDef HAL_HRTIM_DeadTimeConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3412 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3413 HRTIM_DeadTimeCfgTypeDef* pDeadTimeCfg);
mbed_official 381:5460fc57b6e4 3414
mbed_official 381:5460fc57b6e4 3415 HAL_StatusTypeDef HAL_HRTIM_ChopperModeConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3416 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3417 HRTIM_ChopperModeCfgTypeDef* pChopperModeCfg);
mbed_official 381:5460fc57b6e4 3418
mbed_official 381:5460fc57b6e4 3419 HAL_StatusTypeDef HAL_HRTIM_BurstDMAConfig(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3420 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3421 uint32_t RegistersToUpdate);
mbed_official 381:5460fc57b6e4 3422
mbed_official 381:5460fc57b6e4 3423
mbed_official 381:5460fc57b6e4 3424 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3425 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3426
mbed_official 381:5460fc57b6e4 3427 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3428 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3429
mbed_official 381:5460fc57b6e4 3430
mbed_official 381:5460fc57b6e4 3431 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStart_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3432 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3433
mbed_official 381:5460fc57b6e4 3434 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStop_IT(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3435 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3436
mbed_official 381:5460fc57b6e4 3437
mbed_official 381:5460fc57b6e4 3438 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStart_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3439 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3440
mbed_official 381:5460fc57b6e4 3441 HAL_StatusTypeDef HAL_HRTIM_WaveformCounterStop_DMA(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3442 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3443
mbed_official 381:5460fc57b6e4 3444 HAL_StatusTypeDef HAL_HRTIM_WaveformOutputStart(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3445 uint32_t OutputsToStart);
mbed_official 381:5460fc57b6e4 3446
mbed_official 381:5460fc57b6e4 3447 HAL_StatusTypeDef HAL_HRTIM_WaveformOutputStop(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3448 uint32_t OutputsToStop);
mbed_official 381:5460fc57b6e4 3449
mbed_official 381:5460fc57b6e4 3450 HAL_StatusTypeDef HAL_HRTIM_BurstModeCtl(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3451 uint32_t Enable);
mbed_official 381:5460fc57b6e4 3452
mbed_official 381:5460fc57b6e4 3453 HAL_StatusTypeDef HAL_HRTIM_BurstModeSoftwareTrigger(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3454
mbed_official 381:5460fc57b6e4 3455 HAL_StatusTypeDef HAL_HRTIM_SoftwareCapture(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3456 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3457 uint32_t CaptureUnit);
mbed_official 381:5460fc57b6e4 3458
mbed_official 381:5460fc57b6e4 3459 HAL_StatusTypeDef HAL_HRTIM_SoftwareUpdate(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3460 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3461
mbed_official 381:5460fc57b6e4 3462 HAL_StatusTypeDef HAL_HRTIM_SoftwareReset(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3463 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3464
mbed_official 381:5460fc57b6e4 3465 HAL_StatusTypeDef HAL_HRTIM_BurstDMATransfer(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3466 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3467 uint32_t BurstBufferAddress,
mbed_official 381:5460fc57b6e4 3468 uint32_t BurstBufferLength);
mbed_official 381:5460fc57b6e4 3469
mbed_official 381:5460fc57b6e4 3470 HAL_StatusTypeDef HAL_HRTIM_UpdateEnable(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3471 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3472
mbed_official 381:5460fc57b6e4 3473 HAL_StatusTypeDef HAL_HRTIM_UpdateDisable(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3474 uint32_t Timers);
mbed_official 381:5460fc57b6e4 3475
mbed_official 381:5460fc57b6e4 3476 /**
mbed_official 381:5460fc57b6e4 3477 * @}
mbed_official 381:5460fc57b6e4 3478 */
mbed_official 381:5460fc57b6e4 3479
mbed_official 381:5460fc57b6e4 3480 /** @addtogroup HRTIM_Exported_Functions_Group9 Peripheral state functions
mbed_official 381:5460fc57b6e4 3481 * @{
mbed_official 381:5460fc57b6e4 3482 */
mbed_official 381:5460fc57b6e4 3483 /* HRTIM peripheral state functions */
mbed_official 381:5460fc57b6e4 3484 HAL_HRTIM_StateTypeDef HAL_HRTIM_GetState(HRTIM_HandleTypeDef* hhrtim);
mbed_official 381:5460fc57b6e4 3485
mbed_official 381:5460fc57b6e4 3486 uint32_t HAL_HRTIM_GetCapturedValue(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3487 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3488 uint32_t CaptureUnit);
mbed_official 381:5460fc57b6e4 3489
mbed_official 381:5460fc57b6e4 3490 uint32_t HAL_HRTIM_WaveformGetOutputLevel(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3491 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3492 uint32_t Output);
mbed_official 381:5460fc57b6e4 3493
mbed_official 381:5460fc57b6e4 3494 uint32_t HAL_HRTIM_WaveformGetOutputState(HRTIM_HandleTypeDef * hhrtim,
mbed_official 381:5460fc57b6e4 3495 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3496 uint32_t Output);
mbed_official 381:5460fc57b6e4 3497
mbed_official 381:5460fc57b6e4 3498 uint32_t HAL_HRTIM_GetDelayedProtectionStatus(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3499 uint32_t TimerIdx,
mbed_official 381:5460fc57b6e4 3500 uint32_t Output);
mbed_official 381:5460fc57b6e4 3501
mbed_official 381:5460fc57b6e4 3502 uint32_t HAL_HRTIM_GetBurstStatus(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3503
mbed_official 381:5460fc57b6e4 3504 uint32_t HAL_HRTIM_GetCurrentPushPullStatus(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3505 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3506
mbed_official 381:5460fc57b6e4 3507 uint32_t HAL_HRTIM_GetIdlePushPullStatus(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3508 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3509
mbed_official 381:5460fc57b6e4 3510 /**
mbed_official 381:5460fc57b6e4 3511 * @}
mbed_official 381:5460fc57b6e4 3512 */
mbed_official 381:5460fc57b6e4 3513
mbed_official 381:5460fc57b6e4 3514 /** @addtogroup HRTIM_Exported_Functions_Group10 Interrupts handling
mbed_official 381:5460fc57b6e4 3515 * @{
mbed_official 381:5460fc57b6e4 3516 */
mbed_official 381:5460fc57b6e4 3517 /* IRQ handler */
mbed_official 381:5460fc57b6e4 3518 void HAL_HRTIM_IRQHandler(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3519 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3520
mbed_official 381:5460fc57b6e4 3521 /* HRTIM events related callback functions */
mbed_official 381:5460fc57b6e4 3522 void HAL_HRTIM_Fault1Callback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3523 void HAL_HRTIM_Fault2Callback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3524 void HAL_HRTIM_Fault3Callback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3525 void HAL_HRTIM_Fault4Callback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3526 void HAL_HRTIM_Fault5Callback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3527 void HAL_HRTIM_SystemFaultCallback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3528 void HAL_HRTIM_DLLCalbrationReadyCallback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3529 void HAL_HRTIM_BurstModePeriodCallback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3530 void HAL_HRTIM_SynchronizationEventCallback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3531
mbed_official 381:5460fc57b6e4 3532 /* Timer events related callback functions */
mbed_official 381:5460fc57b6e4 3533 void HAL_HRTIM_RegistersUpdateCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3534 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3535 void HAL_HRTIM_RepetitionEventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3536 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3537 void HAL_HRTIM_Compare1EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3538 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3539 void HAL_HRTIM_Compare2EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3540 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3541 void HAL_HRTIM_Compare3EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3542 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3543 void HAL_HRTIM_Compare4EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3544 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3545 void HAL_HRTIM_Capture1EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3546 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3547 void HAL_HRTIM_Capture2EventCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3548 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3549 void HAL_HRTIM_DelayedProtectionCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3550 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3551 void HAL_HRTIM_CounterResetCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3552 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3553 void HAL_HRTIM_Output1SetCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3554 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3555 void HAL_HRTIM_Output1ResetCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3556 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3557 void HAL_HRTIM_Output2SetCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3558 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3559 void HAL_HRTIM_Output2ResetCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3560 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3561 void HAL_HRTIM_BurstDMATransferCallback(HRTIM_HandleTypeDef *hhrtim,
mbed_official 381:5460fc57b6e4 3562 uint32_t TimerIdx);
mbed_official 381:5460fc57b6e4 3563 void HAL_HRTIM_ErrorCallback(HRTIM_HandleTypeDef *hhrtim);
mbed_official 381:5460fc57b6e4 3564
mbed_official 381:5460fc57b6e4 3565 /**
mbed_official 381:5460fc57b6e4 3566 * @}
mbed_official 381:5460fc57b6e4 3567 */
mbed_official 381:5460fc57b6e4 3568
mbed_official 381:5460fc57b6e4 3569 /**
mbed_official 381:5460fc57b6e4 3570 * @}
mbed_official 381:5460fc57b6e4 3571 */
mbed_official 381:5460fc57b6e4 3572
mbed_official 381:5460fc57b6e4 3573 /**
mbed_official 381:5460fc57b6e4 3574 * @}
mbed_official 381:5460fc57b6e4 3575 */
mbed_official 381:5460fc57b6e4 3576
mbed_official 381:5460fc57b6e4 3577 /**
mbed_official 381:5460fc57b6e4 3578 * @}
mbed_official 381:5460fc57b6e4 3579 */
mbed_official 381:5460fc57b6e4 3580
mbed_official 381:5460fc57b6e4 3581 #endif /* defined(STM32F334x8) */
mbed_official 381:5460fc57b6e4 3582
mbed_official 381:5460fc57b6e4 3583 #ifdef __cplusplus
mbed_official 381:5460fc57b6e4 3584 }
mbed_official 381:5460fc57b6e4 3585 #endif
mbed_official 381:5460fc57b6e4 3586
mbed_official 381:5460fc57b6e4 3587 #endif /* __STM32F3xx_HAL_HRTIM_H */
mbed_official 381:5460fc57b6e4 3588
mbed_official 381:5460fc57b6e4 3589 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/