Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
93:e188a91d3eaa
.

Who changed what in which revision?

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