mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Fri Aug 12 13:04:35 2016 +0200
Revision:
123:b0220dba8be7
Parent:
122:f9eeca106725
Release 123 of the mbed library

Changes:
- new targets: nucleo_f207zg, beetle, nrf51_dk, hexiwear,
nuvoton nuc472, vk rz a1h
- ST - fix timer interrupt handler, sleep api fix
- NXP - lpc15xx us ticker fix
- Nordic - analogin fixes, LF clock init addition, enable i2c async

Who changed what in which revision?

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