You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

10777 lines
543 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32h7xx_ll_hrtim.h
  4. * @author MCD Application Team
  5. * @brief Header file of HRTIM LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32H7xx_LL_HRTIM_H
  21. #define STM32H7xx_LL_HRTIM_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32h7xx.h"
  27. /** @addtogroup STM32H7xx_LL_Driver
  28. * @{
  29. */
  30. #if defined (HRTIM1)
  31. /** @defgroup HRTIM_LL HRTIM
  32. * @{
  33. */
  34. /* Private types -------------------------------------------------------------*/
  35. /* Private variables ---------------------------------------------------------*/
  36. /** @defgroup HRTIM_LL_Private_Variables HRTIM Private Variables
  37. * @{
  38. */
  39. static const uint16_t REG_OFFSET_TAB_TIMER[] =
  40. {
  41. 0x00U, /* 0: MASTER */
  42. 0x80U, /* 1: TIMER A */
  43. 0x100U, /* 2: TIMER B */
  44. 0x180U, /* 3: TIMER C */
  45. 0x200U, /* 4: TIMER D */
  46. 0x280U /* 5: TIMER E */
  47. };
  48. static const uint8_t REG_OFFSET_TAB_ADCxR[] =
  49. {
  50. 0x00U, /* 0: HRTIM_ADC1R */
  51. 0x04U, /* 1: HRTIM_ADC2R */
  52. 0x08U, /* 2: HRTIM_ADC3R */
  53. 0x0CU, /* 3: HRTIM_ADC4R */
  54. };
  55. static const uint16_t REG_OFFSET_TAB_SETxR[] =
  56. {
  57. 0x00U, /* 0: TA1 */
  58. 0x08U, /* 1: TA2 */
  59. 0x80U, /* 2: TB1 */
  60. 0x88U, /* 3: TB2 */
  61. 0x100U, /* 4: TC1 */
  62. 0x108U, /* 5: TC2 */
  63. 0x180U, /* 6: TD1 */
  64. 0x188U, /* 7: TD2 */
  65. 0x200U, /* 8: TE1 */
  66. 0x208U /* 9: TE2 */
  67. };
  68. static const uint16_t REG_OFFSET_TAB_OUTxR[] =
  69. {
  70. 0x00U, /* 0: TA1 */
  71. 0x00U, /* 1: TA2 */
  72. 0x80U, /* 2: TB1 */
  73. 0x80U, /* 3: TB2 */
  74. 0x100U, /* 4: TC1 */
  75. 0x100U, /* 5: TC2 */
  76. 0x180U, /* 6: TD1 */
  77. 0x180U, /* 7: TD2 */
  78. 0x200U, /* 8: TE1 */
  79. 0x200U /* 9: TE2 */
  80. };
  81. static const uint8_t REG_OFFSET_TAB_EECR[] =
  82. {
  83. 0x00U, /* LL_HRTIM_EVENT_1 */
  84. 0x00U, /* LL_HRTIM_EVENT_2 */
  85. 0x00U, /* LL_HRTIM_EVENT_3 */
  86. 0x00U, /* LL_HRTIM_EVENT_4 */
  87. 0x00U, /* LL_HRTIM_EVENT_5 */
  88. 0x04U, /* LL_HRTIM_EVENT_6 */
  89. 0x04U, /* LL_HRTIM_EVENT_7 */
  90. 0x04U, /* LL_HRTIM_EVENT_8 */
  91. 0x04U, /* LL_HRTIM_EVENT_9 */
  92. 0x04U /* LL_HRTIM_EVENT_10 */
  93. };
  94. static const uint8_t REG_OFFSET_TAB_FLTINR[] =
  95. {
  96. 0x00U, /* LL_HRTIM_FAULT_1 */
  97. 0x00U, /* LL_HRTIM_FAULT_2 */
  98. 0x00U, /* LL_HRTIM_FAULT_3 */
  99. 0x00U, /* LL_HRTIM_FAULT_4 */
  100. 0x04U /* LL_HRTIM_FAULT_5 */
  101. };
  102. static const uint32_t REG_MASK_TAB_UPDATETRIG[] =
  103. {
  104. 0x20000000U, /* 0: MASTER */
  105. 0x01FE0000U, /* 1: TIMER A */
  106. 0x01FE0000U, /* 2: TIMER B */
  107. 0x01FE0000U, /* 3: TIMER C */
  108. 0x01FE0000U, /* 4: TIMER D */
  109. 0x01FE0000U /* 5: TIMER E */
  110. };
  111. static const uint8_t REG_SHIFT_TAB_UPDATETRIG[] =
  112. {
  113. 12U, /* 0: MASTER */
  114. 0U, /* 1: TIMER A */
  115. 0U, /* 2: TIMER B */
  116. 0U, /* 3: TIMER C */
  117. 0U, /* 4: TIMER D */
  118. 0U /* 5: TIMER E */
  119. };
  120. static const uint8_t REG_SHIFT_TAB_EExSRC[] =
  121. {
  122. 0U, /* LL_HRTIM_EVENT_1 */
  123. 6U, /* LL_HRTIM_EVENT_2 */
  124. 12U, /* LL_HRTIM_EVENT_3 */
  125. 18U, /* LL_HRTIM_EVENT_4 */
  126. 24U, /* LL_HRTIM_EVENT_5 */
  127. 0U, /* LL_HRTIM_EVENT_6 */
  128. 6U, /* LL_HRTIM_EVENT_7 */
  129. 12U, /* LL_HRTIM_EVENT_8 */
  130. 18U, /* LL_HRTIM_EVENT_9 */
  131. 24U /* LL_HRTIM_EVENT_10 */
  132. };
  133. static const uint32_t REG_MASK_TAB_UPDATEGATING[] =
  134. {
  135. HRTIM_MCR_BRSTDMA, /* 0: MASTER */
  136. HRTIM_TIMCR_UPDGAT, /* 1: TIMER A */
  137. HRTIM_TIMCR_UPDGAT, /* 2: TIMER B */
  138. HRTIM_TIMCR_UPDGAT, /* 3: TIMER C */
  139. HRTIM_TIMCR_UPDGAT, /* 4: TIMER D */
  140. HRTIM_TIMCR_UPDGAT /* 5: TIMER E */
  141. };
  142. static const uint8_t REG_SHIFT_TAB_UPDATEGATING[] =
  143. {
  144. 2U, /* 0: MASTER */
  145. 0U, /* 1: TIMER A */
  146. 0U, /* 2: TIMER B */
  147. 0U, /* 3: TIMER C */
  148. 0U, /* 4: TIMER D */
  149. 0U /* 5: TIMER E */
  150. };
  151. static const uint8_t REG_SHIFT_TAB_OUTxR[] =
  152. {
  153. 0U, /* 0: TA1 */
  154. 16U, /* 1: TA2 */
  155. 0U, /* 2: TB1 */
  156. 16U, /* 3: TB2 */
  157. 0U, /* 4: TC1 */
  158. 16U, /* 5: TC2 */
  159. 0U, /* 6: TD1 */
  160. 16U, /* 7: TD2 */
  161. 0U, /* 8: TE1 */
  162. 16U /* 9: TE2 */
  163. };
  164. static const uint8_t REG_SHIFT_TAB_OxSTAT[] =
  165. {
  166. 0U, /* 0: TA1 */
  167. 1U, /* 1: TA2 */
  168. 0U, /* 2: TB1 */
  169. 1U, /* 3: TB2 */
  170. 0U, /* 4: TC1 */
  171. 1U, /* 5: TC2 */
  172. 0U, /* 6: TD1 */
  173. 1U, /* 7: TD2 */
  174. 0U, /* 8: TE1 */
  175. 1U /* 9: TE2 */
  176. };
  177. static const uint8_t REG_SHIFT_TAB_FLTxE[] =
  178. {
  179. 0U, /* LL_HRTIM_FAULT_1 */
  180. 8U, /* LL_HRTIM_FAULT_2 */
  181. 16U, /* LL_HRTIM_FAULT_3 */
  182. 24U, /* LL_HRTIM_FAULT_4 */
  183. 0U /* LL_HRTIM_FAULT_5 */
  184. };
  185. /**
  186. * @}
  187. */
  188. /* Private constants ---------------------------------------------------------*/
  189. /** @defgroup HRTIM_LL_Private_Constants HRTIM Private Constants
  190. * @{
  191. */
  192. #define HRTIM_CR1_UDIS_MASK ((uint32_t)(HRTIM_CR1_MUDIS |\
  193. HRTIM_CR1_TAUDIS |\
  194. HRTIM_CR1_TBUDIS |\
  195. HRTIM_CR1_TCUDIS |\
  196. HRTIM_CR1_TDUDIS |\
  197. HRTIM_CR1_TEUDIS))
  198. #define HRTIM_CR2_SWUPD_MASK ((uint32_t)(HRTIM_CR2_MSWU |\
  199. HRTIM_CR2_TASWU |\
  200. HRTIM_CR2_TBSWU |\
  201. HRTIM_CR2_TCSWU |\
  202. HRTIM_CR2_TDSWU |\
  203. HRTIM_CR2_TESWU))
  204. #define HRTIM_CR2_SWRST_MASK ((uint32_t)(HRTIM_CR2_MRST |\
  205. HRTIM_CR2_TARST |\
  206. HRTIM_CR2_TBRST |\
  207. HRTIM_CR2_TCRST |\
  208. HRTIM_CR2_TDRST |\
  209. HRTIM_CR2_TERST))
  210. #define HRTIM_OENR_OEN_MASK ((uint32_t)(HRTIM_OENR_TA1OEN |\
  211. HRTIM_OENR_TA2OEN |\
  212. HRTIM_OENR_TB1OEN |\
  213. HRTIM_OENR_TB2OEN |\
  214. HRTIM_OENR_TC1OEN |\
  215. HRTIM_OENR_TC2OEN |\
  216. HRTIM_OENR_TD1OEN |\
  217. HRTIM_OENR_TD2OEN |\
  218. HRTIM_OENR_TE1OEN |\
  219. HRTIM_OENR_TE2OEN))
  220. #define HRTIM_OENR_ODIS_MASK ((uint32_t)(HRTIM_ODISR_TA1ODIS |\
  221. HRTIM_ODISR_TA2ODIS |\
  222. HRTIM_ODISR_TB1ODIS |\
  223. HRTIM_ODISR_TB2ODIS |\
  224. HRTIM_ODISR_TC1ODIS |\
  225. HRTIM_ODISR_TC2ODIS |\
  226. HRTIM_ODISR_TD1ODIS |\
  227. HRTIM_ODISR_TD2ODIS |\
  228. HRTIM_ODISR_TE1ODIS |\
  229. HRTIM_ODISR_TE2ODIS))
  230. #define HRTIM_OUT_CONFIG_MASK ((uint32_t)(HRTIM_OUTR_POL1 |\
  231. HRTIM_OUTR_IDLM1 |\
  232. HRTIM_OUTR_IDLES1 |\
  233. HRTIM_OUTR_FAULT1 |\
  234. HRTIM_OUTR_CHP1 |\
  235. HRTIM_OUTR_DIDL1))
  236. #define HRTIM_EE_CONFIG_MASK ((uint32_t)(HRTIM_EECR1_EE1SRC |\
  237. HRTIM_EECR1_EE1POL |\
  238. HRTIM_EECR1_EE1SNS |\
  239. HRTIM_EECR1_EE1FAST))
  240. #define HRTIM_FLT_CONFIG_MASK ((uint32_t)(HRTIM_FLTINR1_FLT1P |\
  241. HRTIM_FLTINR1_FLT1SRC))
  242. #define HRTIM_BM_CONFIG_MASK ((uint32_t)( HRTIM_BMCR_BMPRSC |\
  243. HRTIM_BMCR_BMCLK |\
  244. HRTIM_BMCR_BMOM))
  245. /**
  246. * @}
  247. */
  248. /* Private macros ------------------------------------------------------------*/
  249. /* Exported types ------------------------------------------------------------*/
  250. #if defined(USE_FULL_LL_DRIVER)
  251. /** @defgroup HRTIM_LL_ES_INIT HRTIM Exported Init structure
  252. * @{
  253. */
  254. /* TO BE COMPLETED */
  255. /**
  256. * @}
  257. */
  258. #endif /* USE_FULL_LL_DRIVER */
  259. /* Exported constants --------------------------------------------------------*/
  260. /** @defgroup HRTIM_LL_Exported_Constants HRTIM Exported Constants
  261. * @{
  262. */
  263. /** @defgroup HRTIM_LL_EC_GET_FLAG Get Flags Defines
  264. * @brief Flags defines which can be used with LL_HRTIM_ReadReg function
  265. * @{
  266. */
  267. #define LL_HRTIM_ISR_FLT1 HRTIM_ISR_FLT1
  268. #define LL_HRTIM_ISR_FLT2 HRTIM_ISR_FLT2
  269. #define LL_HRTIM_ISR_FLT3 HRTIM_ISR_FLT3
  270. #define LL_HRTIM_ISR_FLT4 HRTIM_ISR_FLT4
  271. #define LL_HRTIM_ISR_FLT5 HRTIM_ISR_FLT5
  272. #define LL_HRTIM_ISR_SYSFLT HRTIM_ISR_SYSFLT
  273. #define LL_HRTIM_ISR_BMPER HRTIM_ISR_BMPER
  274. #define LL_HRTIM_MISR_MCMP1 HRTIM_MISR_MCMP1
  275. #define LL_HRTIM_MISR_MCMP2 HRTIM_MISR_MCMP2
  276. #define LL_HRTIM_MISR_MCMP3 HRTIM_MISR_MCMP3
  277. #define LL_HRTIM_MISR_MCMP4 HRTIM_MISR_MCMP4
  278. #define LL_HRTIM_MISR_MREP HRTIM_MISR_MREP
  279. #define LL_HRTIM_MISR_SYNC HRTIM_MISR_SYNC
  280. #define LL_HRTIM_MISR_MUPD HRTIM_MISR_MUPD
  281. #define LL_HRTIM_TIMISR_CMP1 HRTIM_TIMISR_CMP1
  282. #define LL_HRTIM_TIMISR_CMP2 HRTIM_TIMISR_CMP2
  283. #define LL_HRTIM_TIMISR_CMP3 HRTIM_TIMISR_CMP3
  284. #define LL_HRTIM_TIMISR_CMP4 HRTIM_TIMISR_CMP4
  285. #define LL_HRTIM_TIMISR_REP HRTIM_TIMISR_REP
  286. #define LL_HRTIM_TIMISR_UPD HRTIM_TIMISR_UPD
  287. #define LL_HRTIM_TIMISR_CPT1 HRTIM_TIMISR_CPT1
  288. #define LL_HRTIM_TIMISR_CPT2 HRTIM_TIMISR_CPT2
  289. #define LL_HRTIM_TIMISR_SET1 HRTIM_TIMISR_SET1
  290. #define LL_HRTIM_TIMISR_RST1 HRTIM_TIMISR_RST1
  291. #define LL_HRTIM_TIMISR_SET2 HRTIM_TIMISR_SET2
  292. #define LL_HRTIM_TIMISR_RST2 HRTIM_TIMISR_RST2
  293. #define LL_HRTIM_TIMISR_RST HRTIM_TIMISR_RST
  294. #define LL_HRTIM_TIMISR_DLYPRT HRTIM_TIMISR_DLYPRT
  295. /**
  296. * @}
  297. */
  298. /** @defgroup HRTIM_LL_EC_IT IT Defines
  299. * @brief IT defines which can be used with LL_HRTIM_ReadReg and LL_HRTIM_WriteReg functions
  300. * @{
  301. */
  302. #define LL_HRTIM_IER_FLT1IE HRTIM_IER_FLT1IE
  303. #define LL_HRTIM_IER_FLT2IE HRTIM_IER_FLT2IE
  304. #define LL_HRTIM_IER_FLT3IE HRTIM_IER_FLT3IE
  305. #define LL_HRTIM_IER_FLT4IE HRTIM_IER_FLT4IE
  306. #define LL_HRTIM_IER_FLT5IE HRTIM_IER_FLT5IE
  307. #define LL_HRTIM_IER_SYSFLTIE HRTIM_IER_SYSFLTIE
  308. #define LL_HRTIM_IER_BMPERIE HRTIM_IER_BMPERIE
  309. #define LL_HRTIM_MDIER_MCMP1IE HRTIM_MDIER_MCMP1IE
  310. #define LL_HRTIM_MDIER_MCMP2IE HRTIM_MDIER_MCMP2IE
  311. #define LL_HRTIM_MDIER_MCMP3IE HRTIM_MDIER_MCMP3IE
  312. #define LL_HRTIM_MDIER_MCMP4IE HRTIM_MDIER_MCMP4IE
  313. #define LL_HRTIM_MDIER_MREPIE HRTIM_MDIER_MREPIE
  314. #define LL_HRTIM_MDIER_SYNCIE HRTIM_MDIER_SYNCIE
  315. #define LL_HRTIM_MDIER_MUPDIE HRTIM_MDIER_MUPDIE
  316. #define LL_HRTIM_TIMDIER_CMP1IE HRTIM_TIMDIER_CMP1IE
  317. #define LL_HRTIM_TIMDIER_CMP2IE HRTIM_TIMDIER_CMP2IE
  318. #define LL_HRTIM_TIMDIER_CMP3IE HRTIM_TIMDIER_CMP3IE
  319. #define LL_HRTIM_TIMDIER_CMP4IE HRTIM_TIMDIER_CMP4IE
  320. #define LL_HRTIM_TIMDIER_REPIE HRTIM_TIMDIER_REPIE
  321. #define LL_HRTIM_TIMDIER_UPDIE HRTIM_TIMDIER_UPDIE
  322. #define LL_HRTIM_TIMDIER_CPT1IE HRTIM_TIMDIER_CPT1IE
  323. #define LL_HRTIM_TIMDIER_CPT2IE HRTIM_TIMDIER_CPT2IE
  324. #define LL_HRTIM_TIMDIER_SET1IE HRTIM_TIMDIER_SET1IE
  325. #define LL_HRTIM_TIMDIER_RST1IE HRTIM_TIMDIER_RST1IE
  326. #define LL_HRTIM_TIMDIER_SET2IE HRTIM_TIMDIER_SET2IE
  327. #define LL_HRTIM_TIMDIER_RST2IE HRTIM_TIMDIER_RST2IE
  328. #define LL_HRTIM_TIMDIER_RSTIE HRTIM_TIMDIER_RSTIE
  329. #define LL_HRTIM_TIMDIER_DLYPRTIE HRTIM_TIMDIER_DLYPRTIE
  330. /**
  331. * @}
  332. */
  333. /** @defgroup HRTIM_LL_EC_SYNCIN_SRC SYNCHRONIZATION INPUT SOURCE
  334. * @{
  335. * @brief Constants defining defining the synchronization input source.
  336. */
  337. #define LL_HRTIM_SYNCIN_SRC_NONE 0x00000000U /*!< HRTIM is not synchronized and runs in standalone mode */
  338. #define LL_HRTIM_SYNCIN_SRC_TIM_EVENT (HRTIM_MCR_SYNC_IN_1) /*!< The HRTIM is synchronized with the on-chip timer */
  339. #define LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT (HRTIM_MCR_SYNC_IN_1 | HRTIM_MCR_SYNC_IN_0) /*!< A positive pulse on SYNCIN input triggers the HRTIM */
  340. /**
  341. * @}
  342. */
  343. /** @defgroup HRTIM_LL_EC_SYNCOUT_SRC SYNCHRONIZATION OUTPUT SOURCE
  344. * @{
  345. * @brief Constants defining the source and event to be sent on the synchronization output.
  346. */
  347. #define LL_HRTIM_SYNCOUT_SRC_MASTER_START 0x00000000U /*!< A pulse is sent on the SYNCOUT output upon master timer start event */
  348. #define LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1 (HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output upon master timer compare 1 event*/
  349. #define LL_HRTIM_SYNCOUT_SRC_TIMA_START (HRTIM_MCR_SYNC_SRC_1) /*!< A pulse is sent on the SYNCOUT output upon timer A start or reset events */
  350. #define LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1 (HRTIM_MCR_SYNC_SRC_1 | HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output upon timer A compare 1 event */
  351. /**
  352. * @}
  353. */
  354. /** @defgroup HRTIM_LL_EC_SYNCOUT_POLARITY SYNCHRONIZATION OUTPUT POLARITY
  355. * @{
  356. * @brief Constants defining the routing and conditioning of the synchronization output event.
  357. */
  358. #define LL_HRTIM_SYNCOUT_DISABLED 0x00000000U /*!< Synchronization output event is disabled */
  359. #define LL_HRTIM_SYNCOUT_POSITIVE_PULSE (HRTIM_MCR_SYNC_OUT_1) /*!< SCOUT pin has a low idle level and issues a positive pulse of 16 fHRTIM clock cycles length for the synchronization */
  360. #define LL_HRTIM_SYNCOUT_NEGATIVE_PULSE (HRTIM_MCR_SYNC_OUT_1 | HRTIM_MCR_SYNC_OUT_0) /*!< SCOUT pin has a high idle level and issues a negative pulse of 16 fHRTIM clock cycles length for the synchronization */
  361. /**
  362. * @}
  363. */
  364. /** @defgroup HRTIM_LL_EC_TIMER TIMER ID
  365. * @{
  366. * @brief Constants identifying a timing unit.
  367. */
  368. #define LL_HRTIM_TIMER_NONE 0U /*!< Master timer identifier */
  369. #define LL_HRTIM_TIMER_MASTER HRTIM_MCR_MCEN /*!< Master timer identifier */
  370. #define LL_HRTIM_TIMER_A HRTIM_MCR_TACEN /*!< Timer A identifier */
  371. #define LL_HRTIM_TIMER_B HRTIM_MCR_TBCEN /*!< Timer B identifier */
  372. #define LL_HRTIM_TIMER_C HRTIM_MCR_TCCEN /*!< Timer C identifier */
  373. #define LL_HRTIM_TIMER_D HRTIM_MCR_TDCEN /*!< Timer D identifier */
  374. #define LL_HRTIM_TIMER_E HRTIM_MCR_TECEN /*!< Timer E identifier */
  375. #define LL_HRTIM_TIMER_X (HRTIM_MCR_TACEN |\
  376. HRTIM_MCR_TBCEN | HRTIM_MCR_TCCEN |\
  377. HRTIM_MCR_TDCEN | HRTIM_MCR_TECEN )
  378. #define LL_HRTIM_TIMER_ALL (LL_HRTIM_TIMER_MASTER | LL_HRTIM_TIMER_X)
  379. /**
  380. * @}
  381. */
  382. /** @defgroup HRTIM_LL_EC_OUTPUT OUTPUT ID
  383. * @{
  384. * @brief Constants identifying an HRTIM output.
  385. */
  386. #define LL_HRTIM_OUTPUT_TA1 HRTIM_OENR_TA1OEN /*!< Timer A - Output 1 identifier */
  387. #define LL_HRTIM_OUTPUT_TA2 HRTIM_OENR_TA2OEN /*!< Timer A - Output 2 identifier */
  388. #define LL_HRTIM_OUTPUT_TB1 HRTIM_OENR_TB1OEN /*!< Timer B - Output 1 identifier */
  389. #define LL_HRTIM_OUTPUT_TB2 HRTIM_OENR_TB2OEN /*!< Timer B - Output 2 identifier */
  390. #define LL_HRTIM_OUTPUT_TC1 HRTIM_OENR_TC1OEN /*!< Timer C - Output 1 identifier */
  391. #define LL_HRTIM_OUTPUT_TC2 HRTIM_OENR_TC2OEN /*!< Timer C - Output 2 identifier */
  392. #define LL_HRTIM_OUTPUT_TD1 HRTIM_OENR_TD1OEN /*!< Timer D - Output 1 identifier */
  393. #define LL_HRTIM_OUTPUT_TD2 HRTIM_OENR_TD2OEN /*!< Timer D - Output 2 identifier */
  394. #define LL_HRTIM_OUTPUT_TE1 HRTIM_OENR_TE1OEN /*!< Timer E - Output 1 identifier */
  395. #define LL_HRTIM_OUTPUT_TE2 HRTIM_OENR_TE2OEN /*!< Timer E - Output 2 identifier */
  396. /**
  397. * @}
  398. */
  399. /** @defgroup HRTIM_LL_EC_COMPAREUNIT COMPARE UNIT ID
  400. * @{
  401. * @brief Constants identifying a compare unit.
  402. */
  403. #define LL_HRTIM_COMPAREUNIT_2 HRTIM_TIMCR_DELCMP2 /*!< Compare unit 2 identifier */
  404. #define LL_HRTIM_COMPAREUNIT_4 HRTIM_TIMCR_DELCMP4 /*!< Compare unit 4 identifier */
  405. /**
  406. * @}
  407. */
  408. /** @defgroup HRTIM_LL_EC_CAPTUREUNIT CAPTURE UNIT ID
  409. * @{
  410. * @brief Constants identifying a capture unit.
  411. */
  412. #define LL_HRTIM_CAPTUREUNIT_1 0 /*!< Capture unit 1 identifier */
  413. #define LL_HRTIM_CAPTUREUNIT_2 1 /*!< Capture unit 2 identifier */
  414. /**
  415. * @}
  416. */
  417. /** @defgroup HRTIM_LL_EC_FAULT FAULT ID
  418. * @{
  419. * @brief Constants identifying a fault channel.
  420. */
  421. #define LL_HRTIM_FAULT_1 HRTIM_FLTR_FLT1EN /*!< Fault channel 1 identifier */
  422. #define LL_HRTIM_FAULT_2 HRTIM_FLTR_FLT2EN /*!< Fault channel 2 identifier */
  423. #define LL_HRTIM_FAULT_3 HRTIM_FLTR_FLT3EN /*!< Fault channel 3 identifier */
  424. #define LL_HRTIM_FAULT_4 HRTIM_FLTR_FLT4EN /*!< Fault channel 4 identifier */
  425. #define LL_HRTIM_FAULT_5 HRTIM_FLTR_FLT5EN /*!< Fault channel 5 identifier */
  426. /**
  427. * @}
  428. */
  429. /** @defgroup HRTIM_LL_EC_EVENT EXTERNAL EVENT ID
  430. * @{
  431. * @brief Constants identifying an external event channel.
  432. */
  433. #define LL_HRTIM_EVENT_1 ((uint32_t)0x00000001U) /*!< External event channel 1 identifier */
  434. #define LL_HRTIM_EVENT_2 ((uint32_t)0x00000002U) /*!< External event channel 2 identifier */
  435. #define LL_HRTIM_EVENT_3 ((uint32_t)0x00000004U) /*!< External event channel 3 identifier */
  436. #define LL_HRTIM_EVENT_4 ((uint32_t)0x00000008U) /*!< External event channel 4 identifier */
  437. #define LL_HRTIM_EVENT_5 ((uint32_t)0x00000010U) /*!< External event channel 5 identifier */
  438. #define LL_HRTIM_EVENT_6 ((uint32_t)0x00000020U) /*!< External event channel 6 identifier */
  439. #define LL_HRTIM_EVENT_7 ((uint32_t)0x00000040U) /*!< External event channel 7 identifier */
  440. #define LL_HRTIM_EVENT_8 ((uint32_t)0x00000080U) /*!< External event channel 8 identifier */
  441. #define LL_HRTIM_EVENT_9 ((uint32_t)0x00000100U) /*!< External event channel 9 identifier */
  442. #define LL_HRTIM_EVENT_10 ((uint32_t)0x00000200U) /*!< External event channel 10 identifier */
  443. /**
  444. * @}
  445. */
  446. /** @defgroup HRTIM_LL_EC_OUTPUTSTATE OUTPUT STATE
  447. * @{
  448. * @brief Constants defining the state of an HRTIM output.
  449. */
  450. #define LL_HRTIM_OUTPUTSTATE_IDLE ((uint32_t)0x00000001U) /*!< Main operating mode, where the output can take the active or inactive level as programmed in the crossbar unit */
  451. #define LL_HRTIM_OUTPUTSTATE_RUN ((uint32_t)0x00000002U) /*!< Default operating state (e.g. after an HRTIM reset, when the outputs are disabled by software or during a burst mode operation) */
  452. #define LL_HRTIM_OUTPUTSTATE_FAULT ((uint32_t)0x00000003U) /*!< Safety state, entered in case of a shut-down request on FAULTx inputs */
  453. /**
  454. * @}
  455. */
  456. /** @defgroup HRTIM_LL_EC_ADCTRIG ADC TRIGGER
  457. * @{
  458. * @brief Constants identifying an ADC trigger.
  459. */
  460. #define LL_HRTIM_ADCTRIG_1 ((uint32_t)0x00000000U) /*!< ADC trigger 1 identifier */
  461. #define LL_HRTIM_ADCTRIG_2 ((uint32_t)0x00000001U) /*!< ADC trigger 2 identifier */
  462. #define LL_HRTIM_ADCTRIG_3 ((uint32_t)0x00000002U) /*!< ADC trigger 3 identifier */
  463. #define LL_HRTIM_ADCTRIG_4 ((uint32_t)0x00000003U) /*!< ADC trigger 4 identifier */
  464. /**
  465. * @}
  466. */
  467. /** @defgroup HRTIM_LL_EC_ADCTRIG_UPDATE ADC TRIGGER UPDATE
  468. * @{
  469. * @brief constants defining the source triggering the update of the HRTIM_ADCxR register (transfer from preload to active register).
  470. */
  471. #define LL_HRTIM_ADCTRIG_UPDATE_MASTER 0x00000000U /*!< HRTIM_ADCxR register update is triggered by the Master timer */
  472. #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_A (HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer A */
  473. #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_B (HRTIM_CR1_ADC1USRC_1) /*!< HRTIM_ADCxR register update is triggered by the Timer B */
  474. #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_C (HRTIM_CR1_ADC1USRC_1 | HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer C */
  475. #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_D (HRTIM_CR1_ADC1USRC_2) /*!< HRTIM_ADCxR register update is triggered by the Timer D */
  476. #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_E (HRTIM_CR1_ADC1USRC_2 | HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer E */
  477. /**
  478. * @}
  479. */
  480. /** @defgroup HRTIM_LL_EC_ADCTRIG_SRC13 ADC TRIGGER 1/3 SOURCE
  481. * @{
  482. * @brief constants defining the events triggering ADC conversion for ADC Triggers 1 and 3.
  483. */
  484. #define LL_HRTIM_ADCTRIG_SRC13_NONE 0x00000000U /*!< No ADC trigger event */
  485. #define LL_HRTIM_ADCTRIG_SRC13_MCMP1 HRTIM_ADC1R_AD1MC1 /*!< ADC Trigger on master compare 1 */
  486. #define LL_HRTIM_ADCTRIG_SRC13_MCMP2 HRTIM_ADC1R_AD1MC2 /*!< ADC Trigger on master compare 2 */
  487. #define LL_HRTIM_ADCTRIG_SRC13_MCMP3 HRTIM_ADC1R_AD1MC3 /*!< ADC Trigger on master compare 3 */
  488. #define LL_HRTIM_ADCTRIG_SRC13_MCMP4 HRTIM_ADC1R_AD1MC4 /*!< ADC Trigger on master compare 4 */
  489. #define LL_HRTIM_ADCTRIG_SRC13_MPER HRTIM_ADC1R_AD1MPER /*!< ADC Trigger on master period */
  490. #define LL_HRTIM_ADCTRIG_SRC13_EEV1 HRTIM_ADC1R_AD1EEV1 /*!< ADC Trigger on external event 1 */
  491. #define LL_HRTIM_ADCTRIG_SRC13_EEV2 HRTIM_ADC1R_AD1EEV2 /*!< ADC Trigger on external event 2 */
  492. #define LL_HRTIM_ADCTRIG_SRC13_EEV3 HRTIM_ADC1R_AD1EEV3 /*!< ADC Trigger on external event 3 */
  493. #define LL_HRTIM_ADCTRIG_SRC13_EEV4 HRTIM_ADC1R_AD1EEV4 /*!< ADC Trigger on external event 4 */
  494. #define LL_HRTIM_ADCTRIG_SRC13_EEV5 HRTIM_ADC1R_AD1EEV5 /*!< ADC Trigger on external event 5 */
  495. #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP2 HRTIM_ADC1R_AD1TAC2 /*!< ADC Trigger on Timer A compare 2 */
  496. #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP3 HRTIM_ADC1R_AD1TAC3 /*!< ADC Trigger on Timer A compare 3 */
  497. #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP4 HRTIM_ADC1R_AD1TAC4 /*!< ADC Trigger on Timer A compare 4 */
  498. #define LL_HRTIM_ADCTRIG_SRC13_TIMAPER HRTIM_ADC1R_AD1TAPER /*!< ADC Trigger on Timer A period */
  499. #define LL_HRTIM_ADCTRIG_SRC13_TIMARST HRTIM_ADC1R_AD1TARST /*!< ADC Trigger on Timer A reset */
  500. #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2 HRTIM_ADC1R_AD1TBC2 /*!< ADC Trigger on Timer B compare 2 */
  501. #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3 HRTIM_ADC1R_AD1TBC3 /*!< ADC Trigger on Timer B compare 3 */
  502. #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4 HRTIM_ADC1R_AD1TBC4 /*!< ADC Trigger on Timer B compare 4 */
  503. #define LL_HRTIM_ADCTRIG_SRC13_TIMBPER HRTIM_ADC1R_AD1TBPER /*!< ADC Trigger on Timer B period */
  504. #define LL_HRTIM_ADCTRIG_SRC13_TIMBRST HRTIM_ADC1R_AD1TBRST /*!< ADC Trigger on Timer B reset */
  505. #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2 HRTIM_ADC1R_AD1TCC2 /*!< ADC Trigger on Timer C compare 2 */
  506. #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3 HRTIM_ADC1R_AD1TCC3 /*!< ADC Trigger on Timer C compare 3 */
  507. #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4 HRTIM_ADC1R_AD1TCC4 /*!< ADC Trigger on Timer C compare 4 */
  508. #define LL_HRTIM_ADCTRIG_SRC13_TIMCPER HRTIM_ADC1R_AD1TCPER /*!< ADC Trigger on Timer C period */
  509. #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2 HRTIM_ADC1R_AD1TDC2 /*!< ADC Trigger on Timer D compare 2 */
  510. #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3 HRTIM_ADC1R_AD1TDC3 /*!< ADC Trigger on Timer D compare 3 */
  511. #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4 HRTIM_ADC1R_AD1TDC4 /*!< ADC Trigger on Timer D compare 4 */
  512. #define LL_HRTIM_ADCTRIG_SRC13_TIMDPER HRTIM_ADC1R_AD1TDPER /*!< ADC Trigger on Timer D period */
  513. #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP2 HRTIM_ADC1R_AD1TEC2 /*!< ADC Trigger on Timer E compare 2 */
  514. #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP3 HRTIM_ADC1R_AD1TEC3 /*!< ADC Trigger on Timer E compare 3 */
  515. #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP4 HRTIM_ADC1R_AD1TEC4 /*!< ADC Trigger on Timer E compare 4 */
  516. #define LL_HRTIM_ADCTRIG_SRC13_TIMEPER HRTIM_ADC1R_AD1TEPER /*!< ADC Trigger on Timer E period */
  517. /**
  518. * @}
  519. */
  520. /** @defgroup HRTIM_LL_EC_ADCTRIG_SRC24 ADC TRIGGER 2/4 SOURCE
  521. * @{
  522. * @brief constants defining the events triggering ADC conversion for ADC Triggers 2 and 4.
  523. */
  524. #define LL_HRTIM_ADCTRIG_SRC24_NONE 0x00000000U /*!< No ADC trigger event */
  525. #define LL_HRTIM_ADCTRIG_SRC24_MCMP1 HRTIM_ADC2R_AD2MC1 /*!< ADC Trigger on master compare 1 */
  526. #define LL_HRTIM_ADCTRIG_SRC24_MCMP2 HRTIM_ADC2R_AD2MC2 /*!< ADC Trigger on master compare 2 */
  527. #define LL_HRTIM_ADCTRIG_SRC24_MCMP3 HRTIM_ADC2R_AD2MC3 /*!< ADC Trigger on master compare 3 */
  528. #define LL_HRTIM_ADCTRIG_SRC24_MCMP4 HRTIM_ADC2R_AD2MC4 /*!< ADC Trigger on master compare 4 */
  529. #define LL_HRTIM_ADCTRIG_SRC24_MPER HRTIM_ADC2R_AD2MPER /*!< ADC Trigger on master period */
  530. #define LL_HRTIM_ADCTRIG_SRC24_EEV6 HRTIM_ADC2R_AD2EEV6 /*!< ADC Trigger on external event 6 */
  531. #define LL_HRTIM_ADCTRIG_SRC24_EEV7 HRTIM_ADC2R_AD2EEV7 /*!< ADC Trigger on external event 7 */
  532. #define LL_HRTIM_ADCTRIG_SRC24_EEV8 HRTIM_ADC2R_AD2EEV8 /*!< ADC Trigger on external event 8 */
  533. #define LL_HRTIM_ADCTRIG_SRC24_EEV9 HRTIM_ADC2R_AD2EEV9 /*!< ADC Trigger on external event 9 */
  534. #define LL_HRTIM_ADCTRIG_SRC24_EEV10 HRTIM_ADC2R_AD2EEV10 /*!< ADC Trigger on external event 10 */
  535. #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP2 HRTIM_ADC2R_AD2TAC2 /*!< ADC Trigger on Timer A compare 2 */
  536. #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP3 HRTIM_ADC2R_AD2TAC3 /*!< ADC Trigger on Timer A compare 3 */
  537. #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP4 HRTIM_ADC2R_AD2TAC4 /*!< ADC Trigger on Timer A compare 4 */
  538. #define LL_HRTIM_ADCTRIG_SRC24_TIMAPER HRTIM_ADC2R_AD2TAPER /*!< ADC Trigger on Timer A period */
  539. #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2 HRTIM_ADC2R_AD2TBC2 /*!< ADC Trigger on Timer B compare 2 */
  540. #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3 HRTIM_ADC2R_AD2TBC3 /*!< ADC Trigger on Timer B compare 3 */
  541. #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4 HRTIM_ADC2R_AD2TBC4 /*!< ADC Trigger on Timer B compare 4 */
  542. #define LL_HRTIM_ADCTRIG_SRC24_TIMBPER HRTIM_ADC2R_AD2TBPER /*!< ADC Trigger on Timer B period */
  543. #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2 HRTIM_ADC2R_AD2TCC2 /*!< ADC Trigger on Timer C compare 2 */
  544. #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3 HRTIM_ADC2R_AD2TCC3 /*!< ADC Trigger on Timer C compare 3 */
  545. #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4 HRTIM_ADC2R_AD2TCC4 /*!< ADC Trigger on Timer C compare 4 */
  546. #define LL_HRTIM_ADCTRIG_SRC24_TIMCPER HRTIM_ADC2R_AD2TCPER /*!< ADC Trigger on Timer C period */
  547. #define LL_HRTIM_ADCTRIG_SRC24_TIMCRST HRTIM_ADC2R_AD2TCRST /*!< ADC Trigger on Timer C reset */
  548. #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2 HRTIM_ADC2R_AD2TDC2 /*!< ADC Trigger on Timer D compare 2 */
  549. #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3 HRTIM_ADC2R_AD2TDC3 /*!< ADC Trigger on Timer D compare 3 */
  550. #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4 HRTIM_ADC2R_AD2TDC4 /*!< ADC Trigger on Timer D compare 4 */
  551. #define LL_HRTIM_ADCTRIG_SRC24_TIMDPER HRTIM_ADC2R_AD2TDPER /*!< ADC Trigger on Timer D period */
  552. #define LL_HRTIM_ADCTRIG_SRC24_TIMDRST HRTIM_ADC2R_AD2TDRST /*!< ADC Trigger on Timer D reset */
  553. #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP2 HRTIM_ADC2R_AD2TEC2 /*!< ADC Trigger on Timer E compare 2 */
  554. #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP3 HRTIM_ADC2R_AD2TEC3 /*!< ADC Trigger on Timer E compare 3 */
  555. #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP4 HRTIM_ADC2R_AD2TEC4 /*!< ADC Trigger on Timer E compare 4 */
  556. #define LL_HRTIM_ADCTRIG_SRC24_TIMERST HRTIM_ADC2R_AD2TERST /*!< ADC Trigger on Timer E reset */
  557. /**
  558. * @}
  559. */
  560. /** @defgroup HRTIM_LL_EC_PRESCALERRATIO PRESCALER RATIO
  561. * @{
  562. * @brief Constants defining timer high-resolution clock prescaler ratio.
  563. */
  564. #define LL_HRTIM_PRESCALERRATIO_MUL32 0x00000000U /*!< fHRCK: fHRTIM x 32 = 4.608 GHz - Resolution: 217 ps - Min PWM frequency: 70.3 kHz (fHRTIM=144MHz) */
  565. #define LL_HRTIM_PRESCALERRATIO_MUL16 ((uint32_t)0x00000001U) /*!< fHRCK: fHRTIM x 16 = 2.304 GHz - Resolution: 434 ps - Min PWM frequency: 35.1 KHz (fHRTIM=144MHz) */
  566. #define LL_HRTIM_PRESCALERRATIO_MUL8 ((uint32_t)0x00000002U) /*!< fHRCK: fHRTIM x 8 = 1.152 GHz - Resolution: 868 ps - Min PWM frequency: 17.6 kHz (fHRTIM=144MHz) */
  567. #define LL_HRTIM_PRESCALERRATIO_MUL4 ((uint32_t)0x00000003U) /*!< fHRCK: fHRTIM x 4 = 576 MHz - Resolution: 1.73 ns - Min PWM frequency: 8.8 kHz (fHRTIM=144MHz) */
  568. #define LL_HRTIM_PRESCALERRATIO_MUL2 ((uint32_t)0x00000004U) /*!< fHRCK: fHRTIM x 2 = 288 MHz - Resolution: 3.47 ns - Min PWM frequency: 4.4 kHz (fHRTIM=144MHz) */
  569. #define LL_HRTIM_PRESCALERRATIO_DIV1 ((uint32_t)0x00000005U) /*!< fHRCK: fHRTIM = 144 MHz - Resolution: 6.95 ns - Min PWM frequency: 2.2 kHz (fHRTIM=144MHz) */
  570. #define LL_HRTIM_PRESCALERRATIO_DIV2 ((uint32_t)0x00000006U) /*!< fHRCK: fHRTIM / 2 = 72 MHz - Resolution: 13.88 ns- Min PWM frequency: 1.1 kHz (fHRTIM=144MHz) */
  571. #define LL_HRTIM_PRESCALERRATIO_DIV4 ((uint32_t)0x00000007U) /*!< fHRCK: fHRTIM / 4 = 36 MHz - Resolution: 27.7 ns- Min PWM frequency: 550Hz (fHRTIM=144MHz) */
  572. /**
  573. * @}
  574. */
  575. /** @defgroup HRTIM_LL_EC_MODE COUNTER MODE
  576. * @{
  577. * @brief Constants defining timer counter operating mode.
  578. */
  579. #define LL_HRTIM_MODE_CONTINUOUS ((uint32_t)0x00000008U) /*!< The timer operates in continuous (free-running) mode */
  580. #define LL_HRTIM_MODE_SINGLESHOT 0x00000000U /*!< The timer operates in non retriggerable single-shot mode */
  581. #define LL_HRTIM_MODE_RETRIGGERABLE ((uint32_t)0x00000010U) /*!< The timer operates in retriggerable single-shot mode */
  582. /**
  583. * @}
  584. */
  585. /** @defgroup HRTIM_LL_EC_DACTRIG DAC TRIGGER
  586. * @{
  587. * @brief Constants defining on which output the DAC synchronization event is sent.
  588. */
  589. #define LL_HRTIM_DACTRIG_NONE 0x00000000U /*!< No DAC synchronization event generated */
  590. #define LL_HRTIM_DACTRIG_DACTRIGOUT_1 (HRTIM_MCR_DACSYNC_0) /*!< DAC synchronization event generated on DACTrigOut1 output upon timer update */
  591. #define LL_HRTIM_DACTRIG_DACTRIGOUT_2 (HRTIM_MCR_DACSYNC_1) /*!< DAC synchronization event generated on DACTrigOut2 output upon timer update */
  592. #define LL_HRTIM_DACTRIG_DACTRIGOUT_3 (HRTIM_MCR_DACSYNC_1 | HRTIM_MCR_DACSYNC_0) /*!< DAC synchronization event generated on DACTrigOut3 output upon timer update */
  593. /**
  594. * @}
  595. */
  596. /** @defgroup HRTIM_LL_EC_UPDATETRIG UPDATE TRIGGER
  597. * @{
  598. * @brief Constants defining whether the registers update is done synchronously with any other timer or master update.
  599. */
  600. #define LL_HRTIM_UPDATETRIG_NONE 0x00000000U /*!< Register update is disabled */
  601. #define LL_HRTIM_UPDATETRIG_MASTER HRTIM_TIMCR_MSTU /*!< Register update is triggered by the master timer update */
  602. #define LL_HRTIM_UPDATETRIG_TIMER_A HRTIM_TIMCR_TAU /*!< Register update is triggered by the timer A update */
  603. #define LL_HRTIM_UPDATETRIG_TIMER_B HRTIM_TIMCR_TBU /*!< Register update is triggered by the timer B update */
  604. #define LL_HRTIM_UPDATETRIG_TIMER_C HRTIM_TIMCR_TCU /*!< Register update is triggered by the timer C update*/
  605. #define LL_HRTIM_UPDATETRIG_TIMER_D HRTIM_TIMCR_TDU /*!< Register update is triggered by the timer D update */
  606. #define LL_HRTIM_UPDATETRIG_TIMER_E HRTIM_TIMCR_TEU /*!< Register update is triggered by the timer E update */
  607. #define LL_HRTIM_UPDATETRIG_REPETITION HRTIM_TIMCR_TREPU /*!< Register update is triggered when the counter rolls over and HRTIM_REPx = 0*/
  608. #define LL_HRTIM_UPDATETRIG_RESET HRTIM_TIMCR_TRSTU /*!< Register update is triggered by counter reset or roll-over to 0 after reaching the period value in continuous mode */
  609. /**
  610. * @}
  611. */
  612. /** @defgroup HRTIM_LL_EC_UPDATEGATING UPDATE GATING
  613. * @{
  614. * @brief Constants defining how the update occurs relatively to the burst DMA transaction and the external update request on update enable inputs 1 to 3.
  615. */
  616. #define LL_HRTIM_UPDATEGATING_INDEPENDENT 0x00000000U /*!< Update done independently from the DMA burst transfer completion */
  617. #define LL_HRTIM_UPDATEGATING_DMABURST (HRTIM_TIMCR_UPDGAT_0) /*!< Update done when the DMA burst transfer is completed */
  618. #define LL_HRTIM_UPDATEGATING_DMABURST_UPDATE (HRTIM_TIMCR_UPDGAT_1) /*!< Update done on timer roll-over following a DMA burst transfer completion*/
  619. #define LL_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 */
  620. #define LL_HRTIM_UPDATEGATING_UPDEN2 (HRTIM_TIMCR_UPDGAT_2) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 2 */
  621. #define LL_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 */
  622. #define LL_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 */
  623. #define LL_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 */
  624. #define LL_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 */
  625. /**
  626. * @}
  627. */
  628. /** @defgroup HRTIM_LL_EC_COMPAREMODE COMPARE MODE
  629. * @{
  630. * @brief Constants defining whether the compare register is behaving in regular mode (compare match issued as soon as counter equal compare) or in auto-delayed mode.
  631. */
  632. #define LL_HRTIM_COMPAREMODE_REGULAR 0x00000000U /*!< standard compare mode */
  633. #define LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT (HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated only if a capture has occurred */
  634. #define LL_HRTIM_COMPAREMODE_DELAY_CMP1 (HRTIM_TIMCR_DELCMP2_1) /*!< Compare event generated if a capture has occurred or after a Compare 1 match (timeout if capture event is missing) */
  635. #define LL_HRTIM_COMPAREMODE_DELAY_CMP3 (HRTIM_TIMCR_DELCMP2_1 | HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated if a capture has occurred or after a Compare 3 match (timeout if capture event is missing) */
  636. /**
  637. * @}
  638. */
  639. /** @defgroup HRTIM_LL_EC_RESETTRIG RESET TRIGGER
  640. * @{
  641. * @brief Constants defining the events that can be selected to trigger the reset of the timer counter.
  642. */
  643. #define LL_HRTIM_RESETTRIG_NONE 0x00000000U /*!< No counter reset trigger */
  644. #define LL_HRTIM_RESETTRIG_UPDATE HRTIM_RSTR_UPDATE /*!< The timer counter is reset upon update event */
  645. #define LL_HRTIM_RESETTRIG_CMP2 HRTIM_RSTR_CMP2 /*!< The timer counter is reset upon Timer Compare 2 event */
  646. #define LL_HRTIM_RESETTRIG_CMP4 HRTIM_RSTR_CMP4 /*!< The timer counter is reset upon Timer Compare 4 event */
  647. #define LL_HRTIM_RESETTRIG_MASTER_PER HRTIM_RSTR_MSTPER /*!< The timer counter is reset upon master timer period event */
  648. #define LL_HRTIM_RESETTRIG_MASTER_CMP1 HRTIM_RSTR_MSTCMP1 /*!< The timer counter is reset upon master timer Compare 1 event */
  649. #define LL_HRTIM_RESETTRIG_MASTER_CMP2 HRTIM_RSTR_MSTCMP2 /*!< The timer counter is reset upon master timer Compare 2 event */
  650. #define LL_HRTIM_RESETTRIG_MASTER_CMP3 HRTIM_RSTR_MSTCMP3 /*!< The timer counter is reset upon master timer Compare 3 event */
  651. #define LL_HRTIM_RESETTRIG_MASTER_CMP4 HRTIM_RSTR_MSTCMP4 /*!< The timer counter is reset upon master timer Compare 4 event */
  652. #define LL_HRTIM_RESETTRIG_EEV_1 HRTIM_RSTR_EXTEVNT1 /*!< The timer counter is reset upon external event 1 */
  653. #define LL_HRTIM_RESETTRIG_EEV_2 HRTIM_RSTR_EXTEVNT2 /*!< The timer counter is reset upon external event 2 */
  654. #define LL_HRTIM_RESETTRIG_EEV_3 HRTIM_RSTR_EXTEVNT3 /*!< The timer counter is reset upon external event 3 */
  655. #define LL_HRTIM_RESETTRIG_EEV_4 HRTIM_RSTR_EXTEVNT4 /*!< The timer counter is reset upon external event 4 */
  656. #define LL_HRTIM_RESETTRIG_EEV_5 HRTIM_RSTR_EXTEVNT5 /*!< The timer counter is reset upon external event 5 */
  657. #define LL_HRTIM_RESETTRIG_EEV_6 HRTIM_RSTR_EXTEVNT6 /*!< The timer counter is reset upon external event 6 */
  658. #define LL_HRTIM_RESETTRIG_EEV_7 HRTIM_RSTR_EXTEVNT7 /*!< The timer counter is reset upon external event 7 */
  659. #define LL_HRTIM_RESETTRIG_EEV_8 HRTIM_RSTR_EXTEVNT8 /*!< The timer counter is reset upon external event 8 */
  660. #define LL_HRTIM_RESETTRIG_EEV_9 HRTIM_RSTR_EXTEVNT9 /*!< The timer counter is reset upon external event 9 */
  661. #define LL_HRTIM_RESETTRIG_EEV_10 HRTIM_RSTR_EXTEVNT10 /*!< The timer counter is reset upon external event 10 */
  662. #define LL_HRTIM_RESETTRIG_OTHER1_CMP1 HRTIM_RSTR_TIMBCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
  663. #define LL_HRTIM_RESETTRIG_OTHER1_CMP2 HRTIM_RSTR_TIMBCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
  664. #define LL_HRTIM_RESETTRIG_OTHER1_CMP4 HRTIM_RSTR_TIMBCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
  665. #define LL_HRTIM_RESETTRIG_OTHER2_CMP1 HRTIM_RSTR_TIMCCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
  666. #define LL_HRTIM_RESETTRIG_OTHER2_CMP2 HRTIM_RSTR_TIMCCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
  667. #define LL_HRTIM_RESETTRIG_OTHER2_CMP4 HRTIM_RSTR_TIMCCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
  668. #define LL_HRTIM_RESETTRIG_OTHER3_CMP1 HRTIM_RSTR_TIMDCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
  669. #define LL_HRTIM_RESETTRIG_OTHER3_CMP2 HRTIM_RSTR_TIMDCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
  670. #define LL_HRTIM_RESETTRIG_OTHER3_CMP4 HRTIM_RSTR_TIMDCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
  671. #define LL_HRTIM_RESETTRIG_OTHER4_CMP1 HRTIM_RSTR_TIMECMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
  672. #define LL_HRTIM_RESETTRIG_OTHER4_CMP2 HRTIM_RSTR_TIMECMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
  673. #define LL_HRTIM_RESETTRIG_OTHER4_CMP4 HRTIM_RSTR_TIMECMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
  674. /**
  675. * @}
  676. */
  677. /** @defgroup HRTIM_LL_EC_CAPTURETRIG CAPTURE TRIGGER
  678. * @{
  679. * @brief Constants defining the events that can be selected to trigger the capture of the timing unit counter.
  680. */
  681. #define LL_HRTIM_CAPTURETRIG_NONE ((uint32_t)0x00000000U)/*!< Capture trigger is disabled */
  682. #define LL_HRTIM_CAPTURETRIG_UPDATE HRTIM_CPT1CR_UPDCPT /*!< The update event triggers the Capture */
  683. #define LL_HRTIM_CAPTURETRIG_EEV_1 HRTIM_CPT1CR_EXEV1CPT /*!< The External event 1 triggers the Capture */
  684. #define LL_HRTIM_CAPTURETRIG_EEV_2 HRTIM_CPT1CR_EXEV2CPT /*!< The External event 2 triggers the Capture */
  685. #define LL_HRTIM_CAPTURETRIG_EEV_3 HRTIM_CPT1CR_EXEV3CPT /*!< The External event 3 triggers the Capture */
  686. #define LL_HRTIM_CAPTURETRIG_EEV_4 HRTIM_CPT1CR_EXEV4CPT /*!< The External event 4 triggers the Capture */
  687. #define LL_HRTIM_CAPTURETRIG_EEV_5 HRTIM_CPT1CR_EXEV5CPT /*!< The External event 5 triggers the Capture */
  688. #define LL_HRTIM_CAPTURETRIG_EEV_6 HRTIM_CPT1CR_EXEV6CPT /*!< The External event 6 triggers the Capture */
  689. #define LL_HRTIM_CAPTURETRIG_EEV_7 HRTIM_CPT1CR_EXEV7CPT /*!< The External event 7 triggers the Capture */
  690. #define LL_HRTIM_CAPTURETRIG_EEV_8 HRTIM_CPT1CR_EXEV8CPT /*!< The External event 8 triggers the Capture */
  691. #define LL_HRTIM_CAPTURETRIG_EEV_9 HRTIM_CPT1CR_EXEV9CPT /*!< The External event 9 triggers the Capture */
  692. #define LL_HRTIM_CAPTURETRIG_EEV_10 HRTIM_CPT1CR_EXEV10CPT /*!< The External event 10 triggers the Capture */
  693. #define LL_HRTIM_CAPTURETRIG_TA1_SET HRTIM_CPT1CR_TA1SET /*!< Capture is triggered by TA1 output inactive to active transition */
  694. #define LL_HRTIM_CAPTURETRIG_TA1_RESET HRTIM_CPT1CR_TA1RST /*!< Capture is triggered by TA1 output active to inactive transition */
  695. #define LL_HRTIM_CAPTURETRIG_TIMA_CMP1 HRTIM_CPT1CR_TIMACMP1 /*!< Timer A Compare 1 triggers Capture */
  696. #define LL_HRTIM_CAPTURETRIG_TIMA_CMP2 HRTIM_CPT1CR_TIMACMP2 /*!< Timer A Compare 2 triggers Capture */
  697. #define LL_HRTIM_CAPTURETRIG_TB1_SET HRTIM_CPT1CR_TB1SET /*!< Capture is triggered by TB1 output inactive to active transition */
  698. #define LL_HRTIM_CAPTURETRIG_TB1_RESET HRTIM_CPT1CR_TB1RST /*!< Capture is triggered by TB1 output active to inactive transition */
  699. #define LL_HRTIM_CAPTURETRIG_TIMB_CMP1 HRTIM_CPT1CR_TIMBCMP1 /*!< Timer B Compare 1 triggers Capture */
  700. #define LL_HRTIM_CAPTURETRIG_TIMB_CMP2 HRTIM_CPT1CR_TIMBCMP2 /*!< Timer B Compare 2 triggers Capture */
  701. #define LL_HRTIM_CAPTURETRIG_TC1_SET HRTIM_CPT1CR_TC1SET /*!< Capture is triggered by TC1 output inactive to active transition */
  702. #define LL_HRTIM_CAPTURETRIG_TC1_RESET HRTIM_CPT1CR_TC1RST /*!< Capture is triggered by TC1 output active to inactive transition */
  703. #define LL_HRTIM_CAPTURETRIG_TIMC_CMP1 HRTIM_CPT1CR_TIMCCMP1 /*!< Timer C Compare 1 triggers Capture */
  704. #define LL_HRTIM_CAPTURETRIG_TIMC_CMP2 HRTIM_CPT1CR_TIMCCMP2 /*!< Timer C Compare 2 triggers Capture */
  705. #define LL_HRTIM_CAPTURETRIG_TD1_SET HRTIM_CPT1CR_TD1SET /*!< Capture is triggered by TD1 output inactive to active transition */
  706. #define LL_HRTIM_CAPTURETRIG_TD1_RESET HRTIM_CPT1CR_TD1RST /*!< Capture is triggered by TD1 output active to inactive transition */
  707. #define LL_HRTIM_CAPTURETRIG_TIMD_CMP1 HRTIM_CPT1CR_TIMDCMP1 /*!< Timer D Compare 1 triggers Capture */
  708. #define LL_HRTIM_CAPTURETRIG_TIMD_CMP2 HRTIM_CPT1CR_TIMDCMP2 /*!< Timer D Compare 2 triggers Capture */
  709. #define LL_HRTIM_CAPTURETRIG_TE1_SET HRTIM_CPT1CR_TE1SET /*!< Capture is triggered by TE1 output inactive to active transition */
  710. #define LL_HRTIM_CAPTURETRIG_TE1_RESET HRTIM_CPT1CR_TE1RST /*!< Capture is triggered by TE1 output active to inactive transition */
  711. #define LL_HRTIM_CAPTURETRIG_TIME_CMP1 HRTIM_CPT1CR_TIMECMP1 /*!< Timer E Compare 1 triggers Capture */
  712. #define LL_HRTIM_CAPTURETRIG_TIME_CMP2 HRTIM_CPT1CR_TIMECMP2 /*!< Timer E Compare 2 triggers Capture */
  713. /**
  714. * @}
  715. */
  716. /** @defgroup HRTIM_LL_EC_DLYPRT DELAYED PROTECTION (DLYPRT) MODE
  717. * @{
  718. * @brief Constants defining all possible delayed protection modes for a timer (also define the source and outputs on which the delayed protection schemes are applied).
  719. */
  720. #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV6 0x00000000U /*!< Timers A, B, C: Output 1 delayed Idle on external Event 6 */
  721. #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV6 (HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Output 2 delayed Idle on external Event 6 */
  722. #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV6 (HRTIM_OUTR_DLYPRT_1) /*!< Timers A, B, C: Output 1 and output 2 delayed Idle on external Event 6 */
  723. #define LL_HRTIM_DLYPRT_BALANCED_EEV6 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Balanced Idle on external Event 6 */
  724. #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV7 (HRTIM_OUTR_DLYPRT_2) /*!< Timers A, B, C: Output 1 delayed Idle on external Event 7 */
  725. #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Output 2 delayed Idle on external Event 7 */
  726. #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1) /*!< Timers A, B, C: Output 1 and output2 delayed Idle on external Event 7 */
  727. #define LL_HRTIM_DLYPRT_BALANCED_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Balanced Idle on external Event 7 */
  728. #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV8 0x00000000U /*!< Timers D, E: Output 1 delayed Idle on external Event 8 */
  729. #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV8 (HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Output 2 delayed Idle on external Event 8 */
  730. #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV8 (HRTIM_OUTR_DLYPRT_1) /*!< Timers D, E: Output 1 and output 2 delayed Idle on external Event 8 */
  731. #define LL_HRTIM_DLYPRT_BALANCED_EEV8 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Balanced Idle on external Event 8 */
  732. #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV9 (HRTIM_OUTR_DLYPRT_2) /*!< Timers D, E: Output 1 delayed Idle on external Event 9 */
  733. #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Output 2 delayed Idle on external Event 9 */
  734. #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1) /*!< Timers D, E: Output 1 and output2 delayed Idle on external Event 9 */
  735. #define LL_HRTIM_DLYPRT_BALANCED_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Balanced Idle on external Event 9 */
  736. /**
  737. * @}
  738. */
  739. /** @defgroup HRTIM_LL_EC_BURSTMODE BURST MODE
  740. * @{
  741. * @brief Constants defining how the timer behaves during a burst mode operation.
  742. */
  743. #define LL_HRTIM_BURSTMODE_MAINTAINCLOCK (uint32_t)0x000000 /*!< Timer counter clock is maintained and the timer operates normally */
  744. #define LL_HRTIM_BURSTMODE_RESETCOUNTER (HRTIM_BMCR_MTBM) /*!< Timer counter clock is stopped and the counter is reset */
  745. /**
  746. * @}
  747. */
  748. /** @defgroup HRTIM_LL_EC_BURSTDMA BURST DMA
  749. * @{
  750. * @brief Constants defining the registers that can be written during a burst DMA operation.
  751. */
  752. #define LL_HRTIM_BURSTDMA_NONE 0x00000000U /*!< No register is updated by Burst DMA accesses */
  753. #define LL_HRTIM_BURSTDMA_MCR (HRTIM_BDMUPR_MCR) /*!< MCR register is updated by Burst DMA accesses */
  754. #define LL_HRTIM_BURSTDMA_MICR (HRTIM_BDMUPR_MICR) /*!< MICR register is updated by Burst DMA accesses */
  755. #define LL_HRTIM_BURSTDMA_MDIER (HRTIM_BDMUPR_MDIER) /*!< MDIER register is updated by Burst DMA accesses */
  756. #define LL_HRTIM_BURSTDMA_MCNT (HRTIM_BDMUPR_MCNT) /*!< MCNTR register is updated by Burst DMA accesses */
  757. #define LL_HRTIM_BURSTDMA_MPER (HRTIM_BDMUPR_MPER) /*!< MPER register is updated by Burst DMA accesses */
  758. #define LL_HRTIM_BURSTDMA_MREP (HRTIM_BDMUPR_MREP) /*!< MREPR register is updated by Burst DMA accesses */
  759. #define LL_HRTIM_BURSTDMA_MCMP1 (HRTIM_BDMUPR_MCMP1) /*!< MCMP1R register is updated by Burst DMA accesses */
  760. #define LL_HRTIM_BURSTDMA_MCMP2 (HRTIM_BDMUPR_MCMP2) /*!< MCMP2R register is updated by Burst DMA accesses */
  761. #define LL_HRTIM_BURSTDMA_MCMP3 (HRTIM_BDMUPR_MCMP3) /*!< MCMP3R register is updated by Burst DMA accesses */
  762. #define LL_HRTIM_BURSTDMA_MCMP4 (HRTIM_BDMUPR_MCMP4) /*!< MCMP4R register is updated by Burst DMA accesses */
  763. #define LL_HRTIM_BURSTDMA_TIMMCR (HRTIM_BDTUPR_TIMCR) /*!< TIMxCR register is updated by Burst DMA accesses */
  764. #define LL_HRTIM_BURSTDMA_TIMICR (HRTIM_BDTUPR_TIMICR) /*!< TIMxICR register is updated by Burst DMA accesses */
  765. #define LL_HRTIM_BURSTDMA_TIMDIER (HRTIM_BDTUPR_TIMDIER) /*!< TIMxDIER register is updated by Burst DMA accesses */
  766. #define LL_HRTIM_BURSTDMA_TIMCNT (HRTIM_BDTUPR_TIMCNT) /*!< CNTxCR register is updated by Burst DMA accesses */
  767. #define LL_HRTIM_BURSTDMA_TIMPER (HRTIM_BDTUPR_TIMPER) /*!< PERxR register is updated by Burst DMA accesses */
  768. #define LL_HRTIM_BURSTDMA_TIMREP (HRTIM_BDTUPR_TIMREP) /*!< REPxR register is updated by Burst DMA accesses */
  769. #define LL_HRTIM_BURSTDMA_TIMCMP1 (HRTIM_BDTUPR_TIMCMP1) /*!< CMP1xR register is updated by Burst DMA accesses */
  770. #define LL_HRTIM_BURSTDMA_TIMCMP2 (HRTIM_BDTUPR_TIMCMP2) /*!< CMP2xR register is updated by Burst DMA accesses */
  771. #define LL_HRTIM_BURSTDMA_TIMCMP3 (HRTIM_BDTUPR_TIMCMP3) /*!< CMP3xR register is updated by Burst DMA accesses */
  772. #define LL_HRTIM_BURSTDMA_TIMCMP4 (HRTIM_BDTUPR_TIMCMP4) /*!< CMP4xR register is updated by Burst DMA accesses */
  773. #define LL_HRTIM_BURSTDMA_TIMDTR (HRTIM_BDTUPR_TIMDTR) /*!< DTxR register is updated by Burst DMA accesses */
  774. #define LL_HRTIM_BURSTDMA_TIMSET1R (HRTIM_BDTUPR_TIMSET1R) /*!< SET1R register is updated by Burst DMA accesses */
  775. #define LL_HRTIM_BURSTDMA_TIMRST1R (HRTIM_BDTUPR_TIMRST1R) /*!< RST1R register is updated by Burst DMA accesses */
  776. #define LL_HRTIM_BURSTDMA_TIMSET2R (HRTIM_BDTUPR_TIMSET2R) /*!< SET2R register is updated by Burst DMA accesses */
  777. #define LL_HRTIM_BURSTDMA_TIMRST2R (HRTIM_BDTUPR_TIMRST2R) /*!< RST1R register is updated by Burst DMA accesses */
  778. #define LL_HRTIM_BURSTDMA_TIMEEFR1 (HRTIM_BDTUPR_TIMEEFR1) /*!< EEFxR1 register is updated by Burst DMA accesses */
  779. #define LL_HRTIM_BURSTDMA_TIMEEFR2 (HRTIM_BDTUPR_TIMEEFR2) /*!< EEFxR2 register is updated by Burst DMA accesses */
  780. #define LL_HRTIM_BURSTDMA_TIMRSTR (HRTIM_BDTUPR_TIMRSTR) /*!< RSTxR register is updated by Burst DMA accesses */
  781. #define LL_HRTIM_BURSTDMA_TIMCHPR (HRTIM_BDTUPR_TIMCHPR) /*!< CHPxR register is updated by Burst DMA accesses */
  782. #define LL_HRTIM_BURSTDMA_TIMOUTR (HRTIM_BDTUPR_TIMOUTR) /*!< OUTxR register is updated by Burst DMA accesses */
  783. #define LL_HRTIM_BURSTDMA_TIMFLTR (HRTIM_BDTUPR_TIMFLTR) /*!< FLTxR register is updated by Burst DMA accesses */
  784. /**
  785. * @}
  786. */
  787. /** @defgroup HRTIM_LL_EC_CPPSTAT CURRENT PUSH-PULL STATUS
  788. * @{
  789. * @brief Constants defining on which output the signal is currently applied in push-pull mode.
  790. */
  791. #define LL_HRTIM_CPPSTAT_OUTPUT1 ((uint32_t) 0x00000000U) /*!< Signal applied on output 1 and output 2 forced inactive */
  792. #define LL_HRTIM_CPPSTAT_OUTPUT2 (HRTIM_TIMISR_CPPSTAT) /*!< Signal applied on output 2 and output 1 forced inactive */
  793. /**
  794. * @}
  795. */
  796. /** @defgroup HRTIM_LL_EC_IPPSTAT IDLE PUSH-PULL STATUS
  797. * @{
  798. * @brief Constants defining on which output the signal was applied, in push-pull mode balanced fault mode or delayed idle mode, when the protection was triggered.
  799. */
  800. #define LL_HRTIM_IPPSTAT_OUTPUT1 ((uint32_t) 0x00000000U) /*!< Protection occurred when the output 1 was active and output 2 forced inactive */
  801. #define LL_HRTIM_IPPSTAT_OUTPUT2 (HRTIM_TIMISR_IPPSTAT) /*!< Protection occurred when the output 2 was active and output 1 forced inactive */
  802. /**
  803. * @}
  804. */
  805. /** @defgroup HRTIM_LL_EC_TIM_EEFLTR TIMER EXTERNAL EVENT FILTER
  806. * @{
  807. * @brief Constants defining the event filtering applied to external events by a timer.
  808. */
  809. #define LL_HRTIM_EEFLTR_NONE (0x00000000U)
  810. #define LL_HRTIM_EEFLTR_BLANKINGCMP1 (HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 1 */
  811. #define LL_HRTIM_EEFLTR_BLANKINGCMP2 (HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from counter reset/roll-over to Compare 2 */
  812. #define LL_HRTIM_EEFLTR_BLANKINGCMP3 (HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 3 */
  813. #define LL_HRTIM_EEFLTR_BLANKINGCMP4 (HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from counter reset/roll-over to Compare 4 */
  814. #define LL_HRTIM_EEFLTR_BLANKINGFLTR1 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR1 source */
  815. #define LL_HRTIM_EEFLTR_BLANKINGFLTR2 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR2 source */
  816. #define LL_HRTIM_EEFLTR_BLANKINGFLTR3 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR3 source */
  817. #define LL_HRTIM_EEFLTR_BLANKINGFLTR4 (HRTIM_EEFR1_EE1FLTR_3) /*!< Blanking from another timing unit: TIMFLTR4 source */
  818. #define LL_HRTIM_EEFLTR_BLANKINGFLTR5 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR5 source */
  819. #define LL_HRTIM_EEFLTR_BLANKINGFLTR6 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR6 source */
  820. #define LL_HRTIM_EEFLTR_BLANKINGFLTR7 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR7 source */
  821. #define LL_HRTIM_EEFLTR_BLANKINGFLTR8 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from another timing unit: TIMFLTR8 source */
  822. #define LL_HRTIM_EEFLTR_WINDOWINGCMP2 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from counter reset/roll-over to Compare 2 */
  823. #define LL_HRTIM_EEFLTR_WINDOWINGCMP3 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Windowing from counter reset/roll-over to Compare 3 */
  824. #define LL_HRTIM_EEFLTR_WINDOWINGTIM (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from another timing unit: TIMWIN source */
  825. /**
  826. * @}
  827. */
  828. /** @defgroup HRTIM_LL_EC_TIM_LATCHSTATUS TIMER EXTERNAL EVENT LATCH STATUS
  829. * @{
  830. * @brief Constants defining whether or not the external event is memorized (latched) and generated as soon as the blanking period is completed or the window ends.
  831. */
  832. #define LL_HRTIM_EELATCH_DISABLED 0x00000000U /*!< Event is ignored if it happens during a blank, or passed through during a window */
  833. #define LL_HRTIM_EELATCH_ENABLED HRTIM_EEFR1_EE1LTCH /*!< Event is latched and delayed till the end of the blanking or windowing period */
  834. /**
  835. * @}
  836. */
  837. /** @defgroup HRTIM_LL_EC_DT_PRESCALER DEADTIME PRESCALER
  838. * @{
  839. * @brief Constants defining division ratio between the timer clock frequency (fHRTIM) and the deadtime generator clock (fDTG).
  840. */
  841. #define LL_HRTIM_DT_PRESCALER_MUL8 0x00000000U /*!< fDTG = fHRTIM * 8 */
  842. #define LL_HRTIM_DT_PRESCALER_MUL4 (HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM * 4 */
  843. #define LL_HRTIM_DT_PRESCALER_MUL2 (HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM * 2 */
  844. #define LL_HRTIM_DT_PRESCALER_DIV1 (HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM */
  845. #define LL_HRTIM_DT_PRESCALER_DIV2 (HRTIM_DTR_DTPRSC_2) /*!< fDTG = fHRTIM / 2 */
  846. #define LL_HRTIM_DT_PRESCALER_DIV4 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 4 */
  847. #define LL_HRTIM_DT_PRESCALER_DIV8 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM / 8 */
  848. #define LL_HRTIM_DT_PRESCALER_DIV16 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 16 */
  849. /**
  850. * @}
  851. */
  852. /** @defgroup HRTIM_LL_EC_DT_RISING_SIGN DEADTIME RISING SIGN
  853. * @{
  854. * @brief Constants defining whether the deadtime is positive or negative (overlapping signal) on rising edge.
  855. */
  856. #define LL_HRTIM_DT_RISING_POSITIVE 0x00000000U /*!< Positive deadtime on rising edge */
  857. #define LL_HRTIM_DT_RISING_NEGATIVE (HRTIM_DTR_SDTR) /*!< Negative deadtime on rising edge */
  858. /**
  859. * @}
  860. */
  861. /** @defgroup HRTIM_LL_EC_DT_FALLING_SIGN DEADTIME FALLING SIGN
  862. * @{
  863. * @brief Constants defining whether the deadtime is positive or negative (overlapping signal) on falling edge.
  864. */
  865. #define LL_HRTIM_DT_FALLING_POSITIVE 0x00000000U /*!< Positive deadtime on falling edge */
  866. #define LL_HRTIM_DT_FALLING_NEGATIVE (HRTIM_DTR_SDTF) /*!< Negative deadtime on falling edge */
  867. /**
  868. * @}
  869. */
  870. /** @defgroup HRTIM_LL_EC_CHP_PRESCALER CHOPPER MODE PRESCALER
  871. * @{
  872. * @brief Constants defining the frequency of the generated high frequency carrier (fCHPFRQ).
  873. */
  874. #define LL_HRTIM_CHP_PRESCALER_DIV16 0x00000000U /*!< fCHPFRQ = fHRTIM / 16 */
  875. #define LL_HRTIM_CHP_PRESCALER_DIV32 (HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 32 */
  876. #define LL_HRTIM_CHP_PRESCALER_DIV48 (HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 48 */
  877. #define LL_HRTIM_CHP_PRESCALER_DIV64 (HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 64 */
  878. #define LL_HRTIM_CHP_PRESCALER_DIV80 (HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 80 */
  879. #define LL_HRTIM_CHP_PRESCALER_DIV96 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 96 */
  880. #define LL_HRTIM_CHP_PRESCALER_DIV112 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 112 */
  881. #define LL_HRTIM_CHP_PRESCALER_DIV128 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 128 */
  882. #define LL_HRTIM_CHP_PRESCALER_DIV144 (HRTIM_CHPR_CARFRQ_3) /*!< fCHPFRQ = fHRTIM / 144 */
  883. #define LL_HRTIM_CHP_PRESCALER_DIV160 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 160 */
  884. #define LL_HRTIM_CHP_PRESCALER_DIV176 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 176 */
  885. #define LL_HRTIM_CHP_PRESCALER_DIV192 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 192 */
  886. #define LL_HRTIM_CHP_PRESCALER_DIV208 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 208 */
  887. #define LL_HRTIM_CHP_PRESCALER_DIV224 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 224 */
  888. #define LL_HRTIM_CHP_PRESCALER_DIV240 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 240 */
  889. #define LL_HRTIM_CHP_PRESCALER_DIV256 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 256 */
  890. /**
  891. * @}
  892. */
  893. /** @defgroup HRTIM_LL_EC_CHP_DUTYCYCLE CHOPPER MODE DUTY CYCLE
  894. * @{
  895. * @brief Constants defining the duty cycle of the generated high frequency carrier. Duty cycle can be adjusted by 1/8 step (from 0/8 up to 7/8).
  896. */
  897. #define LL_HRTIM_CHP_DUTYCYCLE_0 0x00000000U /*!< Only 1st pulse is present */
  898. #define LL_HRTIM_CHP_DUTYCYCLE_125 (HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 12.5 % */
  899. #define LL_HRTIM_CHP_DUTYCYCLE_250 (HRTIM_CHPR_CARDTY_1) /*!< Duty cycle of the carrier signal is 25 % */
  900. #define LL_HRTIM_CHP_DUTYCYCLE_375 (HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 37.5 % */
  901. #define LL_HRTIM_CHP_DUTYCYCLE_500 (HRTIM_CHPR_CARDTY_2) /*!< Duty cycle of the carrier signal is 50 % */
  902. #define LL_HRTIM_CHP_DUTYCYCLE_625 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 62.5 % */
  903. #define LL_HRTIM_CHP_DUTYCYCLE_750 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1) /*!< Duty cycle of the carrier signal is 75 % */
  904. #define LL_HRTIM_CHP_DUTYCYCLE_875 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 87.5 % */
  905. /**
  906. * @}
  907. */
  908. /** @defgroup HRTIM_LL_EC_CHP_PULSEWIDTH CHOPPER MODE PULSE WIDTH
  909. * @{
  910. * @brief Constants defining the pulse width of the first pulse of the generated high frequency carrier.
  911. */
  912. #define LL_HRTIM_CHP_PULSEWIDTH_16 0x00000000U /*!< tSTPW = tHRTIM x 16 */
  913. #define LL_HRTIM_CHP_PULSEWIDTH_32 (HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 32 */
  914. #define LL_HRTIM_CHP_PULSEWIDTH_48 (HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 48 */
  915. #define LL_HRTIM_CHP_PULSEWIDTH_64 (HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 64 */
  916. #define LL_HRTIM_CHP_PULSEWIDTH_80 (HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 80 */
  917. #define LL_HRTIM_CHP_PULSEWIDTH_96 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 96 */
  918. #define LL_HRTIM_CHP_PULSEWIDTH_112 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 112 */
  919. #define LL_HRTIM_CHP_PULSEWIDTH_128 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 128 */
  920. #define LL_HRTIM_CHP_PULSEWIDTH_144 (HRTIM_CHPR_STRPW_3) /*!< tSTPW = tHRTIM x 144 */
  921. #define LL_HRTIM_CHP_PULSEWIDTH_160 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 160 */
  922. #define LL_HRTIM_CHP_PULSEWIDTH_176 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 176 */
  923. #define LL_HRTIM_CHP_PULSEWIDTH_192 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 192 */
  924. #define LL_HRTIM_CHP_PULSEWIDTH_208 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 208 */
  925. #define LL_HRTIM_CHP_PULSEWIDTH_224 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 224 */
  926. #define LL_HRTIM_CHP_PULSEWIDTH_240 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 240 */
  927. #define LL_HRTIM_CHP_PULSEWIDTH_256 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 256 */
  928. /**
  929. * @}
  930. */
  931. /** @defgroup HRTIM_LL_EC_OUTPUTSET_INPUT OUTPUTSET INPUT
  932. * @{
  933. * @brief Constants defining the events that can be selected to configure the set/reset crossbar of a timer output.
  934. */
  935. #define LL_HRTIM_OUTPUTSET_NONE 0x00000000U /*!< Reset the output set crossbar */
  936. #define LL_HRTIM_OUTPUTSET_RESYNC (HRTIM_SET1R_RESYNC) /*!< Timer reset event coming solely from software or SYNC input forces an output level transision */
  937. #define LL_HRTIM_OUTPUTSET_TIMPER (HRTIM_SET1R_PER) /*!< Timer period event forces an output level transision */
  938. #define LL_HRTIM_OUTPUTSET_TIMCMP1 (HRTIM_SET1R_CMP1) /*!< Timer compare 1 event forces an output level transision */
  939. #define LL_HRTIM_OUTPUTSET_TIMCMP2 (HRTIM_SET1R_CMP2) /*!< Timer compare 2 event forces an output level transision */
  940. #define LL_HRTIM_OUTPUTSET_TIMCMP3 (HRTIM_SET1R_CMP3) /*!< Timer compare 3 event forces an output level transision */
  941. #define LL_HRTIM_OUTPUTSET_TIMCMP4 (HRTIM_SET1R_CMP4) /*!< Timer compare 4 event forces an output level transision */
  942. #define LL_HRTIM_OUTPUTSET_MASTERPER (HRTIM_SET1R_MSTPER) /*!< The master timer period event forces an output level transision */
  943. #define LL_HRTIM_OUTPUTSET_MASTERCMP1 (HRTIM_SET1R_MSTCMP1) /*!< Master Timer compare 1 event forces an output level transision */
  944. #define LL_HRTIM_OUTPUTSET_MASTERCMP2 (HRTIM_SET1R_MSTCMP2) /*!< Master Timer compare 2 event forces an output level transision */
  945. #define LL_HRTIM_OUTPUTSET_MASTERCMP3 (HRTIM_SET1R_MSTCMP3) /*!< Master Timer compare 3 event forces an output level transision */
  946. #define LL_HRTIM_OUTPUTSET_MASTERCMP4 (HRTIM_SET1R_MSTCMP4) /*!< Master Timer compare 4 event forces an output level transision */
  947. /* Timer Events mapping for Timer A */
  948. #define LL_HRTIM_OUTPUTSET_TIMAEV1_TIMBCMP1 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its ictive state */
  949. #define LL_HRTIM_OUTPUTSET_TIMAEV2_TIMBCMP2 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
  950. #define LL_HRTIM_OUTPUTSET_TIMAEV3_TIMBCMP4 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
  951. #define LL_HRTIM_OUTPUTSET_TIMAEV4_TIMCCMP2 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
  952. #define LL_HRTIM_OUTPUTSET_TIMAEV5_TIMCCMP3 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
  953. #define LL_HRTIM_OUTPUTSET_TIMAEV6_TIMDCMP1 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
  954. #define LL_HRTIM_OUTPUTSET_TIMAEV7_TIMDCMP2 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
  955. #define LL_HRTIM_OUTPUTSET_TIMAEV8_TIMECMP3 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
  956. #define LL_HRTIM_OUTPUTSET_TIMAEV9_TIMECMP4 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
  957. /* Timer Events mapping for Timer B */
  958. #define LL_HRTIM_OUTPUTSET_TIMBEV1_TIMACMP1 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its active state */
  959. #define LL_HRTIM_OUTPUTSET_TIMBEV2_TIMACMP2 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
  960. #define LL_HRTIM_OUTPUTSET_TIMBEV3_TIMACMP4 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
  961. #define LL_HRTIM_OUTPUTSET_TIMBEV4_TIMCCMP3 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
  962. #define LL_HRTIM_OUTPUTSET_TIMBEV5_TIMCCMP4 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
  963. #define LL_HRTIM_OUTPUTSET_TIMBEV6_TIMDCMP3 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
  964. #define LL_HRTIM_OUTPUTSET_TIMBEV7_TIMDCMP4 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
  965. #define LL_HRTIM_OUTPUTSET_TIMBEV8_TIMECMP1 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
  966. #define LL_HRTIM_OUTPUTSET_TIMBEV9_TIMECMP2 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
  967. /* Timer Events mapping for Timer C */
  968. #define LL_HRTIM_OUTPUTSET_TIMCEV1_TIMACMP2 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its active state */
  969. #define LL_HRTIM_OUTPUTSET_TIMCEV2_TIMACMP3 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
  970. #define LL_HRTIM_OUTPUTSET_TIMCEV3_TIMBCMP2 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
  971. #define LL_HRTIM_OUTPUTSET_TIMCEV4_TIMBCMP3 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
  972. #define LL_HRTIM_OUTPUTSET_TIMCEV5_TIMDCMP2 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
  973. #define LL_HRTIM_OUTPUTSET_TIMCEV6_TIMDCMP4 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
  974. #define LL_HRTIM_OUTPUTSET_TIMCEV7_TIMECMP2 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
  975. #define LL_HRTIM_OUTPUTSET_TIMCEV8_TIMECMP3 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
  976. #define LL_HRTIM_OUTPUTSET_TIMCEV9_TIMECMP4 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
  977. /* Timer Events mapping for Timer D */
  978. #define LL_HRTIM_OUTPUTSET_TIMDEV1_TIMACMP1 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its active state */
  979. #define LL_HRTIM_OUTPUTSET_TIMDEV2_TIMACMP4 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
  980. #define LL_HRTIM_OUTPUTSET_TIMDEV3_TIMBCMP2 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
  981. #define LL_HRTIM_OUTPUTSET_TIMDEV4_TIMBCMP4 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
  982. #define LL_HRTIM_OUTPUTSET_TIMDEV5_TIMCCMP1 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
  983. #define LL_HRTIM_OUTPUTSET_TIMDEV6_TIMCCMP3 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
  984. #define LL_HRTIM_OUTPUTSET_TIMDEV7_TIMCCMP4 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
  985. #define LL_HRTIM_OUTPUTSET_TIMDEV8_TIMECMP1 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
  986. #define LL_HRTIM_OUTPUTSET_TIMDEV9_TIMECMP4 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
  987. /* Timer Events mapping for Timer E */
  988. #define LL_HRTIM_OUTPUTSET_TIMEEV1_TIMACMP3 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces the output to its active state */
  989. #define LL_HRTIM_OUTPUTSET_TIMEEV2_TIMACMP4 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces the output to its active state */
  990. #define LL_HRTIM_OUTPUTSET_TIMEEV3_TIMBCMP3 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces the output to its active state */
  991. #define LL_HRTIM_OUTPUTSET_TIMEEV4_TIMBCMP4 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces the output to its active state */
  992. #define LL_HRTIM_OUTPUTSET_TIMEEV5_TIMCCMP1 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces the output to its active state */
  993. #define LL_HRTIM_OUTPUTSET_TIMEEV6_TIMCCMP2 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces the output to its active state */
  994. #define LL_HRTIM_OUTPUTSET_TIMEEV7_TIMDCMP1 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces the output to its active state */
  995. #define LL_HRTIM_OUTPUTSET_TIMEEV8_TIMDCMP2 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces the output to its active state */
  996. #define LL_HRTIM_OUTPUTSET_TIMEEV9_TIMDCMP4 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces the output to its active state */
  997. #define LL_HRTIM_OUTPUTSET_EEV_1 (HRTIM_SET1R_EXTVNT1) /*!< External event 1 forces an output level transision */
  998. #define LL_HRTIM_OUTPUTSET_EEV_2 (HRTIM_SET1R_EXTVNT2) /*!< External event 2 forces an output level transision */
  999. #define LL_HRTIM_OUTPUTSET_EEV_3 (HRTIM_SET1R_EXTVNT3) /*!< External event 3 forces an output level transision */
  1000. #define LL_HRTIM_OUTPUTSET_EEV_4 (HRTIM_SET1R_EXTVNT4) /*!< External event 4 forces an output level transision */
  1001. #define LL_HRTIM_OUTPUTSET_EEV_5 (HRTIM_SET1R_EXTVNT5) /*!< External event 5 forces an output level transision */
  1002. #define LL_HRTIM_OUTPUTSET_EEV_6 (HRTIM_SET1R_EXTVNT6) /*!< External event 6 forces an output level transision */
  1003. #define LL_HRTIM_OUTPUTSET_EEV_7 (HRTIM_SET1R_EXTVNT7) /*!< External event 7 forces an output level transision */
  1004. #define LL_HRTIM_OUTPUTSET_EEV_8 (HRTIM_SET1R_EXTVNT8) /*!< External event 8 forces an output level transision */
  1005. #define LL_HRTIM_OUTPUTSET_EEV_9 (HRTIM_SET1R_EXTVNT9) /*!< External event 9 forces an output level transision */
  1006. #define LL_HRTIM_OUTPUTSET_EEV_10 (HRTIM_SET1R_EXTVNT10) /*!< External event 10 forces an output level transision */
  1007. #define LL_HRTIM_OUTPUTSET_UPDATE (HRTIM_SET1R_UPDATE) /*!< Timer register update event forces an output level transision */
  1008. /**
  1009. * @}
  1010. */
  1011. /** @defgroup HRTIM_Output_Reset_Source HRTIM Output Reset Source
  1012. * @{
  1013. * @brief Constants defining the events that can be selected to configure the
  1014. * set crossbar of a timer output
  1015. */
  1016. #define LL_HRTIM_OUTPUTRESET_NONE 0x00000000U /*!< Reset the output reset crossbar */
  1017. #define LL_HRTIM_OUTPUTRESET_RESYNC (HRTIM_RST1R_RESYNC) /*!< Timer reset event coming solely from software or SYNC input forces the output to its inactive state */
  1018. #define LL_HRTIM_OUTPUTRESET_TIMPER (HRTIM_RST1R_PER) /*!< Timer period event forces the output to its inactive state */
  1019. #define LL_HRTIM_OUTPUTRESET_TIMCMP1 (HRTIM_RST1R_CMP1) /*!< Timer compare 1 event forces the output to its inactive state */
  1020. #define LL_HRTIM_OUTPUTRESET_TIMCMP2 (HRTIM_RST1R_CMP2) /*!< Timer compare 2 event forces the output to its inactive state */
  1021. #define LL_HRTIM_OUTPUTRESET_TIMCMP3 (HRTIM_RST1R_CMP3) /*!< Timer compare 3 event forces the output to its inactive state */
  1022. #define LL_HRTIM_OUTPUTRESET_TIMCMP4 (HRTIM_RST1R_CMP4) /*!< Timer compare 4 event forces the output to its inactive state */
  1023. #define LL_HRTIM_OUTPUTRESET_MASTERPER (HRTIM_RST1R_MSTPER) /*!< The master timer period event forces the output to its inactive state */
  1024. #define LL_HRTIM_OUTPUTRESET_MASTERCMP1 (HRTIM_RST1R_MSTCMP1) /*!< Master Timer compare 1 event forces the output to its inactive state */
  1025. #define LL_HRTIM_OUTPUTRESET_MASTERCMP2 (HRTIM_RST1R_MSTCMP2) /*!< Master Timer compare 2 event forces the output to its inactive state */
  1026. #define LL_HRTIM_OUTPUTRESET_MASTERCMP3 (HRTIM_RST1R_MSTCMP3) /*!< Master Timer compare 3 event forces the output to its inactive state */
  1027. #define LL_HRTIM_OUTPUTRESET_MASTERCMP4 (HRTIM_RST1R_MSTCMP4) /*!< Master Timer compare 4 event forces the output to its inactive state */
  1028. /* Timer Events mapping for Timer A */
  1029. #define LL_HRTIM_OUTPUTRESET_TIMAEV1_TIMBCMP1 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
  1030. #define LL_HRTIM_OUTPUTRESET_TIMAEV2_TIMBCMP2 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
  1031. #define LL_HRTIM_OUTPUTRESET_TIMAEV3_TIMBCMP4 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
  1032. #define LL_HRTIM_OUTPUTRESET_TIMAEV4_TIMCCMP2 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
  1033. #define LL_HRTIM_OUTPUTRESET_TIMAEV5_TIMCCMP3 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
  1034. #define LL_HRTIM_OUTPUTRESET_TIMAEV6_TIMDCMP1 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
  1035. #define LL_HRTIM_OUTPUTRESET_TIMAEV7_TIMDCMP2 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
  1036. #define LL_HRTIM_OUTPUTRESET_TIMAEV8_TIMECMP3 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
  1037. #define LL_HRTIM_OUTPUTRESET_TIMAEV9_TIMECMP4 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
  1038. /* Timer Events mapping for Timer B */
  1039. #define LL_HRTIM_OUTPUTRESET_TIMBEV1_TIMACMP1 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
  1040. #define LL_HRTIM_OUTPUTRESET_TIMBEV2_TIMACMP2 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
  1041. #define LL_HRTIM_OUTPUTRESET_TIMBEV3_TIMACMP4 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
  1042. #define LL_HRTIM_OUTPUTRESET_TIMBEV4_TIMCCMP3 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
  1043. #define LL_HRTIM_OUTPUTRESET_TIMBEV5_TIMCCMP4 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
  1044. #define LL_HRTIM_OUTPUTRESET_TIMBEV6_TIMDCMP3 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
  1045. #define LL_HRTIM_OUTPUTRESET_TIMBEV7_TIMDCMP4 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
  1046. #define LL_HRTIM_OUTPUTRESET_TIMBEV8_TIMECMP1 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
  1047. #define LL_HRTIM_OUTPUTRESET_TIMBEV9_TIMECMP2 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
  1048. /* Timer Events mapping for Timer C */
  1049. #define LL_HRTIM_OUTPUTRESET_TIMCEV1_TIMACMP2 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
  1050. #define LL_HRTIM_OUTPUTRESET_TIMCEV2_TIMACMP3 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
  1051. #define LL_HRTIM_OUTPUTRESET_TIMCEV3_TIMBCMP2 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
  1052. #define LL_HRTIM_OUTPUTRESET_TIMCEV4_TIMBCMP3 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
  1053. #define LL_HRTIM_OUTPUTRESET_TIMCEV5_TIMDCMP2 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
  1054. #define LL_HRTIM_OUTPUTRESET_TIMCEV6_TIMDCMP4 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
  1055. #define LL_HRTIM_OUTPUTRESET_TIMCEV7_TIMECMP2 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
  1056. #define LL_HRTIM_OUTPUTRESET_TIMCEV8_TIMECMP3 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
  1057. #define LL_HRTIM_OUTPUTRESET_TIMCEV9_TIMECMP4 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
  1058. /* Timer Events mapping for Timer D */
  1059. #define LL_HRTIM_OUTPUTRESET_TIMDEV1_TIMACMP1 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
  1060. #define LL_HRTIM_OUTPUTRESET_TIMDEV2_TIMACMP4 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
  1061. #define LL_HRTIM_OUTPUTRESET_TIMDEV3_TIMBCMP2 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
  1062. #define LL_HRTIM_OUTPUTRESET_TIMDEV4_TIMBCMP4 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
  1063. #define LL_HRTIM_OUTPUTRESET_TIMDEV5_TIMCCMP1 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
  1064. #define LL_HRTIM_OUTPUTRESET_TIMDEV6_TIMCCMP3 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
  1065. #define LL_HRTIM_OUTPUTRESET_TIMDEV7_TIMCCMP4 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
  1066. #define LL_HRTIM_OUTPUTRESET_TIMDEV8_TIMECMP1 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
  1067. #define LL_HRTIM_OUTPUTRESET_TIMDEV9_TIMECMP4 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
  1068. /* Timer Events mapping for Timer E */
  1069. #define LL_HRTIM_OUTPUTRESET_TIMEEV1_TIMACMP3 (HRTIM_RST1R_TIMEVNT1) /*!< Timer event 1 forces the output to its inactive state */
  1070. #define LL_HRTIM_OUTPUTRESET_TIMEEV2_TIMACMP4 (HRTIM_RST1R_TIMEVNT2) /*!< Timer event 2 forces the output to its inactive state */
  1071. #define LL_HRTIM_OUTPUTRESET_TIMEEV3_TIMBCMP3 (HRTIM_RST1R_TIMEVNT3) /*!< Timer event 3 forces the output to its inactive state */
  1072. #define LL_HRTIM_OUTPUTRESET_TIMEEV4_TIMBCMP4 (HRTIM_RST1R_TIMEVNT4) /*!< Timer event 4 forces the output to its inactive state */
  1073. #define LL_HRTIM_OUTPUTRESET_TIMEEV5_TIMCCMP1 (HRTIM_RST1R_TIMEVNT5) /*!< Timer event 5 forces the output to its inactive state */
  1074. #define LL_HRTIM_OUTPUTRESET_TIMEEV6_TIMCCMP2 (HRTIM_RST1R_TIMEVNT6) /*!< Timer event 6 forces the output to its inactive state */
  1075. #define LL_HRTIM_OUTPUTRESET_TIMEEV7_TIMDCMP1 (HRTIM_RST1R_TIMEVNT7) /*!< Timer event 7 forces the output to its inactive state */
  1076. #define LL_HRTIM_OUTPUTRESET_TIMEEV8_TIMDCMP2 (HRTIM_RST1R_TIMEVNT8) /*!< Timer event 8 forces the output to its inactive state */
  1077. #define LL_HRTIM_OUTPUTRESET_TIMEEV9_TIMDCMP4 (HRTIM_RST1R_TIMEVNT9) /*!< Timer event 9 forces the output to its inactive state */
  1078. #define LL_HRTIM_OUTPUTRESET_EEV_1 (HRTIM_RST1R_EXTVNT1) /*!< External event 1 forces the output to its inactive state */
  1079. #define LL_HRTIM_OUTPUTRESET_EEV_2 (HRTIM_RST1R_EXTVNT2) /*!< External event 2 forces the output to its inactive state */
  1080. #define LL_HRTIM_OUTPUTRESET_EEV_3 (HRTIM_RST1R_EXTVNT3) /*!< External event 3 forces the output to its inactive state */
  1081. #define LL_HRTIM_OUTPUTRESET_EEV_4 (HRTIM_RST1R_EXTVNT4) /*!< External event 4 forces the output to its inactive state */
  1082. #define LL_HRTIM_OUTPUTRESET_EEV_5 (HRTIM_RST1R_EXTVNT5) /*!< External event 5 forces the output to its inactive state */
  1083. #define LL_HRTIM_OUTPUTRESET_EEV_6 (HRTIM_RST1R_EXTVNT6) /*!< External event 6 forces the output to its inactive state */
  1084. #define LL_HRTIM_OUTPUTRESET_EEV_7 (HRTIM_RST1R_EXTVNT7) /*!< External event 7 forces the output to its inactive state */
  1085. #define LL_HRTIM_OUTPUTRESET_EEV_8 (HRTIM_RST1R_EXTVNT8) /*!< External event 8 forces the output to its inactive state */
  1086. #define LL_HRTIM_OUTPUTRESET_EEV_9 (HRTIM_RST1R_EXTVNT9) /*!< External event 9 forces the output to its inactive state */
  1087. #define LL_HRTIM_OUTPUTRESET_EEV_10 (HRTIM_RST1R_EXTVNT10) /*!< External event 10 forces the output to its inactive state */
  1088. #define LL_HRTIM_OUTPUTRESET_UPDATE (HRTIM_RST1R_UPDATE) /*!< Timer register update event forces the output to its inactive state */
  1089. /**
  1090. * @}
  1091. */
  1092. /** @defgroup HRTIM_LL_EC_OUT_POLARITY OUPUT_POLARITY
  1093. * @{
  1094. * @brief Constants defining the polarity of a timer output.
  1095. */
  1096. #define LL_HRTIM_OUT_POSITIVE_POLARITY 0x00000000U /*!< Output is acitve HIGH */
  1097. #define LL_HRTIM_OUT_NEGATIVE_POLARITY (HRTIM_OUTR_POL1) /*!< Output is active LOW */
  1098. /**
  1099. * @}
  1100. */
  1101. /** @defgroup HRTIM_LL_EC_OUT_IDLEMODE OUTPUT IDLE MODE
  1102. * @{
  1103. * @brief Constants defining whether or not the timer output transition to its IDLE state when burst mode is entered.
  1104. */
  1105. #define LL_HRTIM_OUT_NO_IDLE 0x00000000U /*!< The output is not affected by the burst mode operation */
  1106. #define LL_HRTIM_OUT_IDLE_WHEN_BURST (HRTIM_OUTR_IDLM1) /*!< The output is in idle state when requested by the burst mode controller */
  1107. /**
  1108. * @}
  1109. */
  1110. /** @defgroup HRTIM_LL_EC_HALF_MODE HALF MODE
  1111. * @{
  1112. * @brief Constants defining the half mode of an HRTIM Timer instance.
  1113. */
  1114. #define LL_HRTIM_HALF_MODE_DISABLED 0x000U /*!< HRTIM Half Mode is disabled */
  1115. #define LL_HRTIM_HALF_MODE_ENABLE HRTIM_MCR_HALF /*!< HRTIM Half Mode is Half */
  1116. /**
  1117. * @}
  1118. */
  1119. /** @defgroup HRTIM_LL_EC_OUT_IDLELEVEL OUTPUT IDLE LEVEL
  1120. * @{
  1121. * @brief Constants defining the output level when output is in IDLE state
  1122. */
  1123. #define LL_HRTIM_OUT_IDLELEVEL_INACTIVE 0x00000000U /*!< Output at inactive level when in IDLE state */
  1124. #define LL_HRTIM_OUT_IDLELEVEL_ACTIVE (HRTIM_OUTR_IDLES1) /*!< Output at active level when in IDLE state */
  1125. /**
  1126. * @}
  1127. */
  1128. /** @defgroup HRTIM_LL_EC_OUT_FAULTSTATE OUTPUT FAULT STATE
  1129. * @{
  1130. * @brief Constants defining the output level when output is in FAULT state.
  1131. */
  1132. #define LL_HRTIM_OUT_FAULTSTATE_NO_ACTION 0x00000000U /*!< The output is not affected by the fault input */
  1133. #define LL_HRTIM_OUT_FAULTSTATE_ACTIVE (HRTIM_OUTR_FAULT1_0) /*!< Output at active level when in FAULT state */
  1134. #define LL_HRTIM_OUT_FAULTSTATE_INACTIVE (HRTIM_OUTR_FAULT1_1) /*!< Output at inactive level when in FAULT state */
  1135. #define LL_HRTIM_OUT_FAULTSTATE_HIGHZ (HRTIM_OUTR_FAULT1_1 | HRTIM_OUTR_FAULT1_0) /*!< Output is tri-stated when in FAULT state */
  1136. /**
  1137. * @}
  1138. */
  1139. /** @defgroup HRTIM_LL_EC_OUT_CHOPPERMODE OUTPUT CHOPPER MODE
  1140. * @{
  1141. * @brief Constants defining whether or not chopper mode is enabled for a timer output.
  1142. */
  1143. #define LL_HRTIM_OUT_CHOPPERMODE_DISABLED 0x00000000U /*!< Output signal is not altered */
  1144. #define LL_HRTIM_OUT_CHOPPERMODE_ENABLED (HRTIM_OUTR_CHP1) /*!< Output signal is chopped by a carrier signal */
  1145. /**
  1146. * @}
  1147. */
  1148. /** @defgroup HRTIM_LL_EC_OUT_BM_ENTRYMODE OUTPUT BURST MODE ENTRY MODE
  1149. * @{
  1150. * @brief Constants defining the idle state entry mode during a burst mode operation. It is possible to delay the burst mode entry and force the output to an inactive state
  1151. during a programmable period before the output takes its idle state.
  1152. */
  1153. #define LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR 0x00000000U /*!< The programmed Idle state is applied immediately to the Output */
  1154. #define LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED (HRTIM_OUTR_DIDL1) /*!< Deadtime is inserted on output before entering the idle mode */
  1155. /**
  1156. * @}
  1157. */
  1158. /** @defgroup HRTIM_LL_EC_OUT_LEVEL OUTPUT LEVEL
  1159. * @{
  1160. * @brief Constants defining the level of a timer output.
  1161. */
  1162. #define LL_HRTIM_OUT_LEVEL_INACTIVE 0x00000000U /*!< Corresponds to a logic level 0 for a positive polarity (High) and to a logic level 1 for a negative polarity (Low) */
  1163. #define LL_HRTIM_OUT_LEVEL_ACTIVE ((uint32_t)0x00000001) /*!< Corresponds to a logic level 1 for a positive polarity (High) and to a logic level 0 for a negative polarity (Low) */
  1164. /**
  1165. * @}
  1166. */
  1167. /** @defgroup HRTIM_LL_EC_EE_SRC EXTERNAL EVENT SOURCE
  1168. * @{
  1169. * @brief Constants defining available sources associated to external events.
  1170. */
  1171. #define LL_HRTIM_EE_SRC_1 0x00000000U /*!< External event source 1 (EExSrc1)*/
  1172. #define LL_HRTIM_EE_SRC_2 (HRTIM_EECR1_EE1SRC_0) /*!< External event source 2 (EExSrc2) */
  1173. #define LL_HRTIM_EE_SRC_3 (HRTIM_EECR1_EE1SRC_1) /*!< External event source 3 (EExSrc3) */
  1174. #define LL_HRTIM_EE_SRC_4 (HRTIM_EECR1_EE1SRC_1 | HRTIM_EECR1_EE1SRC_0) /*!< External event source 4 (EExSrc4) */
  1175. /**
  1176. * @}
  1177. */
  1178. /** @defgroup HRTIM_LL_EC_EE_POLARITY EXTERNAL EVENT POLARITY
  1179. * @{
  1180. * @brief Constants defining the polarity of an external event.
  1181. */
  1182. #define LL_HRTIM_EE_POLARITY_HIGH 0x00000000U /*!< External event is active high */
  1183. #define LL_HRTIM_EE_POLARITY_LOW (HRTIM_EECR1_EE1POL) /*!< External event is active low */
  1184. /**
  1185. * @}
  1186. */
  1187. /** @defgroup HRTIM_LL_EC_EE_SENSITIVITY EXTERNAL EVENT SENSITIVITY
  1188. * @{
  1189. * @brief Constants defining the sensitivity (level-sensitive or edge-sensitive) of an external event.
  1190. */
  1191. #define LL_HRTIM_EE_SENSITIVITY_LEVEL 0x00000000U /*!< External event is active on level */
  1192. #define LL_HRTIM_EE_SENSITIVITY_RISINGEDGE (HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising edge */
  1193. #define LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE (HRTIM_EECR1_EE1SNS_1) /*!< External event is active on Falling edge */
  1194. #define LL_HRTIM_EE_SENSITIVITY_BOTHEDGES (HRTIM_EECR1_EE1SNS_1 | HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising and Falling edges */
  1195. /**
  1196. * @}
  1197. */
  1198. /** @defgroup HRTIM_LL_EC_EE_FASTMODE EXTERNAL EVENT FAST MODE
  1199. * @{
  1200. * @brief Constants defining whether or not an external event is programmed in fast mode.
  1201. */
  1202. #define LL_HRTIM_EE_FASTMODE_DISABLE 0x00000000U /*!< External Event is re-synchronized by the HRTIM logic before acting on outputs */
  1203. #define LL_HRTIM_EE_FASTMODE_ENABLE (HRTIM_EECR1_EE1FAST) /*!< External Event is acting asynchronously on outputs (low latency mode) */
  1204. /**
  1205. * @}
  1206. */
  1207. /** @defgroup HRTIM_LL_EC_EE_FILTER EXTERNAL EVENT DIGITAL FILTER
  1208. * @{
  1209. * @brief Constants defining the frequency used to sample an external event input (fSAMPLING) and the length (N) of the digital filter applied.
  1210. */
  1211. #define LL_HRTIM_EE_FILTER_NONE 0x00000000U /*!< Filter disabled */
  1212. #define LL_HRTIM_EE_FILTER_1 (HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fHRTIM, N=2 */
  1213. #define LL_HRTIM_EE_FILTER_2 (HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fHRTIM, N=4 */
  1214. #define LL_HRTIM_EE_FILTER_3 (HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fHRTIM, N=8 */
  1215. #define LL_HRTIM_EE_FILTER_4 (HRTIM_EECR3_EE6F_2) /*!< fSAMPLING = fEEVS/2, N=6 */
  1216. #define LL_HRTIM_EE_FILTER_5 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/2, N=8 */
  1217. #define LL_HRTIM_EE_FILTER_6 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/4, N=6 */
  1218. #define LL_HRTIM_EE_FILTER_7 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/4, N=8 */
  1219. #define LL_HRTIM_EE_FILTER_8 (HRTIM_EECR3_EE6F_3) /*!< fSAMPLING = fEEVS/8, N=6 */
  1220. #define LL_HRTIM_EE_FILTER_9 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/8, N=8 */
  1221. #define LL_HRTIM_EE_FILTER_10 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/16, N=5 */
  1222. #define LL_HRTIM_EE_FILTER_11 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/16, N=6 */
  1223. #define LL_HRTIM_EE_FILTER_12 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2) /*!< fSAMPLING = fEEVS/16, N=8 */
  1224. #define LL_HRTIM_EE_FILTER_13 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/32, N=5 */
  1225. #define LL_HRTIM_EE_FILTER_14 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/32, N=6 */
  1226. #define LL_HRTIM_EE_FILTER_15 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/32, N=8 */
  1227. /**
  1228. * @}
  1229. */
  1230. /** @defgroup HRTIM_LL_EC_EE_PRESCALER EXTERNAL EVENT PRESCALER
  1231. * @{
  1232. * @brief Constants defining division ratio between the timer clock frequency (fHRTIM) and the external event signal sampling clock (fEEVS) used by the digital filters.
  1233. */
  1234. #define LL_HRTIM_EE_PRESCALER_DIV1 0x00000000U /*!< fEEVS = fHRTIM */
  1235. #define LL_HRTIM_EE_PRESCALER_DIV2 (HRTIM_EECR3_EEVSD_0) /*!< fEEVS = fHRTIM / 2 */
  1236. #define LL_HRTIM_EE_PRESCALER_DIV4 (HRTIM_EECR3_EEVSD_1) /*!< fEEVS = fHRTIM / 4 */
  1237. #define LL_HRTIM_EE_PRESCALER_DIV8 (HRTIM_EECR3_EEVSD_1 | HRTIM_EECR3_EEVSD_0) /*!< fEEVS = fHRTIM / 8 */
  1238. /**
  1239. * @}
  1240. */
  1241. /** @defgroup HRTIM_LL_EC_FLT_SRC FAULT SOURCE
  1242. * @{
  1243. * @brief Constants defining whether a faults is be triggered by any external or internal fault source.
  1244. */
  1245. #define LL_HRTIM_FLT_SRC_DIGITALINPUT 0x00000000U /*!< Fault input is FLT input pin */
  1246. #define LL_HRTIM_FLT_SRC_INTERNAL HRTIM_FLTINR1_FLT1SRC /*!< Fault input is FLT_Int signal (e.g. internal comparator) */
  1247. /**
  1248. * @}
  1249. */
  1250. /** @defgroup HRTIM_LL_EC_FLT_POLARITY FAULT POLARITY
  1251. * @{
  1252. * @brief Constants defining the polarity of a fault event.
  1253. */
  1254. #define LL_HRTIM_FLT_POLARITY_LOW 0x00000000U /*!< Fault input is active low */
  1255. #define LL_HRTIM_FLT_POLARITY_HIGH (HRTIM_FLTINR1_FLT1P) /*!< Fault input is active high */
  1256. /**
  1257. * @}
  1258. */
  1259. /** @defgroup HRTIM_LL_EC_FLT_FILTER FAULT DIGITAL FILTER
  1260. * @{
  1261. * @brief Constants defining the frequency used to sample the fault input (fSAMPLING) and the length (N) of the digital filter applied.
  1262. */
  1263. #define LL_HRTIM_FLT_FILTER_NONE 0x00000000U /*!< Filter disabled */
  1264. #define LL_HRTIM_FLT_FILTER_1 (HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=2 */
  1265. #define LL_HRTIM_FLT_FILTER_2 (HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fHRTIM, N=4 */
  1266. #define LL_HRTIM_FLT_FILTER_3 (HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=8 */
  1267. #define LL_HRTIM_FLT_FILTER_4 (HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/2, N=6 */
  1268. #define LL_HRTIM_FLT_FILTER_5 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/2, N=8 */
  1269. #define LL_HRTIM_FLT_FILTER_6 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/4, N=6 */
  1270. #define LL_HRTIM_FLT_FILTER_7 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/4, N=8 */
  1271. #define LL_HRTIM_FLT_FILTER_8 (HRTIM_FLTINR1_FLT1F_3) /*!< fSAMPLING= fFLTS/8, N=6 */
  1272. #define LL_HRTIM_FLT_FILTER_9 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/8, N=8 */
  1273. #define LL_HRTIM_FLT_FILTER_10 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/16, N=5 */
  1274. #define LL_HRTIM_FLT_FILTER_11 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/16, N=6 */
  1275. #define LL_HRTIM_FLT_FILTER_12 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/16, N=8 */
  1276. #define LL_HRTIM_FLT_FILTER_13 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=5 */
  1277. #define LL_HRTIM_FLT_FILTER_14 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/32, N=6 */
  1278. #define LL_HRTIM_FLT_FILTER_15 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=8 */
  1279. /**
  1280. * @}
  1281. */
  1282. /** @defgroup HRTIM_LL_EC_FLT_PRESCALER BURST FAULT PRESCALER
  1283. * @{
  1284. * @brief Constants defining the division ratio between the timer clock frequency (fHRTIM) and the fault signal sampling clock (fFLTS) used by the digital filters.
  1285. */
  1286. #define LL_HRTIM_FLT_PRESCALER_DIV1 0x00000000U /*!< fFLTS = fHRTIM */
  1287. #define LL_HRTIM_FLT_PRESCALER_DIV2 (HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS = fHRTIM / 2 */
  1288. #define LL_HRTIM_FLT_PRESCALER_DIV4 (HRTIM_FLTINR2_FLTSD_1) /*!< fFLTS = fHRTIM / 4 */
  1289. #define LL_HRTIM_FLT_PRESCALER_DIV8 (HRTIM_FLTINR2_FLTSD_1 | HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS = fHRTIM / 8 */
  1290. /**
  1291. * @}
  1292. */
  1293. /** @defgroup HRTIM_LL_EC_BM_MODE BURST MODE OPERATING MODE
  1294. * @{
  1295. * @brief Constants defining if the burst mode is entered once or if it is continuously operating.
  1296. */
  1297. #define LL_HRTIM_BM_MODE_SINGLESHOT 0x00000000U /*!< Burst mode operates in single shot mode */
  1298. #define LL_HRTIM_BM_MODE_CONTINOUS (HRTIM_BMCR_BMOM) /*!< Burst mode operates in continuous mode */
  1299. /**
  1300. * @}
  1301. */
  1302. /** @defgroup HRTIM_LL_EC_BM_CLKSRC BURST MODE CLOCK SOURCE
  1303. * @{
  1304. * @brief Constants defining the clock source for the burst mode counter.
  1305. */
  1306. #define LL_HRTIM_BM_CLKSRC_MASTER 0x00000000U /*!< Master timer counter reset/roll-over is used as clock source for the burst mode counter */
  1307. #define LL_HRTIM_BM_CLKSRC_TIMER_A (HRTIM_BMCR_BMCLK_0) /*!< Timer A counter reset/roll-over is used as clock source for the burst mode counter */
  1308. #define LL_HRTIM_BM_CLKSRC_TIMER_B (HRTIM_BMCR_BMCLK_1) /*!< Timer B counter reset/roll-over is used as clock source for the burst mode counter */
  1309. #define LL_HRTIM_BM_CLKSRC_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 */
  1310. #define LL_HRTIM_BM_CLKSRC_TIMER_D (HRTIM_BMCR_BMCLK_2) /*!< Timer D counter reset/roll-over is used as clock source for the burst mode counter */
  1311. #define LL_HRTIM_BM_CLKSRC_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 */
  1312. #define LL_HRTIM_BM_CLKSRC_TIM16_OC (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_1) /*!< On-chip Event 1 (BMClk[1]), acting as a burst mode counter clock */
  1313. #define LL_HRTIM_BM_CLKSRC_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 */
  1314. #define LL_HRTIM_BM_CLKSRC_TIM7_TRGO (HRTIM_BMCR_BMCLK_3) /*!< On-chip Event 3 (BMClk[3]), acting as a burst mode counter clock */
  1315. #define LL_HRTIM_BM_CLKSRC_FHRTIM (HRTIM_BMCR_BMCLK_3 | HRTIM_BMCR_BMCLK_1) /*!< Prescaled fHRTIM clock is used as clock source for the burst mode counter */
  1316. /**
  1317. * @}
  1318. */
  1319. /** @defgroup HRTIM_LL_EC_BM_PRESCALER BURST MODE PRESCALER
  1320. * @{
  1321. * @brief Constants defining the prescaling ratio of the fHRTIM clock for the burst mode controller (fBRST).
  1322. */
  1323. #define LL_HRTIM_BM_PRESCALER_DIV1 0x00000000U /*!< fBRST = fHRTIM */
  1324. #define LL_HRTIM_BM_PRESCALER_DIV2 (HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2 */
  1325. #define LL_HRTIM_BM_PRESCALER_DIV4 (HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/4 */
  1326. #define LL_HRTIM_BM_PRESCALER_DIV8 (HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8 */
  1327. #define LL_HRTIM_BM_PRESCALER_DIV16 (HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/16 */
  1328. #define LL_HRTIM_BM_PRESCALER_DIV32 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32 */
  1329. #define LL_HRTIM_BM_PRESCALER_DIV64 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/64 */
  1330. #define LL_HRTIM_BM_PRESCALER_DIV128 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/128 */
  1331. #define LL_HRTIM_BM_PRESCALER_DIV256 (HRTIM_BMCR_BMPRSC_3) /*!< fBRST = fHRTIM/256 */
  1332. #define LL_HRTIM_BM_PRESCALER_DIV512 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/512 */
  1333. #define LL_HRTIM_BM_PRESCALER_DIV1024 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/1024 */
  1334. #define LL_HRTIM_BM_PRESCALER_DIV2048 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2048*/
  1335. #define LL_HRTIM_BM_PRESCALER_DIV4096 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/4096 */
  1336. #define LL_HRTIM_BM_PRESCALER_DIV8192 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8192 */
  1337. #define LL_HRTIM_BM_PRESCALER_DIV16384 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/16384 */
  1338. #define LL_HRTIM_BM_PRESCALER_DIV32768 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32768 */
  1339. /**
  1340. * @}
  1341. */
  1342. /** @defgroup HRTIM_LL_EC_BM_TRIG HRTIM BURST MODE TRIGGER
  1343. * @{
  1344. * @brief Constants defining the events that can be used to trig the burst mode operation.
  1345. */
  1346. #define LL_HRTIM_BM_TRIG_NONE 0x00000000U /*!< No trigger */
  1347. #define LL_HRTIM_BM_TRIG_MASTER_RESET (HRTIM_BMTRGR_MSTRST) /*!< Master timer reset event is starting the burst mode operation */
  1348. #define LL_HRTIM_BM_TRIG_MASTER_REPETITION (HRTIM_BMTRGR_MSTREP) /*!< Master timer repetition event is starting the burst mode operation */
  1349. #define LL_HRTIM_BM_TRIG_MASTER_CMP1 (HRTIM_BMTRGR_MSTCMP1) /*!< Master timer compare 1 event is starting the burst mode operation */
  1350. #define LL_HRTIM_BM_TRIG_MASTER_CMP2 (HRTIM_BMTRGR_MSTCMP2) /*!< Master timer compare 2 event is starting the burst mode operation */
  1351. #define LL_HRTIM_BM_TRIG_MASTER_CMP3 (HRTIM_BMTRGR_MSTCMP3) /*!< Master timer compare 3 event is starting the burst mode operation */
  1352. #define LL_HRTIM_BM_TRIG_MASTER_CMP4 (HRTIM_BMTRGR_MSTCMP4) /*!< Master timer compare 4 event is starting the burst mode operation */
  1353. #define LL_HRTIM_BM_TRIG_TIMA_RESET (HRTIM_BMTRGR_TARST) /*!< Timer A reset event is starting the burst mode operation */
  1354. #define LL_HRTIM_BM_TRIG_TIMA_REPETITION (HRTIM_BMTRGR_TAREP) /*!< Timer A repetition event is starting the burst mode operation */
  1355. #define LL_HRTIM_BM_TRIG_TIMA_CMP1 (HRTIM_BMTRGR_TACMP1) /*!< Timer A compare 1 event is starting the burst mode operation */
  1356. #define LL_HRTIM_BM_TRIG_TIMA_CMP2 (HRTIM_BMTRGR_TACMP2) /*!< Timer A compare 2 event is starting the burst mode operation */
  1357. #define LL_HRTIM_BM_TRIG_TIMB_RESET (HRTIM_BMTRGR_TBRST) /*!< Timer B reset event is starting the burst mode operation */
  1358. #define LL_HRTIM_BM_TRIG_TIMB_REPETITION (HRTIM_BMTRGR_TBREP) /*!< Timer B repetition event is starting the burst mode operation */
  1359. #define LL_HRTIM_BM_TRIG_TIMB_CMP1 (HRTIM_BMTRGR_TBCMP1) /*!< Timer B compare 1 event is starting the burst mode operation */
  1360. #define LL_HRTIM_BM_TRIG_TIMB_CMP2 (HRTIM_BMTRGR_TBCMP2) /*!< Timer B compare 2 event is starting the burst mode operation */
  1361. #define LL_HRTIM_BM_TRIG_TIMC_RESET (HRTIM_BMTRGR_TCRST) /*!< Timer C resetevent is starting the burst mode operation */
  1362. #define LL_HRTIM_BM_TRIG_TIMC_REPETITION (HRTIM_BMTRGR_TCREP) /*!< Timer C repetition event is starting the burst mode operation */
  1363. #define LL_HRTIM_BM_TRIG_TIMC_CMP1 (HRTIM_BMTRGR_TCCMP1) /*!< Timer C compare 1 event is starting the burst mode operation */
  1364. #define LL_HRTIM_BM_TRIG_TIMC_CMP2 (HRTIM_BMTRGR_TCCMP2) /*!< Timer C compare 2 event is starting the burst mode operation */
  1365. #define LL_HRTIM_BM_TRIG_TIMD_RESET (HRTIM_BMTRGR_TDRST) /*!< Timer D reset event is starting the burst mode operation */
  1366. #define LL_HRTIM_BM_TRIG_TIMD_REPETITION (HRTIM_BMTRGR_TDREP) /*!< Timer D repetition event is starting the burst mode operation */
  1367. #define LL_HRTIM_BM_TRIG_TIMD_CMP1 (HRTIM_BMTRGR_TDCMP1) /*!< Timer D compare 1 event is starting the burst mode operation */
  1368. #define LL_HRTIM_BM_TRIG_TIMD_CMP2 (HRTIM_BMTRGR_TDCMP2) /*!< Timer D compare 2 event is starting the burst mode operation */
  1369. #define LL_HRTIM_BM_TRIG_TIME_RESET (HRTIM_BMTRGR_TERST) /*!< Timer E reset event is starting the burst mode operation */
  1370. #define LL_HRTIM_BM_TRIG_TIME_REPETITION (HRTIM_BMTRGR_TEREP) /*!< Timer E repetition event is starting the burst mode operation */
  1371. #define LL_HRTIM_BM_TRIG_TIME_CMP1 (HRTIM_BMTRGR_TECMP1) /*!< Timer E compare 1 event is starting the burst mode operation */
  1372. #define LL_HRTIM_BM_TRIG_TIME_CMP2 (HRTIM_BMTRGR_TECMP2) /*!< Timer E compare 2 event is starting the burst mode operation */
  1373. #define LL_HRTIM_BM_TRIG_TIMA_EVENT7 (HRTIM_BMTRGR_TAEEV7) /*!< Timer A period following an external event 7 (conditioned by TIMA filters) is starting the burst mode operation */
  1374. #define LL_HRTIM_BM_TRIG_TIMD_EVENT8 (HRTIM_BMTRGR_TDEEV8) /*!< Timer D period following an external event 8 (conditioned by TIMD filters) is starting the burst mode operation */
  1375. #define LL_HRTIM_BM_TRIG_EVENT_7 (HRTIM_BMTRGR_EEV7) /*!< External event 7 conditioned by TIMA filters is starting the burst mode operation */
  1376. #define LL_HRTIM_BM_TRIG_EVENT_8 (HRTIM_BMTRGR_EEV8) /*!< External event 8 conditioned by TIMD filters is starting the burst mode operation */
  1377. #define LL_HRTIM_BM_TRIG_EVENT_ONCHIP (HRTIM_BMTRGR_OCHPEV) /*!< A rising edge on an on-chip Event (for instance from GP timer or comparator) triggers the burst mode operation */
  1378. /**
  1379. * @}
  1380. */
  1381. /** @defgroup HRTIM_LL_EC_BM_STATUS HRTIM BURST MODE STATUS
  1382. * @{
  1383. * @brief Constants defining the operating state of the burst mode controller.
  1384. */
  1385. #define LL_HRTIM_BM_STATUS_NORMAL 0x00000000U /*!< Normal operation */
  1386. #define LL_HRTIM_BM_STATUS_BURST_ONGOING HRTIM_BMCR_BMSTAT /*!< Burst operation on-going */
  1387. /**
  1388. * @}
  1389. */
  1390. /**
  1391. * @}
  1392. */
  1393. /* Exported macro ------------------------------------------------------------*/
  1394. /** @defgroup HRTIM_LL_Exported_Macros HRTIM Exported Macros
  1395. * @{
  1396. */
  1397. /** @defgroup HRTIM_LL_EM_WRITE_READ Common Write and read registers Macros
  1398. * @{
  1399. */
  1400. /**
  1401. * @brief Write a value in HRTIM register
  1402. * @param __INSTANCE__ HRTIM Instance
  1403. * @param __REG__ Register to be written
  1404. * @param __VALUE__ Value to be written in the register
  1405. * @retval None
  1406. */
  1407. #define LL_HRTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
  1408. /**
  1409. * @brief Read a value in HRTIM register
  1410. * @param __INSTANCE__ HRTIM Instance
  1411. * @param __REG__ Register to be read
  1412. * @retval Register value
  1413. */
  1414. #define LL_HRTIM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
  1415. /**
  1416. * @}
  1417. */
  1418. /** @defgroup HRTIM_LL_EM_Exported_Macros Exported_Macros
  1419. * @{
  1420. */
  1421. /**
  1422. * @brief HELPER macro returning the output state from output enable/disable status
  1423. * @param __OUTPUT_STATUS_EN__ output enable status
  1424. * @param __OUTPUT_STATUS_DIS__ output Disable status
  1425. * @retval Returned value can be one of the following values:
  1426. * @arg @ref LL_HRTIM_OUTPUTSTATE_IDLE
  1427. * @arg @ref LL_HRTIM_OUTPUTSTATE_RUN
  1428. * @arg @ref LL_HRTIM_OUTPUTSTATE_FAULT
  1429. */
  1430. #define __LL_HRTIM_GET_OUTPUT_STATE(__OUTPUT_STATUS_EN__, __OUTPUT_STATUS_DIS__)\
  1431. (((__OUTPUT_STATUS_EN__) == 1) ? LL_HRTIM_OUTPUTSTATE_RUN :\
  1432. ((__OUTPUT_STATUS_DIS__) == 0) ? LL_HRTIM_OUTPUTSTATE_IDLE : LL_HRTIM_OUTPUTSTATE_FAULT)
  1433. /**
  1434. * @}
  1435. */
  1436. /**
  1437. * @}
  1438. */
  1439. /* Exported functions --------------------------------------------------------*/
  1440. /** @defgroup HRTIM_LL_Exported_Functions HRTIM Exported Functions
  1441. * @{
  1442. */
  1443. /** @defgroup HRTIM_LL_EF_HRTIM_Control HRTIM_Control
  1444. * @{
  1445. */
  1446. /**
  1447. * @brief Select the HRTIM synchronization input source.
  1448. * @note This function must not be called when the concerned timer(s) is (are) enabled .
  1449. * @rmtoll MCR SYNCIN LL_HRTIM_SetSyncInSrc
  1450. * @param HRTIMx High Resolution Timer instance
  1451. * @param SyncInSrc This parameter can be one of the following values:
  1452. * @arg @ref LL_HRTIM_SYNCIN_SRC_NONE
  1453. * @arg @ref LL_HRTIM_SYNCIN_SRC_TIM_EVENT
  1454. * @arg @ref LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT
  1455. * @retval None
  1456. */
  1457. __STATIC_INLINE void LL_HRTIM_SetSyncInSrc(HRTIM_TypeDef *HRTIMx, uint32_t SyncInSrc)
  1458. {
  1459. MODIFY_REG(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_IN, SyncInSrc);
  1460. }
  1461. /**
  1462. * @brief Get actual HRTIM synchronization input source.
  1463. * @rmtoll MCR SYNCIN LL_HRTIM_SetSyncInSrc
  1464. * @param HRTIMx High Resolution Timer instance
  1465. * @retval SyncInSrc Returned value can be one of the following values:
  1466. * @arg @ref LL_HRTIM_SYNCIN_SRC_NONE
  1467. * @arg @ref LL_HRTIM_SYNCIN_SRC_TIM_EVENT
  1468. * @arg @ref LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT
  1469. */
  1470. __STATIC_INLINE uint32_t LL_HRTIM_GetSyncInSrc(HRTIM_TypeDef *HRTIMx)
  1471. {
  1472. return (READ_BIT(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_IN));
  1473. }
  1474. /**
  1475. * @brief Configure the HRTIM synchronization output.
  1476. * @rmtoll MCR SYNCSRC LL_HRTIM_ConfigSyncOut\n
  1477. * MCR SYNCOUT LL_HRTIM_ConfigSyncOut
  1478. * @param HRTIMx High Resolution Timer instance
  1479. * @param Config This parameter can be one of the following values:
  1480. * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
  1481. * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
  1482. * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
  1483. * @param Src This parameter can be one of the following values:
  1484. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
  1485. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
  1486. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
  1487. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
  1488. * @retval None
  1489. */
  1490. __STATIC_INLINE void LL_HRTIM_ConfigSyncOut(HRTIM_TypeDef *HRTIMx, uint32_t Config, uint32_t Src)
  1491. {
  1492. MODIFY_REG(HRTIMx->sMasterRegs.MCR, (HRTIM_MCR_SYNC_OUT | HRTIM_MCR_SYNC_SRC), (Config | Src));
  1493. }
  1494. /**
  1495. * @brief Set the routing and conditioning of the synchronization output event.
  1496. * @rmtoll MCR SYNCOUT LL_HRTIM_SetSyncOutConfig
  1497. * @note This function can be called only when the master timer is enabled.
  1498. * @param HRTIMx High Resolution Timer instance
  1499. * @param SyncOutConfig This parameter can be one of the following values:
  1500. * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
  1501. * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
  1502. * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
  1503. * @retval None
  1504. */
  1505. __STATIC_INLINE void LL_HRTIM_SetSyncOutConfig(HRTIM_TypeDef *HRTIMx, uint32_t SyncOutConfig)
  1506. {
  1507. MODIFY_REG(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_OUT, SyncOutConfig);
  1508. }
  1509. /**
  1510. * @brief Get actual routing and conditioning of the synchronization output event.
  1511. * @rmtoll MCR SYNCOUT LL_HRTIM_GetSyncOutConfig
  1512. * @param HRTIMx High Resolution Timer instance
  1513. * @retval SyncOutConfig Returned value can be one of the following values:
  1514. * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
  1515. * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
  1516. * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
  1517. */
  1518. __STATIC_INLINE uint32_t LL_HRTIM_GetSyncOutConfig(HRTIM_TypeDef *HRTIMx)
  1519. {
  1520. return (READ_BIT(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_OUT));
  1521. }
  1522. /**
  1523. * @brief Set the source and event to be sent on the HRTIM synchronization output.
  1524. * @rmtoll MCR SYNCSRC LL_HRTIM_SetSyncOutSrc
  1525. * @param HRTIMx High Resolution Timer instance
  1526. * @param SyncOutSrc This parameter can be one of the following values:
  1527. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
  1528. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
  1529. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
  1530. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
  1531. * @retval None
  1532. */
  1533. __STATIC_INLINE void LL_HRTIM_SetSyncOutSrc(HRTIM_TypeDef *HRTIMx, uint32_t SyncOutSrc)
  1534. {
  1535. MODIFY_REG(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_SRC, SyncOutSrc);
  1536. }
  1537. /**
  1538. * @brief Get actual source and event sent on the HRTIM synchronization output.
  1539. * @rmtoll MCR SYNCSRC LL_HRTIM_GetSyncOutSrc
  1540. * @param HRTIMx High Resolution Timer instance
  1541. * @retval SyncOutSrc Returned value can be one of the following values:
  1542. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
  1543. * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
  1544. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
  1545. * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
  1546. */
  1547. __STATIC_INLINE uint32_t LL_HRTIM_GetSyncOutSrc(HRTIM_TypeDef *HRTIMx)
  1548. {
  1549. return (READ_BIT(HRTIMx->sMasterRegs.MCR, HRTIM_MCR_SYNC_SRC));
  1550. }
  1551. /**
  1552. * @brief Disable (temporarily) update event generation.
  1553. * @rmtoll CR1 MUDIS LL_HRTIM_SuspendUpdate\n
  1554. * CR1 TAUDIS LL_HRTIM_SuspendUpdate\n
  1555. * CR1 TBUDIS LL_HRTIM_SuspendUpdate\n
  1556. * CR1 TCUDIS LL_HRTIM_SuspendUpdate\n
  1557. * CR1 TDUDIS LL_HRTIM_SuspendUpdate\n
  1558. * CR1 TEUDIS LL_HRTIM_SuspendUpdate
  1559. * @note Allow to temporarily disable the transfer from preload to active
  1560. * registers, whatever the selected update event. This allows to modify
  1561. * several registers in multiple timers.
  1562. * @param HRTIMx High Resolution Timer instance
  1563. * @param Timers This parameter can be a combination of the following values:
  1564. * @arg @ref LL_HRTIM_TIMER_MASTER
  1565. * @arg @ref LL_HRTIM_TIMER_A
  1566. * @arg @ref LL_HRTIM_TIMER_B
  1567. * @arg @ref LL_HRTIM_TIMER_C
  1568. * @arg @ref LL_HRTIM_TIMER_D
  1569. * @arg @ref LL_HRTIM_TIMER_E
  1570. * @retval None
  1571. */
  1572. __STATIC_INLINE void LL_HRTIM_SuspendUpdate(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  1573. {
  1574. SET_BIT(HRTIMx->sCommonRegs.CR1, ((Timers >> HRTIM_MCR_MCEN_Pos) & HRTIM_CR1_UDIS_MASK));
  1575. }
  1576. /**
  1577. * @brief Enable update event generation.
  1578. * @rmtoll CR1 MUDIS LL_HRTIM_ResumeUpdate\n
  1579. * CR1 TAUDIS LL_HRTIM_ResumeUpdate\n
  1580. * CR1 TBUDIS LL_HRTIM_ResumeUpdate\n
  1581. * CR1 TCUDIS LL_HRTIM_ResumeUpdate\n
  1582. * CR1 TDUDIS LL_HRTIM_ResumeUpdate\n
  1583. * CR1 TEUDIS LL_HRTIM_ResumeUpdate
  1584. * @note The regular update event takes place.
  1585. * @param HRTIMx High Resolution Timer instance
  1586. * @param Timers This parameter can be a combination of the following values:
  1587. * @arg @ref LL_HRTIM_TIMER_MASTER
  1588. * @arg @ref LL_HRTIM_TIMER_A
  1589. * @arg @ref LL_HRTIM_TIMER_B
  1590. * @arg @ref LL_HRTIM_TIMER_C
  1591. * @arg @ref LL_HRTIM_TIMER_D
  1592. * @arg @ref LL_HRTIM_TIMER_E
  1593. * @retval None
  1594. */
  1595. __STATIC_INLINE void LL_HRTIM_ResumeUpdate(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  1596. {
  1597. CLEAR_BIT(HRTIMx->sCommonRegs.CR1, ((Timers >> HRTIM_MCR_MCEN_Pos) & HRTIM_CR1_UDIS_MASK));
  1598. }
  1599. /**
  1600. * @brief Force an immediate transfer from the preload to the active register .
  1601. * @rmtoll CR2 MSWU LL_HRTIM_ForceUpdate\n
  1602. * CR2 TASWU LL_HRTIM_ForceUpdate\n
  1603. * CR2 TBSWU LL_HRTIM_ForceUpdate\n
  1604. * CR2 TCSWU LL_HRTIM_ForceUpdate\n
  1605. * CR2 TDSWU LL_HRTIM_ForceUpdate\n
  1606. * CR2 TESWU LL_HRTIM_ForceUpdate
  1607. * @note Any pending update request is cancelled.
  1608. * @param HRTIMx High Resolution Timer instance
  1609. * @param Timers This parameter can be a combination of the following values:
  1610. * @arg @ref LL_HRTIM_TIMER_MASTER
  1611. * @arg @ref LL_HRTIM_TIMER_A
  1612. * @arg @ref LL_HRTIM_TIMER_B
  1613. * @arg @ref LL_HRTIM_TIMER_C
  1614. * @arg @ref LL_HRTIM_TIMER_D
  1615. * @arg @ref LL_HRTIM_TIMER_E
  1616. * @retval None
  1617. */
  1618. __STATIC_INLINE void LL_HRTIM_ForceUpdate(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  1619. {
  1620. SET_BIT(HRTIMx->sCommonRegs.CR2, ((Timers >> HRTIM_MCR_MCEN_Pos) & HRTIM_CR2_SWUPD_MASK));
  1621. }
  1622. /**
  1623. * @brief Reset the HRTIM timer(s) counter.
  1624. * @rmtoll CR2 MRST LL_HRTIM_CounterReset\n
  1625. * CR2 TARST LL_HRTIM_CounterReset\n
  1626. * CR2 TBRST LL_HRTIM_CounterReset\n
  1627. * CR2 TCRST LL_HRTIM_CounterReset\n
  1628. * CR2 TDRST LL_HRTIM_CounterReset\n
  1629. * CR2 TERST LL_HRTIM_CounterReset
  1630. * @param HRTIMx High Resolution Timer instance
  1631. * @param Timers This parameter can be a combination of the following values:
  1632. * @arg @ref LL_HRTIM_TIMER_MASTER
  1633. * @arg @ref LL_HRTIM_TIMER_A
  1634. * @arg @ref LL_HRTIM_TIMER_B
  1635. * @arg @ref LL_HRTIM_TIMER_C
  1636. * @arg @ref LL_HRTIM_TIMER_D
  1637. * @arg @ref LL_HRTIM_TIMER_E
  1638. * @retval None
  1639. */
  1640. __STATIC_INLINE void LL_HRTIM_CounterReset(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  1641. {
  1642. SET_BIT(HRTIMx->sCommonRegs.CR2, (((Timers >> HRTIM_MCR_MCEN_Pos) << HRTIM_CR2_MRST_Pos) & HRTIM_CR2_SWRST_MASK));
  1643. }
  1644. /**
  1645. * @brief Enable the HRTIM timer(s) output(s) .
  1646. * @rmtoll OENR TA1OEN LL_HRTIM_EnableOutput\n
  1647. * OENR TA2OEN LL_HRTIM_EnableOutput\n
  1648. * OENR TB1OEN LL_HRTIM_EnableOutput\n
  1649. * OENR TB2OEN LL_HRTIM_EnableOutput\n
  1650. * OENR TC1OEN LL_HRTIM_EnableOutput\n
  1651. * OENR TC2OEN LL_HRTIM_EnableOutput\n
  1652. * OENR TD1OEN LL_HRTIM_EnableOutput\n
  1653. * OENR TD2OEN LL_HRTIM_EnableOutput\n
  1654. * OENR TE1OEN LL_HRTIM_EnableOutput\n
  1655. * OENR TE2OEN LL_HRTIM_EnableOutput
  1656. * @param HRTIMx High Resolution Timer instance
  1657. * @param Outputs This parameter can be a combination of the following values:
  1658. * @arg @ref LL_HRTIM_OUTPUT_TA1
  1659. * @arg @ref LL_HRTIM_OUTPUT_TA2
  1660. * @arg @ref LL_HRTIM_OUTPUT_TB1
  1661. * @arg @ref LL_HRTIM_OUTPUT_TB2
  1662. * @arg @ref LL_HRTIM_OUTPUT_TC1
  1663. * @arg @ref LL_HRTIM_OUTPUT_TC2
  1664. * @arg @ref LL_HRTIM_OUTPUT_TD1
  1665. * @arg @ref LL_HRTIM_OUTPUT_TD2
  1666. * @arg @ref LL_HRTIM_OUTPUT_TE1
  1667. * @arg @ref LL_HRTIM_OUTPUT_TE2
  1668. * @retval None
  1669. */
  1670. __STATIC_INLINE void LL_HRTIM_EnableOutput(HRTIM_TypeDef *HRTIMx, uint32_t Outputs)
  1671. {
  1672. SET_BIT(HRTIMx->sCommonRegs.OENR, (Outputs & HRTIM_OENR_OEN_MASK));
  1673. }
  1674. /**
  1675. * @brief Disable the HRTIM timer(s) output(s) .
  1676. * @rmtoll OENR TA1OEN LL_HRTIM_DisableOutput\n
  1677. * OENR TA2OEN LL_HRTIM_DisableOutput\n
  1678. * OENR TB1OEN LL_HRTIM_DisableOutput\n
  1679. * OENR TB2OEN LL_HRTIM_DisableOutput\n
  1680. * OENR TC1OEN LL_HRTIM_DisableOutput\n
  1681. * OENR TC2OEN LL_HRTIM_DisableOutput\n
  1682. * OENR TD1OEN LL_HRTIM_DisableOutput\n
  1683. * OENR TD2OEN LL_HRTIM_DisableOutput\n
  1684. * OENR TE1OEN LL_HRTIM_DisableOutput\n
  1685. * OENR TE2OEN LL_HRTIM_DisableOutput
  1686. * @param HRTIMx High Resolution Timer instance
  1687. * @param Outputs This parameter can be a combination of the following values:
  1688. * @arg @ref LL_HRTIM_OUTPUT_TA1
  1689. * @arg @ref LL_HRTIM_OUTPUT_TA2
  1690. * @arg @ref LL_HRTIM_OUTPUT_TB1
  1691. * @arg @ref LL_HRTIM_OUTPUT_TB2
  1692. * @arg @ref LL_HRTIM_OUTPUT_TC1
  1693. * @arg @ref LL_HRTIM_OUTPUT_TC2
  1694. * @arg @ref LL_HRTIM_OUTPUT_TD1
  1695. * @arg @ref LL_HRTIM_OUTPUT_TD2
  1696. * @arg @ref LL_HRTIM_OUTPUT_TE1
  1697. * @arg @ref LL_HRTIM_OUTPUT_TE2
  1698. * @retval None
  1699. */
  1700. __STATIC_INLINE void LL_HRTIM_DisableOutput(HRTIM_TypeDef *HRTIMx, uint32_t Outputs)
  1701. {
  1702. SET_BIT(HRTIMx->sCommonRegs.ODISR, (Outputs & HRTIM_OENR_ODIS_MASK));
  1703. }
  1704. /**
  1705. * @brief Indicates whether the HRTIM timer output is enabled.
  1706. * @rmtoll OENR TA1OEN LL_HRTIM_IsEnabledOutput\n
  1707. * OENR TA2OEN LL_HRTIM_IsEnabledOutput\n
  1708. * OENR TB1OEN LL_HRTIM_IsEnabledOutput\n
  1709. * OENR TB2OEN LL_HRTIM_IsEnabledOutput\n
  1710. * OENR TC1OEN LL_HRTIM_IsEnabledOutput\n
  1711. * OENR TC2OEN LL_HRTIM_IsEnabledOutput\n
  1712. * OENR TD1OEN LL_HRTIM_IsEnabledOutput\n
  1713. * OENR TD2OEN LL_HRTIM_IsEnabledOutput\n
  1714. * OENR TE1OEN LL_HRTIM_IsEnabledOutput\n
  1715. * OENR TE2OEN LL_HRTIM_IsEnabledOutput
  1716. * @param HRTIMx High Resolution Timer instance
  1717. * @param Output This parameter can be one of the following values:
  1718. * @arg @ref LL_HRTIM_OUTPUT_TA1
  1719. * @arg @ref LL_HRTIM_OUTPUT_TA2
  1720. * @arg @ref LL_HRTIM_OUTPUT_TB1
  1721. * @arg @ref LL_HRTIM_OUTPUT_TB2
  1722. * @arg @ref LL_HRTIM_OUTPUT_TC1
  1723. * @arg @ref LL_HRTIM_OUTPUT_TC2
  1724. * @arg @ref LL_HRTIM_OUTPUT_TD1
  1725. * @arg @ref LL_HRTIM_OUTPUT_TD2
  1726. * @arg @ref LL_HRTIM_OUTPUT_TE1
  1727. * @arg @ref LL_HRTIM_OUTPUT_TE2
  1728. * @retval State of TxyOEN bit in HRTIM_OENR register (1 or 0).
  1729. */
  1730. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledOutput(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  1731. {
  1732. return ((READ_BIT(HRTIMx->sCommonRegs.OENR, Output) == Output) ? 1UL : 0UL);
  1733. }
  1734. /**
  1735. * @brief Indicates whether the HRTIM timer output is disabled.
  1736. * @rmtoll ODISR TA1ODIS LL_HRTIM_IsDisabledOutput\n
  1737. * ODISR TA2ODIS LL_HRTIM_IsDisabledOutput\n
  1738. * ODISR TB1ODIS LL_HRTIM_IsDisabledOutput\n
  1739. * ODISR TB2ODIS LL_HRTIM_IsDisabledOutput\n
  1740. * ODISR TC1ODIS LL_HRTIM_IsDisabledOutput\n
  1741. * ODISR TC2ODIS LL_HRTIM_IsDisabledOutput\n
  1742. * ODISR TD1ODIS LL_HRTIM_IsDisabledOutput\n
  1743. * ODISR TD2ODIS LL_HRTIM_IsDisabledOutput\n
  1744. * ODISR TE1ODIS LL_HRTIM_IsDisabledOutput\n
  1745. * ODISR TE2ODIS LL_HRTIM_IsDisabledOutput
  1746. * @param HRTIMx High Resolution Timer instance
  1747. * @param Output This parameter can be one of the following values:
  1748. * @arg @ref LL_HRTIM_OUTPUT_TA1
  1749. * @arg @ref LL_HRTIM_OUTPUT_TA2
  1750. * @arg @ref LL_HRTIM_OUTPUT_TB1
  1751. * @arg @ref LL_HRTIM_OUTPUT_TB2
  1752. * @arg @ref LL_HRTIM_OUTPUT_TC1
  1753. * @arg @ref LL_HRTIM_OUTPUT_TC2
  1754. * @arg @ref LL_HRTIM_OUTPUT_TD1
  1755. * @arg @ref LL_HRTIM_OUTPUT_TD2
  1756. * @arg @ref LL_HRTIM_OUTPUT_TE1
  1757. * @arg @ref LL_HRTIM_OUTPUT_TE2
  1758. * @retval State of TxyODS bit in HRTIM_OENR register (1 or 0).
  1759. */
  1760. __STATIC_INLINE uint32_t LL_HRTIM_IsDisabledOutput(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  1761. {
  1762. return ((READ_BIT(HRTIMx->sCommonRegs.OENR, Output) == 0U) ? 1UL : 0UL);
  1763. }
  1764. /**
  1765. * @brief Configure an ADC trigger.
  1766. * @rmtoll CR1 ADC1USRC LL_HRTIM_ConfigADCTrig\n
  1767. * CR1 ADC2USRC LL_HRTIM_ConfigADCTrig\n
  1768. * CR1 ADC3USRC LL_HRTIM_ConfigADCTrig\n
  1769. * CR1 ADC4USRC LL_HRTIM_ConfigADCTrig\n
  1770. * ADC1R ADC1MC1 LL_HRTIM_ConfigADCTrig\n
  1771. * ADC1R ADC1MC2 LL_HRTIM_ConfigADCTrig\n
  1772. * ADC1R ADC1MC3 LL_HRTIM_ConfigADCTrig\n
  1773. * ADC1R ADC1MC4 LL_HRTIM_ConfigADCTrig\n
  1774. * ADC1R ADC1MPER LL_HRTIM_ConfigADCTrig\n
  1775. * ADC1R ADC1EEV1 LL_HRTIM_ConfigADCTrig\n
  1776. * ADC1R ADC1EEV2 LL_HRTIM_ConfigADCTrig\n
  1777. * ADC1R ADC1EEV3 LL_HRTIM_ConfigADCTrig\n
  1778. * ADC1R ADC1EEV4 LL_HRTIM_ConfigADCTrig\n
  1779. * ADC1R ADC1EEV5 LL_HRTIM_ConfigADCTrig\n
  1780. * ADC1R ADC1TAC2 LL_HRTIM_ConfigADCTrig\n
  1781. * ADC1R ADC1TAC3 LL_HRTIM_ConfigADCTrig\n
  1782. * ADC1R ADC1TAC4 LL_HRTIM_ConfigADCTrig\n
  1783. * ADC1R ADC1TAPER LL_HRTIM_ConfigADCTrig\n
  1784. * ADC1R ADC1TARST LL_HRTIM_ConfigADCTrig\n
  1785. * ADC1R ADC1TBC2 LL_HRTIM_ConfigADCTrig\n
  1786. * ADC1R ADC1TBC3 LL_HRTIM_ConfigADCTrig\n
  1787. * ADC1R ADC1TBC4 LL_HRTIM_ConfigADCTrig\n
  1788. * ADC1R ADC1TBPER LL_HRTIM_ConfigADCTrig\n
  1789. * ADC1R ADC1TBRST LL_HRTIM_ConfigADCTrig\n
  1790. * ADC1R ADC1TCC2 LL_HRTIM_ConfigADCTrig\n
  1791. * ADC1R ADC1TCC3 LL_HRTIM_ConfigADCTrig\n
  1792. * ADC1R ADC1TCC4 LL_HRTIM_ConfigADCTrig\n
  1793. * ADC1R ADC1TCPER LL_HRTIM_ConfigADCTrig\n
  1794. * ADC1R ADC1TDC2 LL_HRTIM_ConfigADCTrig\n
  1795. * ADC1R ADC1TDC3 LL_HRTIM_ConfigADCTrig\n
  1796. * ADC1R ADC1TDC4 LL_HRTIM_ConfigADCTrig\n
  1797. * ADC1R ADC1TDPER LL_HRTIM_ConfigADCTrig\n
  1798. * ADC1R ADC1TEC2 LL_HRTIM_ConfigADCTrig\n
  1799. * ADC1R ADC1TEC3 LL_HRTIM_ConfigADCTrig\n
  1800. * ADC1R ADC1TEC4 LL_HRTIM_ConfigADCTrig\n
  1801. * ADC1R ADC1TEPER LL_HRTIM_ConfigADCTrig\n
  1802. * ADC2R ADC2MC1 LL_HRTIM_ConfigADCTrig\n
  1803. * ADC2R ADC2MC2 LL_HRTIM_ConfigADCTrig\n
  1804. * ADC2R ADC2MC3 LL_HRTIM_ConfigADCTrig\n
  1805. * ADC2R ADC2MC4 LL_HRTIM_ConfigADCTrig\n
  1806. * ADC2R ADC2MPER LL_HRTIM_ConfigADCTrig\n
  1807. * ADC2R ADC2EEV6 LL_HRTIM_ConfigADCTrig\n
  1808. * ADC2R ADC2EEV7 LL_HRTIM_ConfigADCTrig\n
  1809. * ADC2R ADC2EEV8 LL_HRTIM_ConfigADCTrig\n
  1810. * ADC2R ADC2EEV9 LL_HRTIM_ConfigADCTrig\n
  1811. * ADC2R ADC2EEV10 LL_HRTIM_ConfigADCTrig\n
  1812. * ADC2R ADC2TAC2 LL_HRTIM_ConfigADCTrig\n
  1813. * ADC2R ADC2TAC3 LL_HRTIM_ConfigADCTrig\n
  1814. * ADC2R ADC2TAC4 LL_HRTIM_ConfigADCTrig\n
  1815. * ADC2R ADC2TAPER LL_HRTIM_ConfigADCTrig\n
  1816. * ADC2R ADC2TBC2 LL_HRTIM_ConfigADCTrig\n
  1817. * ADC2R ADC2TBC3 LL_HRTIM_ConfigADCTrig\n
  1818. * ADC2R ADC2TBC4 LL_HRTIM_ConfigADCTrig\n
  1819. * ADC2R ADC2TBPER LL_HRTIM_ConfigADCTrig\n
  1820. * ADC2R ADC2TCC2 LL_HRTIM_ConfigADCTrig\n
  1821. * ADC2R ADC2TCC3 LL_HRTIM_ConfigADCTrig\n
  1822. * ADC2R ADC2TCC4 LL_HRTIM_ConfigADCTrig\n
  1823. * ADC2R ADC2TCPER LL_HRTIM_ConfigADCTrig\n
  1824. * ADC2R ADC2TCRST LL_HRTIM_ConfigADCTrig\n
  1825. * ADC2R ADC2TDC2 LL_HRTIM_ConfigADCTrig\n
  1826. * ADC2R ADC2TDC3 LL_HRTIM_ConfigADCTrig\n
  1827. * ADC2R ADC2TDC4 LL_HRTIM_ConfigADCTrig\n
  1828. * ADC2R ADC2TDPER LL_HRTIM_ConfigADCTrig\n
  1829. * ADC2R ADC2TDRST LL_HRTIM_ConfigADCTrig\n
  1830. * ADC2R ADC2TEC2 LL_HRTIM_ConfigADCTrig\n
  1831. * ADC2R ADC2TEC3 LL_HRTIM_ConfigADCTrig\n
  1832. * ADC2R ADC2TEC4 LL_HRTIM_ConfigADCTrig\n
  1833. * ADC2R ADC2TERST LL_HRTIM_ConfigADCTrig\n
  1834. * ADC3R ADC3MC1 LL_HRTIM_ConfigADCTrig\n
  1835. * ADC3R ADC3MC2 LL_HRTIM_ConfigADCTrig\n
  1836. * ADC3R ADC3MC3 LL_HRTIM_ConfigADCTrig\n
  1837. * ADC3R ADC3MC4 LL_HRTIM_ConfigADCTrig\n
  1838. * ADC3R ADC3MPER LL_HRTIM_ConfigADCTrig\n
  1839. * ADC3R ADC3EEV1 LL_HRTIM_ConfigADCTrig\n
  1840. * ADC3R ADC3EEV2 LL_HRTIM_ConfigADCTrig\n
  1841. * ADC3R ADC3EEV3 LL_HRTIM_ConfigADCTrig\n
  1842. * ADC3R ADC3EEV4 LL_HRTIM_ConfigADCTrig\n
  1843. * ADC3R ADC3EEV5 LL_HRTIM_ConfigADCTrig\n
  1844. * ADC3R ADC3TAC2 LL_HRTIM_ConfigADCTrig\n
  1845. * ADC3R ADC3TAC3 LL_HRTIM_ConfigADCTrig\n
  1846. * ADC3R ADC3TAC4 LL_HRTIM_ConfigADCTrig\n
  1847. * ADC3R ADC3TAPER LL_HRTIM_ConfigADCTrig\n
  1848. * ADC3R ADC3TARST LL_HRTIM_ConfigADCTrig\n
  1849. * ADC3R ADC3TBC2 LL_HRTIM_ConfigADCTrig\n
  1850. * ADC3R ADC3TBC3 LL_HRTIM_ConfigADCTrig\n
  1851. * ADC3R ADC3TBC4 LL_HRTIM_ConfigADCTrig\n
  1852. * ADC3R ADC3TBPER LL_HRTIM_ConfigADCTrig\n
  1853. * ADC3R ADC3TBRST LL_HRTIM_ConfigADCTrig\n
  1854. * ADC3R ADC3TCC2 LL_HRTIM_ConfigADCTrig\n
  1855. * ADC3R ADC3TCC3 LL_HRTIM_ConfigADCTrig\n
  1856. * ADC3R ADC3TCC4 LL_HRTIM_ConfigADCTrig\n
  1857. * ADC3R ADC3TCPER LL_HRTIM_ConfigADCTrig\n
  1858. * ADC3R ADC3TDC2 LL_HRTIM_ConfigADCTrig\n
  1859. * ADC3R ADC3TDC3 LL_HRTIM_ConfigADCTrig\n
  1860. * ADC3R ADC3TDC4 LL_HRTIM_ConfigADCTrig\n
  1861. * ADC3R ADC3TDPER LL_HRTIM_ConfigADCTrig\n
  1862. * ADC3R ADC3TEC2 LL_HRTIM_ConfigADCTrig\n
  1863. * ADC3R ADC3TEC3 LL_HRTIM_ConfigADCTrig\n
  1864. * ADC3R ADC3TEC4 LL_HRTIM_ConfigADCTrig\n
  1865. * ADC3R ADC3TEPER LL_HRTIM_ConfigADCTrig\n
  1866. * ADC4R ADC4MC1 LL_HRTIM_ConfigADCTrig\n
  1867. * ADC4R ADC4MC2 LL_HRTIM_ConfigADCTrig\n
  1868. * ADC4R ADC4MC3 LL_HRTIM_ConfigADCTrig\n
  1869. * ADC4R ADC4MC4 LL_HRTIM_ConfigADCTrig\n
  1870. * ADC4R ADC4MPER LL_HRTIM_ConfigADCTrig\n
  1871. * ADC4R ADC4EEV6 LL_HRTIM_ConfigADCTrig\n
  1872. * ADC4R ADC4EEV7 LL_HRTIM_ConfigADCTrig\n
  1873. * ADC4R ADC4EEV8 LL_HRTIM_ConfigADCTrig\n
  1874. * ADC4R ADC4EEV9 LL_HRTIM_ConfigADCTrig\n
  1875. * ADC4R ADC4EEV10 LL_HRTIM_ConfigADCTrig\n
  1876. * ADC4R ADC4TAC2 LL_HRTIM_ConfigADCTrig\n
  1877. * ADC4R ADC4TAC3 LL_HRTIM_ConfigADCTrig\n
  1878. * ADC4R ADC4TAC4 LL_HRTIM_ConfigADCTrig\n
  1879. * ADC4R ADC4TAPER LL_HRTIM_ConfigADCTrig\n
  1880. * ADC4R ADC4TBC2 LL_HRTIM_ConfigADCTrig\n
  1881. * ADC4R ADC4TBC3 LL_HRTIM_ConfigADCTrig\n
  1882. * ADC4R ADC4TBC4 LL_HRTIM_ConfigADCTrig\n
  1883. * ADC4R ADC4TBPER LL_HRTIM_ConfigADCTrig\n
  1884. * ADC4R ADC4TCC2 LL_HRTIM_ConfigADCTrig\n
  1885. * ADC4R ADC4TCC3 LL_HRTIM_ConfigADCTrig\n
  1886. * ADC4R ADC4TCC4 LL_HRTIM_ConfigADCTrig\n
  1887. * ADC4R ADC4TCPER LL_HRTIM_ConfigADCTrig\n
  1888. * ADC4R ADC4TCRST LL_HRTIM_ConfigADCTrig\n
  1889. * ADC4R ADC4TDC2 LL_HRTIM_ConfigADCTrig\n
  1890. * ADC4R ADC4TDC3 LL_HRTIM_ConfigADCTrig\n
  1891. * ADC4R ADC4TDC4 LL_HRTIM_ConfigADCTrig\n
  1892. * ADC4R ADC4TDPER LL_HRTIM_ConfigADCTrig\n
  1893. * ADC4R ADC4TDRST LL_HRTIM_ConfigADCTrig\n
  1894. * ADC4R ADC4TEC2 LL_HRTIM_ConfigADCTrig\n
  1895. * ADC4R ADC4TEC3 LL_HRTIM_ConfigADCTrig\n
  1896. * ADC4R ADC4TEC4 LL_HRTIM_ConfigADCTrig\n
  1897. * ADC4R ADC4TERST LL_HRTIM_ConfigADCTrig
  1898. * @param HRTIMx High Resolution Timer instance
  1899. * @param ADCTrig This parameter can be one of the following values:
  1900. * @arg @ref LL_HRTIM_ADCTRIG_1
  1901. * @arg @ref LL_HRTIM_ADCTRIG_2
  1902. * @arg @ref LL_HRTIM_ADCTRIG_3
  1903. * @arg @ref LL_HRTIM_ADCTRIG_4
  1904. * @param Update This parameter can be one of the following values:
  1905. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
  1906. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
  1907. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
  1908. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
  1909. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
  1910. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
  1911. * @param Src This parameter can be a combination of the following values:
  1912. *
  1913. * For ADC trigger 1 and ADC trigger 3:
  1914. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
  1915. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
  1916. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
  1917. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
  1918. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
  1919. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
  1920. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
  1921. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
  1922. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
  1923. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
  1924. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
  1925. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
  1926. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
  1927. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
  1928. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
  1929. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
  1930. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
  1931. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
  1932. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
  1933. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
  1934. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
  1935. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
  1936. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
  1937. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
  1938. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
  1939. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
  1940. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
  1941. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
  1942. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
  1943. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
  1944. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
  1945. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
  1946. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
  1947. *
  1948. * For ADC trigger 2 and ADC trigger 4:
  1949. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
  1950. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
  1951. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
  1952. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
  1953. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
  1954. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
  1955. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
  1956. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
  1957. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
  1958. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
  1959. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
  1960. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
  1961. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
  1962. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
  1963. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
  1964. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
  1965. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
  1966. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
  1967. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
  1968. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
  1969. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
  1970. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
  1971. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
  1972. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
  1973. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
  1974. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
  1975. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
  1976. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
  1977. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
  1978. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
  1979. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
  1980. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
  1981. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
  1982. *
  1983. * @retval None
  1984. */
  1985. __STATIC_INLINE void LL_HRTIM_ConfigADCTrig(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Update, uint32_t Src)
  1986. {
  1987. register uint32_t shift = ((3U * ADCTrig)& 0x1FU);
  1988. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) +
  1989. REG_OFFSET_TAB_ADCxR[ADCTrig]));
  1990. MODIFY_REG(HRTIMx->sCommonRegs.CR1, (HRTIM_CR1_ADC1USRC << shift), (Update << shift));
  1991. WRITE_REG(*pReg, Src);
  1992. }
  1993. /**
  1994. * @brief Associate the ADCx trigger to a timer triggering the update of the HRTIM_ADCxR register.
  1995. * @rmtoll CR1 ADC1USRC LL_HRTIM_SetADCTrigUpdate\n
  1996. * CR1 ADC2USRC LL_HRTIM_SetADCTrigUpdate\n
  1997. * CR1 ADC3USRC LL_HRTIM_SetADCTrigUpdate\n
  1998. * CR1 ADC4USRC LL_HRTIM_SetADCTrigUpdate\n
  1999. * @note When the preload is disabled in the source timer, the HRTIM_ADCxR
  2000. * registers are not preloaded either: a write access will result in an
  2001. * immediate update of the trigger source.
  2002. * @param HRTIMx High Resolution Timer instance
  2003. * @param ADCTrig This parameter can be one of the following values:
  2004. * @arg @ref LL_HRTIM_ADCTRIG_1
  2005. * @arg @ref LL_HRTIM_ADCTRIG_2
  2006. * @arg @ref LL_HRTIM_ADCTRIG_3
  2007. * @arg @ref LL_HRTIM_ADCTRIG_4
  2008. * @param Update This parameter can be one of the following values:
  2009. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
  2010. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
  2011. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
  2012. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
  2013. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
  2014. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
  2015. * @retval None
  2016. */
  2017. __STATIC_INLINE void LL_HRTIM_SetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Update)
  2018. {
  2019. register uint32_t shift = ((3U * ADCTrig) & 0x1FU);
  2020. MODIFY_REG(HRTIMx->sCommonRegs.CR1, (HRTIM_CR1_ADC1USRC << shift), (Update << shift));
  2021. }
  2022. /**
  2023. * @brief Get the source timer triggering the update of the HRTIM_ADCxR register.
  2024. * @rmtoll CR1 ADC1USRC LL_HRTIM_GetADCTrigUpdate\n
  2025. * CR1 ADC2USRC LL_HRTIM_GetADCTrigUpdate\n
  2026. * CR1 ADC3USRC LL_HRTIM_GetADCTrigUpdate\n
  2027. * CR1 ADC4USRC LL_HRTIM_GetADCTrigUpdate\n
  2028. * @param HRTIMx High Resolution Timer instance
  2029. * @param ADCTrig This parameter can be one of the following values:
  2030. * @arg @ref LL_HRTIM_ADCTRIG_1
  2031. * @arg @ref LL_HRTIM_ADCTRIG_2
  2032. * @arg @ref LL_HRTIM_ADCTRIG_3
  2033. * @arg @ref LL_HRTIM_ADCTRIG_4
  2034. * @retval Update Returned value can be one of the following values:
  2035. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
  2036. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
  2037. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
  2038. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
  2039. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
  2040. * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
  2041. */
  2042. __STATIC_INLINE uint32_t LL_HRTIM_GetADCTrigUpdate(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig)
  2043. {
  2044. register uint32_t shift = ((3U * ADCTrig) & 0x1FU);
  2045. return (READ_BIT(HRTIMx->sCommonRegs.CR1, (uint32_t)(HRTIM_CR1_ADC1USRC) << shift ) >> shift);
  2046. }
  2047. /**
  2048. * @brief Specify which events (timer events and/or external events) are used as triggers for ADC conversion.
  2049. * @rmtoll ADC1R ADC1MC1 LL_HRTIM_SetADCTrigSrc\n
  2050. * ADC1R ADC1MC2 LL_HRTIM_SetADCTrigSrc\n
  2051. * ADC1R ADC1MC3 LL_HRTIM_SetADCTrigSrc\n
  2052. * ADC1R ADC1MC4 LL_HRTIM_SetADCTrigSrc\n
  2053. * ADC1R ADC1MPER LL_HRTIM_SetADCTrigSrc\n
  2054. * ADC1R ADC1EEV1 LL_HRTIM_SetADCTrigSrc\n
  2055. * ADC1R ADC1EEV2 LL_HRTIM_SetADCTrigSrc\n
  2056. * ADC1R ADC1EEV3 LL_HRTIM_SetADCTrigSrc\n
  2057. * ADC1R ADC1EEV4 LL_HRTIM_SetADCTrigSrc\n
  2058. * ADC1R ADC1EEV5 LL_HRTIM_SetADCTrigSrc\n
  2059. * ADC1R ADC1TAC2 LL_HRTIM_SetADCTrigSrc\n
  2060. * ADC1R ADC1TAC3 LL_HRTIM_SetADCTrigSrc\n
  2061. * ADC1R ADC1TAC4 LL_HRTIM_SetADCTrigSrc\n
  2062. * ADC1R ADC1TAPER LL_HRTIM_SetADCTrigSrc\n
  2063. * ADC1R ADC1TARST LL_HRTIM_SetADCTrigSrc\n
  2064. * ADC1R ADC1TBC2 LL_HRTIM_SetADCTrigSrc\n
  2065. * ADC1R ADC1TBC3 LL_HRTIM_SetADCTrigSrc\n
  2066. * ADC1R ADC1TBC4 LL_HRTIM_SetADCTrigSrc\n
  2067. * ADC1R ADC1TBPER LL_HRTIM_SetADCTrigSrc\n
  2068. * ADC1R ADC1TBRST LL_HRTIM_SetADCTrigSrc\n
  2069. * ADC1R ADC1TCC2 LL_HRTIM_SetADCTrigSrc\n
  2070. * ADC1R ADC1TCC3 LL_HRTIM_SetADCTrigSrc\n
  2071. * ADC1R ADC1TCC4 LL_HRTIM_SetADCTrigSrc\n
  2072. * ADC1R ADC1TCPER LL_HRTIM_SetADCTrigSrc\n
  2073. * ADC1R ADC1TDC2 LL_HRTIM_SetADCTrigSrc\n
  2074. * ADC1R ADC1TDC3 LL_HRTIM_SetADCTrigSrc\n
  2075. * ADC1R ADC1TDC4 LL_HRTIM_SetADCTrigSrc\n
  2076. * ADC1R ADC1TDPER LL_HRTIM_SetADCTrigSrc\n
  2077. * ADC1R ADC1TEC2 LL_HRTIM_SetADCTrigSrc\n
  2078. * ADC1R ADC1TEC3 LL_HRTIM_SetADCTrigSrc\n
  2079. * ADC1R ADC1TEC4 LL_HRTIM_SetADCTrigSrc\n
  2080. * ADC1R ADC1TEPER LL_HRTIM_SetADCTrigSrc\n
  2081. * ADC2R ADC2MC1 LL_HRTIM_SetADCTrigSrc\n
  2082. * ADC2R ADC2MC2 LL_HRTIM_SetADCTrigSrc\n
  2083. * ADC2R ADC2MC3 LL_HRTIM_SetADCTrigSrc\n
  2084. * ADC2R ADC2MC4 LL_HRTIM_SetADCTrigSrc\n
  2085. * ADC2R ADC2MPER LL_HRTIM_SetADCTrigSrc\n
  2086. * ADC2R ADC2EEV6 LL_HRTIM_SetADCTrigSrc\n
  2087. * ADC2R ADC2EEV7 LL_HRTIM_SetADCTrigSrc\n
  2088. * ADC2R ADC2EEV8 LL_HRTIM_SetADCTrigSrc\n
  2089. * ADC2R ADC2EEV9 LL_HRTIM_SetADCTrigSrc\n
  2090. * ADC2R ADC2EEV10 LL_HRTIM_SetADCTrigSrc\n
  2091. * ADC2R ADC2TAC2 LL_HRTIM_SetADCTrigSrc\n
  2092. * ADC2R ADC2TAC3 LL_HRTIM_SetADCTrigSrc\n
  2093. * ADC2R ADC2TAC4 LL_HRTIM_SetADCTrigSrc\n
  2094. * ADC2R ADC2TAPER LL_HRTIM_SetADCTrigSrc\n
  2095. * ADC2R ADC2TBC2 LL_HRTIM_SetADCTrigSrc\n
  2096. * ADC2R ADC2TBC3 LL_HRTIM_SetADCTrigSrc\n
  2097. * ADC2R ADC2TBC4 LL_HRTIM_SetADCTrigSrc\n
  2098. * ADC2R ADC2TBPER LL_HRTIM_SetADCTrigSrc\n
  2099. * ADC2R ADC2TCC2 LL_HRTIM_SetADCTrigSrc\n
  2100. * ADC2R ADC2TCC3 LL_HRTIM_SetADCTrigSrc\n
  2101. * ADC2R ADC2TCC4 LL_HRTIM_SetADCTrigSrc\n
  2102. * ADC2R ADC2TCPER LL_HRTIM_SetADCTrigSrc\n
  2103. * ADC2R ADC2TCRST LL_HRTIM_SetADCTrigSrc\n
  2104. * ADC2R ADC2TDC2 LL_HRTIM_SetADCTrigSrc\n
  2105. * ADC2R ADC2TDC3 LL_HRTIM_SetADCTrigSrc\n
  2106. * ADC2R ADC2TDC4 LL_HRTIM_SetADCTrigSrc\n
  2107. * ADC2R ADC2TDPER LL_HRTIM_SetADCTrigSrc\n
  2108. * ADC2R ADC2TDRST LL_HRTIM_SetADCTrigSrc\n
  2109. * ADC2R ADC2TEC2 LL_HRTIM_SetADCTrigSrc\n
  2110. * ADC2R ADC2TEC3 LL_HRTIM_SetADCTrigSrc\n
  2111. * ADC2R ADC2TEC4 LL_HRTIM_SetADCTrigSrc\n
  2112. * ADC2R ADC2TERST LL_HRTIM_SetADCTrigSrc\n
  2113. * ADC3R ADC3MC1 LL_HRTIM_SetADCTrigSrc\n
  2114. * ADC3R ADC3MC2 LL_HRTIM_SetADCTrigSrc\n
  2115. * ADC3R ADC3MC3 LL_HRTIM_SetADCTrigSrc\n
  2116. * ADC3R ADC3MC4 LL_HRTIM_SetADCTrigSrc\n
  2117. * ADC3R ADC3MPER LL_HRTIM_SetADCTrigSrc\n
  2118. * ADC3R ADC3EEV1 LL_HRTIM_SetADCTrigSrc\n
  2119. * ADC3R ADC3EEV2 LL_HRTIM_SetADCTrigSrc\n
  2120. * ADC3R ADC3EEV3 LL_HRTIM_SetADCTrigSrc\n
  2121. * ADC3R ADC3EEV4 LL_HRTIM_SetADCTrigSrc\n
  2122. * ADC3R ADC3EEV5 LL_HRTIM_SetADCTrigSrc\n
  2123. * ADC3R ADC3TAC2 LL_HRTIM_SetADCTrigSrc\n
  2124. * ADC3R ADC3TAC3 LL_HRTIM_SetADCTrigSrc\n
  2125. * ADC3R ADC3TAC4 LL_HRTIM_SetADCTrigSrc\n
  2126. * ADC3R ADC3TAPER LL_HRTIM_SetADCTrigSrc\n
  2127. * ADC3R ADC3TARST LL_HRTIM_SetADCTrigSrc\n
  2128. * ADC3R ADC3TBC2 LL_HRTIM_SetADCTrigSrc\n
  2129. * ADC3R ADC3TBC3 LL_HRTIM_SetADCTrigSrc\n
  2130. * ADC3R ADC3TBC4 LL_HRTIM_SetADCTrigSrc\n
  2131. * ADC3R ADC3TBPER LL_HRTIM_SetADCTrigSrc\n
  2132. * ADC3R ADC3TBRST LL_HRTIM_SetADCTrigSrc\n
  2133. * ADC3R ADC3TCC2 LL_HRTIM_SetADCTrigSrc\n
  2134. * ADC3R ADC3TCC3 LL_HRTIM_SetADCTrigSrc\n
  2135. * ADC3R ADC3TCC4 LL_HRTIM_SetADCTrigSrc\n
  2136. * ADC3R ADC3TCPER LL_HRTIM_SetADCTrigSrc\n
  2137. * ADC3R ADC3TDC2 LL_HRTIM_SetADCTrigSrc\n
  2138. * ADC3R ADC3TDC3 LL_HRTIM_SetADCTrigSrc\n
  2139. * ADC3R ADC3TDC4 LL_HRTIM_SetADCTrigSrc\n
  2140. * ADC3R ADC3TDPER LL_HRTIM_SetADCTrigSrc\n
  2141. * ADC3R ADC3TEC2 LL_HRTIM_SetADCTrigSrc\n
  2142. * ADC3R ADC3TEC3 LL_HRTIM_SetADCTrigSrc\n
  2143. * ADC3R ADC3TEC4 LL_HRTIM_SetADCTrigSrc\n
  2144. * ADC3R ADC3TEPER LL_HRTIM_SetADCTrigSrc\n
  2145. * ADC4R ADC4MC1 LL_HRTIM_SetADCTrigSrc\n
  2146. * ADC4R ADC4MC2 LL_HRTIM_SetADCTrigSrc\n
  2147. * ADC4R ADC4MC3 LL_HRTIM_SetADCTrigSrc\n
  2148. * ADC4R ADC4MC4 LL_HRTIM_SetADCTrigSrc\n
  2149. * ADC4R ADC4MPER LL_HRTIM_SetADCTrigSrc\n
  2150. * ADC4R ADC4EEV6 LL_HRTIM_SetADCTrigSrc\n
  2151. * ADC4R ADC4EEV7 LL_HRTIM_SetADCTrigSrc\n
  2152. * ADC4R ADC4EEV8 LL_HRTIM_SetADCTrigSrc\n
  2153. * ADC4R ADC4EEV9 LL_HRTIM_SetADCTrigSrc\n
  2154. * ADC4R ADC4EEV10 LL_HRTIM_SetADCTrigSrc\n
  2155. * ADC4R ADC4TAC2 LL_HRTIM_SetADCTrigSrc\n
  2156. * ADC4R ADC4TAC3 LL_HRTIM_SetADCTrigSrc\n
  2157. * ADC4R ADC4TAC4 LL_HRTIM_SetADCTrigSrc\n
  2158. * ADC4R ADC4TAPER LL_HRTIM_SetADCTrigSrc\n
  2159. * ADC4R ADC4TBC2 LL_HRTIM_SetADCTrigSrc\n
  2160. * ADC4R ADC4TBC3 LL_HRTIM_SetADCTrigSrc\n
  2161. * ADC4R ADC4TBC4 LL_HRTIM_SetADCTrigSrc\n
  2162. * ADC4R ADC4TBPER LL_HRTIM_SetADCTrigSrc\n
  2163. * ADC4R ADC4TCC2 LL_HRTIM_SetADCTrigSrc\n
  2164. * ADC4R ADC4TCC3 LL_HRTIM_SetADCTrigSrc\n
  2165. * ADC4R ADC4TCC4 LL_HRTIM_SetADCTrigSrc\n
  2166. * ADC4R ADC4TCPER LL_HRTIM_SetADCTrigSrc\n
  2167. * ADC4R ADC4TCRST LL_HRTIM_SetADCTrigSrc\n
  2168. * ADC4R ADC4TDC2 LL_HRTIM_SetADCTrigSrc\n
  2169. * ADC4R ADC4TDC3 LL_HRTIM_SetADCTrigSrc\n
  2170. * ADC4R ADC4TDC4 LL_HRTIM_SetADCTrigSrc\n
  2171. * ADC4R ADC4TDPER LL_HRTIM_SetADCTrigSrc\n
  2172. * ADC4R ADC4TDRST LL_HRTIM_SetADCTrigSrc\n
  2173. * ADC4R ADC4TEC2 LL_HRTIM_SetADCTrigSrc\n
  2174. * ADC4R ADC4TEC3 LL_HRTIM_SetADCTrigSrc\n
  2175. * ADC4R ADC4TEC4 LL_HRTIM_SetADCTrigSrc\n
  2176. * ADC4R ADC4TERST LL_HRTIM_SetADCTrigSrc\n
  2177. * @param HRTIMx High Resolution Timer instance
  2178. * @param ADCTrig This parameter can be one of the following values:
  2179. * @arg @ref LL_HRTIM_ADCTRIG_1
  2180. * @arg @ref LL_HRTIM_ADCTRIG_2
  2181. * @arg @ref LL_HRTIM_ADCTRIG_3
  2182. * @arg @ref LL_HRTIM_ADCTRIG_4
  2183. * @param Src
  2184. * For ADC trigger 1 and ADC trigger 3 this parameter can be a
  2185. * combination of the following values:
  2186. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
  2187. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
  2188. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
  2189. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
  2190. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
  2191. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
  2192. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
  2193. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
  2194. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
  2195. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
  2196. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
  2197. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
  2198. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
  2199. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
  2200. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
  2201. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
  2202. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
  2203. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
  2204. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
  2205. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
  2206. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
  2207. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
  2208. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
  2209. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
  2210. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
  2211. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
  2212. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
  2213. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
  2214. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
  2215. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
  2216. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
  2217. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
  2218. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
  2219. *
  2220. * For ADC trigger 2 and ADC trigger 4 this parameter can be a
  2221. * combination of the following values:
  2222. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
  2223. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
  2224. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
  2225. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
  2226. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
  2227. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
  2228. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
  2229. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
  2230. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
  2231. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
  2232. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
  2233. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
  2234. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
  2235. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
  2236. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
  2237. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
  2238. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
  2239. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
  2240. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
  2241. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
  2242. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
  2243. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
  2244. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
  2245. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
  2246. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
  2247. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
  2248. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
  2249. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
  2250. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
  2251. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
  2252. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
  2253. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
  2254. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
  2255. *
  2256. * @retval None
  2257. */
  2258. __STATIC_INLINE void LL_HRTIM_SetADCTrigSrc(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig, uint32_t Src)
  2259. {
  2260. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) +
  2261. REG_OFFSET_TAB_ADCxR[ADCTrig]));
  2262. WRITE_REG(*pReg, Src);
  2263. }
  2264. /**
  2265. * @brief Indicate which events (timer events and/or external events) are currently used as triggers for ADC conversion.
  2266. * @rmtoll ADC1R ADC1MC1 LL_HRTIM_GetADCTrigSrc\n
  2267. * ADC1R ADC1MC2 LL_HRTIM_GetADCTrigSrc\n
  2268. * ADC1R ADC1MC3 LL_HRTIM_GetADCTrigSrc\n
  2269. * ADC1R ADC1MC4 LL_HRTIM_GetADCTrigSrc\n
  2270. * ADC1R ADC1MPER LL_HRTIM_GetADCTrigSrc\n
  2271. * ADC1R ADC1EEV1 LL_HRTIM_GetADCTrigSrc\n
  2272. * ADC1R ADC1EEV2 LL_HRTIM_GetADCTrigSrc\n
  2273. * ADC1R ADC1EEV3 LL_HRTIM_GetADCTrigSrc\n
  2274. * ADC1R ADC1EEV4 LL_HRTIM_GetADCTrigSrc\n
  2275. * ADC1R ADC1EEV5 LL_HRTIM_GetADCTrigSrc\n
  2276. * ADC1R ADC1TAC2 LL_HRTIM_GetADCTrigSrc\n
  2277. * ADC1R ADC1TAC3 LL_HRTIM_GetADCTrigSrc\n
  2278. * ADC1R ADC1TAC4 LL_HRTIM_GetADCTrigSrc\n
  2279. * ADC1R ADC1TAPER LL_HRTIM_GetADCTrigSrc\n
  2280. * ADC1R ADC1TARST LL_HRTIM_GetADCTrigSrc\n
  2281. * ADC1R ADC1TBC2 LL_HRTIM_GetADCTrigSrc\n
  2282. * ADC1R ADC1TBC3 LL_HRTIM_GetADCTrigSrc\n
  2283. * ADC1R ADC1TBC4 LL_HRTIM_GetADCTrigSrc\n
  2284. * ADC1R ADC1TBPER LL_HRTIM_GetADCTrigSrc\n
  2285. * ADC1R ADC1TBRST LL_HRTIM_GetADCTrigSrc\n
  2286. * ADC1R ADC1TCC2 LL_HRTIM_GetADCTrigSrc\n
  2287. * ADC1R ADC1TCC3 LL_HRTIM_GetADCTrigSrc\n
  2288. * ADC1R ADC1TCC4 LL_HRTIM_GetADCTrigSrc\n
  2289. * ADC1R ADC1TCPER LL_HRTIM_GetADCTrigSrc\n
  2290. * ADC1R ADC1TDC2 LL_HRTIM_GetADCTrigSrc\n
  2291. * ADC1R ADC1TDC3 LL_HRTIM_GetADCTrigSrc\n
  2292. * ADC1R ADC1TDC4 LL_HRTIM_GetADCTrigSrc\n
  2293. * ADC1R ADC1TDPER LL_HRTIM_GetADCTrigSrc\n
  2294. * ADC1R ADC1TEC2 LL_HRTIM_GetADCTrigSrc\n
  2295. * ADC1R ADC1TEC3 LL_HRTIM_GetADCTrigSrc\n
  2296. * ADC1R ADC1TEC4 LL_HRTIM_GetADCTrigSrc\n
  2297. * ADC1R ADC1TEPER LL_HRTIM_GetADCTrigSrc\n
  2298. * ADC2R ADC2MC1 LL_HRTIM_GetADCTrigSrc\n
  2299. * ADC2R ADC2MC2 LL_HRTIM_GetADCTrigSrc\n
  2300. * ADC2R ADC2MC3 LL_HRTIM_GetADCTrigSrc\n
  2301. * ADC2R ADC2MC4 LL_HRTIM_GetADCTrigSrc\n
  2302. * ADC2R ADC2MPER LL_HRTIM_GetADCTrigSrc\n
  2303. * ADC2R ADC2EEV6 LL_HRTIM_GetADCTrigSrc\n
  2304. * ADC2R ADC2EEV7 LL_HRTIM_GetADCTrigSrc\n
  2305. * ADC2R ADC2EEV8 LL_HRTIM_GetADCTrigSrc\n
  2306. * ADC2R ADC2EEV9 LL_HRTIM_GetADCTrigSrc\n
  2307. * ADC2R ADC2EEV10 LL_HRTIM_GetADCTrigSrc\n
  2308. * ADC2R ADC2TAC2 LL_HRTIM_GetADCTrigSrc\n
  2309. * ADC2R ADC2TAC3 LL_HRTIM_GetADCTrigSrc\n
  2310. * ADC2R ADC2TAC4 LL_HRTIM_GetADCTrigSrc\n
  2311. * ADC2R ADC2TAPER LL_HRTIM_GetADCTrigSrc\n
  2312. * ADC2R ADC2TBC2 LL_HRTIM_GetADCTrigSrc\n
  2313. * ADC2R ADC2TBC3 LL_HRTIM_GetADCTrigSrc\n
  2314. * ADC2R ADC2TBC4 LL_HRTIM_GetADCTrigSrc\n
  2315. * ADC2R ADC2TBPER LL_HRTIM_GetADCTrigSrc\n
  2316. * ADC2R ADC2TCC2 LL_HRTIM_GetADCTrigSrc\n
  2317. * ADC2R ADC2TCC3 LL_HRTIM_GetADCTrigSrc\n
  2318. * ADC2R ADC2TCC4 LL_HRTIM_GetADCTrigSrc\n
  2319. * ADC2R ADC2TCPER LL_HRTIM_GetADCTrigSrc\n
  2320. * ADC2R ADC2TCRST LL_HRTIM_GetADCTrigSrc\n
  2321. * ADC2R ADC2TDC2 LL_HRTIM_GetADCTrigSrc\n
  2322. * ADC2R ADC2TDC3 LL_HRTIM_GetADCTrigSrc\n
  2323. * ADC2R ADC2TDC4 LL_HRTIM_GetADCTrigSrc\n
  2324. * ADC2R ADC2TDPER LL_HRTIM_GetADCTrigSrc\n
  2325. * ADC2R ADC2TDRST LL_HRTIM_GetADCTrigSrc\n
  2326. * ADC2R ADC2TEC2 LL_HRTIM_GetADCTrigSrc\n
  2327. * ADC2R ADC2TEC3 LL_HRTIM_GetADCTrigSrc\n
  2328. * ADC2R ADC2TEC4 LL_HRTIM_GetADCTrigSrc\n
  2329. * ADC2R ADC2TERST LL_HRTIM_GetADCTrigSrc\n
  2330. * ADC3R ADC3MC1 LL_HRTIM_GetADCTrigSrc\n
  2331. * ADC3R ADC3MC2 LL_HRTIM_GetADCTrigSrc\n
  2332. * ADC3R ADC3MC3 LL_HRTIM_GetADCTrigSrc\n
  2333. * ADC3R ADC3MC4 LL_HRTIM_GetADCTrigSrc\n
  2334. * ADC3R ADC3MPER LL_HRTIM_GetADCTrigSrc\n
  2335. * ADC3R ADC3EEV1 LL_HRTIM_GetADCTrigSrc\n
  2336. * ADC3R ADC3EEV2 LL_HRTIM_GetADCTrigSrc\n
  2337. * ADC3R ADC3EEV3 LL_HRTIM_GetADCTrigSrc\n
  2338. * ADC3R ADC3EEV4 LL_HRTIM_GetADCTrigSrc\n
  2339. * ADC3R ADC3EEV5 LL_HRTIM_GetADCTrigSrc\n
  2340. * ADC3R ADC3TAC2 LL_HRTIM_GetADCTrigSrc\n
  2341. * ADC3R ADC3TAC3 LL_HRTIM_GetADCTrigSrc\n
  2342. * ADC3R ADC3TAC4 LL_HRTIM_GetADCTrigSrc\n
  2343. * ADC3R ADC3TAPER LL_HRTIM_GetADCTrigSrc\n
  2344. * ADC3R ADC3TARST LL_HRTIM_GetADCTrigSrc\n
  2345. * ADC3R ADC3TBC2 LL_HRTIM_GetADCTrigSrc\n
  2346. * ADC3R ADC3TBC3 LL_HRTIM_GetADCTrigSrc\n
  2347. * ADC3R ADC3TBC4 LL_HRTIM_GetADCTrigSrc\n
  2348. * ADC3R ADC3TBPER LL_HRTIM_GetADCTrigSrc\n
  2349. * ADC3R ADC3TBRST LL_HRTIM_GetADCTrigSrc\n
  2350. * ADC3R ADC3TCC2 LL_HRTIM_GetADCTrigSrc\n
  2351. * ADC3R ADC3TCC3 LL_HRTIM_GetADCTrigSrc\n
  2352. * ADC3R ADC3TCC4 LL_HRTIM_GetADCTrigSrc\n
  2353. * ADC3R ADC3TCPER LL_HRTIM_GetADCTrigSrc\n
  2354. * ADC3R ADC3TDC2 LL_HRTIM_GetADCTrigSrc\n
  2355. * ADC3R ADC3TDC3 LL_HRTIM_GetADCTrigSrc\n
  2356. * ADC3R ADC3TDC4 LL_HRTIM_GetADCTrigSrc\n
  2357. * ADC3R ADC3TDPER LL_HRTIM_GetADCTrigSrc\n
  2358. * ADC3R ADC3TEC2 LL_HRTIM_GetADCTrigSrc\n
  2359. * ADC3R ADC3TEC3 LL_HRTIM_GetADCTrigSrc\n
  2360. * ADC3R ADC3TEC4 LL_HRTIM_GetADCTrigSrc\n
  2361. * ADC3R ADC3TEPER LL_HRTIM_GetADCTrigSrc\n
  2362. * ADC4R ADC4MC1 LL_HRTIM_GetADCTrigSrc\n
  2363. * ADC4R ADC4MC2 LL_HRTIM_GetADCTrigSrc\n
  2364. * ADC4R ADC4MC3 LL_HRTIM_GetADCTrigSrc\n
  2365. * ADC4R ADC4MC4 LL_HRTIM_GetADCTrigSrc\n
  2366. * ADC4R ADC4MPER LL_HRTIM_GetADCTrigSrc\n
  2367. * ADC4R ADC4EEV6 LL_HRTIM_GetADCTrigSrc\n
  2368. * ADC4R ADC4EEV7 LL_HRTIM_GetADCTrigSrc\n
  2369. * ADC4R ADC4EEV8 LL_HRTIM_GetADCTrigSrc\n
  2370. * ADC4R ADC4EEV9 LL_HRTIM_GetADCTrigSrc\n
  2371. * ADC4R ADC4EEV10 LL_HRTIM_GetADCTrigSrc\n
  2372. * ADC4R ADC4TAC2 LL_HRTIM_GetADCTrigSrc\n
  2373. * ADC4R ADC4TAC3 LL_HRTIM_GetADCTrigSrc\n
  2374. * ADC4R ADC4TAC4 LL_HRTIM_GetADCTrigSrc\n
  2375. * ADC4R ADC4TAPER LL_HRTIM_GetADCTrigSrc\n
  2376. * ADC4R ADC4TBC2 LL_HRTIM_GetADCTrigSrc\n
  2377. * ADC4R ADC4TBC3 LL_HRTIM_GetADCTrigSrc\n
  2378. * ADC4R ADC4TBC4 LL_HRTIM_GetADCTrigSrc\n
  2379. * ADC4R ADC4TBPER LL_HRTIM_GetADCTrigSrc\n
  2380. * ADC4R ADC4TCC2 LL_HRTIM_GetADCTrigSrc\n
  2381. * ADC4R ADC4TCC3 LL_HRTIM_GetADCTrigSrc\n
  2382. * ADC4R ADC4TCC4 LL_HRTIM_GetADCTrigSrc\n
  2383. * ADC4R ADC4TCPER LL_HRTIM_GetADCTrigSrc\n
  2384. * ADC4R ADC4TCRST LL_HRTIM_GetADCTrigSrc\n
  2385. * ADC4R ADC4TDC2 LL_HRTIM_GetADCTrigSrc\n
  2386. * ADC4R ADC4TDC3 LL_HRTIM_GetADCTrigSrc\n
  2387. * ADC4R ADC4TDC4 LL_HRTIM_GetADCTrigSrc\n
  2388. * ADC4R ADC4TDPER LL_HRTIM_GetADCTrigSrc\n
  2389. * ADC4R ADC4TDRST LL_HRTIM_GetADCTrigSrc\n
  2390. * ADC4R ADC4TEC2 LL_HRTIM_GetADCTrigSrc\n
  2391. * ADC4R ADC4TEC3 LL_HRTIM_GetADCTrigSrc\n
  2392. * ADC4R ADC4TEC4 LL_HRTIM_GetADCTrigSrc\n
  2393. * ADC4R ADC4TERST LL_HRTIM_GetADCTrigSrc
  2394. * @param HRTIMx High Resolution Timer instance
  2395. * @param ADCTrig This parameter can be one of the following values:
  2396. * @arg @ref LL_HRTIM_ADCTRIG_1
  2397. * @arg @ref LL_HRTIM_ADCTRIG_2
  2398. * @arg @ref LL_HRTIM_ADCTRIG_3
  2399. * @arg @ref LL_HRTIM_ADCTRIG_4
  2400. * @retval Src This parameter can be a combination of the following values:
  2401. *
  2402. * For ADC trigger 1 and ADC trigger 3 this parameter can be a
  2403. * combination of the following values:
  2404. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
  2405. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
  2406. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
  2407. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
  2408. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
  2409. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
  2410. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
  2411. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
  2412. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
  2413. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
  2414. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
  2415. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
  2416. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
  2417. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
  2418. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
  2419. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
  2420. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
  2421. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
  2422. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
  2423. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
  2424. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
  2425. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
  2426. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
  2427. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
  2428. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
  2429. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
  2430. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
  2431. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
  2432. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
  2433. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
  2434. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
  2435. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
  2436. * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
  2437. *
  2438. * For ADC trigger 2 and ADC trigger 4 this parameter can be a
  2439. * combination of the following values:
  2440. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
  2441. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
  2442. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
  2443. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
  2444. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
  2445. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
  2446. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
  2447. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
  2448. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
  2449. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
  2450. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
  2451. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
  2452. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
  2453. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
  2454. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
  2455. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
  2456. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
  2457. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
  2458. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
  2459. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
  2460. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
  2461. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
  2462. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
  2463. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
  2464. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
  2465. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
  2466. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
  2467. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
  2468. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
  2469. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
  2470. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
  2471. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
  2472. * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
  2473. */
  2474. __STATIC_INLINE uint32_t LL_HRTIM_GetADCTrigSrc(HRTIM_TypeDef *HRTIMx, uint32_t ADCTrig)
  2475. {
  2476. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.ADC1R) +
  2477. REG_OFFSET_TAB_ADCxR[ADCTrig]));
  2478. return (*pReg);
  2479. }
  2480. /**
  2481. * @}
  2482. */
  2483. /** @defgroup HRTIM_LL_EF_HRTIM_Timer_Control HRTIM_Timer_Control
  2484. * @{
  2485. */
  2486. /**
  2487. * @brief Enable timer(s) counter.
  2488. * @rmtoll MDIER TECEN LL_HRTIM_TIM_CounterEnable\n
  2489. * MDIER TDCEN LL_HRTIM_TIM_CounterEnable\n
  2490. * MDIER TCCEN LL_HRTIM_TIM_CounterEnable\n
  2491. * MDIER TBCEN LL_HRTIM_TIM_CounterEnable\n
  2492. * MDIER TACEN LL_HRTIM_TIM_CounterEnable\n
  2493. * MDIER MCEN LL_HRTIM_TIM_CounterEnable
  2494. * @param HRTIMx High Resolution Timer instance
  2495. * @param Timers This parameter can be a combination of the following values:
  2496. * @arg @ref LL_HRTIM_TIMER_MASTER
  2497. * @arg @ref LL_HRTIM_TIMER_A
  2498. * @arg @ref LL_HRTIM_TIMER_B
  2499. * @arg @ref LL_HRTIM_TIMER_C
  2500. * @arg @ref LL_HRTIM_TIMER_D
  2501. * @arg @ref LL_HRTIM_TIMER_E
  2502. * @retval None
  2503. */
  2504. __STATIC_INLINE void LL_HRTIM_TIM_CounterEnable(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  2505. {
  2506. SET_BIT(HRTIMx->sMasterRegs.MCR, Timers);
  2507. }
  2508. /**
  2509. * @brief Disable timer(s) counter.
  2510. * @rmtoll MDIER TECEN LL_HRTIM_TIM_CounterDisable\n
  2511. * MDIER TDCEN LL_HRTIM_TIM_CounterDisable\n
  2512. * MDIER TCCEN LL_HRTIM_TIM_CounterDisable\n
  2513. * MDIER TBCEN LL_HRTIM_TIM_CounterDisable\n
  2514. * MDIER TACEN LL_HRTIM_TIM_CounterDisable\n
  2515. * MDIER MCEN LL_HRTIM_TIM_CounterDisable
  2516. * @param HRTIMx High Resolution Timer instance
  2517. * @param Timers This parameter can be a combination of the following values:
  2518. * @arg @ref LL_HRTIM_TIMER_MASTER
  2519. * @arg @ref LL_HRTIM_TIMER_A
  2520. * @arg @ref LL_HRTIM_TIMER_B
  2521. * @arg @ref LL_HRTIM_TIMER_C
  2522. * @arg @ref LL_HRTIM_TIMER_D
  2523. * @arg @ref LL_HRTIM_TIMER_E
  2524. * @retval None
  2525. */
  2526. __STATIC_INLINE void LL_HRTIM_TIM_CounterDisable(HRTIM_TypeDef *HRTIMx, uint32_t Timers)
  2527. {
  2528. CLEAR_BIT(HRTIMx->sMasterRegs.MCR, Timers);
  2529. }
  2530. /**
  2531. * @brief Indicate whether the timer counter is enabled.
  2532. * @rmtoll MDIER TECEN LL_HRTIM_TIM_IsCounterEnabled\n
  2533. * MDIER TDCEN LL_HRTIM_TIM_IsCounterEnabled\n
  2534. * MDIER TCCEN LL_HRTIM_TIM_IsCounterEnabled\n
  2535. * MDIER TBCEN LL_HRTIM_TIM_IsCounterEnabled\n
  2536. * MDIER TACEN LL_HRTIM_TIM_IsCounterEnabled\n
  2537. * MDIER MCEN LL_HRTIM_TIM_IsCounterEnabled
  2538. * @param HRTIMx High Resolution Timer instance
  2539. * @param Timer This parameter can be one of the following values:
  2540. * @arg @ref LL_HRTIM_TIMER_MASTER
  2541. * @arg @ref LL_HRTIM_TIMER_A
  2542. * @arg @ref LL_HRTIM_TIMER_B
  2543. * @arg @ref LL_HRTIM_TIMER_C
  2544. * @arg @ref LL_HRTIM_TIMER_D
  2545. * @arg @ref LL_HRTIM_TIMER_E
  2546. * @retval State of MCEN or TxCEN bit HRTIM_MCR register (1 or 0).
  2547. */
  2548. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsCounterEnabled(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2549. {
  2550. return ((READ_BIT(HRTIMx->sMasterRegs.MCR, Timer) == (Timer)) ? 1UL : 0UL);
  2551. }
  2552. /**
  2553. * @brief Set the timer clock prescaler ratio.
  2554. * @rmtoll MCR CKPSC LL_HRTIM_TIM_SetPrescaler\n
  2555. * TIMxCR CKPSC LL_HRTIM_TIM_SetPrescaler
  2556. * @note The counter clock equivalent frequency (CK_CNT) is equal to fHRCK / 2^CKPSC[2:0].
  2557. * @note The prescaling ratio cannot be modified once the timer counter is enabled.
  2558. * @param HRTIMx High Resolution Timer instance
  2559. * @param Timer This parameter can be one of the following values:
  2560. * @arg @ref LL_HRTIM_TIMER_MASTER
  2561. * @arg @ref LL_HRTIM_TIMER_A
  2562. * @arg @ref LL_HRTIM_TIMER_B
  2563. * @arg @ref LL_HRTIM_TIMER_C
  2564. * @arg @ref LL_HRTIM_TIMER_D
  2565. * @arg @ref LL_HRTIM_TIMER_E
  2566. * @param Prescaler This parameter can be one of the following values:
  2567. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL32
  2568. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL16
  2569. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL8
  2570. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL4
  2571. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL2
  2572. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV1
  2573. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV2
  2574. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV4
  2575. * @retval None
  2576. */
  2577. __STATIC_INLINE void LL_HRTIM_TIM_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler)
  2578. {
  2579. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2580. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2581. MODIFY_REG(*pReg, HRTIM_MCR_CK_PSC, Prescaler);
  2582. }
  2583. /**
  2584. * @brief Get the timer clock prescaler ratio
  2585. * @rmtoll MCR CKPSC LL_HRTIM_TIM_GetPrescaler\n
  2586. * TIMxCR CKPSC LL_HRTIM_TIM_GetPrescaler
  2587. * @param HRTIMx High Resolution Timer instance
  2588. * @param Timer This parameter can be one of the following values:
  2589. * @arg @ref LL_HRTIM_TIMER_MASTER
  2590. * @arg @ref LL_HRTIM_TIMER_A
  2591. * @arg @ref LL_HRTIM_TIMER_B
  2592. * @arg @ref LL_HRTIM_TIMER_C
  2593. * @arg @ref LL_HRTIM_TIMER_D
  2594. * @arg @ref LL_HRTIM_TIMER_E
  2595. * @retval Prescaler Returned value can be one of the following values:
  2596. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL32
  2597. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL16
  2598. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL8
  2599. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL4
  2600. * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL2
  2601. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV1
  2602. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV2
  2603. * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV4
  2604. */
  2605. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2606. {
  2607. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2608. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2609. return (READ_BIT(*pReg, HRTIM_MCR_CK_PSC));
  2610. }
  2611. /**
  2612. * @brief Set the counter operating mode mode (single-shot, continuous or re-triggerable).
  2613. * @rmtoll MCR CONT LL_HRTIM_TIM_SetCounterMode\n
  2614. * MCR RETRIG LL_HRTIM_TIM_SetCounterMode\n
  2615. * TIMxCR CONT LL_HRTIM_TIM_SetCounterMode\n
  2616. * TIMxCR RETRIG LL_HRTIM_TIM_SetCounterMode
  2617. * @param HRTIMx High Resolution Timer instance
  2618. * @param Timer This parameter can be one of the following values:
  2619. * @arg @ref LL_HRTIM_TIMER_MASTER
  2620. * @arg @ref LL_HRTIM_TIMER_A
  2621. * @arg @ref LL_HRTIM_TIMER_B
  2622. * @arg @ref LL_HRTIM_TIMER_C
  2623. * @arg @ref LL_HRTIM_TIMER_D
  2624. * @arg @ref LL_HRTIM_TIMER_E
  2625. * @param Mode This parameter can be one of the following values:
  2626. * @arg @ref LL_HRTIM_MODE_CONTINUOUS
  2627. * @arg @ref LL_HRTIM_MODE_SINGLESHOT
  2628. * @arg @ref LL_HRTIM_MODE_RETRIGGERABLE
  2629. * @retval None
  2630. */
  2631. __STATIC_INLINE void LL_HRTIM_TIM_SetCounterMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Mode)
  2632. {
  2633. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2634. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2635. MODIFY_REG(*pReg, (HRTIM_TIMCR_RETRIG | HRTIM_MCR_CONT), Mode);
  2636. }
  2637. /**
  2638. * @brief Get the counter operating mode mode
  2639. * @rmtoll MCR CONT LL_HRTIM_TIM_GetCounterMode\n
  2640. * MCR RETRIG LL_HRTIM_TIM_GetCounterMode\n
  2641. * TIMxCR CONT LL_HRTIM_TIM_GetCounterMode\n
  2642. * TIMxCR RETRIG LL_HRTIM_TIM_GetCounterMode
  2643. * @param HRTIMx High Resolution Timer instance
  2644. * @param Timer This parameter can be one of the following values:
  2645. * @arg @ref LL_HRTIM_TIMER_MASTER
  2646. * @arg @ref LL_HRTIM_TIMER_A
  2647. * @arg @ref LL_HRTIM_TIMER_B
  2648. * @arg @ref LL_HRTIM_TIMER_C
  2649. * @arg @ref LL_HRTIM_TIMER_D
  2650. * @arg @ref LL_HRTIM_TIMER_E
  2651. * @retval Mode Returned value can be one of the following values:
  2652. * @arg @ref LL_HRTIM_MODE_CONTINUOUS
  2653. * @arg @ref LL_HRTIM_MODE_SINGLESHOT
  2654. * @arg @ref LL_HRTIM_MODE_RETRIGGERABLE
  2655. */
  2656. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounterMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2657. {
  2658. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2659. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2660. return (READ_BIT(*pReg, (HRTIM_MCR_RETRIG | HRTIM_MCR_CONT)));
  2661. }
  2662. /**
  2663. * @brief Enable the half duty-cycle mode.
  2664. * @rmtoll MCR HALF LL_HRTIM_TIM_EnableHalfMode\n
  2665. * TIMxCR HALF LL_HRTIM_TIM_EnableHalfMode
  2666. * @note When the half mode is enabled, HRTIM_MCMP1R (or HRTIM_CMP1xR)
  2667. * active register is automatically updated with HRTIM_MPER/2
  2668. * (or HRTIM_PERxR/2) value when HRTIM_MPER (or HRTIM_PERxR) register is written.
  2669. * @param HRTIMx High Resolution Timer instance
  2670. * @param Timer This parameter can be one of the following values:
  2671. * @arg @ref LL_HRTIM_TIMER_MASTER
  2672. * @arg @ref LL_HRTIM_TIMER_A
  2673. * @arg @ref LL_HRTIM_TIMER_B
  2674. * @arg @ref LL_HRTIM_TIMER_C
  2675. * @arg @ref LL_HRTIM_TIMER_D
  2676. * @arg @ref LL_HRTIM_TIMER_E
  2677. * @retval None
  2678. */
  2679. __STATIC_INLINE void LL_HRTIM_TIM_EnableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2680. {
  2681. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2682. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2683. SET_BIT(*pReg, HRTIM_MCR_HALF);
  2684. }
  2685. /**
  2686. * @brief Disable the half duty-cycle mode.
  2687. * @rmtoll MCR HALF LL_HRTIM_TIM_DisableHalfMode\n
  2688. * TIMxCR HALF LL_HRTIM_TIM_DisableHalfMode
  2689. * @param HRTIMx High Resolution Timer instance
  2690. * @param Timer This parameter can be one of the following values:
  2691. * @arg @ref LL_HRTIM_TIMER_MASTER
  2692. * @arg @ref LL_HRTIM_TIMER_A
  2693. * @arg @ref LL_HRTIM_TIMER_B
  2694. * @arg @ref LL_HRTIM_TIMER_C
  2695. * @arg @ref LL_HRTIM_TIMER_D
  2696. * @arg @ref LL_HRTIM_TIMER_E
  2697. * @retval None
  2698. */
  2699. __STATIC_INLINE void LL_HRTIM_TIM_DisableHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2700. {
  2701. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2702. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2703. CLEAR_BIT(*pReg, HRTIM_MCR_HALF);
  2704. }
  2705. /**
  2706. * @brief Indicate whether half duty-cycle mode is enabled for a given timer.
  2707. * @rmtoll MCR HALF LL_HRTIM_TIM_IsEnabledHalfMode\n
  2708. * TIMxCR HALF LL_HRTIM_TIM_IsEnabledHalfMode
  2709. * @param HRTIMx High Resolution Timer instance
  2710. * @param Timer This parameter can be one of the following values:
  2711. * @arg @ref LL_HRTIM_TIMER_MASTER
  2712. * @arg @ref LL_HRTIM_TIMER_A
  2713. * @arg @ref LL_HRTIM_TIMER_B
  2714. * @arg @ref LL_HRTIM_TIMER_C
  2715. * @arg @ref LL_HRTIM_TIMER_D
  2716. * @arg @ref LL_HRTIM_TIMER_E
  2717. * @retval State of HALF bit to 1 in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
  2718. */
  2719. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledHalfMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2720. {
  2721. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2722. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2723. return ((READ_BIT(*pReg, HRTIM_MCR_HALF) == (HRTIM_MCR_HALF)) ? 1UL : 0UL);
  2724. }
  2725. /**
  2726. * @brief Enable the timer start when receiving a synchronization input event.
  2727. * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_EnableStartOnSync\n
  2728. * TIMxCR SYNSTRTA LL_HRTIM_TIM_EnableStartOnSync
  2729. * @param HRTIMx High Resolution Timer instance
  2730. * @param Timer This parameter can be one of the following values:
  2731. * @arg @ref LL_HRTIM_TIMER_MASTER
  2732. * @arg @ref LL_HRTIM_TIMER_A
  2733. * @arg @ref LL_HRTIM_TIMER_B
  2734. * @arg @ref LL_HRTIM_TIMER_C
  2735. * @arg @ref LL_HRTIM_TIMER_D
  2736. * @arg @ref LL_HRTIM_TIMER_E
  2737. * @retval None
  2738. */
  2739. __STATIC_INLINE void LL_HRTIM_TIM_EnableStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2740. {
  2741. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2742. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2743. SET_BIT(*pReg, HRTIM_MCR_SYNCSTRTM);
  2744. }
  2745. /**
  2746. * @brief Disable the timer start when receiving a synchronization input event.
  2747. * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_DisableStartOnSync\n
  2748. * TIMxCR SYNSTRTA LL_HRTIM_TIM_DisableStartOnSync
  2749. * @param HRTIMx High Resolution Timer instance
  2750. * @param Timer This parameter can be one of the following values:
  2751. * @arg @ref LL_HRTIM_TIMER_MASTER
  2752. * @arg @ref LL_HRTIM_TIMER_A
  2753. * @arg @ref LL_HRTIM_TIMER_B
  2754. * @arg @ref LL_HRTIM_TIMER_C
  2755. * @arg @ref LL_HRTIM_TIMER_D
  2756. * @arg @ref LL_HRTIM_TIMER_E
  2757. * @retval None
  2758. */
  2759. __STATIC_INLINE void LL_HRTIM_TIM_DisableStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2760. {
  2761. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2762. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2763. CLEAR_BIT(*pReg, HRTIM_MCR_SYNCSTRTM);
  2764. }
  2765. /**
  2766. * @brief Indicate whether the timer start when receiving a synchronization input event.
  2767. * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_IsEnabledStartOnSync\n
  2768. * TIMxCR SYNSTRTA LL_HRTIM_TIM_IsEnabledStartOnSync
  2769. * @param HRTIMx High Resolution Timer instance
  2770. * @param Timer This parameter can be one of the following values:
  2771. * @arg @ref LL_HRTIM_TIMER_MASTER
  2772. * @arg @ref LL_HRTIM_TIMER_A
  2773. * @arg @ref LL_HRTIM_TIMER_B
  2774. * @arg @ref LL_HRTIM_TIMER_C
  2775. * @arg @ref LL_HRTIM_TIMER_D
  2776. * @arg @ref LL_HRTIM_TIMER_E
  2777. * @retval State of SYNCSTRTx bit in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
  2778. */
  2779. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledStartOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2780. {
  2781. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2782. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2783. return ((READ_BIT(*pReg, HRTIM_MCR_SYNCSTRTM) == (HRTIM_MCR_SYNCSTRTM)) ? 1UL : 0UL);
  2784. }
  2785. /**
  2786. * @brief Enable the timer reset when receiving a synchronization input event.
  2787. * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_EnableResetOnSync\n
  2788. * TIMxCR SYNCRSTA LL_HRTIM_TIM_EnableResetOnSync
  2789. * @param HRTIMx High Resolution Timer instance
  2790. * @param Timer This parameter can be one of the following values:
  2791. * @arg @ref LL_HRTIM_TIMER_MASTER
  2792. * @arg @ref LL_HRTIM_TIMER_A
  2793. * @arg @ref LL_HRTIM_TIMER_B
  2794. * @arg @ref LL_HRTIM_TIMER_C
  2795. * @arg @ref LL_HRTIM_TIMER_D
  2796. * @arg @ref LL_HRTIM_TIMER_E
  2797. * @retval None
  2798. */
  2799. __STATIC_INLINE void LL_HRTIM_TIM_EnableResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2800. {
  2801. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2802. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2803. SET_BIT(*pReg, HRTIM_MCR_SYNCRSTM);
  2804. }
  2805. /**
  2806. * @brief Disable the timer reset when receiving a synchronization input event.
  2807. * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_DisableResetOnSync\n
  2808. * TIMxCR SYNCRSTA LL_HRTIM_TIM_DisableResetOnSync
  2809. * @param HRTIMx High Resolution Timer instance
  2810. * @param Timer This parameter can be one of the following values:
  2811. * @arg @ref LL_HRTIM_TIMER_MASTER
  2812. * @arg @ref LL_HRTIM_TIMER_A
  2813. * @arg @ref LL_HRTIM_TIMER_B
  2814. * @arg @ref LL_HRTIM_TIMER_C
  2815. * @arg @ref LL_HRTIM_TIMER_D
  2816. * @arg @ref LL_HRTIM_TIMER_E
  2817. * @retval None
  2818. */
  2819. __STATIC_INLINE void LL_HRTIM_TIM_DisableResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2820. {
  2821. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2822. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2823. CLEAR_BIT(*pReg, HRTIM_MCR_SYNCRSTM);
  2824. }
  2825. /**
  2826. * @brief Indicate whether the timer reset when receiving a synchronization input event.
  2827. * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_IsEnabledResetOnSync\n
  2828. * TIMxCR SYNCRSTA LL_HRTIM_TIM_IsEnabledResetOnSync
  2829. * @param HRTIMx High Resolution Timer instance
  2830. * @param Timer This parameter can be one of the following values:
  2831. * @arg @ref LL_HRTIM_TIMER_MASTER
  2832. * @arg @ref LL_HRTIM_TIMER_A
  2833. * @arg @ref LL_HRTIM_TIMER_B
  2834. * @arg @ref LL_HRTIM_TIMER_C
  2835. * @arg @ref LL_HRTIM_TIMER_D
  2836. * @arg @ref LL_HRTIM_TIMER_E
  2837. * @retval None
  2838. */
  2839. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledResetOnSync(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2840. {
  2841. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2842. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2843. return ((READ_BIT(*pReg, HRTIM_MCR_SYNCRSTM) == (HRTIM_MCR_SYNCRSTM)) ? 1UL : 0UL);
  2844. }
  2845. /**
  2846. * @brief Set the HRTIM output the DAC synchronization event is generated on (DACtrigOutx).
  2847. * @rmtoll MCR DACSYNC LL_HRTIM_TIM_SetDACTrig\n
  2848. * TIMxCR DACSYNC LL_HRTIM_TIM_SetDACTrig
  2849. * @param HRTIMx High Resolution Timer instance
  2850. * @param Timer This parameter can be one of the following values:
  2851. * @arg @ref LL_HRTIM_TIMER_MASTER
  2852. * @arg @ref LL_HRTIM_TIMER_A
  2853. * @arg @ref LL_HRTIM_TIMER_B
  2854. * @arg @ref LL_HRTIM_TIMER_C
  2855. * @arg @ref LL_HRTIM_TIMER_D
  2856. * @arg @ref LL_HRTIM_TIMER_E
  2857. * @param DACTrig This parameter can be one of the following values:
  2858. * @arg @ref LL_HRTIM_DACTRIG_NONE
  2859. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_1
  2860. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_2
  2861. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_3
  2862. * @retval None
  2863. */
  2864. __STATIC_INLINE void LL_HRTIM_TIM_SetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DACTrig)
  2865. {
  2866. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2867. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2868. MODIFY_REG(*pReg, HRTIM_MCR_DACSYNC, DACTrig);
  2869. }
  2870. /**
  2871. * @brief Get the HRTIM output the DAC synchronization event is generated on (DACtrigOutx).
  2872. * @rmtoll MCR DACSYNC LL_HRTIM_TIM_GetDACTrig\n
  2873. * TIMxCR DACSYNC LL_HRTIM_TIM_GetDACTrig
  2874. * @param HRTIMx High Resolution Timer instance
  2875. * @param Timer This parameter can be one of the following values:
  2876. * @arg @ref LL_HRTIM_TIMER_MASTER
  2877. * @arg @ref LL_HRTIM_TIMER_A
  2878. * @arg @ref LL_HRTIM_TIMER_B
  2879. * @arg @ref LL_HRTIM_TIMER_C
  2880. * @arg @ref LL_HRTIM_TIMER_D
  2881. * @arg @ref LL_HRTIM_TIMER_E
  2882. * @retval DACTrig Returned value can be one of the following values:
  2883. * @arg @ref LL_HRTIM_DACTRIG_NONE
  2884. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_1
  2885. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_2
  2886. * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_3
  2887. */
  2888. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDACTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2889. {
  2890. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2891. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2892. return (READ_BIT(*pReg, HRTIM_MCR_DACSYNC));
  2893. }
  2894. /**
  2895. * @brief Enable the timer registers preload mechanism.
  2896. * @rmtoll MCR PREEN LL_HRTIM_TIM_EnablePreload\n
  2897. * TIMxCR PREEN LL_HRTIM_TIM_EnablePreload
  2898. * @note When the preload mode is enabled, accessed registers are shadow registers.
  2899. * Their content is transferred into the active register after an update request,
  2900. * either software or synchronized with an event.
  2901. * @param HRTIMx High Resolution Timer instance
  2902. * @param Timer This parameter can be one of the following values:
  2903. * @arg @ref LL_HRTIM_TIMER_MASTER
  2904. * @arg @ref LL_HRTIM_TIMER_A
  2905. * @arg @ref LL_HRTIM_TIMER_B
  2906. * @arg @ref LL_HRTIM_TIMER_C
  2907. * @arg @ref LL_HRTIM_TIMER_D
  2908. * @arg @ref LL_HRTIM_TIMER_E
  2909. * @retval None
  2910. */
  2911. __STATIC_INLINE void LL_HRTIM_TIM_EnablePreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2912. {
  2913. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2914. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2915. SET_BIT(*pReg, HRTIM_MCR_PREEN);
  2916. }
  2917. /**
  2918. * @brief Disable the timer registers preload mechanism.
  2919. * @rmtoll MCR PREEN LL_HRTIM_TIM_DisablePreload\n
  2920. * TIMxCR PREEN LL_HRTIM_TIM_DisablePreload
  2921. * @param HRTIMx High Resolution Timer instance
  2922. * @param Timer This parameter can be one of the following values:
  2923. * @arg @ref LL_HRTIM_TIMER_MASTER
  2924. * @arg @ref LL_HRTIM_TIMER_A
  2925. * @arg @ref LL_HRTIM_TIMER_B
  2926. * @arg @ref LL_HRTIM_TIMER_C
  2927. * @arg @ref LL_HRTIM_TIMER_D
  2928. * @arg @ref LL_HRTIM_TIMER_E
  2929. * @retval None
  2930. */
  2931. __STATIC_INLINE void LL_HRTIM_TIM_DisablePreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2932. {
  2933. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2934. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2935. CLEAR_BIT(*pReg, HRTIM_MCR_PREEN);
  2936. }
  2937. /**
  2938. * @brief Indicate whether the timer registers preload mechanism is enabled.
  2939. * @rmtoll MCR PREEN LL_HRTIM_TIM_IsEnabledPreload\n
  2940. * TIMxCR PREEN LL_HRTIM_TIM_IsEnabledPreload
  2941. * @param HRTIMx High Resolution Timer instance
  2942. * @param Timer This parameter can be one of the following values:
  2943. * @arg @ref LL_HRTIM_TIMER_MASTER
  2944. * @arg @ref LL_HRTIM_TIMER_A
  2945. * @arg @ref LL_HRTIM_TIMER_B
  2946. * @arg @ref LL_HRTIM_TIMER_C
  2947. * @arg @ref LL_HRTIM_TIMER_D
  2948. * @arg @ref LL_HRTIM_TIMER_E
  2949. * @retval State of PREEN bit in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
  2950. */
  2951. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPreload(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  2952. {
  2953. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2954. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2955. return ((READ_BIT(*pReg, HRTIM_MCR_PREEN) == (HRTIM_MCR_PREEN)) ? 1UL : 0UL);
  2956. }
  2957. /**
  2958. * @brief Set the timer register update trigger.
  2959. * @rmtoll MCR MREPU LL_HRTIM_TIM_SetUpdateTrig\n
  2960. * TIMxCR TAU LL_HRTIM_TIM_SetUpdateTrig\n
  2961. * TIMxCR TBU LL_HRTIM_TIM_SetUpdateTrig\n
  2962. * TIMxCR TCU LL_HRTIM_TIM_SetUpdateTrig\n
  2963. * TIMxCR TDU LL_HRTIM_TIM_SetUpdateTrig\n
  2964. * TIMxCR TEU LL_HRTIM_TIM_SetUpdateTrig\n
  2965. * TIMxCR MSTU LL_HRTIM_TIM_SetUpdateTrig
  2966. * @param HRTIMx High Resolution Timer instance
  2967. * @param Timer This parameter can be one of the following values:
  2968. * @arg @ref LL_HRTIM_TIMER_MASTER
  2969. * @arg @ref LL_HRTIM_TIMER_A
  2970. * @arg @ref LL_HRTIM_TIMER_B
  2971. * @arg @ref LL_HRTIM_TIMER_C
  2972. * @arg @ref LL_HRTIM_TIMER_D
  2973. * @arg @ref LL_HRTIM_TIMER_E
  2974. * @param UpdateTrig This parameter can be one of the following values:
  2975. *
  2976. * For the master timer this parameter can be one of the following values:
  2977. * @arg @ref LL_HRTIM_UPDATETRIG_NONE
  2978. * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
  2979. *
  2980. * For timer A..E this parameter can be:
  2981. * @arg @ref LL_HRTIM_UPDATETRIG_NONE
  2982. * or a combination of the following values:
  2983. * @arg @ref LL_HRTIM_UPDATETRIG_MASTER
  2984. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_A
  2985. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_B
  2986. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_C
  2987. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_D
  2988. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_E
  2989. * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
  2990. * @arg @ref LL_HRTIM_UPDATETRIG_RESET
  2991. * @retval None
  2992. */
  2993. __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t UpdateTrig)
  2994. {
  2995. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  2996. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  2997. MODIFY_REG(*pReg, REG_MASK_TAB_UPDATETRIG[iTimer], UpdateTrig << REG_SHIFT_TAB_UPDATETRIG[iTimer]);
  2998. }
  2999. /**
  3000. * @brief Get the timer register update trigger.
  3001. * @rmtoll MCR MREPU LL_HRTIM_TIM_GetUpdateTrig\n
  3002. * TIMxCR TBU LL_HRTIM_TIM_GetUpdateTrig\n
  3003. * TIMxCR TCU LL_HRTIM_TIM_GetUpdateTrig\n
  3004. * TIMxCR TDU LL_HRTIM_TIM_GetUpdateTrig\n
  3005. * TIMxCR TEU LL_HRTIM_TIM_GetUpdateTrig\n
  3006. * TIMxCR MSTU LL_HRTIM_TIM_GetUpdateTrig
  3007. * @param HRTIMx High Resolution Timer instance
  3008. * @param Timer This parameter can be one of the following values:
  3009. * @arg @ref LL_HRTIM_TIMER_MASTER
  3010. * @arg @ref LL_HRTIM_TIMER_A
  3011. * @arg @ref LL_HRTIM_TIMER_B
  3012. * @arg @ref LL_HRTIM_TIMER_C
  3013. * @arg @ref LL_HRTIM_TIMER_D
  3014. * @arg @ref LL_HRTIM_TIMER_E
  3015. * @retval UpdateTrig Returned value can be one of the following values:
  3016. *
  3017. * For the master timer this parameter can be one of the following values:
  3018. * @arg @ref LL_HRTIM_UPDATETRIG_NONE
  3019. * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
  3020. *
  3021. * For timer A..E this parameter can be:
  3022. * @arg @ref LL_HRTIM_UPDATETRIG_NONE
  3023. * or a combination of the following values:
  3024. * @arg @ref LL_HRTIM_UPDATETRIG_MASTER
  3025. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_A
  3026. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_B
  3027. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_C
  3028. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_D
  3029. * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_E
  3030. * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
  3031. * @arg @ref LL_HRTIM_UPDATETRIG_RESET
  3032. */
  3033. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3034. {
  3035. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3036. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  3037. return (READ_BIT(*pReg, REG_MASK_TAB_UPDATETRIG[iTimer]) >> REG_SHIFT_TAB_UPDATETRIG[iTimer]);
  3038. }
  3039. /**
  3040. * @brief Set the timer registers update condition (how the registers update occurs relatively to the burst DMA transaction or an external update request received on one of the update enable inputs (UPD_EN[3:1])).
  3041. * @rmtoll MCR BRSTDMA LL_HRTIM_TIM_SetUpdateGating\n
  3042. * TIMxCR UPDGAT LL_HRTIM_TIM_SetUpdateGating
  3043. * @param HRTIMx High Resolution Timer instance
  3044. * @param Timer This parameter can be one of the following values:
  3045. * @arg @ref LL_HRTIM_TIMER_MASTER
  3046. * @arg @ref LL_HRTIM_TIMER_A
  3047. * @arg @ref LL_HRTIM_TIMER_B
  3048. * @arg @ref LL_HRTIM_TIMER_C
  3049. * @arg @ref LL_HRTIM_TIMER_D
  3050. * @arg @ref LL_HRTIM_TIMER_E
  3051. * @param UpdateGating This parameter can be one of the following values:
  3052. *
  3053. * For the master timer this parameter can be one of the following values:
  3054. * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
  3055. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
  3056. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
  3057. *
  3058. * For the timer A..E this parameter can be one of the following values:
  3059. * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
  3060. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
  3061. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
  3062. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1
  3063. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2
  3064. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3
  3065. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1_UPDATE
  3066. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2_UPDATE
  3067. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3_UPDATE
  3068. * @retval None
  3069. */
  3070. __STATIC_INLINE void LL_HRTIM_TIM_SetUpdateGating(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t UpdateGating)
  3071. {
  3072. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3073. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  3074. MODIFY_REG(*pReg, REG_MASK_TAB_UPDATEGATING[iTimer], (UpdateGating << REG_SHIFT_TAB_UPDATEGATING[iTimer]));
  3075. }
  3076. /**
  3077. * @brief Get the timer registers update condition.
  3078. * @rmtoll MCR BRSTDMA LL_HRTIM_TIM_GetUpdateGating\n
  3079. * TIMxCR UPDGAT LL_HRTIM_TIM_GetUpdateGating
  3080. * @param HRTIMx High Resolution Timer instance
  3081. * @param Timer This parameter can be one of the following values:
  3082. * @arg @ref LL_HRTIM_TIMER_MASTER
  3083. * @arg @ref LL_HRTIM_TIMER_A
  3084. * @arg @ref LL_HRTIM_TIMER_B
  3085. * @arg @ref LL_HRTIM_TIMER_C
  3086. * @arg @ref LL_HRTIM_TIMER_D
  3087. * @arg @ref LL_HRTIM_TIMER_E
  3088. * @retval UpdateGating Returned value can be one of the following values:
  3089. *
  3090. * For the master timer this parameter can be one of the following values:
  3091. * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
  3092. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
  3093. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
  3094. *
  3095. * For the timer A..E this parameter can be one of the following values:
  3096. * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
  3097. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
  3098. * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
  3099. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1
  3100. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2
  3101. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3
  3102. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1_UPDATE
  3103. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2_UPDATE
  3104. * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3_UPDATE
  3105. */
  3106. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetUpdateGating(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3107. {
  3108. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3109. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCR) + REG_OFFSET_TAB_TIMER[iTimer]));
  3110. return (READ_BIT(*pReg, REG_MASK_TAB_UPDATEGATING[iTimer]) >> REG_SHIFT_TAB_UPDATEGATING[iTimer]);
  3111. }
  3112. /**
  3113. * @brief Enable the push-pull mode.
  3114. * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_EnablePushPullMode
  3115. * @param HRTIMx High Resolution Timer instance
  3116. * @param Timer This parameter can be one of the following values:
  3117. * @arg @ref LL_HRTIM_TIMER_A
  3118. * @arg @ref LL_HRTIM_TIMER_B
  3119. * @arg @ref LL_HRTIM_TIMER_C
  3120. * @arg @ref LL_HRTIM_TIMER_D
  3121. * @arg @ref LL_HRTIM_TIMER_E
  3122. * @retval None
  3123. */
  3124. __STATIC_INLINE void LL_HRTIM_TIM_EnablePushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3125. {
  3126. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3127. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) +
  3128. REG_OFFSET_TAB_TIMER[iTimer]));
  3129. SET_BIT(*pReg, HRTIM_TIMCR_PSHPLL);
  3130. }
  3131. /**
  3132. * @brief Disable the push-pull mode.
  3133. * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_DisablePushPullMode
  3134. * @param HRTIMx High Resolution Timer instance
  3135. * @param Timer This parameter can be one of the following values:
  3136. * @arg @ref LL_HRTIM_TIMER_A
  3137. * @arg @ref LL_HRTIM_TIMER_B
  3138. * @arg @ref LL_HRTIM_TIMER_C
  3139. * @arg @ref LL_HRTIM_TIMER_D
  3140. * @arg @ref LL_HRTIM_TIMER_E
  3141. * @retval None
  3142. */
  3143. __STATIC_INLINE void LL_HRTIM_TIM_DisablePushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3144. {
  3145. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3146. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) +
  3147. REG_OFFSET_TAB_TIMER[iTimer]));
  3148. CLEAR_BIT(*pReg, HRTIM_TIMCR_PSHPLL);
  3149. }
  3150. /**
  3151. * @brief Indicate whether the push-pull mode is enabled.
  3152. * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_IsEnabledPushPullMode\n
  3153. * @param HRTIMx High Resolution Timer instance
  3154. * @param Timer This parameter can be one of the following values:
  3155. * @arg @ref LL_HRTIM_TIMER_A
  3156. * @arg @ref LL_HRTIM_TIMER_B
  3157. * @arg @ref LL_HRTIM_TIMER_C
  3158. * @arg @ref LL_HRTIM_TIMER_D
  3159. * @arg @ref LL_HRTIM_TIMER_E
  3160. * @retval State of PSHPLL bit in HRTIM_TIMxCR register (1 or 0).
  3161. */
  3162. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledPushPullMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3163. {
  3164. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3165. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) +
  3166. REG_OFFSET_TAB_TIMER[iTimer]));
  3167. return ((READ_BIT(*pReg, HRTIM_TIMCR_PSHPLL) == (HRTIM_TIMCR_PSHPLL)) ? 1UL : 0UL);
  3168. }
  3169. /**
  3170. * @brief Set the functioning mode of the compare unit (CMP2 or CMP4 can operate in standard mode or in auto delayed mode).
  3171. * @rmtoll TIMxCR DELCMP2 LL_HRTIM_TIM_SetCompareMode\n
  3172. * TIMxCR DELCMP4 LL_HRTIM_TIM_SetCompareMode
  3173. * @note In auto-delayed mode the compare match occurs independently from the timer counter value.
  3174. * @param HRTIMx High Resolution Timer instance
  3175. * @param Timer This parameter can be one of the following values:
  3176. * @arg @ref LL_HRTIM_TIMER_A
  3177. * @arg @ref LL_HRTIM_TIMER_B
  3178. * @arg @ref LL_HRTIM_TIMER_C
  3179. * @arg @ref LL_HRTIM_TIMER_D
  3180. * @arg @ref LL_HRTIM_TIMER_E
  3181. * @param CompareUnit This parameter can be one of the following values:
  3182. * @arg @ref LL_HRTIM_COMPAREUNIT_2
  3183. * @arg @ref LL_HRTIM_COMPAREUNIT_4
  3184. * @param Mode This parameter can be one of the following values:
  3185. * @arg @ref LL_HRTIM_COMPAREMODE_REGULAR
  3186. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT
  3187. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP1
  3188. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP3
  3189. * @retval None
  3190. */
  3191. __STATIC_INLINE void LL_HRTIM_TIM_SetCompareMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareUnit,
  3192. uint32_t Mode)
  3193. {
  3194. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3195. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) +
  3196. REG_OFFSET_TAB_TIMER[iTimer]));
  3197. register uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU);
  3198. MODIFY_REG(* pReg, (HRTIM_TIMCR_DELCMP2 << shift), (Mode << shift));
  3199. }
  3200. /**
  3201. * @brief Get the functioning mode of the compare unit.
  3202. * @rmtoll TIMxCR DELCMP2 LL_HRTIM_TIM_GetCompareMode\n
  3203. * TIMxCR DELCMP4 LL_HRTIM_TIM_GetCompareMode
  3204. * @param HRTIMx High Resolution Timer instance
  3205. * @param Timer This parameter can be one of the following values:
  3206. * @arg @ref LL_HRTIM_TIMER_A
  3207. * @arg @ref LL_HRTIM_TIMER_B
  3208. * @arg @ref LL_HRTIM_TIMER_C
  3209. * @arg @ref LL_HRTIM_TIMER_D
  3210. * @arg @ref LL_HRTIM_TIMER_E
  3211. * @param CompareUnit This parameter can be one of the following values:
  3212. * @arg @ref LL_HRTIM_COMPAREUNIT_2
  3213. * @arg @ref LL_HRTIM_COMPAREUNIT_4
  3214. * @retval Mode Returned value can be one of the following values:
  3215. * @arg @ref LL_HRTIM_COMPAREMODE_REGULAR
  3216. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT
  3217. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP1
  3218. * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP3
  3219. */
  3220. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompareMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareUnit)
  3221. {
  3222. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3223. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxCR) +
  3224. REG_OFFSET_TAB_TIMER[iTimer]));
  3225. register uint32_t shift = (((uint32_t)POSITION_VAL(CompareUnit) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2)) & 0x1FU);
  3226. return (READ_BIT(*pReg, (HRTIM_TIMCR_DELCMP2 << shift)) >> shift);
  3227. }
  3228. /**
  3229. * @brief Set the timer counter value.
  3230. * @rmtoll MCNTR MCNT LL_HRTIM_TIM_SetCounter\n
  3231. * CNTxR CNTx LL_HRTIM_TIM_SetCounter
  3232. * @note This function can only be called when the timer is stopped.
  3233. * @note For HR clock prescaling ratio below 32 (CKPSC[2:0] < 5), the least
  3234. * significant bits of the counter are not significant. They cannot be
  3235. * written and return 0 when read.
  3236. * @note The timer behavior is not guaranteed if the counter value is set above
  3237. * the period.
  3238. * @param HRTIMx High Resolution Timer instance
  3239. * @param Timer This parameter can be one of the following values:
  3240. * @arg @ref LL_HRTIM_TIMER_MASTER
  3241. * @arg @ref LL_HRTIM_TIMER_A
  3242. * @arg @ref LL_HRTIM_TIMER_B
  3243. * @arg @ref LL_HRTIM_TIMER_C
  3244. * @arg @ref LL_HRTIM_TIMER_D
  3245. * @arg @ref LL_HRTIM_TIMER_E
  3246. * @param Counter Value between 0 and 0xFFFF
  3247. * @retval None
  3248. */
  3249. __STATIC_INLINE void LL_HRTIM_TIM_SetCounter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Counter)
  3250. {
  3251. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3252. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) +
  3253. REG_OFFSET_TAB_TIMER[iTimer]));
  3254. MODIFY_REG(* pReg, HRTIM_MCNTR_MCNTR, Counter);
  3255. }
  3256. /**
  3257. * @brief Get actual timer counter value.
  3258. * @rmtoll MCNTR MCNT LL_HRTIM_TIM_GetCounter\n
  3259. * CNTxR CNTx LL_HRTIM_TIM_GetCounter
  3260. * @param HRTIMx High Resolution Timer instance
  3261. * @param Timer This parameter can be one of the following values:
  3262. * @arg @ref LL_HRTIM_TIMER_MASTER
  3263. * @arg @ref LL_HRTIM_TIMER_A
  3264. * @arg @ref LL_HRTIM_TIMER_B
  3265. * @arg @ref LL_HRTIM_TIMER_C
  3266. * @arg @ref LL_HRTIM_TIMER_D
  3267. * @arg @ref LL_HRTIM_TIMER_E
  3268. * @retval Counter Value between 0 and 0xFFFF
  3269. */
  3270. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCounter(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3271. {
  3272. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3273. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCNTR) +
  3274. REG_OFFSET_TAB_TIMER[iTimer]));
  3275. return (READ_BIT(*pReg, HRTIM_MCNTR_MCNTR));
  3276. }
  3277. /**
  3278. * @brief Set the timer period value.
  3279. * @rmtoll MPER MPER LL_HRTIM_TIM_SetPeriod\n
  3280. * PERxR PERx LL_HRTIM_TIM_SetPeriod
  3281. * @param HRTIMx High Resolution Timer instance
  3282. * @param Timer This parameter can be one of the following values:
  3283. * @arg @ref LL_HRTIM_TIMER_MASTER
  3284. * @arg @ref LL_HRTIM_TIMER_A
  3285. * @arg @ref LL_HRTIM_TIMER_B
  3286. * @arg @ref LL_HRTIM_TIMER_C
  3287. * @arg @ref LL_HRTIM_TIMER_D
  3288. * @arg @ref LL_HRTIM_TIMER_E
  3289. * @param Period Value between 0 and 0xFFFF
  3290. * @retval None
  3291. */
  3292. __STATIC_INLINE void LL_HRTIM_TIM_SetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Period)
  3293. {
  3294. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3295. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) +
  3296. REG_OFFSET_TAB_TIMER[iTimer]));
  3297. MODIFY_REG(* pReg, HRTIM_MPER_MPER, Period);
  3298. }
  3299. /**
  3300. * @brief Get actual timer period value.
  3301. * @rmtoll MPER MPER LL_HRTIM_TIM_GetPeriod\n
  3302. * PERxR PERx LL_HRTIM_TIM_GetPeriod
  3303. * @param HRTIMx High Resolution Timer instance
  3304. * @param Timer This parameter can be one of the following values:
  3305. * @arg @ref LL_HRTIM_TIMER_MASTER
  3306. * @arg @ref LL_HRTIM_TIMER_A
  3307. * @arg @ref LL_HRTIM_TIMER_B
  3308. * @arg @ref LL_HRTIM_TIMER_C
  3309. * @arg @ref LL_HRTIM_TIMER_D
  3310. * @arg @ref LL_HRTIM_TIMER_E
  3311. * @retval Period Value between 0 and 0xFFFF
  3312. */
  3313. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3314. {
  3315. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3316. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MPER) +
  3317. REG_OFFSET_TAB_TIMER[iTimer]));
  3318. return (READ_BIT(*pReg, HRTIM_MPER_MPER));
  3319. }
  3320. /**
  3321. * @brief Set the timer repetition period value.
  3322. * @rmtoll MREP MREP LL_HRTIM_TIM_SetRepetition\n
  3323. * REPxR REPx LL_HRTIM_TIM_SetRepetition
  3324. * @param HRTIMx High Resolution Timer instance
  3325. * @param Timer This parameter can be one of the following values:
  3326. * @arg @ref LL_HRTIM_TIMER_MASTER
  3327. * @arg @ref LL_HRTIM_TIMER_A
  3328. * @arg @ref LL_HRTIM_TIMER_B
  3329. * @arg @ref LL_HRTIM_TIMER_C
  3330. * @arg @ref LL_HRTIM_TIMER_D
  3331. * @arg @ref LL_HRTIM_TIMER_E
  3332. * @param Repetition Value between 0 and 0xFF
  3333. * @retval None
  3334. */
  3335. __STATIC_INLINE void LL_HRTIM_TIM_SetRepetition(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Repetition)
  3336. {
  3337. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3338. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) +
  3339. REG_OFFSET_TAB_TIMER[iTimer]));
  3340. MODIFY_REG(* pReg, HRTIM_MREP_MREP, Repetition);
  3341. }
  3342. /**
  3343. * @brief Get actual timer repetition period value.
  3344. * @rmtoll MREP MREP LL_HRTIM_TIM_GetRepetition\n
  3345. * REPxR REPx LL_HRTIM_TIM_GetRepetition
  3346. * @param HRTIMx High Resolution Timer instance
  3347. * @param Timer This parameter can be one of the following values:
  3348. * @arg @ref LL_HRTIM_TIMER_MASTER
  3349. * @arg @ref LL_HRTIM_TIMER_A
  3350. * @arg @ref LL_HRTIM_TIMER_B
  3351. * @arg @ref LL_HRTIM_TIMER_C
  3352. * @arg @ref LL_HRTIM_TIMER_D
  3353. * @arg @ref LL_HRTIM_TIMER_E
  3354. * @retval Repetition Value between 0 and 0xFF
  3355. */
  3356. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetRepetition(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3357. {
  3358. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3359. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MREP) +
  3360. REG_OFFSET_TAB_TIMER[iTimer]));
  3361. return (READ_BIT(*pReg, HRTIM_MREP_MREP));
  3362. }
  3363. /**
  3364. * @brief Set the compare value of the compare unit 1.
  3365. * @rmtoll MCMP1R MCMP1 LL_HRTIM_TIM_SetCompare1\n
  3366. * CMP1xR CMP1x LL_HRTIM_TIM_SetCompare1
  3367. * @param HRTIMx High Resolution Timer instance
  3368. * @param Timer This parameter can be one of the following values:
  3369. * @arg @ref LL_HRTIM_TIMER_MASTER
  3370. * @arg @ref LL_HRTIM_TIMER_A
  3371. * @arg @ref LL_HRTIM_TIMER_B
  3372. * @arg @ref LL_HRTIM_TIMER_C
  3373. * @arg @ref LL_HRTIM_TIMER_D
  3374. * @arg @ref LL_HRTIM_TIMER_E
  3375. * @param CompareValue Compare value must be above or equal to 3
  3376. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3377. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3378. * @retval None
  3379. */
  3380. __STATIC_INLINE void LL_HRTIM_TIM_SetCompare1(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue)
  3381. {
  3382. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3383. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) +
  3384. REG_OFFSET_TAB_TIMER[iTimer]));
  3385. MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP1R, CompareValue);
  3386. }
  3387. /**
  3388. * @brief Get actual compare value of the compare unit 1.
  3389. * @rmtoll MCMP1R MCMP1 LL_HRTIM_TIM_GetCompare1\n
  3390. * CMP1xR CMP1x LL_HRTIM_TIM_GetCompare1
  3391. * @param HRTIMx High Resolution Timer instance
  3392. * @param Timer This parameter can be one of the following values:
  3393. * @arg @ref LL_HRTIM_TIMER_MASTER
  3394. * @arg @ref LL_HRTIM_TIMER_A
  3395. * @arg @ref LL_HRTIM_TIMER_B
  3396. * @arg @ref LL_HRTIM_TIMER_C
  3397. * @arg @ref LL_HRTIM_TIMER_D
  3398. * @arg @ref LL_HRTIM_TIMER_E
  3399. * @retval CompareValue Compare value must be above or equal to 3
  3400. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3401. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3402. */
  3403. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3404. {
  3405. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3406. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP1R) +
  3407. REG_OFFSET_TAB_TIMER[iTimer]));
  3408. return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP1R));
  3409. }
  3410. /**
  3411. * @brief Set the compare value of the compare unit 2.
  3412. * @rmtoll MCMP2R MCMP2 LL_HRTIM_TIM_SetCompare2\n
  3413. * CMP2xR CMP2x LL_HRTIM_TIM_SetCompare2
  3414. * @param HRTIMx High Resolution Timer instance
  3415. * @param Timer This parameter can be one of the following values:
  3416. * @arg @ref LL_HRTIM_TIMER_MASTER
  3417. * @arg @ref LL_HRTIM_TIMER_A
  3418. * @arg @ref LL_HRTIM_TIMER_B
  3419. * @arg @ref LL_HRTIM_TIMER_C
  3420. * @arg @ref LL_HRTIM_TIMER_D
  3421. * @arg @ref LL_HRTIM_TIMER_E
  3422. * @param CompareValue Compare value must be above or equal to 3
  3423. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3424. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3425. * @retval None
  3426. */
  3427. __STATIC_INLINE void LL_HRTIM_TIM_SetCompare2(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue)
  3428. {
  3429. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3430. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) +
  3431. REG_OFFSET_TAB_TIMER[iTimer]));
  3432. MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP2R, CompareValue);
  3433. }
  3434. /**
  3435. * @brief Get actual compare value of the compare unit 2.
  3436. * @rmtoll MCMP2R MCMP2 LL_HRTIM_TIM_GetCompare2\n
  3437. * CMP2xR CMP2x LL_HRTIM_TIM_GetCompare2\n
  3438. * @param HRTIMx High Resolution Timer instance
  3439. * @param Timer This parameter can be one of the following values:
  3440. * @arg @ref LL_HRTIM_TIMER_MASTER
  3441. * @arg @ref LL_HRTIM_TIMER_A
  3442. * @arg @ref LL_HRTIM_TIMER_B
  3443. * @arg @ref LL_HRTIM_TIMER_C
  3444. * @arg @ref LL_HRTIM_TIMER_D
  3445. * @arg @ref LL_HRTIM_TIMER_E
  3446. * @retval CompareValue Compare value must be above or equal to 3
  3447. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3448. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3449. */
  3450. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3451. {
  3452. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3453. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP2R) +
  3454. REG_OFFSET_TAB_TIMER[iTimer]));
  3455. return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP2R));
  3456. }
  3457. /**
  3458. * @brief Set the compare value of the compare unit 3.
  3459. * @rmtoll MCMP3R MCMP3 LL_HRTIM_TIM_SetCompare3\n
  3460. * CMP3xR CMP3x LL_HRTIM_TIM_SetCompare3
  3461. * @param HRTIMx High Resolution Timer instance
  3462. * @param Timer This parameter can be one of the following values:
  3463. * @arg @ref LL_HRTIM_TIMER_MASTER
  3464. * @arg @ref LL_HRTIM_TIMER_A
  3465. * @arg @ref LL_HRTIM_TIMER_B
  3466. * @arg @ref LL_HRTIM_TIMER_C
  3467. * @arg @ref LL_HRTIM_TIMER_D
  3468. * @arg @ref LL_HRTIM_TIMER_E
  3469. * @param CompareValue Compare value must be above or equal to 3
  3470. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3471. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3472. * @retval None
  3473. */
  3474. __STATIC_INLINE void LL_HRTIM_TIM_SetCompare3(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue)
  3475. {
  3476. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3477. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) +
  3478. REG_OFFSET_TAB_TIMER[iTimer]));
  3479. MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP3R, CompareValue);
  3480. }
  3481. /**
  3482. * @brief Get actual compare value of the compare unit 3.
  3483. * @rmtoll MCMP3R MCMP3 LL_HRTIM_TIM_GetCompare3\n
  3484. * CMP3xR CMP3x LL_HRTIM_TIM_GetCompare3
  3485. * @param HRTIMx High Resolution Timer instance
  3486. * @param Timer This parameter can be one of the following values:
  3487. * @arg @ref LL_HRTIM_TIMER_MASTER
  3488. * @arg @ref LL_HRTIM_TIMER_A
  3489. * @arg @ref LL_HRTIM_TIMER_B
  3490. * @arg @ref LL_HRTIM_TIMER_C
  3491. * @arg @ref LL_HRTIM_TIMER_D
  3492. * @arg @ref LL_HRTIM_TIMER_E
  3493. * @retval CompareValue Compare value must be above or equal to 3
  3494. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3495. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3496. */
  3497. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3498. {
  3499. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3500. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP3R) +
  3501. REG_OFFSET_TAB_TIMER[iTimer]));
  3502. return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP3R));
  3503. }
  3504. /**
  3505. * @brief Set the compare value of the compare unit 4.
  3506. * @rmtoll MCMP4R MCMP4 LL_HRTIM_TIM_SetCompare4\n
  3507. * CMP4xR CMP4x LL_HRTIM_TIM_SetCompare4
  3508. * @param HRTIMx High Resolution Timer instance
  3509. * @param Timer This parameter can be one of the following values:
  3510. * @arg @ref LL_HRTIM_TIMER_MASTER
  3511. * @arg @ref LL_HRTIM_TIMER_A
  3512. * @arg @ref LL_HRTIM_TIMER_B
  3513. * @arg @ref LL_HRTIM_TIMER_C
  3514. * @arg @ref LL_HRTIM_TIMER_D
  3515. * @arg @ref LL_HRTIM_TIMER_E
  3516. * @param CompareValue Compare value must be above or equal to 3
  3517. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3518. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3519. * @retval None
  3520. */
  3521. __STATIC_INLINE void LL_HRTIM_TIM_SetCompare4(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CompareValue)
  3522. {
  3523. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3524. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) +
  3525. REG_OFFSET_TAB_TIMER[iTimer]));
  3526. MODIFY_REG(* pReg, HRTIM_MCMP1R_MCMP4R, CompareValue);
  3527. }
  3528. /**
  3529. * @brief Get actual compare value of the compare unit 4.
  3530. * @rmtoll MCMP4R MCMP4 LL_HRTIM_TIM_GetCompare4\n
  3531. * CMP4xR CMP4x LL_HRTIM_TIM_GetCompare4
  3532. * @param HRTIMx High Resolution Timer instance
  3533. * @param Timer This parameter can be one of the following values:
  3534. * @arg @ref LL_HRTIM_TIMER_MASTER
  3535. * @arg @ref LL_HRTIM_TIMER_A
  3536. * @arg @ref LL_HRTIM_TIMER_B
  3537. * @arg @ref LL_HRTIM_TIMER_C
  3538. * @arg @ref LL_HRTIM_TIMER_D
  3539. * @arg @ref LL_HRTIM_TIMER_E
  3540. * @retval CompareValue Compare value must be above or equal to 3
  3541. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  3542. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  3543. */
  3544. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCompare4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3545. {
  3546. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  3547. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MCMP4R) +
  3548. REG_OFFSET_TAB_TIMER[iTimer]));
  3549. return (READ_BIT(*pReg, HRTIM_MCMP1R_MCMP4R));
  3550. }
  3551. /**
  3552. * @brief Set the reset trigger of a timer counter.
  3553. * @rmtoll RSTxR UPDT LL_HRTIM_TIM_SetResetTrig\n
  3554. * RSTxR CMP2 LL_HRTIM_TIM_SetResetTrig\n
  3555. * RSTxR CMP4 LL_HRTIM_TIM_SetResetTrig\n
  3556. * RSTxR MSTPER LL_HRTIM_TIM_SetResetTrig\n
  3557. * RSTxR MSTCMP1 LL_HRTIM_TIM_SetResetTrig\n
  3558. * RSTxR MSTCMP2 LL_HRTIM_TIM_SetResetTrig\n
  3559. * RSTxR MSTCMP3 LL_HRTIM_TIM_SetResetTrig\n
  3560. * RSTxR MSTCMP4 LL_HRTIM_TIM_SetResetTrig\n
  3561. * RSTxR EXTEVNT1 LL_HRTIM_TIM_SetResetTrig\n
  3562. * RSTxR EXTEVNT2 LL_HRTIM_TIM_SetResetTrig\n
  3563. * RSTxR EXTEVNT3 LL_HRTIM_TIM_SetResetTrig\n
  3564. * RSTxR EXTEVNT4 LL_HRTIM_TIM_SetResetTrig\n
  3565. * RSTxR EXTEVNT5 LL_HRTIM_TIM_SetResetTrig\n
  3566. * RSTxR EXTEVNT6 LL_HRTIM_TIM_SetResetTrig\n
  3567. * RSTxR EXTEVNT7 LL_HRTIM_TIM_SetResetTrig\n
  3568. * RSTxR EXTEVNT8 LL_HRTIM_TIM_SetResetTrig\n
  3569. * RSTxR EXTEVNT9 LL_HRTIM_TIM_SetResetTrig\n
  3570. * RSTxR EXTEVNT10 LL_HRTIM_TIM_SetResetTrig\n
  3571. * RSTxR TIMBCMP1 LL_HRTIM_TIM_SetResetTrig\n
  3572. * RSTxR TIMBCMP2 LL_HRTIM_TIM_SetResetTrig\n
  3573. * RSTxR TIMBCMP4 LL_HRTIM_TIM_SetResetTrig\n
  3574. * RSTxR TIMCCMP1 LL_HRTIM_TIM_SetResetTrig\n
  3575. * RSTxR TIMCCMP2 LL_HRTIM_TIM_SetResetTrig\n
  3576. * RSTxR TIMCCMP4 LL_HRTIM_TIM_SetResetTrig\n
  3577. * RSTxR TIMDCMP1 LL_HRTIM_TIM_SetResetTrig\n
  3578. * RSTxR TIMDCMP2 LL_HRTIM_TIM_SetResetTrig\n
  3579. * RSTxR TIMDCMP4 LL_HRTIM_TIM_SetResetTrig\n
  3580. * RSTxR TIMECMP1 LL_HRTIM_TIM_SetResetTrig\n
  3581. * RSTxR TIMECMP2 LL_HRTIM_TIM_SetResetTrig\n
  3582. * RSTxR TIMECMP4 LL_HRTIM_TIM_SetResetTrig
  3583. * @note The reset of the timer counter can be triggered by up to 30 events
  3584. * that can be selected among the following sources:
  3585. * @arg The timing unit: Compare 2, Compare 4 and Update (3 events).
  3586. * @arg The master timer: Reset and Compare 1..4 (5 events).
  3587. * @arg The external events EXTEVNT1..10 (10 events).
  3588. * @arg All other timing units (e.g. Timer B..E for timer A): Compare 1, 2 and 4 (12 events).
  3589. * @param HRTIMx High Resolution Timer instance
  3590. * @param Timer This parameter can be one of the following values:
  3591. * @arg @ref LL_HRTIM_TIMER_A
  3592. * @arg @ref LL_HRTIM_TIMER_B
  3593. * @arg @ref LL_HRTIM_TIMER_C
  3594. * @arg @ref LL_HRTIM_TIMER_D
  3595. * @arg @ref LL_HRTIM_TIMER_E
  3596. * @param ResetTrig This parameter can be a combination of the following values:
  3597. * @arg @ref LL_HRTIM_RESETTRIG_NONE
  3598. * @arg @ref LL_HRTIM_RESETTRIG_UPDATE
  3599. * @arg @ref LL_HRTIM_RESETTRIG_CMP2
  3600. * @arg @ref LL_HRTIM_RESETTRIG_CMP4
  3601. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_PER
  3602. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP1
  3603. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP2
  3604. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP3
  3605. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP4
  3606. * @arg @ref LL_HRTIM_RESETTRIG_EEV_1
  3607. * @arg @ref LL_HRTIM_RESETTRIG_EEV_2
  3608. * @arg @ref LL_HRTIM_RESETTRIG_EEV_3
  3609. * @arg @ref LL_HRTIM_RESETTRIG_EEV_4
  3610. * @arg @ref LL_HRTIM_RESETTRIG_EEV_5
  3611. * @arg @ref LL_HRTIM_RESETTRIG_EEV_6
  3612. * @arg @ref LL_HRTIM_RESETTRIG_EEV_7
  3613. * @arg @ref LL_HRTIM_RESETTRIG_EEV_8
  3614. * @arg @ref LL_HRTIM_RESETTRIG_EEV_9
  3615. * @arg @ref LL_HRTIM_RESETTRIG_EEV_10
  3616. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP1
  3617. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP2
  3618. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP4
  3619. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP1
  3620. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP2
  3621. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP4
  3622. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP1
  3623. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP2
  3624. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP4
  3625. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP1
  3626. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP2
  3627. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP4
  3628. * @retval None
  3629. */
  3630. __STATIC_INLINE void LL_HRTIM_TIM_SetResetTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t ResetTrig)
  3631. {
  3632. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3633. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) +
  3634. REG_OFFSET_TAB_TIMER[iTimer]));
  3635. WRITE_REG(*pReg, ResetTrig);
  3636. }
  3637. /**
  3638. * @brief Get actual reset trigger of a timer counter.
  3639. * @rmtoll RSTxR UPDT LL_HRTIM_TIM_GetResetTrig\n
  3640. * RSTxR CMP2 LL_HRTIM_TIM_GetResetTrig\n
  3641. * RSTxR CMP4 LL_HRTIM_TIM_GetResetTrig\n
  3642. * RSTxR MSTPER LL_HRTIM_TIM_GetResetTrig\n
  3643. * RSTxR MSTCMP1 LL_HRTIM_TIM_GetResetTrig\n
  3644. * RSTxR MSTCMP2 LL_HRTIM_TIM_GetResetTrig\n
  3645. * RSTxR MSTCMP3 LL_HRTIM_TIM_GetResetTrig\n
  3646. * RSTxR MSTCMP4 LL_HRTIM_TIM_GetResetTrig\n
  3647. * RSTxR EXTEVNT1 LL_HRTIM_TIM_GetResetTrig\n
  3648. * RSTxR EXTEVNT2 LL_HRTIM_TIM_GetResetTrig\n
  3649. * RSTxR EXTEVNT3 LL_HRTIM_TIM_GetResetTrig\n
  3650. * RSTxR EXTEVNT4 LL_HRTIM_TIM_GetResetTrig\n
  3651. * RSTxR EXTEVNT5 LL_HRTIM_TIM_GetResetTrig\n
  3652. * RSTxR EXTEVNT6 LL_HRTIM_TIM_GetResetTrig\n
  3653. * RSTxR EXTEVNT7 LL_HRTIM_TIM_GetResetTrig\n
  3654. * RSTxR EXTEVNT8 LL_HRTIM_TIM_GetResetTrig\n
  3655. * RSTxR EXTEVNT9 LL_HRTIM_TIM_GetResetTrig\n
  3656. * RSTxR EXTEVNT10 LL_HRTIM_TIM_GetResetTrig\n
  3657. * RSTxR TIMBCMP1 LL_HRTIM_TIM_GetResetTrig\n
  3658. * RSTxR TIMBCMP2 LL_HRTIM_TIM_GetResetTrig\n
  3659. * RSTxR TIMBCMP4 LL_HRTIM_TIM_GetResetTrig\n
  3660. * RSTxR TIMCCMP1 LL_HRTIM_TIM_GetResetTrig\n
  3661. * RSTxR TIMCCMP2 LL_HRTIM_TIM_GetResetTrig\n
  3662. * RSTxR TIMCCMP4 LL_HRTIM_TIM_GetResetTrig\n
  3663. * RSTxR TIMDCMP1 LL_HRTIM_TIM_GetResetTrig\n
  3664. * RSTxR TIMDCMP2 LL_HRTIM_TIM_GetResetTrig\n
  3665. * RSTxR TIMDCMP4 LL_HRTIM_TIM_GetResetTrig\n
  3666. * RSTxR TIMECMP1 LL_HRTIM_TIM_GetResetTrig\n
  3667. * RSTxR TIMECMP2 LL_HRTIM_TIM_GetResetTrig\n
  3668. * RSTxR TIMECMP4 LL_HRTIM_TIM_GetResetTrig
  3669. * @param HRTIMx High Resolution Timer instance
  3670. * @param Timer This parameter can be one of the following values:
  3671. * @arg @ref LL_HRTIM_TIMER_A
  3672. * @arg @ref LL_HRTIM_TIMER_B
  3673. * @arg @ref LL_HRTIM_TIMER_C
  3674. * @arg @ref LL_HRTIM_TIMER_D
  3675. * @arg @ref LL_HRTIM_TIMER_E
  3676. * @retval ResetTrig Returned value can be one of the following values:
  3677. * @arg @ref LL_HRTIM_RESETTRIG_NONE
  3678. * @arg @ref LL_HRTIM_RESETTRIG_UPDATE
  3679. * @arg @ref LL_HRTIM_RESETTRIG_CMP2
  3680. * @arg @ref LL_HRTIM_RESETTRIG_CMP4
  3681. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_PER
  3682. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP1
  3683. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP2
  3684. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP3
  3685. * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP4
  3686. * @arg @ref LL_HRTIM_RESETTRIG_EEV_1
  3687. * @arg @ref LL_HRTIM_RESETTRIG_EEV_2
  3688. * @arg @ref LL_HRTIM_RESETTRIG_EEV_3
  3689. * @arg @ref LL_HRTIM_RESETTRIG_EEV_4
  3690. * @arg @ref LL_HRTIM_RESETTRIG_EEV_5
  3691. * @arg @ref LL_HRTIM_RESETTRIG_EEV_6
  3692. * @arg @ref LL_HRTIM_RESETTRIG_EEV_7
  3693. * @arg @ref LL_HRTIM_RESETTRIG_EEV_8
  3694. * @arg @ref LL_HRTIM_RESETTRIG_EEV_9
  3695. * @arg @ref LL_HRTIM_RESETTRIG_EEV_10
  3696. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP1
  3697. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP2
  3698. * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP4
  3699. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP1
  3700. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP2
  3701. * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP4
  3702. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP1
  3703. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP2
  3704. * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP4
  3705. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP1
  3706. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP2
  3707. * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP4
  3708. */
  3709. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetResetTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3710. {
  3711. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3712. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTxR) +
  3713. REG_OFFSET_TAB_TIMER[iTimer]));
  3714. return (READ_REG(*pReg));
  3715. }
  3716. /**
  3717. * @brief Get captured value for capture unit 1.
  3718. * @rmtoll CPT1xR CPT1x LL_HRTIM_TIM_GetCapture1
  3719. * @param HRTIMx High Resolution Timer instance
  3720. * @param Timer This parameter can be one of the following values:
  3721. * @arg @ref LL_HRTIM_TIMER_A
  3722. * @arg @ref LL_HRTIM_TIMER_B
  3723. * @arg @ref LL_HRTIM_TIMER_C
  3724. * @arg @ref LL_HRTIM_TIMER_D
  3725. * @arg @ref LL_HRTIM_TIMER_E
  3726. * @retval Captured value
  3727. */
  3728. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3729. {
  3730. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3731. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT1xR) +
  3732. REG_OFFSET_TAB_TIMER[iTimer]));
  3733. return (READ_REG(*pReg));
  3734. }
  3735. /**
  3736. * @brief Get captured value for capture unit 2.
  3737. * @rmtoll CPT2xR CPT2x LL_HRTIM_TIM_GetCapture2
  3738. * @param HRTIMx High Resolution Timer instance
  3739. * @param Timer This parameter can be one of the following values:
  3740. * @arg @ref LL_HRTIM_TIMER_A
  3741. * @arg @ref LL_HRTIM_TIMER_B
  3742. * @arg @ref LL_HRTIM_TIMER_C
  3743. * @arg @ref LL_HRTIM_TIMER_D
  3744. * @arg @ref LL_HRTIM_TIMER_E
  3745. * @retval Captured value
  3746. */
  3747. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCapture2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3748. {
  3749. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3750. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CPT2xR) +
  3751. REG_OFFSET_TAB_TIMER[iTimer]));
  3752. return (READ_REG(*pReg));
  3753. }
  3754. /**
  3755. * @brief Set the trigger of a capture unit for a given timer.
  3756. * @rmtoll CPT1xCR SWCPT LL_HRTIM_TIM_SetCaptureTrig\n
  3757. * CPT1xCR UPDCPT LL_HRTIM_TIM_SetCaptureTrig\n
  3758. * CPT1xCR EXEV1CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3759. * CPT1xCR EXEV2CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3760. * CPT1xCR EXEV3CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3761. * CPT1xCR EXEV4CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3762. * CPT1xCR EXEV5CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3763. * CPT1xCR EXEV6CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3764. * CPT1xCR EXEV7CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3765. * CPT1xCR EXEV8CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3766. * CPT1xCR EXEV9CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3767. * CPT1xCR EXEV10CPT LL_HRTIM_TIM_SetCaptureTrig\n
  3768. * CPT1xCR TA1SET LL_HRTIM_TIM_SetCaptureTrig\n
  3769. * CPT1xCR TA1RST LL_HRTIM_TIM_SetCaptureTrig\n
  3770. * CPT1xCR TACMP1 LL_HRTIM_TIM_SetCaptureTrig\n
  3771. * CPT1xCR TACMP2 LL_HRTIM_TIM_SetCaptureTrig\n
  3772. * CPT1xCR TB1SET LL_HRTIM_TIM_SetCaptureTrig\n
  3773. * CPT1xCR TB1RST LL_HRTIM_TIM_SetCaptureTrig\n
  3774. * CPT1xCR TBCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
  3775. * CPT1xCR TBCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
  3776. * CPT1xCR TC1SET LL_HRTIM_TIM_SetCaptureTrig\n
  3777. * CPT1xCR TC1RST LL_HRTIM_TIM_SetCaptureTrig\n
  3778. * CPT1xCR TCCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
  3779. * CPT1xCR TCCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
  3780. * CPT1xCR TD1SET LL_HRTIM_TIM_SetCaptureTrig\n
  3781. * CPT1xCR TD1RST LL_HRTIM_TIM_SetCaptureTrig\n
  3782. * CPT1xCR TDCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
  3783. * CPT1xCR TDCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
  3784. * CPT1xCR TE1SET LL_HRTIM_TIM_SetCaptureTrig\n
  3785. * CPT1xCR TE1RST LL_HRTIM_TIM_SetCaptureTrig\n
  3786. * CPT1xCR TECMP1 LL_HRTIM_TIM_SetCaptureTrig\n
  3787. * CPT1xCR TECMP2 LL_HRTIM_TIM_SetCaptureTrig
  3788. * @param HRTIMx High Resolution Timer instance
  3789. * @param Timer This parameter can be one of the following values:
  3790. * @arg @ref LL_HRTIM_TIMER_A
  3791. * @arg @ref LL_HRTIM_TIMER_B
  3792. * @arg @ref LL_HRTIM_TIMER_C
  3793. * @arg @ref LL_HRTIM_TIMER_D
  3794. * @arg @ref LL_HRTIM_TIMER_E
  3795. * @param CaptureUnit This parameter can be one of the following values:
  3796. * @arg @ref LL_HRTIM_CAPTUREUNIT_1
  3797. * @arg @ref LL_HRTIM_CAPTUREUNIT_2
  3798. * @param CaptureTrig This parameter can be a combination of the following values:
  3799. * @arg @ref LL_HRTIM_CAPTURETRIG_NONE
  3800. * @arg @ref LL_HRTIM_CAPTURETRIG_UPDATE
  3801. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_1
  3802. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_2
  3803. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_3
  3804. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_4
  3805. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_5
  3806. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_6
  3807. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_7
  3808. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_8
  3809. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_9
  3810. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_10
  3811. * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_SET
  3812. * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_RESET
  3813. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP1
  3814. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP2
  3815. * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_SET
  3816. * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_RESET
  3817. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP1
  3818. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP2
  3819. * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_SET
  3820. * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_RESET
  3821. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP1
  3822. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP2
  3823. * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_SET
  3824. * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_RESET
  3825. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP1
  3826. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP2
  3827. * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_SET
  3828. * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_RESET
  3829. * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP1
  3830. * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP2
  3831. * @retval None
  3832. */
  3833. __STATIC_INLINE void LL_HRTIM_TIM_SetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CaptureUnit,
  3834. uint32_t CaptureTrig)
  3835. {
  3836. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3837. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) +
  3838. REG_OFFSET_TAB_TIMER[iTimer] + (CaptureUnit * 4U)));
  3839. WRITE_REG(*pReg, CaptureTrig);
  3840. }
  3841. /**
  3842. * @brief Get actual trigger of a capture unit for a given timer.
  3843. * @rmtoll CPT1xCR SWCPT LL_HRTIM_TIM_GetCaptureTrig\n
  3844. * CPT1xCR UPDCPT LL_HRTIM_TIM_GetCaptureTrig\n
  3845. * CPT1xCR EXEV1CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3846. * CPT1xCR EXEV2CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3847. * CPT1xCR EXEV3CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3848. * CPT1xCR EXEV4CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3849. * CPT1xCR EXEV5CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3850. * CPT1xCR EXEV6CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3851. * CPT1xCR EXEV7CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3852. * CPT1xCR EXEV8CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3853. * CPT1xCR EXEV9CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3854. * CPT1xCR EXEV10CPT LL_HRTIM_TIM_GetCaptureTrig\n
  3855. * CPT1xCR TA1SET LL_HRTIM_TIM_GetCaptureTrig\n
  3856. * CPT1xCR TA1RST LL_HRTIM_TIM_GetCaptureTrig\n
  3857. * CPT1xCR TACMP1 LL_HRTIM_TIM_GetCaptureTrig\n
  3858. * CPT1xCR TACMP2 LL_HRTIM_TIM_GetCaptureTrig\n
  3859. * CPT1xCR TB1SET LL_HRTIM_TIM_GetCaptureTrig\n
  3860. * CPT1xCR TB1RST LL_HRTIM_TIM_GetCaptureTrig\n
  3861. * CPT1xCR TBCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
  3862. * CPT1xCR TBCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
  3863. * CPT1xCR TC1SET LL_HRTIM_TIM_GetCaptureTrig\n
  3864. * CPT1xCR TC1RST LL_HRTIM_TIM_GetCaptureTrig\n
  3865. * CPT1xCR TCCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
  3866. * CPT1xCR TCCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
  3867. * CPT1xCR TD1SET LL_HRTIM_TIM_GetCaptureTrig\n
  3868. * CPT1xCR TD1RST LL_HRTIM_TIM_GetCaptureTrig\n
  3869. * CPT1xCR TDCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
  3870. * CPT1xCR TDCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
  3871. * CPT1xCR TE1SET LL_HRTIM_TIM_GetCaptureTrig\n
  3872. * CPT1xCR TE1RST LL_HRTIM_TIM_GetCaptureTrig\n
  3873. * CPT1xCR TECMP1 LL_HRTIM_TIM_GetCaptureTrig\n
  3874. * CPT1xCR TECMP2 LL_HRTIM_TIM_GetCaptureTrig
  3875. * @param HRTIMx High Resolution Timer instance
  3876. * @param Timer This parameter can be one of the following values:
  3877. * @arg @ref LL_HRTIM_TIMER_A
  3878. * @arg @ref LL_HRTIM_TIMER_B
  3879. * @arg @ref LL_HRTIM_TIMER_C
  3880. * @arg @ref LL_HRTIM_TIMER_D
  3881. * @arg @ref LL_HRTIM_TIMER_E
  3882. * @param CaptureUnit This parameter can be one of the following values:
  3883. * @arg @ref LL_HRTIM_CAPTUREUNIT_1
  3884. * @arg @ref LL_HRTIM_CAPTUREUNIT_2
  3885. * @retval CaptureTrig This parameter can be a combination of the following values:
  3886. * @arg @ref LL_HRTIM_CAPTURETRIG_NONE
  3887. * @arg @ref LL_HRTIM_CAPTURETRIG_UPDATE
  3888. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_1
  3889. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_2
  3890. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_3
  3891. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_4
  3892. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_5
  3893. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_6
  3894. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_7
  3895. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_8
  3896. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_9
  3897. * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_10
  3898. * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_SET
  3899. * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_RESET
  3900. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP1
  3901. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP2
  3902. * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_SET
  3903. * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_RESET
  3904. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP1
  3905. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP2
  3906. * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_SET
  3907. * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_RESET
  3908. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP1
  3909. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP2
  3910. * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_SET
  3911. * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_RESET
  3912. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP1
  3913. * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP2
  3914. * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_SET
  3915. * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_RESET
  3916. * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP1
  3917. * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP2
  3918. */
  3919. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCaptureTrig(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t CaptureUnit)
  3920. {
  3921. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3922. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0U].CPT1xCR) +
  3923. REG_OFFSET_TAB_TIMER[iTimer] + (CaptureUnit * 4U)));
  3924. return (READ_REG(*pReg));
  3925. }
  3926. /**
  3927. * @brief Enable deadtime insertion for a given timer.
  3928. * @rmtoll OUTxR DTEN LL_HRTIM_TIM_EnableDeadTime
  3929. * @param HRTIMx High Resolution Timer instance
  3930. * @param Timer This parameter can be one of the following values:
  3931. * @arg @ref LL_HRTIM_TIMER_A
  3932. * @arg @ref LL_HRTIM_TIMER_B
  3933. * @arg @ref LL_HRTIM_TIMER_C
  3934. * @arg @ref LL_HRTIM_TIMER_D
  3935. * @arg @ref LL_HRTIM_TIMER_E
  3936. * @retval None
  3937. */
  3938. __STATIC_INLINE void LL_HRTIM_TIM_EnableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3939. {
  3940. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3941. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  3942. REG_OFFSET_TAB_TIMER[iTimer]));
  3943. SET_BIT(*pReg, HRTIM_OUTR_DTEN);
  3944. }
  3945. /**
  3946. * @brief Disable deadtime insertion for a given timer.
  3947. * @rmtoll OUTxR DTEN LL_HRTIM_TIM_DisableDeadTime
  3948. * @param HRTIMx High Resolution Timer instance
  3949. * @param Timer This parameter can be one of the following values:
  3950. * @arg @ref LL_HRTIM_TIMER_A
  3951. * @arg @ref LL_HRTIM_TIMER_B
  3952. * @arg @ref LL_HRTIM_TIMER_C
  3953. * @arg @ref LL_HRTIM_TIMER_D
  3954. * @arg @ref LL_HRTIM_TIMER_E
  3955. * @retval None
  3956. */
  3957. __STATIC_INLINE void LL_HRTIM_TIM_DisableDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3958. {
  3959. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3960. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  3961. REG_OFFSET_TAB_TIMER[iTimer]));
  3962. CLEAR_BIT(*pReg, HRTIM_OUTR_DTEN);
  3963. }
  3964. /**
  3965. * @brief Indicate whether deadtime insertion is enabled for a given timer.
  3966. * @rmtoll OUTxR DTEN LL_HRTIM_TIM_IsEnabledDeadTime
  3967. * @param HRTIMx High Resolution Timer instance
  3968. * @param Timer This parameter can be one of the following values:
  3969. * @arg @ref LL_HRTIM_TIMER_A
  3970. * @arg @ref LL_HRTIM_TIMER_B
  3971. * @arg @ref LL_HRTIM_TIMER_C
  3972. * @arg @ref LL_HRTIM_TIMER_D
  3973. * @arg @ref LL_HRTIM_TIMER_E
  3974. * @retval State of DTEN bit in HRTIM_OUTxR register (1 or 0).
  3975. */
  3976. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDeadTime(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  3977. {
  3978. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  3979. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  3980. REG_OFFSET_TAB_TIMER[iTimer]));
  3981. return ((READ_BIT(*pReg, HRTIM_OUTR_DTEN) == (HRTIM_OUTR_DTEN)) ? 1UL : 0UL);
  3982. }
  3983. /**
  3984. * @brief Set the delayed protection (DLYPRT) mode.
  3985. * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_SetDLYPRTMode\n
  3986. * OUTxR DLYPRT LL_HRTIM_TIM_SetDLYPRTMode
  3987. * @note This function must be called prior enabling the delayed protection
  3988. * @note Balanced Idle mode is only available in push-pull mode
  3989. * @param HRTIMx High Resolution Timer instance
  3990. * @param Timer This parameter can be one of the following values:
  3991. * @arg @ref LL_HRTIM_TIMER_A
  3992. * @arg @ref LL_HRTIM_TIMER_B
  3993. * @arg @ref LL_HRTIM_TIMER_C
  3994. * @arg @ref LL_HRTIM_TIMER_D
  3995. * @arg @ref LL_HRTIM_TIMER_E
  3996. * @param DLYPRTMode Delayed protection (DLYPRT) mode
  3997. *
  3998. * For timers A, B and C this parameter can be one of the following values:
  3999. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV6
  4000. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV6
  4001. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV6
  4002. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV6
  4003. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV7
  4004. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV7
  4005. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV7
  4006. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV7
  4007. *
  4008. * For timers D and E this parameter can be one of the following values:
  4009. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV8
  4010. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV8
  4011. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV8
  4012. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV8
  4013. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV9
  4014. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV9
  4015. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV9
  4016. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV9
  4017. * @retval None
  4018. */
  4019. __STATIC_INLINE void LL_HRTIM_TIM_SetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DLYPRTMode)
  4020. {
  4021. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4022. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  4023. REG_OFFSET_TAB_TIMER[iTimer]));
  4024. MODIFY_REG(*pReg, HRTIM_OUTR_DLYPRT, DLYPRTMode);
  4025. }
  4026. /**
  4027. * @brief Get the delayed protection (DLYPRT) mode.
  4028. * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_GetDLYPRTMode\n
  4029. * OUTxR DLYPRT LL_HRTIM_TIM_GetDLYPRTMode
  4030. * @param HRTIMx High Resolution Timer instance
  4031. * @param Timer This parameter can be one of the following values:
  4032. * @arg @ref LL_HRTIM_TIMER_A
  4033. * @arg @ref LL_HRTIM_TIMER_B
  4034. * @arg @ref LL_HRTIM_TIMER_C
  4035. * @arg @ref LL_HRTIM_TIMER_D
  4036. * @arg @ref LL_HRTIM_TIMER_E
  4037. * @retval DLYPRTMode Delayed protection (DLYPRT) mode
  4038. *
  4039. * For timers A, B and C this parameter can be one of the following values:
  4040. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV6
  4041. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV6
  4042. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV6
  4043. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV6
  4044. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV7
  4045. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV7
  4046. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV7
  4047. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV7
  4048. *
  4049. * For timers D and E this parameter can be one of the following values:
  4050. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV8
  4051. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV8
  4052. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV8
  4053. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV8
  4054. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV9
  4055. * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV9
  4056. * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV9
  4057. * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV9
  4058. */
  4059. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetDLYPRTMode(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4060. {
  4061. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4062. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  4063. REG_OFFSET_TAB_TIMER[iTimer]));
  4064. return (READ_BIT(*pReg, HRTIM_OUTR_DLYPRT));
  4065. }
  4066. /**
  4067. * @brief Enable delayed protection (DLYPRT) for a given timer.
  4068. * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_EnableDLYPRT
  4069. * @note This function must not be called once the concerned timer is enabled
  4070. * @param HRTIMx High Resolution Timer instance
  4071. * @param Timer This parameter can be one of the following values:
  4072. * @arg @ref LL_HRTIM_TIMER_A
  4073. * @arg @ref LL_HRTIM_TIMER_B
  4074. * @arg @ref LL_HRTIM_TIMER_C
  4075. * @arg @ref LL_HRTIM_TIMER_D
  4076. * @arg @ref LL_HRTIM_TIMER_E
  4077. * @retval None
  4078. */
  4079. __STATIC_INLINE void LL_HRTIM_TIM_EnableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4080. {
  4081. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4082. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  4083. REG_OFFSET_TAB_TIMER[iTimer]));
  4084. SET_BIT(*pReg, HRTIM_OUTR_DLYPRTEN);
  4085. }
  4086. /**
  4087. * @brief Disable delayed protection (DLYPRT) for a given timer.
  4088. * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_DisableDLYPRT
  4089. * @note This function must not be called once the concerned timer is enabled
  4090. * @param HRTIMx High Resolution Timer instance
  4091. * @param Timer This parameter can be one of the following values:
  4092. * @arg @ref LL_HRTIM_TIMER_A
  4093. * @arg @ref LL_HRTIM_TIMER_B
  4094. * @arg @ref LL_HRTIM_TIMER_C
  4095. * @arg @ref LL_HRTIM_TIMER_D
  4096. * @arg @ref LL_HRTIM_TIMER_E
  4097. * @retval None
  4098. */
  4099. __STATIC_INLINE void LL_HRTIM_TIM_DisableDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4100. {
  4101. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4102. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  4103. REG_OFFSET_TAB_TIMER[iTimer]));
  4104. CLEAR_BIT(*pReg, HRTIM_OUTR_DLYPRTEN);
  4105. }
  4106. /**
  4107. * @brief Indicate whether delayed protection (DLYPRT) is enabled for a given timer.
  4108. * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_IsEnabledDLYPRT
  4109. * @param HRTIMx High Resolution Timer instance
  4110. * @param Timer This parameter can be one of the following values:
  4111. * @arg @ref LL_HRTIM_TIMER_A
  4112. * @arg @ref LL_HRTIM_TIMER_B
  4113. * @arg @ref LL_HRTIM_TIMER_C
  4114. * @arg @ref LL_HRTIM_TIMER_D
  4115. * @arg @ref LL_HRTIM_TIMER_E
  4116. * @retval State of DLYPRTEN bit in HRTIM_OUTxR register (1 or 0).
  4117. */
  4118. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledDLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4119. {
  4120. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4121. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  4122. REG_OFFSET_TAB_TIMER[iTimer]));
  4123. return ((READ_BIT(*pReg, HRTIM_OUTR_DLYPRTEN) == (HRTIM_OUTR_DLYPRTEN)) ? 1UL : 0UL);
  4124. }
  4125. /**
  4126. * @brief Enable the fault channel(s) for a given timer.
  4127. * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_EnableFault\n
  4128. * FLTxR FLT2EN LL_HRTIM_TIM_EnableFault\n
  4129. * FLTxR FLT3EN LL_HRTIM_TIM_EnableFault\n
  4130. * FLTxR FLT4EN LL_HRTIM_TIM_EnableFault\n
  4131. * FLTxR FLT5EN LL_HRTIM_TIM_EnableFault
  4132. * @param HRTIMx High Resolution Timer instance
  4133. * @param Timer This parameter can be one of the following values:
  4134. * @arg @ref LL_HRTIM_TIMER_A
  4135. * @arg @ref LL_HRTIM_TIMER_B
  4136. * @arg @ref LL_HRTIM_TIMER_C
  4137. * @arg @ref LL_HRTIM_TIMER_D
  4138. * @arg @ref LL_HRTIM_TIMER_E
  4139. * @param Faults This parameter can be a combination of the following values:
  4140. * @arg @ref LL_HRTIM_FAULT_1
  4141. * @arg @ref LL_HRTIM_FAULT_2
  4142. * @arg @ref LL_HRTIM_FAULT_3
  4143. * @arg @ref LL_HRTIM_FAULT_4
  4144. * @arg @ref LL_HRTIM_FAULT_5
  4145. * @retval None
  4146. */
  4147. __STATIC_INLINE void LL_HRTIM_TIM_EnableFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Faults)
  4148. {
  4149. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4150. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) +
  4151. REG_OFFSET_TAB_TIMER[iTimer]));
  4152. SET_BIT(*pReg, Faults);
  4153. }
  4154. /**
  4155. * @brief Disable the fault channel(s) for a given timer.
  4156. * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_DisableFault\n
  4157. * FLTxR FLT2EN LL_HRTIM_TIM_DisableFault\n
  4158. * FLTxR FLT3EN LL_HRTIM_TIM_DisableFault\n
  4159. * FLTxR FLT4EN LL_HRTIM_TIM_DisableFault\n
  4160. * FLTxR FLT5EN LL_HRTIM_TIM_DisableFault
  4161. * @param HRTIMx High Resolution Timer instance
  4162. * @param Timer This parameter can be one of the following values:
  4163. * @arg @ref LL_HRTIM_TIMER_A
  4164. * @arg @ref LL_HRTIM_TIMER_B
  4165. * @arg @ref LL_HRTIM_TIMER_C
  4166. * @arg @ref LL_HRTIM_TIMER_D
  4167. * @arg @ref LL_HRTIM_TIMER_E
  4168. * @param Faults This parameter can be a combination of the following values:
  4169. * @arg @ref LL_HRTIM_FAULT_1
  4170. * @arg @ref LL_HRTIM_FAULT_2
  4171. * @arg @ref LL_HRTIM_FAULT_3
  4172. * @arg @ref LL_HRTIM_FAULT_4
  4173. * @arg @ref LL_HRTIM_FAULT_5
  4174. * @retval None
  4175. */
  4176. __STATIC_INLINE void LL_HRTIM_TIM_DisableFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Faults)
  4177. {
  4178. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4179. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) +
  4180. REG_OFFSET_TAB_TIMER[iTimer]));
  4181. CLEAR_BIT(*pReg, Faults);
  4182. }
  4183. /**
  4184. * @brief Indicate whether the fault channel is enabled for a given timer.
  4185. * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_IsEnabledFault\n
  4186. * FLTxR FLT2EN LL_HRTIM_TIM_IsEnabledFault\n
  4187. * FLTxR FLT3EN LL_HRTIM_TIM_IsEnabledFault\n
  4188. * FLTxR FLT4EN LL_HRTIM_TIM_IsEnabledFault\n
  4189. * FLTxR FLT5EN LL_HRTIM_TIM_IsEnabledFault
  4190. * @param HRTIMx High Resolution Timer instance
  4191. * @param Timer This parameter can be one of the following values:
  4192. * @arg @ref LL_HRTIM_TIMER_A
  4193. * @arg @ref LL_HRTIM_TIMER_B
  4194. * @arg @ref LL_HRTIM_TIMER_C
  4195. * @arg @ref LL_HRTIM_TIMER_D
  4196. * @arg @ref LL_HRTIM_TIMER_E
  4197. * @param Fault This parameter can be one of the following values:
  4198. * @arg @ref LL_HRTIM_FAULT_1
  4199. * @arg @ref LL_HRTIM_FAULT_2
  4200. * @arg @ref LL_HRTIM_FAULT_3
  4201. * @arg @ref LL_HRTIM_FAULT_4
  4202. * @arg @ref LL_HRTIM_FAULT_5
  4203. * @retval State of FLTxEN bit in HRTIM_FLTxR register (1 or 0).
  4204. */
  4205. __STATIC_INLINE uint32_t LL_HRTIM_TIM_IsEnabledFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Fault)
  4206. {
  4207. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4208. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) +
  4209. REG_OFFSET_TAB_TIMER[iTimer]));
  4210. return ((READ_BIT(*pReg, Fault) == (Fault)) ? 1UL : 0UL);
  4211. }
  4212. /**
  4213. * @brief Lock the fault conditioning set-up for a given timer.
  4214. * @rmtoll FLTxR FLTLCK LL_HRTIM_TIM_LockFault
  4215. * @note Timer fault-related set-up is frozen until the next HRTIM or system reset
  4216. * @param HRTIMx High Resolution Timer instance
  4217. * @param Timer This parameter can be one of the following values:
  4218. * @arg @ref LL_HRTIM_TIMER_A
  4219. * @arg @ref LL_HRTIM_TIMER_B
  4220. * @arg @ref LL_HRTIM_TIMER_C
  4221. * @arg @ref LL_HRTIM_TIMER_D
  4222. * @arg @ref LL_HRTIM_TIMER_E
  4223. * @retval None
  4224. */
  4225. __STATIC_INLINE void LL_HRTIM_TIM_LockFault(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4226. {
  4227. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4228. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].FLTxR) +
  4229. REG_OFFSET_TAB_TIMER[iTimer]));
  4230. SET_BIT(*pReg, HRTIM_FLTR_FLTLCK);
  4231. }
  4232. /**
  4233. * @brief Define how the timer behaves during a burst mode operation.
  4234. * @rmtoll BMCR MTBM LL_HRTIM_TIM_SetBurstModeOption\n
  4235. * BMCR TABM LL_HRTIM_TIM_SetBurstModeOption\n
  4236. * BMCR TBBM LL_HRTIM_TIM_SetBurstModeOption\n
  4237. * BMCR TCBM LL_HRTIM_TIM_SetBurstModeOption\n
  4238. * BMCR TDBM LL_HRTIM_TIM_SetBurstModeOption\n
  4239. * BMCR TEBM LL_HRTIM_TIM_SetBurstModeOption
  4240. * @note This function must not be called when the burst mode is enabled
  4241. * @param HRTIMx High Resolution Timer instance
  4242. * @param Timer This parameter can be one of the following values:
  4243. * @arg @ref LL_HRTIM_TIMER_MASTER
  4244. * @arg @ref LL_HRTIM_TIMER_A
  4245. * @arg @ref LL_HRTIM_TIMER_B
  4246. * @arg @ref LL_HRTIM_TIMER_C
  4247. * @arg @ref LL_HRTIM_TIMER_D
  4248. * @arg @ref LL_HRTIM_TIMER_E
  4249. * @param BurtsModeOption This parameter can be one of the following values:
  4250. * @arg @ref LL_HRTIM_BURSTMODE_MAINTAINCLOCK
  4251. * @arg @ref LL_HRTIM_BURSTMODE_RESETCOUNTER
  4252. * @retval None
  4253. */
  4254. __STATIC_INLINE void LL_HRTIM_TIM_SetBurstModeOption(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t BurtsModeOption)
  4255. {
  4256. register uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU);
  4257. MODIFY_REG(HRTIMx->sCommonRegs.BMCR, Timer, BurtsModeOption << iTimer);
  4258. }
  4259. /**
  4260. * @brief Retrieve how the timer behaves during a burst mode operation.
  4261. * @rmtoll BMCR MCR LL_HRTIM_TIM_GetBurstModeOption\n
  4262. * BMCR TABM LL_HRTIM_TIM_GetBurstModeOption\n
  4263. * BMCR TBBM LL_HRTIM_TIM_GetBurstModeOption\n
  4264. * BMCR TCBM LL_HRTIM_TIM_GetBurstModeOption\n
  4265. * BMCR TDBM LL_HRTIM_TIM_GetBurstModeOption\n
  4266. * BMCR TEBM LL_HRTIM_TIM_GetBurstModeOption
  4267. * @param HRTIMx High Resolution Timer instance
  4268. * @param Timer This parameter can be one of the following values:
  4269. * @arg @ref LL_HRTIM_TIMER_MASTER
  4270. * @arg @ref LL_HRTIM_TIMER_A
  4271. * @arg @ref LL_HRTIM_TIMER_B
  4272. * @arg @ref LL_HRTIM_TIMER_C
  4273. * @arg @ref LL_HRTIM_TIMER_D
  4274. * @arg @ref LL_HRTIM_TIMER_E
  4275. * @retval BurtsMode This parameter can be one of the following values:
  4276. * @arg @ref LL_HRTIM_BURSTMODE_MAINTAINCLOCK
  4277. * @arg @ref LL_HRTIM_BURSTMODE_RESETCOUNTER
  4278. */
  4279. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetBurstModeOption(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4280. {
  4281. register uint32_t iTimer = (uint8_t)((POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos) & 0x1FU);
  4282. return (READ_BIT(HRTIMx->sCommonRegs.BMCR, Timer) >> iTimer);
  4283. }
  4284. /**
  4285. * @brief Program which registers are to be written by Burst DMA transfers.
  4286. * @rmtoll BDMUPDR MTBM LL_HRTIM_TIM_ConfigBurstDMA\n
  4287. * BDMUPDR MICR LL_HRTIM_TIM_ConfigBurstDMA\n
  4288. * BDMUPDR MDIER LL_HRTIM_TIM_ConfigBurstDMA\n
  4289. * BDMUPDR MCNT LL_HRTIM_TIM_ConfigBurstDMA\n
  4290. * BDMUPDR MPER LL_HRTIM_TIM_ConfigBurstDMA\n
  4291. * BDMUPDR MREP LL_HRTIM_TIM_ConfigBurstDMA\n
  4292. * BDMUPDR MCMP1 LL_HRTIM_TIM_ConfigBurstDMA\n
  4293. * BDMUPDR MCMP2 LL_HRTIM_TIM_ConfigBurstDMA\n
  4294. * BDMUPDR MCMP3 LL_HRTIM_TIM_ConfigBurstDMA\n
  4295. * BDMUPDR MCMP4 LL_HRTIM_TIM_ConfigBurstDMA\n
  4296. * BDTxUPDR TIMxCR LL_HRTIM_TIM_ConfigBurstDMA\n
  4297. * BDTxUPDR TIMxICR LL_HRTIM_TIM_ConfigBurstDMA\n
  4298. * BDTxUPDR TIMxDIER LL_HRTIM_TIM_ConfigBurstDMA\n
  4299. * BDTxUPDR TIMxCNT LL_HRTIM_TIM_ConfigBurstDMA\n
  4300. * BDTxUPDR TIMxPER LL_HRTIM_TIM_ConfigBurstDMA\n
  4301. * BDTxUPDR TIMxREP LL_HRTIM_TIM_ConfigBurstDMA\n
  4302. * BDTxUPDR TIMxCMP1 LL_HRTIM_TIM_ConfigBurstDMA\n
  4303. * BDTxUPDR TIMxCMP2 LL_HRTIM_TIM_ConfigBurstDMA\n
  4304. * BDTxUPDR TIMxCMP3 LL_HRTIM_TIM_ConfigBurstDMA\n
  4305. * BDTxUPDR TIMxCMP4 LL_HRTIM_TIM_ConfigBurstDMA\n
  4306. * BDTxUPDR TIMxDTR LL_HRTIM_TIM_ConfigBurstDMA\n
  4307. * BDTxUPDR TIMxSET1R LL_HRTIM_TIM_ConfigBurstDMA\n
  4308. * BDTxUPDR TIMxRST1R LL_HRTIM_TIM_ConfigBurstDMA\n
  4309. * BDTxUPDR TIMxSET2R LL_HRTIM_TIM_ConfigBurstDMA\n
  4310. * BDTxUPDR TIMxRST2R LL_HRTIM_TIM_ConfigBurstDMA\n
  4311. * BDTxUPDR TIMxEEFR1 LL_HRTIM_TIM_ConfigBurstDMA\n
  4312. * BDTxUPDR TIMxEEFR2 LL_HRTIM_TIM_ConfigBurstDMA\n
  4313. * BDTxUPDR TIMxRSTR LL_HRTIM_TIM_ConfigBurstDMA\n
  4314. * BDTxUPDR TIMxOUTR LL_HRTIM_TIM_ConfigBurstDMA\n
  4315. * BDTxUPDR TIMxLTCH LL_HRTIM_TIM_ConfigBurstDMA
  4316. * @param HRTIMx High Resolution Timer instance
  4317. * @param Timer This parameter can be one of the following values:
  4318. * @arg @ref LL_HRTIM_TIMER_MASTER
  4319. * @arg @ref LL_HRTIM_TIMER_A
  4320. * @arg @ref LL_HRTIM_TIMER_B
  4321. * @arg @ref LL_HRTIM_TIMER_C
  4322. * @arg @ref LL_HRTIM_TIMER_D
  4323. * @arg @ref LL_HRTIM_TIMER_E
  4324. * @param Registers Registers to be updated by the DMA request
  4325. *
  4326. * For Master timer this parameter can be can be a combination of the following values:
  4327. * @arg @ref LL_HRTIM_BURSTDMA_NONE
  4328. * @arg @ref LL_HRTIM_BURSTDMA_MCR
  4329. * @arg @ref LL_HRTIM_BURSTDMA_MICR
  4330. * @arg @ref LL_HRTIM_BURSTDMA_MDIER
  4331. * @arg @ref LL_HRTIM_BURSTDMA_MCNT
  4332. * @arg @ref LL_HRTIM_BURSTDMA_MPER
  4333. * @arg @ref LL_HRTIM_BURSTDMA_MREP
  4334. * @arg @ref LL_HRTIM_BURSTDMA_MCMP1
  4335. * @arg @ref LL_HRTIM_BURSTDMA_MCMP2
  4336. * @arg @ref LL_HRTIM_BURSTDMA_MCMP3
  4337. * @arg @ref LL_HRTIM_BURSTDMA_MCMP4
  4338. *
  4339. * For Timers A..E this parameter can be can be a combination of the following values:
  4340. * @arg @ref LL_HRTIM_BURSTDMA_NONE
  4341. * @arg @ref LL_HRTIM_BURSTDMA_TIMMCR
  4342. * @arg @ref LL_HRTIM_BURSTDMA_TIMICR
  4343. * @arg @ref LL_HRTIM_BURSTDMA_TIMDIER
  4344. * @arg @ref LL_HRTIM_BURSTDMA_TIMCNT
  4345. * @arg @ref LL_HRTIM_BURSTDMA_TIMPER
  4346. * @arg @ref LL_HRTIM_BURSTDMA_TIMREP
  4347. * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP1
  4348. * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP2
  4349. * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP3
  4350. * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP4
  4351. * @arg @ref LL_HRTIM_BURSTDMA_TIMDTR
  4352. * @arg @ref LL_HRTIM_BURSTDMA_TIMSET1R
  4353. * @arg @ref LL_HRTIM_BURSTDMA_TIMRST1R
  4354. * @arg @ref LL_HRTIM_BURSTDMA_TIMSET2R
  4355. * @arg @ref LL_HRTIM_BURSTDMA_TIMRST2R
  4356. * @arg @ref LL_HRTIM_BURSTDMA_TIMEEFR1
  4357. * @arg @ref LL_HRTIM_BURSTDMA_TIMEEFR2
  4358. * @arg @ref LL_HRTIM_BURSTDMA_TIMRSTR
  4359. * @arg @ref LL_HRTIM_BURSTDMA_TIMCHPR
  4360. * @arg @ref LL_HRTIM_BURSTDMA_TIMOUTR
  4361. * @arg @ref LL_HRTIM_BURSTDMA_TIMFLTR
  4362. * @retval None
  4363. */
  4364. __STATIC_INLINE void LL_HRTIM_TIM_ConfigBurstDMA(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Registers)
  4365. {
  4366. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  4367. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.BDMUPR) + (4U * iTimer)));
  4368. WRITE_REG(*pReg, Registers);
  4369. }
  4370. /**
  4371. * @brief Indicate on which output the signal is currently applied.
  4372. * @rmtoll TIMxISR CPPSTAT LL_HRTIM_TIM_GetCurrentPushPullStatus
  4373. * @note Only significant when the timer operates in push-pull mode.
  4374. * @param HRTIMx High Resolution Timer instance
  4375. * @param Timer This parameter can be one of the following values:
  4376. * @arg @ref LL_HRTIM_TIMER_A
  4377. * @arg @ref LL_HRTIM_TIMER_B
  4378. * @arg @ref LL_HRTIM_TIMER_C
  4379. * @arg @ref LL_HRTIM_TIMER_D
  4380. * @arg @ref LL_HRTIM_TIMER_E
  4381. * @retval CPPSTAT This parameter can be one of the following values:
  4382. * @arg @ref LL_HRTIM_CPPSTAT_OUTPUT1
  4383. * @arg @ref LL_HRTIM_CPPSTAT_OUTPUT2
  4384. */
  4385. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetCurrentPushPullStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4386. {
  4387. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  4388. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  4389. REG_OFFSET_TAB_TIMER[iTimer]));
  4390. return (READ_BIT(*pReg, HRTIM_TIMISR_CPPSTAT));
  4391. }
  4392. /**
  4393. * @brief Indicate on which output the signal was applied, in push-pull mode, balanced fault mode or delayed idle mode, when the protection was triggered.
  4394. * @rmtoll TIMxISR IPPSTAT LL_HRTIM_TIM_GetIdlePushPullStatus
  4395. * @param HRTIMx High Resolution Timer instance
  4396. * @param Timer This parameter can be one of the following values:
  4397. * @arg @ref LL_HRTIM_TIMER_A
  4398. * @arg @ref LL_HRTIM_TIMER_B
  4399. * @arg @ref LL_HRTIM_TIMER_C
  4400. * @arg @ref LL_HRTIM_TIMER_D
  4401. * @arg @ref LL_HRTIM_TIMER_E
  4402. * @retval IPPSTAT This parameter can be one of the following values:
  4403. * @arg @ref LL_HRTIM_IPPSTAT_OUTPUT1
  4404. * @arg @ref LL_HRTIM_IPPSTAT_OUTPUT2
  4405. */
  4406. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetIdlePushPullStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4407. {
  4408. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  4409. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  4410. REG_OFFSET_TAB_TIMER[iTimer]));
  4411. return (READ_BIT(*pReg, HRTIM_TIMISR_IPPSTAT));
  4412. }
  4413. /**
  4414. * @brief Set the event filter for a given timer.
  4415. * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_SetEventFilter\n
  4416. * EEFxR1 EE2LTCH LL_HRTIM_TIM_SetEventFilter\n
  4417. * EEFxR1 EE3LTCH LL_HRTIM_TIM_SetEventFilter\n
  4418. * EEFxR1 EE4LTCH LL_HRTIM_TIM_SetEventFilter\n
  4419. * EEFxR1 EE5LTCH LL_HRTIM_TIM_SetEventFilter\n
  4420. * EEFxR2 EE6LTCH LL_HRTIM_TIM_SetEventFilter\n
  4421. * EEFxR2 EE7LTCH LL_HRTIM_TIM_SetEventFilter\n
  4422. * EEFxR2 EE8LTCH LL_HRTIM_TIM_SetEventFilter\n
  4423. * EEFxR2 EE9LTCH LL_HRTIM_TIM_SetEventFilter\n
  4424. * EEFxR2 EE10LTCH LL_HRTIM_TIM_SetEventFilter
  4425. * @note This function must not be called when the timer counter is enabled.
  4426. * @param HRTIMx High Resolution Timer instance
  4427. * @param Timer This parameter can be one of the following values:
  4428. * @arg @ref LL_HRTIM_TIMER_A
  4429. * @arg @ref LL_HRTIM_TIMER_B
  4430. * @arg @ref LL_HRTIM_TIMER_C
  4431. * @arg @ref LL_HRTIM_TIMER_D
  4432. * @arg @ref LL_HRTIM_TIMER_E
  4433. * @param Event This parameter can be one of the following values:
  4434. * @arg @ref LL_HRTIM_EVENT_1
  4435. * @arg @ref LL_HRTIM_EVENT_2
  4436. * @arg @ref LL_HRTIM_EVENT_3
  4437. * @arg @ref LL_HRTIM_EVENT_4
  4438. * @arg @ref LL_HRTIM_EVENT_5
  4439. * @arg @ref LL_HRTIM_EVENT_6
  4440. * @arg @ref LL_HRTIM_EVENT_7
  4441. * @arg @ref LL_HRTIM_EVENT_8
  4442. * @arg @ref LL_HRTIM_EVENT_9
  4443. * @arg @ref LL_HRTIM_EVENT_10
  4444. * @param Filter This parameter can be one of the following values:
  4445. * @arg @ref LL_HRTIM_EEFLTR_NONE
  4446. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP1
  4447. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP2
  4448. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP3
  4449. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP4
  4450. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR1
  4451. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR2
  4452. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR3
  4453. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR4
  4454. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR5
  4455. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR6
  4456. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR7
  4457. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR8
  4458. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP2
  4459. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP3
  4460. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGTIM
  4461. * @retval None
  4462. */
  4463. __STATIC_INLINE void LL_HRTIM_TIM_SetEventFilter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event, uint32_t Filter)
  4464. {
  4465. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A));
  4466. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  4467. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) +
  4468. REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent]));
  4469. MODIFY_REG(*pReg, (HRTIM_EEFR1_EE1FLTR << REG_SHIFT_TAB_EExSRC[iEvent]), (Filter << REG_SHIFT_TAB_EExSRC[iEvent]));
  4470. }
  4471. /**
  4472. * @brief Get actual event filter settings for a given timer.
  4473. * @rmtoll EEFxR1 EE1FLTR LL_HRTIM_TIM_GetEventFilter\n
  4474. * EEFxR1 EE2FLTR LL_HRTIM_TIM_GetEventFilter\n
  4475. * EEFxR1 EE3FLTR LL_HRTIM_TIM_GetEventFilter\n
  4476. * EEFxR1 EE4FLTR LL_HRTIM_TIM_GetEventFilter\n
  4477. * EEFxR1 EE5FLTR LL_HRTIM_TIM_GetEventFilter\n
  4478. * EEFxR2 EE6FLTR LL_HRTIM_TIM_GetEventFilter\n
  4479. * EEFxR2 EE7FLTR LL_HRTIM_TIM_GetEventFilter\n
  4480. * EEFxR2 EE8FLTR LL_HRTIM_TIM_GetEventFilter\n
  4481. * EEFxR2 EE9FLTR LL_HRTIM_TIM_GetEventFilter\n
  4482. * EEFxR2 EE10FLTR LL_HRTIM_TIM_GetEventFilter
  4483. * @param HRTIMx High Resolution Timer instance
  4484. * @param Timer This parameter can be one of the following values:
  4485. * @arg @ref LL_HRTIM_TIMER_A
  4486. * @arg @ref LL_HRTIM_TIMER_B
  4487. * @arg @ref LL_HRTIM_TIMER_C
  4488. * @arg @ref LL_HRTIM_TIMER_D
  4489. * @arg @ref LL_HRTIM_TIMER_E
  4490. * @param Event This parameter can be one of the following values:
  4491. * @arg @ref LL_HRTIM_EVENT_1
  4492. * @arg @ref LL_HRTIM_EVENT_2
  4493. * @arg @ref LL_HRTIM_EVENT_3
  4494. * @arg @ref LL_HRTIM_EVENT_4
  4495. * @arg @ref LL_HRTIM_EVENT_5
  4496. * @arg @ref LL_HRTIM_EVENT_6
  4497. * @arg @ref LL_HRTIM_EVENT_7
  4498. * @arg @ref LL_HRTIM_EVENT_8
  4499. * @arg @ref LL_HRTIM_EVENT_9
  4500. * @arg @ref LL_HRTIM_EVENT_10
  4501. * @retval Filter This parameter can be one of the following values:
  4502. * @arg @ref LL_HRTIM_EEFLTR_NONE
  4503. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP1
  4504. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP2
  4505. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP3
  4506. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP4
  4507. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR1
  4508. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR2
  4509. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR3
  4510. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR4
  4511. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR5
  4512. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR6
  4513. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR7
  4514. * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR8
  4515. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP2
  4516. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP3
  4517. * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGTIM
  4518. */
  4519. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventFilter(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event)
  4520. {
  4521. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A));
  4522. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  4523. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) +
  4524. REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent]));
  4525. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EEFR1_EE1FLTR) << (REG_SHIFT_TAB_EExSRC[iEvent] )) >> (REG_SHIFT_TAB_EExSRC[iEvent] ));
  4526. }
  4527. /**
  4528. * @brief Enable or disable event latch mechanism for a given timer.
  4529. * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4530. * EEFxR1 EE2LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4531. * EEFxR1 EE3LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4532. * EEFxR1 EE4LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4533. * EEFxR1 EE5LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4534. * EEFxR2 EE6LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4535. * EEFxR2 EE7LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4536. * EEFxR2 EE8LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4537. * EEFxR2 EE9LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
  4538. * EEFxR2 EE10LTCH LL_HRTIM_TIM_SetEventLatchStatus
  4539. * @note This function must not be called when the timer counter is enabled.
  4540. * @param HRTIMx High Resolution Timer instance
  4541. * @param Timer This parameter can be one of the following values:
  4542. * @arg @ref LL_HRTIM_TIMER_A
  4543. * @arg @ref LL_HRTIM_TIMER_B
  4544. * @arg @ref LL_HRTIM_TIMER_C
  4545. * @arg @ref LL_HRTIM_TIMER_D
  4546. * @arg @ref LL_HRTIM_TIMER_E
  4547. * @param Event This parameter can be one of the following values:
  4548. * @arg @ref LL_HRTIM_EVENT_1
  4549. * @arg @ref LL_HRTIM_EVENT_2
  4550. * @arg @ref LL_HRTIM_EVENT_3
  4551. * @arg @ref LL_HRTIM_EVENT_4
  4552. * @arg @ref LL_HRTIM_EVENT_5
  4553. * @arg @ref LL_HRTIM_EVENT_6
  4554. * @arg @ref LL_HRTIM_EVENT_7
  4555. * @arg @ref LL_HRTIM_EVENT_8
  4556. * @arg @ref LL_HRTIM_EVENT_9
  4557. * @arg @ref LL_HRTIM_EVENT_10
  4558. * @param LatchStatus This parameter can be one of the following values:
  4559. * @arg @ref LL_HRTIM_EELATCH_DISABLED
  4560. * @arg @ref LL_HRTIM_EELATCH_ENABLED
  4561. * @retval None
  4562. */
  4563. __STATIC_INLINE void LL_HRTIM_TIM_SetEventLatchStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event,
  4564. uint32_t LatchStatus)
  4565. {
  4566. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A));
  4567. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  4568. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) +
  4569. REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent]));
  4570. MODIFY_REG(*pReg, (HRTIM_EEFR1_EE1LTCH << REG_SHIFT_TAB_EExSRC[iEvent]), (LatchStatus << REG_SHIFT_TAB_EExSRC[iEvent]));
  4571. }
  4572. /**
  4573. * @brief Get actual event latch status for a given timer.
  4574. * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4575. * EEFxR1 EE2LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4576. * EEFxR1 EE3LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4577. * EEFxR1 EE4LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4578. * EEFxR1 EE5LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4579. * EEFxR2 EE6LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4580. * EEFxR2 EE7LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4581. * EEFxR2 EE8LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4582. * EEFxR2 EE9LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
  4583. * EEFxR2 EE10LTCH LL_HRTIM_TIM_GetEventLatchStatus
  4584. * @param HRTIMx High Resolution Timer instance
  4585. * @param Timer This parameter can be one of the following values:
  4586. * @arg @ref LL_HRTIM_TIMER_A
  4587. * @arg @ref LL_HRTIM_TIMER_B
  4588. * @arg @ref LL_HRTIM_TIMER_C
  4589. * @arg @ref LL_HRTIM_TIMER_D
  4590. * @arg @ref LL_HRTIM_TIMER_E
  4591. * @param Event This parameter can be one of the following values:
  4592. * @arg @ref LL_HRTIM_EVENT_1
  4593. * @arg @ref LL_HRTIM_EVENT_2
  4594. * @arg @ref LL_HRTIM_EVENT_3
  4595. * @arg @ref LL_HRTIM_EVENT_4
  4596. * @arg @ref LL_HRTIM_EVENT_5
  4597. * @arg @ref LL_HRTIM_EVENT_6
  4598. * @arg @ref LL_HRTIM_EVENT_7
  4599. * @arg @ref LL_HRTIM_EVENT_8
  4600. * @arg @ref LL_HRTIM_EVENT_9
  4601. * @arg @ref LL_HRTIM_EVENT_10
  4602. * @retval LatchStatus This parameter can be one of the following values:
  4603. * @arg @ref LL_HRTIM_EELATCH_DISABLED
  4604. * @arg @ref LL_HRTIM_EELATCH_ENABLED
  4605. */
  4606. __STATIC_INLINE uint32_t LL_HRTIM_TIM_GetEventLatchStatus(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Event)
  4607. {
  4608. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - POSITION_VAL(LL_HRTIM_TIMER_A));
  4609. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  4610. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].EEFxR1) +
  4611. REG_OFFSET_TAB_TIMER[iTimer] + REG_OFFSET_TAB_EECR[iEvent]));
  4612. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EEFR1_EE1LTCH) << REG_SHIFT_TAB_EExSRC[iEvent]) >> (REG_SHIFT_TAB_EExSRC[iEvent] ));
  4613. }
  4614. /**
  4615. * @}
  4616. */
  4617. /** @defgroup HRTIM_LL_EF_Dead_Time_Configuration Dead_Time_Configuration
  4618. * @{
  4619. */
  4620. /**
  4621. * @brief Configure the dead time insertion feature for a given timer.
  4622. * @rmtoll DTxR DTPRSC LL_HRTIM_DT_Config\n
  4623. * DTxR SDTF LL_HRTIM_DT_Config\n
  4624. * DTxR SDRT LL_HRTIM_DT_Config
  4625. * @param HRTIMx High Resolution Timer instance
  4626. * @param Timer This parameter can be one of the following values:
  4627. * @arg @ref LL_HRTIM_TIMER_A
  4628. * @arg @ref LL_HRTIM_TIMER_B
  4629. * @arg @ref LL_HRTIM_TIMER_C
  4630. * @arg @ref LL_HRTIM_TIMER_D
  4631. * @arg @ref LL_HRTIM_TIMER_E
  4632. * @param Configuration This parameter must be a combination of all the following values:
  4633. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8 or ... or @ref LL_HRTIM_DT_PRESCALER_DIV16
  4634. * @arg @ref LL_HRTIM_DT_RISING_POSITIVE or @ref LL_HRTIM_DT_RISING_NEGATIVE
  4635. * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE or @ref LL_HRTIM_DT_FALLING_NEGATIVE
  4636. * @retval None
  4637. */
  4638. __STATIC_INLINE void LL_HRTIM_DT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Configuration)
  4639. {
  4640. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4641. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4642. REG_OFFSET_TAB_TIMER[iTimer]));
  4643. MODIFY_REG(*pReg, HRTIM_DTR_SDTF | HRTIM_DTR_DTPRSC | HRTIM_DTR_SDTR, Configuration);
  4644. }
  4645. /**
  4646. * @brief Set the deadtime prescaler value.
  4647. * @rmtoll DTxR DTPRSC LL_HRTIM_DT_SetPrescaler
  4648. * @param HRTIMx High Resolution Timer instance
  4649. * @param Timer This parameter can be one of the following values:
  4650. * @arg @ref LL_HRTIM_TIMER_A
  4651. * @arg @ref LL_HRTIM_TIMER_B
  4652. * @arg @ref LL_HRTIM_TIMER_C
  4653. * @arg @ref LL_HRTIM_TIMER_D
  4654. * @arg @ref LL_HRTIM_TIMER_E
  4655. * @param Prescaler This parameter can be one of the following values:
  4656. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8
  4657. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL4
  4658. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL2
  4659. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV1
  4660. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV2
  4661. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV4
  4662. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV8
  4663. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV16
  4664. * @retval None
  4665. */
  4666. __STATIC_INLINE void LL_HRTIM_DT_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler)
  4667. {
  4668. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4669. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4670. REG_OFFSET_TAB_TIMER[iTimer]));
  4671. MODIFY_REG(*pReg, HRTIM_DTR_DTPRSC, Prescaler);
  4672. }
  4673. /**
  4674. * @brief Get actual deadtime prescaler value.
  4675. * @rmtoll DTxR DTPRSC LL_HRTIM_DT_GetPrescaler
  4676. * @param HRTIMx High Resolution Timer instance
  4677. * @param Timer This parameter can be one of the following values:
  4678. * @arg @ref LL_HRTIM_TIMER_A
  4679. * @arg @ref LL_HRTIM_TIMER_B
  4680. * @arg @ref LL_HRTIM_TIMER_C
  4681. * @arg @ref LL_HRTIM_TIMER_D
  4682. * @arg @ref LL_HRTIM_TIMER_E
  4683. * @retval Prescaler This parameter can be one of the following values:
  4684. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8
  4685. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL4
  4686. * @arg @ref LL_HRTIM_DT_PRESCALER_MUL2
  4687. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV1
  4688. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV2
  4689. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV4
  4690. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV8
  4691. * @arg @ref LL_HRTIM_DT_PRESCALER_DIV16
  4692. */
  4693. __STATIC_INLINE uint32_t LL_HRTIM_DT_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4694. {
  4695. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4696. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4697. REG_OFFSET_TAB_TIMER[iTimer]));
  4698. return (READ_BIT(*pReg, HRTIM_DTR_DTPRSC));
  4699. }
  4700. /**
  4701. * @brief Set the deadtime rising value.
  4702. * @rmtoll DTxR DTR LL_HRTIM_DT_SetRisingValue
  4703. * @param HRTIMx High Resolution Timer instance
  4704. * @param Timer This parameter can be one of the following values:
  4705. * @arg @ref LL_HRTIM_TIMER_A
  4706. * @arg @ref LL_HRTIM_TIMER_B
  4707. * @arg @ref LL_HRTIM_TIMER_C
  4708. * @arg @ref LL_HRTIM_TIMER_D
  4709. * @arg @ref LL_HRTIM_TIMER_E
  4710. * @param RisingValue Value between 0 and 0x1FF
  4711. * @retval None
  4712. */
  4713. __STATIC_INLINE void LL_HRTIM_DT_SetRisingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t RisingValue)
  4714. {
  4715. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4716. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4717. REG_OFFSET_TAB_TIMER[iTimer]));
  4718. MODIFY_REG(*pReg, HRTIM_DTR_DTR, RisingValue);
  4719. }
  4720. /**
  4721. * @brief Get actual deadtime rising value.
  4722. * @rmtoll DTxR DTR LL_HRTIM_DT_GetRisingValue
  4723. * @param HRTIMx High Resolution Timer instance
  4724. * @param Timer This parameter can be one of the following values:
  4725. * @arg @ref LL_HRTIM_TIMER_A
  4726. * @arg @ref LL_HRTIM_TIMER_B
  4727. * @arg @ref LL_HRTIM_TIMER_C
  4728. * @arg @ref LL_HRTIM_TIMER_D
  4729. * @arg @ref LL_HRTIM_TIMER_E
  4730. * @retval RisingValue Value between 0 and 0x1FF
  4731. */
  4732. __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4733. {
  4734. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4735. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4736. REG_OFFSET_TAB_TIMER[iTimer]));
  4737. return (READ_BIT(*pReg, HRTIM_DTR_DTR));
  4738. }
  4739. /**
  4740. * @brief Set the deadtime sign on rising edge.
  4741. * @rmtoll DTxR SDTR LL_HRTIM_DT_SetRisingSign
  4742. * @param HRTIMx High Resolution Timer instance
  4743. * @param Timer This parameter can be one of the following values:
  4744. * @arg @ref LL_HRTIM_TIMER_A
  4745. * @arg @ref LL_HRTIM_TIMER_B
  4746. * @arg @ref LL_HRTIM_TIMER_C
  4747. * @arg @ref LL_HRTIM_TIMER_D
  4748. * @arg @ref LL_HRTIM_TIMER_E
  4749. * @param RisingSign This parameter can be one of the following values:
  4750. * @arg @ref LL_HRTIM_DT_RISING_POSITIVE
  4751. * @arg @ref LL_HRTIM_DT_RISING_NEGATIVE
  4752. * @retval None
  4753. */
  4754. __STATIC_INLINE void LL_HRTIM_DT_SetRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t RisingSign)
  4755. {
  4756. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4757. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4758. REG_OFFSET_TAB_TIMER[iTimer]));
  4759. MODIFY_REG(*pReg, HRTIM_DTR_SDTR, RisingSign);
  4760. }
  4761. /**
  4762. * @brief Get actual deadtime sign on rising edge.
  4763. * @rmtoll DTxR SDTR LL_HRTIM_DT_GetRisingSign
  4764. * @param HRTIMx High Resolution Timer instance
  4765. * @param Timer This parameter can be one of the following values:
  4766. * @arg @ref LL_HRTIM_TIMER_A
  4767. * @arg @ref LL_HRTIM_TIMER_B
  4768. * @arg @ref LL_HRTIM_TIMER_C
  4769. * @arg @ref LL_HRTIM_TIMER_D
  4770. * @arg @ref LL_HRTIM_TIMER_E
  4771. * @retval RisingSign This parameter can be one of the following values:
  4772. * @arg @ref LL_HRTIM_DT_RISING_POSITIVE
  4773. * @arg @ref LL_HRTIM_DT_RISING_NEGATIVE
  4774. */
  4775. __STATIC_INLINE uint32_t LL_HRTIM_DT_GetRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4776. {
  4777. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4778. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4779. REG_OFFSET_TAB_TIMER[iTimer]));
  4780. return (READ_BIT(*pReg, HRTIM_DTR_SDTR));
  4781. }
  4782. /**
  4783. * @brief Set the deadime falling value.
  4784. * @rmtoll DTxR DTF LL_HRTIM_DT_SetFallingValue
  4785. * @param HRTIMx High Resolution Timer instance
  4786. * @param Timer This parameter can be one of the following values:
  4787. * @arg @ref LL_HRTIM_TIMER_A
  4788. * @arg @ref LL_HRTIM_TIMER_B
  4789. * @arg @ref LL_HRTIM_TIMER_C
  4790. * @arg @ref LL_HRTIM_TIMER_D
  4791. * @arg @ref LL_HRTIM_TIMER_E
  4792. * @param FallingValue Value between 0 and 0x1FF
  4793. * @retval None
  4794. */
  4795. __STATIC_INLINE void LL_HRTIM_DT_SetFallingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t FallingValue)
  4796. {
  4797. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4798. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4799. REG_OFFSET_TAB_TIMER[iTimer]));
  4800. MODIFY_REG(*pReg, HRTIM_DTR_DTF, FallingValue << HRTIM_DTR_DTF_Pos);
  4801. }
  4802. /**
  4803. * @brief Get actual deadtime falling value
  4804. * @rmtoll DTxR DTF LL_HRTIM_DT_GetFallingValue
  4805. * @param HRTIMx High Resolution Timer instance
  4806. * @param Timer This parameter can be one of the following values:
  4807. * @arg @ref LL_HRTIM_TIMER_A
  4808. * @arg @ref LL_HRTIM_TIMER_B
  4809. * @arg @ref LL_HRTIM_TIMER_C
  4810. * @arg @ref LL_HRTIM_TIMER_D
  4811. * @arg @ref LL_HRTIM_TIMER_E
  4812. * @retval FallingValue Value between 0 and 0x1FF
  4813. */
  4814. __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingValue(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4815. {
  4816. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4817. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4818. REG_OFFSET_TAB_TIMER[iTimer]));
  4819. return ((READ_BIT(*pReg, HRTIM_DTR_DTF)) >> HRTIM_DTR_DTF_Pos);
  4820. }
  4821. /**
  4822. * @brief Set the deadtime sign on falling edge.
  4823. * @rmtoll DTxR SDTF LL_HRTIM_DT_SetFallingSign
  4824. * @param HRTIMx High Resolution Timer instance
  4825. * @param Timer This parameter can be one of the following values:
  4826. * @arg @ref LL_HRTIM_TIMER_A
  4827. * @arg @ref LL_HRTIM_TIMER_B
  4828. * @arg @ref LL_HRTIM_TIMER_C
  4829. * @arg @ref LL_HRTIM_TIMER_D
  4830. * @arg @ref LL_HRTIM_TIMER_E
  4831. * @param FallingSign This parameter can be one of the following values:
  4832. * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE
  4833. * @arg @ref LL_HRTIM_DT_FALLING_NEGATIVE
  4834. * @retval None
  4835. */
  4836. __STATIC_INLINE void LL_HRTIM_DT_SetFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t FallingSign)
  4837. {
  4838. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4839. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4840. REG_OFFSET_TAB_TIMER[iTimer]));
  4841. MODIFY_REG(*pReg, HRTIM_DTR_SDTF, FallingSign);
  4842. }
  4843. /**
  4844. * @brief Get actual deadtime sign on falling edge.
  4845. * @rmtoll DTxR SDTF LL_HRTIM_DT_GetFallingSign
  4846. * @param HRTIMx High Resolution Timer instance
  4847. * @param Timer This parameter can be one of the following values:
  4848. * @arg @ref LL_HRTIM_TIMER_A
  4849. * @arg @ref LL_HRTIM_TIMER_B
  4850. * @arg @ref LL_HRTIM_TIMER_C
  4851. * @arg @ref LL_HRTIM_TIMER_D
  4852. * @arg @ref LL_HRTIM_TIMER_E
  4853. * @retval FallingSign This parameter can be one of the following values:
  4854. * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE
  4855. * @arg @ref LL_HRTIM_DT_FALLING_NEGATIVE
  4856. */
  4857. __STATIC_INLINE uint32_t LL_HRTIM_DT_GetFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4858. {
  4859. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4860. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4861. REG_OFFSET_TAB_TIMER[iTimer]));
  4862. return (READ_BIT(*pReg, HRTIM_DTR_SDTF));
  4863. }
  4864. /**
  4865. * @brief Lock the deadtime value and sign on rising edge.
  4866. * @rmtoll DTxR DTRLK LL_HRTIM_DT_LockRising
  4867. * @param HRTIMx High Resolution Timer instance
  4868. * @param Timer This parameter can be one of the following values:
  4869. * @arg @ref LL_HRTIM_TIMER_A
  4870. * @arg @ref LL_HRTIM_TIMER_B
  4871. * @arg @ref LL_HRTIM_TIMER_C
  4872. * @arg @ref LL_HRTIM_TIMER_D
  4873. * @arg @ref LL_HRTIM_TIMER_E
  4874. * @retval None
  4875. */
  4876. __STATIC_INLINE void LL_HRTIM_DT_LockRising(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4877. {
  4878. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4879. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4880. REG_OFFSET_TAB_TIMER[iTimer]));
  4881. SET_BIT(*pReg, HRTIM_DTR_DTRLK);
  4882. }
  4883. /**
  4884. * @brief Lock the deadtime sign on rising edge.
  4885. * @rmtoll DTxR DTRSLK LL_HRTIM_DT_LockRisingSign
  4886. * @param HRTIMx High Resolution Timer instance
  4887. * @param Timer This parameter can be one of the following values:
  4888. * @arg @ref LL_HRTIM_TIMER_A
  4889. * @arg @ref LL_HRTIM_TIMER_B
  4890. * @arg @ref LL_HRTIM_TIMER_C
  4891. * @arg @ref LL_HRTIM_TIMER_D
  4892. * @arg @ref LL_HRTIM_TIMER_E
  4893. * @retval None
  4894. */
  4895. __STATIC_INLINE void LL_HRTIM_DT_LockRisingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4896. {
  4897. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4898. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4899. REG_OFFSET_TAB_TIMER[iTimer]));
  4900. SET_BIT(*pReg, HRTIM_DTR_DTRSLK);
  4901. }
  4902. /**
  4903. * @brief Lock the deadtime value and sign on falling edge.
  4904. * @rmtoll DTxR DTFLK LL_HRTIM_DT_LockFalling
  4905. * @param HRTIMx High Resolution Timer instance
  4906. * @param Timer This parameter can be one of the following values:
  4907. * @arg @ref LL_HRTIM_TIMER_A
  4908. * @arg @ref LL_HRTIM_TIMER_B
  4909. * @arg @ref LL_HRTIM_TIMER_C
  4910. * @arg @ref LL_HRTIM_TIMER_D
  4911. * @arg @ref LL_HRTIM_TIMER_E
  4912. * @retval None
  4913. */
  4914. __STATIC_INLINE void LL_HRTIM_DT_LockFalling(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4915. {
  4916. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4917. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4918. REG_OFFSET_TAB_TIMER[iTimer]));
  4919. SET_BIT(*pReg, HRTIM_DTR_DTFLK);
  4920. }
  4921. /**
  4922. * @brief Lock the deadtime sign on falling edge.
  4923. * @rmtoll DTxR DTFSLK LL_HRTIM_DT_LockFallingSign
  4924. * @param HRTIMx High Resolution Timer instance
  4925. * @param Timer This parameter can be one of the following values:
  4926. * @arg @ref LL_HRTIM_TIMER_A
  4927. * @arg @ref LL_HRTIM_TIMER_B
  4928. * @arg @ref LL_HRTIM_TIMER_C
  4929. * @arg @ref LL_HRTIM_TIMER_D
  4930. * @arg @ref LL_HRTIM_TIMER_E
  4931. * @retval None
  4932. */
  4933. __STATIC_INLINE void LL_HRTIM_DT_LockFallingSign(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  4934. {
  4935. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4936. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].DTxR) +
  4937. REG_OFFSET_TAB_TIMER[iTimer]));
  4938. SET_BIT(*pReg, HRTIM_DTR_DTFSLK);
  4939. }
  4940. /**
  4941. * @}
  4942. */
  4943. /** @defgroup HRTIM_LL_EF_Chopper_Mode_Configuration Chopper_Mode_Configuration
  4944. * @{
  4945. */
  4946. /**
  4947. * @brief Configure the chopper stage for a given timer.
  4948. * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_Config\n
  4949. * CHPxR CARDTY LL_HRTIM_CHP_Config\n
  4950. * CHPxR STRTPW LL_HRTIM_CHP_Config
  4951. * @note This function must not be called if the chopper mode is already
  4952. * enabled for one of the timer outputs.
  4953. * @param HRTIMx High Resolution Timer instance
  4954. * @param Timer This parameter can be one of the following values:
  4955. * @arg @ref LL_HRTIM_TIMER_A
  4956. * @arg @ref LL_HRTIM_TIMER_B
  4957. * @arg @ref LL_HRTIM_TIMER_C
  4958. * @arg @ref LL_HRTIM_TIMER_D
  4959. * @arg @ref LL_HRTIM_TIMER_E
  4960. * @param Configuration This parameter must be a combination of all the following values:
  4961. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16 or ... or @ref LL_HRTIM_CHP_PRESCALER_DIV256
  4962. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0 or ... or @ref LL_HRTIM_CHP_DUTYCYCLE_875
  4963. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16 or ... or @ref LL_HRTIM_CHP_PULSEWIDTH_256
  4964. * @retval None
  4965. */
  4966. __STATIC_INLINE void LL_HRTIM_CHP_Config(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Configuration)
  4967. {
  4968. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  4969. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  4970. REG_OFFSET_TAB_TIMER[iTimer]));
  4971. MODIFY_REG(*pReg, HRTIM_CHPR_STRPW | HRTIM_CHPR_CARDTY | HRTIM_CHPR_CARFRQ, Configuration);
  4972. }
  4973. /**
  4974. * @brief Set prescaler determining the carrier frequency to be added on top
  4975. * of the timer output signals when chopper mode is enabled.
  4976. * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_SetPrescaler
  4977. * @note This function must not be called if the chopper mode is already
  4978. * enabled for one of the timer outputs.
  4979. * @param HRTIMx High Resolution Timer instance
  4980. * @param Timer This parameter can be one of the following values:
  4981. * @arg @ref LL_HRTIM_TIMER_A
  4982. * @arg @ref LL_HRTIM_TIMER_B
  4983. * @arg @ref LL_HRTIM_TIMER_C
  4984. * @arg @ref LL_HRTIM_TIMER_D
  4985. * @arg @ref LL_HRTIM_TIMER_E
  4986. * @param Prescaler This parameter can be one of the following values:
  4987. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16
  4988. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV32
  4989. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV48
  4990. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV64
  4991. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV80
  4992. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV96
  4993. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV112
  4994. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV128
  4995. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV144
  4996. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV160
  4997. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV176
  4998. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV192
  4999. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV208
  5000. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV224
  5001. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV240
  5002. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV256
  5003. * @retval None
  5004. */
  5005. __STATIC_INLINE void LL_HRTIM_CHP_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t Prescaler)
  5006. {
  5007. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5008. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5009. REG_OFFSET_TAB_TIMER[iTimer]));
  5010. MODIFY_REG(*pReg, HRTIM_CHPR_CARFRQ, Prescaler);
  5011. }
  5012. /**
  5013. * @brief Get actual chopper stage prescaler value.
  5014. * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_GetPrescaler
  5015. * @param HRTIMx High Resolution Timer instance
  5016. * @param Timer This parameter can be one of the following values:
  5017. * @arg @ref LL_HRTIM_TIMER_A
  5018. * @arg @ref LL_HRTIM_TIMER_B
  5019. * @arg @ref LL_HRTIM_TIMER_C
  5020. * @arg @ref LL_HRTIM_TIMER_D
  5021. * @arg @ref LL_HRTIM_TIMER_E
  5022. * @retval Prescaler This parameter can be one of the following values:
  5023. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16
  5024. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV32
  5025. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV48
  5026. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV64
  5027. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV80
  5028. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV96
  5029. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV112
  5030. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV128
  5031. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV144
  5032. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV160
  5033. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV176
  5034. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV192
  5035. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV208
  5036. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV224
  5037. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV240
  5038. * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV256
  5039. */
  5040. __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  5041. {
  5042. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5043. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5044. REG_OFFSET_TAB_TIMER[iTimer]));
  5045. return (READ_BIT(*pReg, HRTIM_CHPR_CARFRQ));
  5046. }
  5047. /**
  5048. * @brief Set the chopper duty cycle.
  5049. * @rmtoll CHPxR CARDTY LL_HRTIM_CHP_SetDutyCycle
  5050. * @note Duty cycle can be adjusted by 1/8 step (from 0/8 up to 7/8)
  5051. * @note This function must not be called if the chopper mode is already
  5052. * enabled for one of the timer outputs.
  5053. * @param HRTIMx High Resolution Timer instance
  5054. * @param Timer This parameter can be one of the following values:
  5055. * @arg @ref LL_HRTIM_TIMER_A
  5056. * @arg @ref LL_HRTIM_TIMER_B
  5057. * @arg @ref LL_HRTIM_TIMER_C
  5058. * @arg @ref LL_HRTIM_TIMER_D
  5059. * @arg @ref LL_HRTIM_TIMER_E
  5060. * @param DutyCycle This parameter can be one of the following values:
  5061. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0
  5062. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_125
  5063. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_250
  5064. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_375
  5065. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_500
  5066. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_625
  5067. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_750
  5068. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_875
  5069. * @retval None
  5070. */
  5071. __STATIC_INLINE void LL_HRTIM_CHP_SetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t DutyCycle)
  5072. {
  5073. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5074. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5075. REG_OFFSET_TAB_TIMER[iTimer]));
  5076. MODIFY_REG(*pReg, HRTIM_CHPR_CARDTY, DutyCycle);
  5077. }
  5078. /**
  5079. * @brief Get actual chopper duty cycle.
  5080. * @rmtoll CHPxR CARDTY LL_HRTIM_CHP_GetDutyCycle
  5081. * @param HRTIMx High Resolution Timer instance
  5082. * @param Timer This parameter can be one of the following values:
  5083. * @arg @ref LL_HRTIM_TIMER_A
  5084. * @arg @ref LL_HRTIM_TIMER_B
  5085. * @arg @ref LL_HRTIM_TIMER_C
  5086. * @arg @ref LL_HRTIM_TIMER_D
  5087. * @arg @ref LL_HRTIM_TIMER_E
  5088. * @retval DutyCycle This parameter can be one of the following values:
  5089. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0
  5090. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_125
  5091. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_250
  5092. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_375
  5093. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_500
  5094. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_625
  5095. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_750
  5096. * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_875
  5097. */
  5098. __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetDutyCycle(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  5099. {
  5100. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5101. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5102. REG_OFFSET_TAB_TIMER[iTimer]));
  5103. return (READ_BIT(*pReg, HRTIM_CHPR_CARDTY));
  5104. }
  5105. /**
  5106. * @brief Set the start pulse width.
  5107. * @rmtoll CHPxR STRPW LL_HRTIM_CHP_SetPulseWidth
  5108. * @note This function must not be called if the chopper mode is already
  5109. * enabled for one of the timer outputs.
  5110. * @param HRTIMx High Resolution Timer instance
  5111. * @param Timer This parameter can be one of the following values:
  5112. * @arg @ref LL_HRTIM_TIMER_A
  5113. * @arg @ref LL_HRTIM_TIMER_B
  5114. * @arg @ref LL_HRTIM_TIMER_C
  5115. * @arg @ref LL_HRTIM_TIMER_D
  5116. * @arg @ref LL_HRTIM_TIMER_E
  5117. * @param PulseWidth This parameter can be one of the following values:
  5118. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16
  5119. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_32
  5120. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_48
  5121. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_64
  5122. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_80
  5123. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_96
  5124. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_112
  5125. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_128
  5126. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_144
  5127. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_160
  5128. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_176
  5129. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_192
  5130. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_208
  5131. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_224
  5132. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_240
  5133. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_256
  5134. * @retval None
  5135. */
  5136. __STATIC_INLINE void LL_HRTIM_CHP_SetPulseWidth(HRTIM_TypeDef *HRTIMx, uint32_t Timer, uint32_t PulseWidth)
  5137. {
  5138. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5139. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5140. REG_OFFSET_TAB_TIMER[iTimer]));
  5141. MODIFY_REG(*pReg, HRTIM_CHPR_STRPW, PulseWidth);
  5142. }
  5143. /**
  5144. * @brief Get actual start pulse width.
  5145. * @rmtoll CHPxR STRPW LL_HRTIM_CHP_GetPulseWidth
  5146. * @param HRTIMx High Resolution Timer instance
  5147. * @param Timer This parameter can be one of the following values:
  5148. * @arg @ref LL_HRTIM_TIMER_A
  5149. * @arg @ref LL_HRTIM_TIMER_B
  5150. * @arg @ref LL_HRTIM_TIMER_C
  5151. * @arg @ref LL_HRTIM_TIMER_D
  5152. * @arg @ref LL_HRTIM_TIMER_E
  5153. * @retval PulseWidth This parameter can be one of the following values:
  5154. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16
  5155. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_32
  5156. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_48
  5157. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_64
  5158. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_80
  5159. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_96
  5160. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_112
  5161. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_128
  5162. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_144
  5163. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_160
  5164. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_176
  5165. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_192
  5166. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_208
  5167. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_224
  5168. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_240
  5169. * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_256
  5170. */
  5171. __STATIC_INLINE uint32_t LL_HRTIM_CHP_GetPulseWidth(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  5172. {
  5173. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_TACEN_Pos);
  5174. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].CHPxR) +
  5175. REG_OFFSET_TAB_TIMER[iTimer]));
  5176. return (READ_BIT(*pReg, HRTIM_CHPR_STRPW));
  5177. }
  5178. /**
  5179. * @}
  5180. */
  5181. /** @defgroup HRTIM_LL_EF_Output_Management Output_Management
  5182. * @{
  5183. */
  5184. /**
  5185. * @brief Set the timer output set source.
  5186. * @rmtoll SETx1R SST LL_HRTIM_OUT_SetOutputSetSrc\n
  5187. * SETx1R RESYNC LL_HRTIM_OUT_SetOutputSetSrc\n
  5188. * SETx1R PER LL_HRTIM_OUT_SetOutputSetSrc\n
  5189. * SETx1R CMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5190. * SETx1R CMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5191. * SETx1R CMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5192. * SETx1R CMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5193. * SETx1R MSTPER LL_HRTIM_OUT_SetOutputSetSrc\n
  5194. * SETx1R MSTCMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5195. * SETx1R MSTCMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5196. * SETx1R MSTCMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5197. * SETx1R MSTCMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5198. * SETx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5199. * SETx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5200. * SETx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5201. * SETx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5202. * SETx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
  5203. * SETx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
  5204. * SETx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
  5205. * SETx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
  5206. * SETx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
  5207. * SETx1R EXEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5208. * SETx1R EXEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5209. * SETx1R EXEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5210. * SETx1R EXEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5211. * SETx1R EXEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
  5212. * SETx1R EXEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
  5213. * SETx1R EXEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
  5214. * SETx1R EXEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
  5215. * SETx1R EXEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
  5216. * SETx1R EXEVNT10 LL_HRTIM_OUT_SetOutputSetSrc\n
  5217. * SETx1R UPDATE LL_HRTIM_OUT_SetOutputSetSrc\n
  5218. * SETx1R SST LL_HRTIM_OUT_SetOutputSetSrc\n
  5219. * SETx1R RESYNC LL_HRTIM_OUT_SetOutputSetSrc\n
  5220. * SETx1R PER LL_HRTIM_OUT_SetOutputSetSrc\n
  5221. * SETx1R CMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5222. * SETx1R CMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5223. * SETx1R CMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5224. * SETx1R CMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5225. * SETx1R MSTPER LL_HRTIM_OUT_SetOutputSetSrc\n
  5226. * SETx1R MSTCMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5227. * SETx1R MSTCMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5228. * SETx1R MSTCMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5229. * SETx1R MSTCMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5230. * SETx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5231. * SETx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5232. * SETx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5233. * SETx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5234. * SETx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
  5235. * SETx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
  5236. * SETx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
  5237. * SETx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
  5238. * SETx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
  5239. * SETx1R EXEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
  5240. * SETx1R EXEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
  5241. * SETx1R EXEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
  5242. * SETx1R EXEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
  5243. * SETx1R EXEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
  5244. * SETx1R EXEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
  5245. * SETx1R EXEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
  5246. * SETx1R EXEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
  5247. * SETx1R EXEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
  5248. * SETx1R EXEVNT10 LL_HRTIM_OUT_SetOutputSetSrc\n
  5249. * SETx1R UPDATE LL_HRTIM_OUT_SetOutputSetSrc
  5250. * @param HRTIMx High Resolution Timer instance
  5251. * @param Output This parameter can be one of the following values:
  5252. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5253. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5254. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5255. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5256. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5257. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5258. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5259. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5260. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5261. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5262. * @param SetSrc This parameter can be a combination of the following values:
  5263. * @arg @ref LL_HRTIM_OUTPUTSET_NONE
  5264. * @arg @ref LL_HRTIM_OUTPUTSET_RESYNC
  5265. * @arg @ref LL_HRTIM_OUTPUTSET_TIMPER
  5266. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP1
  5267. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP2
  5268. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP3
  5269. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP4
  5270. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERPER
  5271. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP1
  5272. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP2
  5273. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP3
  5274. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP4
  5275. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV1_TIMBCMP1
  5276. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV2_TIMBCMP2
  5277. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV3_TIMBCMP4
  5278. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV4_TIMCCMP2
  5279. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV5_TIMCCMP3
  5280. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV6_TIMDCMP1
  5281. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV7_TIMDCMP2
  5282. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV8_TIMECMP3
  5283. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV9_TIMECMP4
  5284. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV1_TIMACMP1
  5285. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV2_TIMACMP2
  5286. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV3_TIMACMP4
  5287. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV4_TIMCCMP3
  5288. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV5_TIMCCMP4
  5289. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV6_TIMDCMP3
  5290. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV7_TIMDCMP4
  5291. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV8_TIMECMP1
  5292. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV9_TIMECMP2
  5293. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV1_TIMACMP2
  5294. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV2_TIMACMP3
  5295. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV3_TIMBCMP2
  5296. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV4_TIMBCMP3
  5297. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV5_TIMDCMP2
  5298. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV6_TIMDCMP4
  5299. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV7_TIMECMP2
  5300. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV8_TIMECMP3
  5301. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV9_TIMECMP4
  5302. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV1_TIMACMP1
  5303. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV2_TIMACMP4
  5304. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV3_TIMBCMP2
  5305. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV4_TIMBCMP4
  5306. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV5_TIMCCMP1
  5307. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV6_TIMCCMP3
  5308. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV7_TIMCCMP4
  5309. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV8_TIMECMP1
  5310. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV9_TIMECMP4
  5311. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV1_TIMACMP3
  5312. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV2_TIMACMP4
  5313. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV3_TIMBCMP3
  5314. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV4_TIMBCMP4
  5315. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV5_TIMCCMP1
  5316. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV6_TIMCCMP2
  5317. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV7_TIMDCMP1
  5318. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV8_TIMDCMP2
  5319. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV9_TIMDCMP4
  5320. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_1
  5321. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_2
  5322. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_3
  5323. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_4
  5324. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_5
  5325. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_6
  5326. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_7
  5327. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_8
  5328. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_9
  5329. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_10
  5330. * @arg @ref LL_HRTIM_OUTPUTSET_UPDATE
  5331. * (source = TIMy and destination = TIMx, Compare Unit = CMPz).
  5332. * @retval None
  5333. */
  5334. __STATIC_INLINE void LL_HRTIM_OUT_SetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t SetSrc)
  5335. {
  5336. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5337. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) +
  5338. REG_OFFSET_TAB_SETxR[iOutput]));
  5339. WRITE_REG(*pReg, SetSrc);
  5340. }
  5341. /**
  5342. * @brief Get the timer output set source.
  5343. * @rmtoll SETx1R SST LL_HRTIM_OUT_GetOutputSetSrc\n
  5344. * SETx1R RESYNC LL_HRTIM_OUT_GetOutputSetSrc\n
  5345. * SETx1R PER LL_HRTIM_OUT_GetOutputSetSrc\n
  5346. * SETx1R CMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5347. * SETx1R CMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5348. * SETx1R CMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5349. * SETx1R CMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5350. * SETx1R MSTPER LL_HRTIM_OUT_GetOutputSetSrc\n
  5351. * SETx1R MSTCMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5352. * SETx1R MSTCMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5353. * SETx1R MSTCMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5354. * SETx1R MSTCMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5355. * SETx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5356. * SETx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5357. * SETx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5358. * SETx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5359. * SETx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
  5360. * SETx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
  5361. * SETx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
  5362. * SETx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
  5363. * SETx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
  5364. * SETx1R EXEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5365. * SETx1R EXEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5366. * SETx1R EXEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5367. * SETx1R EXEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5368. * SETx1R EXEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
  5369. * SETx1R EXEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
  5370. * SETx1R EXEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
  5371. * SETx1R EXEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
  5372. * SETx1R EXEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
  5373. * SETx1R EXEVNT10 LL_HRTIM_OUT_GetOutputSetSrc\n
  5374. * SETx1R UPDATE LL_HRTIM_OUT_GetOutputSetSrc\n
  5375. * SETx1R SST LL_HRTIM_OUT_GetOutputSetSrc\n
  5376. * SETx1R RESYNC LL_HRTIM_OUT_GetOutputSetSrc\n
  5377. * SETx1R PER LL_HRTIM_OUT_GetOutputSetSrc\n
  5378. * SETx1R CMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5379. * SETx1R CMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5380. * SETx1R CMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5381. * SETx1R CMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5382. * SETx1R MSTPER LL_HRTIM_OUT_GetOutputSetSrc\n
  5383. * SETx1R MSTCMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5384. * SETx1R MSTCMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5385. * SETx1R MSTCMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5386. * SETx1R MSTCMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5387. * SETx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5388. * SETx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5389. * SETx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5390. * SETx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5391. * SETx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
  5392. * SETx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
  5393. * SETx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
  5394. * SETx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
  5395. * SETx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
  5396. * SETx1R EXEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
  5397. * SETx1R EXEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
  5398. * SETx1R EXEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
  5399. * SETx1R EXEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
  5400. * SETx1R EXEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
  5401. * SETx1R EXEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
  5402. * SETx1R EXEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
  5403. * SETx1R EXEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
  5404. * SETx1R EXEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
  5405. * SETx1R EXEVNT10 LL_HRTIM_OUT_GetOutputSetSrc\n
  5406. * SETx1R UPDATE LL_HRTIM_OUT_GetOutputSetSrc
  5407. * @param HRTIMx High Resolution Timer instance
  5408. * @param Output This parameter can be one of the following values:
  5409. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5410. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5411. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5412. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5413. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5414. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5415. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5416. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5417. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5418. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5419. * @retval SetSrc This parameter can be a combination of the following values:
  5420. * @arg @ref LL_HRTIM_OUTPUTSET_NONE
  5421. * @arg @ref LL_HRTIM_OUTPUTSET_RESYNC
  5422. * @arg @ref LL_HRTIM_OUTPUTSET_TIMPER
  5423. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP1
  5424. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP2
  5425. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP3
  5426. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCMP4
  5427. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERPER
  5428. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP1
  5429. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP2
  5430. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP3
  5431. * @arg @ref LL_HRTIM_OUTPUTSET_MASTERCMP4
  5432. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV1_TIMBCMP1
  5433. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV2_TIMBCMP2
  5434. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV3_TIMBCMP4
  5435. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV4_TIMCCMP2
  5436. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV5_TIMCCMP3
  5437. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV6_TIMDCMP1
  5438. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV7_TIMDCMP2
  5439. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV8_TIMECMP3
  5440. * @arg @ref LL_HRTIM_OUTPUTSET_TIMAEV9_TIMECMP4
  5441. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV1_TIMACMP1
  5442. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV2_TIMACMP2
  5443. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV3_TIMACMP4
  5444. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV4_TIMCCMP3
  5445. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV5_TIMCCMP4
  5446. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV6_TIMDCMP3
  5447. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV7_TIMDCMP4
  5448. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV8_TIMECMP1
  5449. * @arg @ref LL_HRTIM_OUTPUTSET_TIMBEV9_TIMECMP2
  5450. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV1_TIMACMP2
  5451. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV2_TIMACMP3
  5452. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV3_TIMBCMP2
  5453. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV4_TIMBCMP3
  5454. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV5_TIMDCMP2
  5455. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV6_TIMDCMP4
  5456. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV7_TIMECMP2
  5457. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV8_TIMECMP3
  5458. * @arg @ref LL_HRTIM_OUTPUTSET_TIMCEV9_TIMECMP4
  5459. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV1_TIMACMP1
  5460. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV2_TIMACMP4
  5461. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV3_TIMBCMP2
  5462. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV4_TIMBCMP4
  5463. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV5_TIMCCMP1
  5464. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV6_TIMCCMP3
  5465. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV7_TIMCCMP4
  5466. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV8_TIMECMP1
  5467. * @arg @ref LL_HRTIM_OUTPUTSET_TIMDEV9_TIMECMP4
  5468. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV1_TIMACMP3
  5469. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV2_TIMACMP4
  5470. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV3_TIMBCMP3
  5471. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV4_TIMBCMP4
  5472. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV5_TIMCCMP1
  5473. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV6_TIMCCMP2
  5474. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV7_TIMDCMP1
  5475. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV8_TIMDCMP2
  5476. * @arg @ref LL_HRTIM_OUTPUTSET_TIMEEV9_TIMDCMP4
  5477. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_1
  5478. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_2
  5479. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_3
  5480. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_4
  5481. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_5
  5482. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_6
  5483. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_7
  5484. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_8
  5485. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_9
  5486. * @arg @ref LL_HRTIM_OUTPUTSET_EEV_10
  5487. * @arg @ref LL_HRTIM_OUTPUTSET_UPDATE
  5488. * (source = TIMy and destination = TIMx, Compare Unit = CMPz).
  5489. */
  5490. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputSetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  5491. {
  5492. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5493. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) +
  5494. REG_OFFSET_TAB_SETxR[iOutput]));
  5495. return (uint32_t) READ_REG(*pReg);
  5496. }
  5497. /**
  5498. * @brief Set the timer output reset source.
  5499. * @rmtoll RSTx1R RST LL_HRTIM_OUT_SetOutputResetSrc\n
  5500. * RSTx1R RESYNC LL_HRTIM_OUT_SetOutputResetSrc\n
  5501. * RSTx1R PER LL_HRTIM_OUT_SetOutputResetSrc\n
  5502. * RSTx1R CMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5503. * RSTx1R CMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5504. * RSTx1R CMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5505. * RSTx1R CMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5506. * RSTx1R MSTPER LL_HRTIM_OUT_SetOutputResetSrc\n
  5507. * RSTx1R MSTCMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5508. * RSTx1R MSTCMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5509. * RSTx1R MSTCMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5510. * RSTx1R MSTCMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5511. * RSTx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5512. * RSTx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5513. * RSTx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5514. * RSTx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5515. * RSTx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
  5516. * RSTx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
  5517. * RSTx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
  5518. * RSTx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
  5519. * RSTx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
  5520. * RSTx1R EXEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5521. * RSTx1R EXEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5522. * RSTx1R EXEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5523. * RSTx1R EXEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5524. * RSTx1R EXEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
  5525. * RSTx1R EXEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
  5526. * RSTx1R EXEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
  5527. * RSTx1R EXEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
  5528. * RSTx1R EXEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
  5529. * RSTx1R EXEVNT10 LL_HRTIM_OUT_SetOutputResetSrc\n
  5530. * RSTx1R UPDATE LL_HRTIM_OUT_SetOutputResetSrc\n
  5531. * RSTx1R RST LL_HRTIM_OUT_SetOutputResetSrc\n
  5532. * RSTx1R RESYNC LL_HRTIM_OUT_SetOutputResetSrc\n
  5533. * RSTx1R PER LL_HRTIM_OUT_SetOutputResetSrc\n
  5534. * RSTx1R CMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5535. * RSTx1R CMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5536. * RSTx1R CMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5537. * RSTx1R CMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5538. * RSTx1R MSTPER LL_HRTIM_OUT_SetOutputResetSrc\n
  5539. * RSTx1R MSTCMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5540. * RSTx1R MSTCMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5541. * RSTx1R MSTCMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5542. * RSTx1R MSTCMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5543. * RSTx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5544. * RSTx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5545. * RSTx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5546. * RSTx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5547. * RSTx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
  5548. * RSTx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
  5549. * RSTx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
  5550. * RSTx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
  5551. * RSTx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
  5552. * RSTx1R EXEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
  5553. * RSTx1R EXEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
  5554. * RSTx1R EXEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
  5555. * RSTx1R EXEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
  5556. * RSTx1R EXEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
  5557. * RSTx1R EXEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
  5558. * RSTx1R EXEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
  5559. * RSTx1R EXEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
  5560. * RSTx1R EXEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
  5561. * RSTx1R EXEVNT10 LL_HRTIM_OUT_SetOutputResetSrc\n
  5562. * RSTx1R UPDATE LL_HRTIM_OUT_SetOutputResetSrc
  5563. * @param HRTIMx High Resolution Timer instance
  5564. * @param Output This parameter can be one of the following values:
  5565. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5566. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5567. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5568. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5569. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5570. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5571. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5572. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5573. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5574. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5575. * @param ResetSrc This parameter can be a combination of the following values:
  5576. * @arg @ref LL_HRTIM_OUTPUTRESET_NONE
  5577. * @arg @ref LL_HRTIM_OUTPUTRESET_RESYNC
  5578. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMPER
  5579. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP1
  5580. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP2
  5581. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP3
  5582. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP4
  5583. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERPER
  5584. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP1
  5585. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP2
  5586. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP3
  5587. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP4
  5588. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV1_TIMBCMP1
  5589. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV2_TIMBCMP2
  5590. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV3_TIMBCMP4
  5591. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV4_TIMCCMP2
  5592. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV5_TIMCCMP3
  5593. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV6_TIMDCMP1
  5594. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV7_TIMDCMP2
  5595. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV8_TIMECMP3
  5596. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV9_TIMECMP4
  5597. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV1_TIMACMP1
  5598. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV2_TIMACMP2
  5599. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV3_TIMACMP4
  5600. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV4_TIMCCMP3
  5601. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV5_TIMCCMP4
  5602. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV6_TIMDCMP3
  5603. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV7_TIMDCMP4
  5604. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV8_TIMECMP1
  5605. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV9_TIMECMP2
  5606. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV1_TIMACMP2
  5607. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV2_TIMACMP3
  5608. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV3_TIMBCMP2
  5609. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV4_TIMBCMP3
  5610. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV5_TIMDCMP2
  5611. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV6_TIMDCMP4
  5612. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV7_TIMECMP2
  5613. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV8_TIMECMP3
  5614. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV9_TIMECMP4
  5615. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV1_TIMACMP1
  5616. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV2_TIMACMP4
  5617. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV3_TIMBCMP2
  5618. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV4_TIMBCMP4
  5619. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV5_TIMCCMP1
  5620. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV6_TIMCCMP3
  5621. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV7_TIMCCMP4
  5622. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV8_TIMECMP1
  5623. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV9_TIMECMP4
  5624. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV1_TIMACMP3
  5625. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV2_TIMACMP4
  5626. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV3_TIMBCMP3
  5627. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV4_TIMBCMP4
  5628. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV5_TIMCCMP1
  5629. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV6_TIMCCMP2
  5630. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV7_TIMDCMP1
  5631. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV8_TIMDCMP2
  5632. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV9_TIMDCMP4
  5633. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_1
  5634. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_2
  5635. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_3
  5636. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_4
  5637. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_5
  5638. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_6
  5639. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_7
  5640. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_8
  5641. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_9
  5642. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_10
  5643. * @arg @ref LL_HRTIM_OUTPUTRESET_UPDATE
  5644. * (source = TIMy and destination = TIMx, Compare Unit = CMPz).
  5645. * @retval None
  5646. */
  5647. __STATIC_INLINE void LL_HRTIM_OUT_SetOutputResetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t ResetSrc)
  5648. {
  5649. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5650. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) +
  5651. REG_OFFSET_TAB_SETxR[iOutput]));
  5652. WRITE_REG(*pReg, ResetSrc);
  5653. }
  5654. /**
  5655. * @brief Get the timer output set source.
  5656. * @rmtoll RSTx1R RST LL_HRTIM_OUT_GetOutputResetSrc\n
  5657. * RSTx1R RESYNC LL_HRTIM_OUT_GetOutputResetSrc\n
  5658. * RSTx1R PER LL_HRTIM_OUT_GetOutputResetSrc\n
  5659. * RSTx1R CMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5660. * RSTx1R CMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5661. * RSTx1R CMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5662. * RSTx1R CMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5663. * RSTx1R MSTPER LL_HRTIM_OUT_GetOutputResetSrc\n
  5664. * RSTx1R MSTCMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5665. * RSTx1R MSTCMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5666. * RSTx1R MSTCMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5667. * RSTx1R MSTCMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5668. * RSTx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5669. * RSTx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5670. * RSTx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5671. * RSTx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5672. * RSTx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
  5673. * RSTx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
  5674. * RSTx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
  5675. * RSTx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
  5676. * RSTx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
  5677. * RSTx1R EXEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5678. * RSTx1R EXEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5679. * RSTx1R EXEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5680. * RSTx1R EXEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5681. * RSTx1R EXEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
  5682. * RSTx1R EXEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
  5683. * RSTx1R EXEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
  5684. * RSTx1R EXEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
  5685. * RSTx1R EXEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
  5686. * RSTx1R EXEVNT10 LL_HRTIM_OUT_GetOutputResetSrc\n
  5687. * RSTx1R UPDATE LL_HRTIM_OUT_GetOutputResetSrc\n
  5688. * RSTx1R RST LL_HRTIM_OUT_GetOutputResetSrc\n
  5689. * RSTx1R RESYNC LL_HRTIM_OUT_GetOutputResetSrc\n
  5690. * RSTx1R PER LL_HRTIM_OUT_GetOutputResetSrc\n
  5691. * RSTx1R CMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5692. * RSTx1R CMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5693. * RSTx1R CMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5694. * RSTx1R CMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5695. * RSTx1R MSTPER LL_HRTIM_OUT_GetOutputResetSrc\n
  5696. * RSTx1R MSTCMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5697. * RSTx1R MSTCMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5698. * RSTx1R MSTCMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5699. * RSTx1R MSTCMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5700. * RSTx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5701. * RSTx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5702. * RSTx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5703. * RSTx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5704. * RSTx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
  5705. * RSTx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
  5706. * RSTx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
  5707. * RSTx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
  5708. * RSTx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
  5709. * RSTx1R EXEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
  5710. * RSTx1R EXEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
  5711. * RSTx1R EXEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
  5712. * RSTx1R EXEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
  5713. * RSTx1R EXEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
  5714. * RSTx1R EXEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
  5715. * RSTx1R EXEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
  5716. * RSTx1R EXEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
  5717. * RSTx1R EXEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
  5718. * RSTx1R EXEVNT10 LL_HRTIM_OUT_GetOutputResetSrc\n
  5719. * RSTx1R UPDATE LL_HRTIM_OUT_GetOutputResetSrc
  5720. * @param HRTIMx High Resolution Timer instance
  5721. * @param Output This parameter can be one of the following values:
  5722. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5723. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5724. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5725. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5726. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5727. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5728. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5729. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5730. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5731. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5732. * @retval ResetSrc This parameter can be a combination of the following values:
  5733. * @arg @ref LL_HRTIM_OUTPUTRESET_NONE
  5734. * @arg @ref LL_HRTIM_OUTPUTRESET_RESYNC
  5735. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMPER
  5736. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP1
  5737. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP2
  5738. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP3
  5739. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCMP4
  5740. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERPER
  5741. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP1
  5742. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP2
  5743. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP3
  5744. * @arg @ref LL_HRTIM_OUTPUTRESET_MASTERCMP4
  5745. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV1_TIMBCMP1
  5746. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV2_TIMBCMP2
  5747. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV3_TIMBCMP4
  5748. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV4_TIMCCMP2
  5749. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV5_TIMCCMP3
  5750. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV6_TIMDCMP1
  5751. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV7_TIMDCMP2
  5752. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV8_TIMECMP3
  5753. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMAEV9_TIMECMP4
  5754. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV1_TIMACMP1
  5755. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV2_TIMACMP2
  5756. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV3_TIMACMP4
  5757. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV4_TIMCCMP3
  5758. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV5_TIMCCMP4
  5759. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV6_TIMDCMP3
  5760. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV7_TIMDCMP4
  5761. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV8_TIMECMP1
  5762. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMBEV9_TIMECMP2
  5763. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV1_TIMACMP2
  5764. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV2_TIMACMP3
  5765. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV3_TIMBCMP2
  5766. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV4_TIMBCMP3
  5767. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV5_TIMDCMP2
  5768. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV6_TIMDCMP4
  5769. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV7_TIMECMP2
  5770. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV8_TIMECMP3
  5771. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMCEV9_TIMECMP4
  5772. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV1_TIMACMP1
  5773. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV2_TIMACMP4
  5774. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV3_TIMBCMP2
  5775. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV4_TIMBCMP4
  5776. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV5_TIMCCMP1
  5777. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV6_TIMCCMP3
  5778. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV7_TIMCCMP4
  5779. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV8_TIMECMP1
  5780. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMDEV9_TIMECMP4
  5781. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV1_TIMACMP3
  5782. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV2_TIMACMP4
  5783. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV3_TIMBCMP3
  5784. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV4_TIMBCMP4
  5785. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV5_TIMCCMP1
  5786. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV6_TIMCCMP2
  5787. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV7_TIMDCMP1
  5788. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV8_TIMDCMP2
  5789. * @arg @ref LL_HRTIM_OUTPUTRESET_TIMEEV9_TIMDCMP4
  5790. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_1
  5791. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_2
  5792. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_3
  5793. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_4
  5794. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_5
  5795. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_6
  5796. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_7
  5797. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_8
  5798. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_9
  5799. * @arg @ref LL_HRTIM_OUTPUTRESET_EEV_10
  5800. * @arg @ref LL_HRTIM_OUTPUTRESET_UPDATE
  5801. * (source = TIMy and destination = TIMx, Compare Unit = CMPz).
  5802. */
  5803. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetOutputResetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  5804. {
  5805. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5806. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].RSTx1R) +
  5807. REG_OFFSET_TAB_SETxR[iOutput]));
  5808. return (uint32_t) READ_REG(*pReg);
  5809. }
  5810. /**
  5811. * @brief Configure a timer output.
  5812. * @rmtoll OUTxR POL1 LL_HRTIM_OUT_Config\n
  5813. * OUTxR IDLEM1 LL_HRTIM_OUT_Config\n
  5814. * OUTxR IDLES1 LL_HRTIM_OUT_Config\n
  5815. * OUTxR FAULT1 LL_HRTIM_OUT_Config\n
  5816. * OUTxR CHP1 LL_HRTIM_OUT_Config\n
  5817. * OUTxR DIDL1 LL_HRTIM_OUT_Config\n
  5818. * OUTxR POL2 LL_HRTIM_OUT_Config\n
  5819. * OUTxR IDLEM2 LL_HRTIM_OUT_Config\n
  5820. * OUTxR IDLES2 LL_HRTIM_OUT_Config\n
  5821. * OUTxR FAULT2 LL_HRTIM_OUT_Config\n
  5822. * OUTxR CHP2 LL_HRTIM_OUT_Config\n
  5823. * OUTxR DIDL2 LL_HRTIM_OUT_Config
  5824. * @param HRTIMx High Resolution Timer instance
  5825. * @param Output This parameter can be one of the following values:
  5826. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5827. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5828. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5829. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5830. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5831. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5832. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5833. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5834. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5835. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5836. * @param Configuration This parameter must be a combination of all the following values:
  5837. * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY or @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
  5838. * @arg @ref LL_HRTIM_OUT_NO_IDLE or @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
  5839. * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE or @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
  5840. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION or @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE or @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE or @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
  5841. * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED or @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
  5842. * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR or @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
  5843. * @retval None
  5844. */
  5845. __STATIC_INLINE void LL_HRTIM_OUT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t Configuration)
  5846. {
  5847. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5848. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5849. REG_OFFSET_TAB_OUTxR[iOutput]));
  5850. MODIFY_REG(*pReg, (HRTIM_OUT_CONFIG_MASK << REG_SHIFT_TAB_OUTxR[iOutput]),
  5851. (Configuration << REG_SHIFT_TAB_OUTxR[iOutput]));
  5852. }
  5853. /**
  5854. * @brief Set the polarity of a timer output.
  5855. * @rmtoll OUTxR POL1 LL_HRTIM_OUT_SetPolarity\n
  5856. * OUTxR POL2 LL_HRTIM_OUT_SetPolarity
  5857. * @param HRTIMx High Resolution Timer instance
  5858. * @param Output This parameter can be one of the following values:
  5859. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5860. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5861. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5862. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5863. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5864. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5865. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5866. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5867. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5868. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5869. * @param Polarity This parameter can be one of the following values:
  5870. * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY
  5871. * @arg @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
  5872. * @retval None
  5873. */
  5874. __STATIC_INLINE void LL_HRTIM_OUT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t Polarity)
  5875. {
  5876. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5877. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5878. REG_OFFSET_TAB_OUTxR[iOutput]));
  5879. MODIFY_REG(*pReg, (HRTIM_OUTR_POL1 << REG_SHIFT_TAB_OUTxR[iOutput]), (Polarity << REG_SHIFT_TAB_OUTxR[iOutput]));
  5880. }
  5881. /**
  5882. * @brief Get actual polarity of the timer output.
  5883. * @rmtoll OUTxR POL1 LL_HRTIM_OUT_GetPolarity\n
  5884. * OUTxR POL2 LL_HRTIM_OUT_GetPolarity
  5885. * @param HRTIMx High Resolution Timer instance
  5886. * @param Output This parameter can be one of the following values:
  5887. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5888. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5889. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5890. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5891. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5892. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5893. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5894. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5895. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5896. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5897. * @retval Polarity This parameter can be one of the following values:
  5898. * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY
  5899. * @arg @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
  5900. */
  5901. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  5902. {
  5903. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5904. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5905. REG_OFFSET_TAB_OUTxR[iOutput]));
  5906. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_POL1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  5907. }
  5908. /**
  5909. * @brief Set the output IDLE mode.
  5910. * @rmtoll OUTxR IDLEM1 LL_HRTIM_OUT_SetIdleMode\n
  5911. * OUTxR IDLEM2 LL_HRTIM_OUT_SetIdleMode
  5912. * @note This function must not be called when the burst mode is active
  5913. * @param HRTIMx High Resolution Timer instance
  5914. * @param Output This parameter can be one of the following values:
  5915. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5916. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5917. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5918. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5919. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5920. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5921. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5922. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5923. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5924. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5925. * @param IdleMode This parameter can be one of the following values:
  5926. * @arg @ref LL_HRTIM_OUT_NO_IDLE
  5927. * @arg @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
  5928. * @retval None
  5929. */
  5930. __STATIC_INLINE void LL_HRTIM_OUT_SetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t IdleMode)
  5931. {
  5932. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5933. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5934. REG_OFFSET_TAB_OUTxR[iOutput]));
  5935. MODIFY_REG(*pReg, (HRTIM_OUTR_IDLM1 << (REG_SHIFT_TAB_OUTxR[iOutput] )), (IdleMode << (REG_SHIFT_TAB_OUTxR[iOutput] )));
  5936. }
  5937. /**
  5938. * @brief Get actual output IDLE mode.
  5939. * @rmtoll OUTxR IDLEM1 LL_HRTIM_OUT_GetIdleMode\n
  5940. * OUTxR IDLEM2 LL_HRTIM_OUT_GetIdleMode
  5941. * @param HRTIMx High Resolution Timer instance
  5942. * @param Output This parameter can be one of the following values:
  5943. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5944. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5945. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5946. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5947. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5948. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5949. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5950. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5951. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5952. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5953. * @retval IdleMode This parameter can be one of the following values:
  5954. * @arg @ref LL_HRTIM_OUT_NO_IDLE
  5955. * @arg @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
  5956. */
  5957. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleMode(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  5958. {
  5959. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5960. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5961. REG_OFFSET_TAB_OUTxR[iOutput]));
  5962. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_IDLM1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  5963. }
  5964. /**
  5965. * @brief Set the output IDLE level.
  5966. * @rmtoll OUTxR IDLES1 LL_HRTIM_OUT_SetIdleLevel\n
  5967. * OUTxR IDLES2 LL_HRTIM_OUT_SetIdleLevel
  5968. * @note This function must be called prior enabling the timer.
  5969. * @note Idle level isn't relevant when the output idle mode is set to LL_HRTIM_OUT_NO_IDLE.
  5970. * @param HRTIMx High Resolution Timer instance
  5971. * @param Output This parameter can be one of the following values:
  5972. * @arg @ref LL_HRTIM_OUTPUT_TA1
  5973. * @arg @ref LL_HRTIM_OUTPUT_TA2
  5974. * @arg @ref LL_HRTIM_OUTPUT_TB1
  5975. * @arg @ref LL_HRTIM_OUTPUT_TB2
  5976. * @arg @ref LL_HRTIM_OUTPUT_TC1
  5977. * @arg @ref LL_HRTIM_OUTPUT_TC2
  5978. * @arg @ref LL_HRTIM_OUTPUT_TD1
  5979. * @arg @ref LL_HRTIM_OUTPUT_TD2
  5980. * @arg @ref LL_HRTIM_OUTPUT_TE1
  5981. * @arg @ref LL_HRTIM_OUTPUT_TE2
  5982. * @param IdleLevel This parameter can be one of the following values:
  5983. * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE
  5984. * @arg @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
  5985. * @retval None
  5986. */
  5987. __STATIC_INLINE void LL_HRTIM_OUT_SetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t IdleLevel)
  5988. {
  5989. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  5990. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  5991. REG_OFFSET_TAB_OUTxR[iOutput]));
  5992. MODIFY_REG(*pReg, (HRTIM_OUTR_IDLES1 << REG_SHIFT_TAB_OUTxR[iOutput]), (IdleLevel << REG_SHIFT_TAB_OUTxR[iOutput]));
  5993. }
  5994. /**
  5995. * @brief Get actual output IDLE level.
  5996. * @rmtoll OUTxR IDLES1 LL_HRTIM_OUT_GetIdleLevel\n
  5997. * OUTxR IDLES2 LL_HRTIM_OUT_GetIdleLevel
  5998. * @param HRTIMx High Resolution Timer instance
  5999. * @param Output This parameter can be one of the following values:
  6000. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6001. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6002. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6003. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6004. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6005. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6006. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6007. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6008. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6009. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6010. * @retval IdleLevel This parameter can be one of the following values:
  6011. * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE
  6012. * @arg @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
  6013. */
  6014. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetIdleLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6015. {
  6016. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6017. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6018. REG_OFFSET_TAB_OUTxR[iOutput]));
  6019. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_IDLES1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  6020. }
  6021. /**
  6022. * @brief Set the output FAULT state.
  6023. * @rmtoll OUTxR FAULT1 LL_HRTIM_OUT_SetFaultState\n
  6024. * OUTxR FAULT2 LL_HRTIM_OUT_SetFaultState
  6025. * @note This function must not called when the timer is enabled and a fault
  6026. * channel is enabled at timer level.
  6027. * @param HRTIMx High Resolution Timer instance
  6028. * @param Output This parameter can be one of the following values:
  6029. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6030. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6031. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6032. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6033. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6034. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6035. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6036. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6037. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6038. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6039. * @param FaultState This parameter can be one of the following values:
  6040. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION
  6041. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE
  6042. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE
  6043. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
  6044. * @retval None
  6045. */
  6046. __STATIC_INLINE void LL_HRTIM_OUT_SetFaultState(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t FaultState)
  6047. {
  6048. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6049. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6050. REG_OFFSET_TAB_OUTxR[iOutput]));
  6051. MODIFY_REG(*pReg, (HRTIM_OUTR_FAULT1 << REG_SHIFT_TAB_OUTxR[iOutput]), (FaultState << REG_SHIFT_TAB_OUTxR[iOutput]));
  6052. }
  6053. /**
  6054. * @brief Get actual FAULT state.
  6055. * @rmtoll OUTxR FAULT1 LL_HRTIM_OUT_GetFaultState\n
  6056. * OUTxR FAULT2 LL_HRTIM_OUT_GetFaultState
  6057. * @param HRTIMx High Resolution Timer instance
  6058. * @param Output This parameter can be one of the following values:
  6059. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6060. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6061. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6062. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6063. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6064. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6065. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6066. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6067. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6068. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6069. * @retval FaultState This parameter can be one of the following values:
  6070. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION
  6071. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE
  6072. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE
  6073. * @arg @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
  6074. */
  6075. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetFaultState(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6076. {
  6077. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6078. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6079. REG_OFFSET_TAB_OUTxR[iOutput]));
  6080. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_FAULT1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  6081. }
  6082. /**
  6083. * @brief Set the output chopper mode.
  6084. * @rmtoll OUTxR CHP1 LL_HRTIM_OUT_SetChopperMode\n
  6085. * OUTxR CHP2 LL_HRTIM_OUT_SetChopperMode
  6086. * @note This function must not called when the timer is enabled.
  6087. * @param HRTIMx High Resolution Timer instance
  6088. * @param Output This parameter can be one of the following values:
  6089. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6090. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6091. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6092. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6093. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6094. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6095. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6096. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6097. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6098. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6099. * @param ChopperMode This parameter can be one of the following values:
  6100. * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED
  6101. * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
  6102. * @retval None
  6103. */
  6104. __STATIC_INLINE void LL_HRTIM_OUT_SetChopperMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t ChopperMode)
  6105. {
  6106. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6107. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6108. REG_OFFSET_TAB_OUTxR[iOutput]));
  6109. MODIFY_REG(*pReg, (HRTIM_OUTR_CHP1 << REG_SHIFT_TAB_OUTxR[iOutput]), (ChopperMode << REG_SHIFT_TAB_OUTxR[iOutput]));
  6110. }
  6111. /**
  6112. * @brief Get actual output chopper mode
  6113. * @rmtoll OUTxR CHP1 LL_HRTIM_OUT_GetChopperMode\n
  6114. * OUTxR CHP2 LL_HRTIM_OUT_GetChopperMode
  6115. * @param HRTIMx High Resolution Timer instance
  6116. * @param Output This parameter can be one of the following values:
  6117. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6118. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6119. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6120. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6121. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6122. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6123. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6124. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6125. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6126. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6127. * @retval ChopperMode This parameter can be one of the following values:
  6128. * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED
  6129. * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
  6130. */
  6131. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetChopperMode(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6132. {
  6133. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6134. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6135. REG_OFFSET_TAB_OUTxR[iOutput]));
  6136. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_CHP1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  6137. }
  6138. /**
  6139. * @brief Set the output burst mode entry mode.
  6140. * @rmtoll OUTxR DIDL1 LL_HRTIM_OUT_SetBMEntryMode\n
  6141. * OUTxR DIDL2 LL_HRTIM_OUT_SetBMEntryMode
  6142. * @note This function must not called when the timer is enabled.
  6143. * @param HRTIMx High Resolution Timer instance
  6144. * @param Output This parameter can be one of the following values:
  6145. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6146. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6147. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6148. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6149. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6150. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6151. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6152. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6153. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6154. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6155. * @param BMEntryMode This parameter can be one of the following values:
  6156. * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR
  6157. * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
  6158. * @retval None
  6159. */
  6160. __STATIC_INLINE void LL_HRTIM_OUT_SetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t BMEntryMode)
  6161. {
  6162. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6163. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6164. REG_OFFSET_TAB_OUTxR[iOutput]));
  6165. MODIFY_REG(*pReg, (HRTIM_OUTR_DIDL1 << REG_SHIFT_TAB_OUTxR[iOutput]), (BMEntryMode << REG_SHIFT_TAB_OUTxR[iOutput]));
  6166. }
  6167. /**
  6168. * @brief Get actual output burst mode entry mode.
  6169. * @rmtoll OUTxR DIDL1 LL_HRTIM_OUT_GetBMEntryMode\n
  6170. * OUTxR DIDL2 LL_HRTIM_OUT_GetBMEntryMode
  6171. * @param HRTIMx High Resolution Timer instance
  6172. * @param Output This parameter can be one of the following values:
  6173. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6174. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6175. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6176. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6177. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6178. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6179. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6180. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6181. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6182. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6183. * @retval BMEntryMode This parameter can be one of the following values:
  6184. * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR
  6185. * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
  6186. */
  6187. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetBMEntryMode(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6188. {
  6189. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6190. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].OUTxR) +
  6191. REG_OFFSET_TAB_OUTxR[iOutput]));
  6192. return (READ_BIT(*pReg, (uint32_t)(HRTIM_OUTR_DIDL1) << REG_SHIFT_TAB_OUTxR[iOutput]) >> REG_SHIFT_TAB_OUTxR[iOutput]);
  6193. }
  6194. /**
  6195. * @brief Get the level (active or inactive) of the designated output when the
  6196. * delayed protection was triggered.
  6197. * @rmtoll TIMxISR O1SRSR LL_HRTIM_OUT_GetDLYPRTOutStatus\n
  6198. * TIMxISR O2SRSR LL_HRTIM_OUT_GetDLYPRTOutStatus
  6199. * @param HRTIMx High Resolution Timer instance
  6200. * @param Output This parameter can be one of the following values:
  6201. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6202. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6203. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6204. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6205. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6206. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6207. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6208. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6209. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6210. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6211. * @retval OutputLevel This parameter can be one of the following values:
  6212. * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
  6213. * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
  6214. */
  6215. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetDLYPRTOutStatus(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6216. {
  6217. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6218. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) +
  6219. REG_OFFSET_TAB_OUTxR[iOutput]));
  6220. return ((READ_BIT(*pReg, (uint32_t)(HRTIM_TIMISR_O1STAT) << REG_SHIFT_TAB_OxSTAT[iOutput]) >> REG_SHIFT_TAB_OxSTAT[iOutput]) >>
  6221. HRTIM_TIMISR_O1STAT_Pos);
  6222. }
  6223. /**
  6224. * @brief Force the timer output to its active or inactive level.
  6225. * @rmtoll SETx1R SST LL_HRTIM_OUT_ForceLevel\n
  6226. * RSTx1R SRT LL_HRTIM_OUT_ForceLevel\n
  6227. * SETx2R SST LL_HRTIM_OUT_ForceLevel\n
  6228. * RSTx2R SRT LL_HRTIM_OUT_ForceLevel
  6229. * @param HRTIMx High Resolution Timer instance
  6230. * @param Output This parameter can be one of the following values:
  6231. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6232. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6233. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6234. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6235. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6236. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6237. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6238. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6239. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6240. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6241. * @param OutputLevel This parameter can be one of the following values:
  6242. * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
  6243. * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
  6244. * @retval None
  6245. */
  6246. __STATIC_INLINE void LL_HRTIM_OUT_ForceLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output, uint32_t OutputLevel)
  6247. {
  6248. const uint8_t REG_OFFSET_TAB_OUT_LEVEL[] =
  6249. {
  6250. 0x04U, /* 0: LL_HRTIM_OUT_LEVEL_INACTIVE */
  6251. 0x00U /* 1: LL_HRTIM_OUT_LEVEL_ACTIVE */
  6252. };
  6253. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6254. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].SETx1R) +
  6255. REG_OFFSET_TAB_SETxR[iOutput] + REG_OFFSET_TAB_OUT_LEVEL[OutputLevel]));
  6256. SET_BIT(*pReg, HRTIM_SET1R_SST);
  6257. }
  6258. /**
  6259. * @brief Get actual output level, before the output stage (chopper, polarity).
  6260. * @rmtoll TIMxISR O1CPY LL_HRTIM_OUT_GetLevel\n
  6261. * TIMxISR O2CPY LL_HRTIM_OUT_GetLevel
  6262. * @param HRTIMx High Resolution Timer instance
  6263. * @param Output This parameter can be one of the following values:
  6264. * @arg @ref LL_HRTIM_OUTPUT_TA1
  6265. * @arg @ref LL_HRTIM_OUTPUT_TA2
  6266. * @arg @ref LL_HRTIM_OUTPUT_TB1
  6267. * @arg @ref LL_HRTIM_OUTPUT_TB2
  6268. * @arg @ref LL_HRTIM_OUTPUT_TC1
  6269. * @arg @ref LL_HRTIM_OUTPUT_TC2
  6270. * @arg @ref LL_HRTIM_OUTPUT_TD1
  6271. * @arg @ref LL_HRTIM_OUTPUT_TD2
  6272. * @arg @ref LL_HRTIM_OUTPUT_TE1
  6273. * @arg @ref LL_HRTIM_OUTPUT_TE2
  6274. * @retval OutputLevel This parameter can be one of the following values:
  6275. * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
  6276. * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
  6277. */
  6278. __STATIC_INLINE uint32_t LL_HRTIM_OUT_GetLevel(HRTIM_TypeDef *HRTIMx, uint32_t Output)
  6279. {
  6280. register uint32_t iOutput = (uint8_t)(POSITION_VAL(Output) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1));
  6281. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sTimerxRegs[0].TIMxISR) +
  6282. REG_OFFSET_TAB_OUTxR[iOutput]));
  6283. return ((READ_BIT(*pReg, (uint32_t)(HRTIM_TIMISR_O1CPY) << REG_SHIFT_TAB_OxSTAT[iOutput]) >> REG_SHIFT_TAB_OxSTAT[iOutput]) >>
  6284. HRTIM_TIMISR_O1CPY_Pos);
  6285. }
  6286. /**
  6287. * @}
  6288. */
  6289. /** @defgroup HRTIM_LL_EF_External_Event_management External_Event_management
  6290. * @{
  6291. */
  6292. /**
  6293. * @brief Configure external event conditioning.
  6294. * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_Config\n
  6295. * EECR1 EE1POL LL_HRTIM_EE_Config\n
  6296. * EECR1 EE1SNS LL_HRTIM_EE_Config\n
  6297. * EECR1 EE1FAST LL_HRTIM_EE_Config\n
  6298. * EECR1 EE2SRC LL_HRTIM_EE_Config\n
  6299. * EECR1 EE2POL LL_HRTIM_EE_Config\n
  6300. * EECR1 EE2SNS LL_HRTIM_EE_Config\n
  6301. * EECR1 EE2FAST LL_HRTIM_EE_Config\n
  6302. * EECR1 EE3SRC LL_HRTIM_EE_Config\n
  6303. * EECR1 EE3POL LL_HRTIM_EE_Config\n
  6304. * EECR1 EE3SNS LL_HRTIM_EE_Config\n
  6305. * EECR1 EE3FAST LL_HRTIM_EE_Config\n
  6306. * EECR1 EE4SRC LL_HRTIM_EE_Config\n
  6307. * EECR1 EE4POL LL_HRTIM_EE_Config\n
  6308. * EECR1 EE4SNS LL_HRTIM_EE_Config\n
  6309. * EECR1 EE4FAST LL_HRTIM_EE_Config\n
  6310. * EECR1 EE5SRC LL_HRTIM_EE_Config\n
  6311. * EECR1 EE5POL LL_HRTIM_EE_Config\n
  6312. * EECR1 EE5SNS LL_HRTIM_EE_Config\n
  6313. * EECR1 EE5FAST LL_HRTIM_EE_Config\n
  6314. * EECR2 EE6SRC LL_HRTIM_EE_Config\n
  6315. * EECR2 EE6POL LL_HRTIM_EE_Config\n
  6316. * EECR2 EE6SNS LL_HRTIM_EE_Config\n
  6317. * EECR2 EE6FAST LL_HRTIM_EE_Config\n
  6318. * EECR2 EE7SRC LL_HRTIM_EE_Config\n
  6319. * EECR2 EE7POL LL_HRTIM_EE_Config\n
  6320. * EECR2 EE7SNS LL_HRTIM_EE_Config\n
  6321. * EECR2 EE7FAST LL_HRTIM_EE_Config\n
  6322. * EECR2 EE8SRC LL_HRTIM_EE_Config\n
  6323. * EECR2 EE8POL LL_HRTIM_EE_Config\n
  6324. * EECR2 EE8SNS LL_HRTIM_EE_Config\n
  6325. * EECR2 EE8FAST LL_HRTIM_EE_Config\n
  6326. * EECR2 EE9SRC LL_HRTIM_EE_Config\n
  6327. * EECR2 EE9POL LL_HRTIM_EE_Config\n
  6328. * EECR2 EE9SNS LL_HRTIM_EE_Config\n
  6329. * EECR2 EE9FAST LL_HRTIM_EE_Config\n
  6330. * EECR2 EE10SRC LL_HRTIM_EE_Config\n
  6331. * EECR2 EE10POL LL_HRTIM_EE_Config\n
  6332. * EECR2 EE10SNS LL_HRTIM_EE_Config\n
  6333. * EECR2 EE10FAST LL_HRTIM_EE_Config
  6334. * @note This function must not be called when the timer counter is enabled.
  6335. * @note Event source (EExSrc1..EExSRC4) mapping depends on configured event channel.
  6336. * @note Fast mode is available only for LL_HRTIM_EVENT_1..5.
  6337. * @param HRTIMx High Resolution Timer instance
  6338. * @param Event This parameter can be one of the following values:
  6339. * @arg @ref LL_HRTIM_EVENT_1
  6340. * @arg @ref LL_HRTIM_EVENT_2
  6341. * @arg @ref LL_HRTIM_EVENT_3
  6342. * @arg @ref LL_HRTIM_EVENT_4
  6343. * @arg @ref LL_HRTIM_EVENT_5
  6344. * @arg @ref LL_HRTIM_EVENT_6
  6345. * @arg @ref LL_HRTIM_EVENT_7
  6346. * @arg @ref LL_HRTIM_EVENT_8
  6347. * @arg @ref LL_HRTIM_EVENT_9
  6348. * @arg @ref LL_HRTIM_EVENT_10
  6349. * @param Configuration This parameter must be a combination of all the following values:
  6350. * @arg @ref LL_HRTIM_EE_SRC_1 or @ref LL_HRTIM_EE_SRC_2 or @ref LL_HRTIM_EE_SRC_3 or @ref LL_HRTIM_EE_SRC_4
  6351. * @arg @ref LL_HRTIM_EE_POLARITY_HIGH or @ref LL_HRTIM_EE_POLARITY_LOW
  6352. * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL or @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE or @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE or @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
  6353. * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE or @ref LL_HRTIM_EE_FASTMODE_ENABLE
  6354. * @retval None
  6355. */
  6356. __STATIC_INLINE void LL_HRTIM_EE_Config(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Configuration)
  6357. {
  6358. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6359. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6360. REG_OFFSET_TAB_EECR[iEvent]));
  6361. MODIFY_REG(*pReg, (HRTIM_EE_CONFIG_MASK << REG_SHIFT_TAB_EExSRC[iEvent]),
  6362. (Configuration << REG_SHIFT_TAB_EExSRC[iEvent]));
  6363. }
  6364. /**
  6365. * @brief Set the external event source.
  6366. * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_SetSrc\n
  6367. * EECR1 EE2SRC LL_HRTIM_EE_SetSrc\n
  6368. * EECR1 EE3SRC LL_HRTIM_EE_SetSrc\n
  6369. * EECR1 EE4SRC LL_HRTIM_EE_SetSrc\n
  6370. * EECR1 EE5SRC LL_HRTIM_EE_SetSrc\n
  6371. * EECR2 EE6SRC LL_HRTIM_EE_SetSrc\n
  6372. * EECR2 EE7SRC LL_HRTIM_EE_SetSrc\n
  6373. * EECR2 EE8SRC LL_HRTIM_EE_SetSrc\n
  6374. * EECR2 EE9SRC LL_HRTIM_EE_SetSrc\n
  6375. * EECR2 EE10SRC LL_HRTIM_EE_SetSrc
  6376. * @param HRTIMx High Resolution Timer instance
  6377. * @param Event This parameter can be one of the following values:
  6378. * @arg @ref LL_HRTIM_EVENT_1
  6379. * @arg @ref LL_HRTIM_EVENT_2
  6380. * @arg @ref LL_HRTIM_EVENT_3
  6381. * @arg @ref LL_HRTIM_EVENT_4
  6382. * @arg @ref LL_HRTIM_EVENT_5
  6383. * @arg @ref LL_HRTIM_EVENT_6
  6384. * @arg @ref LL_HRTIM_EVENT_7
  6385. * @arg @ref LL_HRTIM_EVENT_8
  6386. * @arg @ref LL_HRTIM_EVENT_9
  6387. * @arg @ref LL_HRTIM_EVENT_10
  6388. * @param Src This parameter can be one of the following values:
  6389. * @arg @ref LL_HRTIM_EE_SRC_1
  6390. * @arg @ref LL_HRTIM_EE_SRC_2
  6391. * @arg @ref LL_HRTIM_EE_SRC_3
  6392. * @arg @ref LL_HRTIM_EE_SRC_4
  6393. * @retval None
  6394. */
  6395. __STATIC_INLINE void LL_HRTIM_EE_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Src)
  6396. {
  6397. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6398. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6399. REG_OFFSET_TAB_EECR[iEvent]));
  6400. MODIFY_REG(*pReg, (HRTIM_EECR1_EE1SRC << REG_SHIFT_TAB_EExSRC[iEvent]), (Src << REG_SHIFT_TAB_EExSRC[iEvent]));
  6401. }
  6402. /**
  6403. * @brief Get actual external event source.
  6404. * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_GetSrc\n
  6405. * EECR1 EE2SRC LL_HRTIM_EE_GetSrc\n
  6406. * EECR1 EE3SRC LL_HRTIM_EE_GetSrc\n
  6407. * EECR1 EE4SRC LL_HRTIM_EE_GetSrc\n
  6408. * EECR1 EE5SRC LL_HRTIM_EE_GetSrc\n
  6409. * EECR2 EE6SRC LL_HRTIM_EE_GetSrc\n
  6410. * EECR2 EE7SRC LL_HRTIM_EE_GetSrc\n
  6411. * EECR2 EE8SRC LL_HRTIM_EE_GetSrc\n
  6412. * EECR2 EE9SRC LL_HRTIM_EE_GetSrc\n
  6413. * EECR2 EE10SRC LL_HRTIM_EE_GetSrc
  6414. * @param HRTIMx High Resolution Timer instance
  6415. * @param Event This parameter can be one of the following values:
  6416. * @arg @ref LL_HRTIM_EVENT_1
  6417. * @arg @ref LL_HRTIM_EVENT_2
  6418. * @arg @ref LL_HRTIM_EVENT_3
  6419. * @arg @ref LL_HRTIM_EVENT_4
  6420. * @arg @ref LL_HRTIM_EVENT_5
  6421. * @arg @ref LL_HRTIM_EVENT_6
  6422. * @arg @ref LL_HRTIM_EVENT_7
  6423. * @arg @ref LL_HRTIM_EVENT_8
  6424. * @arg @ref LL_HRTIM_EVENT_9
  6425. * @arg @ref LL_HRTIM_EVENT_10
  6426. * @retval EventSrc This parameter can be one of the following values:
  6427. * @arg @ref LL_HRTIM_EE_SRC_1
  6428. * @arg @ref LL_HRTIM_EE_SRC_2
  6429. * @arg @ref LL_HRTIM_EE_SRC_3
  6430. * @arg @ref LL_HRTIM_EE_SRC_4
  6431. */
  6432. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Event)
  6433. {
  6434. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6435. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6436. REG_OFFSET_TAB_EECR[iEvent]));
  6437. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1SRC) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]);
  6438. }
  6439. /**
  6440. * @brief Set the polarity of an external event.
  6441. * @rmtoll EECR1 EE1POL LL_HRTIM_EE_SetPolarity\n
  6442. * EECR1 EE2POL LL_HRTIM_EE_SetPolarity\n
  6443. * EECR1 EE3POL LL_HRTIM_EE_SetPolarity\n
  6444. * EECR1 EE4POL LL_HRTIM_EE_SetPolarity\n
  6445. * EECR1 EE5POL LL_HRTIM_EE_SetPolarity\n
  6446. * EECR2 EE6POL LL_HRTIM_EE_SetPolarity\n
  6447. * EECR2 EE7POL LL_HRTIM_EE_SetPolarity\n
  6448. * EECR2 EE8POL LL_HRTIM_EE_SetPolarity\n
  6449. * EECR2 EE9POL LL_HRTIM_EE_SetPolarity\n
  6450. * EECR2 EE10POL LL_HRTIM_EE_SetPolarity
  6451. * @note This function must not be called when the timer counter is enabled.
  6452. * @note Event polarity is only significant when event detection is level-sensitive.
  6453. * @param HRTIMx High Resolution Timer instance
  6454. * @param Event This parameter can be one of the following values:
  6455. * @arg @ref LL_HRTIM_EVENT_1
  6456. * @arg @ref LL_HRTIM_EVENT_2
  6457. * @arg @ref LL_HRTIM_EVENT_3
  6458. * @arg @ref LL_HRTIM_EVENT_4
  6459. * @arg @ref LL_HRTIM_EVENT_5
  6460. * @arg @ref LL_HRTIM_EVENT_6
  6461. * @arg @ref LL_HRTIM_EVENT_7
  6462. * @arg @ref LL_HRTIM_EVENT_8
  6463. * @arg @ref LL_HRTIM_EVENT_9
  6464. * @arg @ref LL_HRTIM_EVENT_10
  6465. * @param Polarity This parameter can be one of the following values:
  6466. * @arg @ref LL_HRTIM_EE_POLARITY_HIGH
  6467. * @arg @ref LL_HRTIM_EE_POLARITY_LOW
  6468. * @retval None
  6469. */
  6470. __STATIC_INLINE void LL_HRTIM_EE_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Polarity)
  6471. {
  6472. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6473. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6474. REG_OFFSET_TAB_EECR[iEvent]));
  6475. MODIFY_REG(*pReg, (HRTIM_EECR1_EE1POL << REG_SHIFT_TAB_EExSRC[iEvent]), (Polarity << REG_SHIFT_TAB_EExSRC[iEvent]));
  6476. }
  6477. /**
  6478. * @brief Get actual polarity setting of an external event.
  6479. * @rmtoll EECR1 EE1POL LL_HRTIM_EE_GetPolarity\n
  6480. * EECR1 EE2POL LL_HRTIM_EE_GetPolarity\n
  6481. * EECR1 EE3POL LL_HRTIM_EE_GetPolarity\n
  6482. * EECR1 EE4POL LL_HRTIM_EE_GetPolarity\n
  6483. * EECR1 EE5POL LL_HRTIM_EE_GetPolarity\n
  6484. * EECR2 EE6POL LL_HRTIM_EE_GetPolarity\n
  6485. * EECR2 EE7POL LL_HRTIM_EE_GetPolarity\n
  6486. * EECR2 EE8POL LL_HRTIM_EE_GetPolarity\n
  6487. * EECR2 EE9POL LL_HRTIM_EE_GetPolarity\n
  6488. * EECR2 EE10POL LL_HRTIM_EE_GetPolarity
  6489. * @param HRTIMx High Resolution Timer instance
  6490. * @param Event This parameter can be one of the following values:
  6491. * @arg @ref LL_HRTIM_EVENT_1
  6492. * @arg @ref LL_HRTIM_EVENT_2
  6493. * @arg @ref LL_HRTIM_EVENT_3
  6494. * @arg @ref LL_HRTIM_EVENT_4
  6495. * @arg @ref LL_HRTIM_EVENT_5
  6496. * @arg @ref LL_HRTIM_EVENT_6
  6497. * @arg @ref LL_HRTIM_EVENT_7
  6498. * @arg @ref LL_HRTIM_EVENT_8
  6499. * @arg @ref LL_HRTIM_EVENT_9
  6500. * @arg @ref LL_HRTIM_EVENT_10
  6501. * @retval Polarity This parameter can be one of the following values:
  6502. * @arg @ref LL_HRTIM_EE_POLARITY_HIGH
  6503. * @arg @ref LL_HRTIM_EE_POLARITY_LOW
  6504. */
  6505. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Event)
  6506. {
  6507. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6508. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6509. REG_OFFSET_TAB_EECR[iEvent]));
  6510. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1POL) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]);
  6511. }
  6512. /**
  6513. * @brief Set the sensitivity of an external event.
  6514. * @rmtoll EECR1 EE1SNS LL_HRTIM_EE_SetSensitivity\n
  6515. * EECR1 EE2SNS LL_HRTIM_EE_SetSensitivity\n
  6516. * EECR1 EE3SNS LL_HRTIM_EE_SetSensitivity\n
  6517. * EECR1 EE4SNS LL_HRTIM_EE_SetSensitivity\n
  6518. * EECR1 EE5SNS LL_HRTIM_EE_SetSensitivity\n
  6519. * EECR2 EE6SNS LL_HRTIM_EE_SetSensitivity\n
  6520. * EECR2 EE7SNS LL_HRTIM_EE_SetSensitivity\n
  6521. * EECR2 EE8SNS LL_HRTIM_EE_SetSensitivity\n
  6522. * EECR2 EE9SNS LL_HRTIM_EE_SetSensitivity\n
  6523. * EECR2 EE10SNS LL_HRTIM_EE_SetSensitivity
  6524. * @param HRTIMx High Resolution Timer instance
  6525. * @param Event This parameter can be one of the following values:
  6526. * @arg @ref LL_HRTIM_EVENT_1
  6527. * @arg @ref LL_HRTIM_EVENT_2
  6528. * @arg @ref LL_HRTIM_EVENT_3
  6529. * @arg @ref LL_HRTIM_EVENT_4
  6530. * @arg @ref LL_HRTIM_EVENT_5
  6531. * @arg @ref LL_HRTIM_EVENT_6
  6532. * @arg @ref LL_HRTIM_EVENT_7
  6533. * @arg @ref LL_HRTIM_EVENT_8
  6534. * @arg @ref LL_HRTIM_EVENT_9
  6535. * @arg @ref LL_HRTIM_EVENT_10
  6536. * @param Sensitivity This parameter can be one of the following values:
  6537. * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL
  6538. * @arg @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE
  6539. * @arg @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE
  6540. * @arg @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
  6541. * @retval None
  6542. */
  6543. __STATIC_INLINE void LL_HRTIM_EE_SetSensitivity(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Sensitivity)
  6544. {
  6545. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6546. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6547. REG_OFFSET_TAB_EECR[iEvent]));
  6548. MODIFY_REG(*pReg, (HRTIM_EECR1_EE1SNS << REG_SHIFT_TAB_EExSRC[iEvent]), (Sensitivity << REG_SHIFT_TAB_EExSRC[iEvent]));
  6549. }
  6550. /**
  6551. * @brief Get actual sensitivity setting of an external event.
  6552. * @rmtoll EECR1 EE1SNS LL_HRTIM_EE_GetSensitivity\n
  6553. * EECR1 EE2SNS LL_HRTIM_EE_GetSensitivity\n
  6554. * EECR1 EE3SNS LL_HRTIM_EE_GetSensitivity\n
  6555. * EECR1 EE4SNS LL_HRTIM_EE_GetSensitivity\n
  6556. * EECR1 EE5SNS LL_HRTIM_EE_GetSensitivity\n
  6557. * EECR2 EE6SNS LL_HRTIM_EE_GetSensitivity\n
  6558. * EECR2 EE7SNS LL_HRTIM_EE_GetSensitivity\n
  6559. * EECR2 EE8SNS LL_HRTIM_EE_GetSensitivity\n
  6560. * EECR2 EE9SNS LL_HRTIM_EE_GetSensitivity\n
  6561. * EECR2 EE10SNS LL_HRTIM_EE_GetSensitivity
  6562. * @param HRTIMx High Resolution Timer instance
  6563. * @param Event This parameter can be one of the following values:
  6564. * @arg @ref LL_HRTIM_EVENT_1
  6565. * @arg @ref LL_HRTIM_EVENT_2
  6566. * @arg @ref LL_HRTIM_EVENT_3
  6567. * @arg @ref LL_HRTIM_EVENT_4
  6568. * @arg @ref LL_HRTIM_EVENT_5
  6569. * @arg @ref LL_HRTIM_EVENT_6
  6570. * @arg @ref LL_HRTIM_EVENT_7
  6571. * @arg @ref LL_HRTIM_EVENT_8
  6572. * @arg @ref LL_HRTIM_EVENT_9
  6573. * @arg @ref LL_HRTIM_EVENT_10
  6574. * @retval Polarity This parameter can be one of the following values:
  6575. * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL
  6576. * @arg @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE
  6577. * @arg @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE
  6578. * @arg @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
  6579. */
  6580. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetSensitivity(HRTIM_TypeDef *HRTIMx, uint32_t Event)
  6581. {
  6582. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6583. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6584. REG_OFFSET_TAB_EECR[iEvent]));
  6585. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1SNS) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]);
  6586. }
  6587. /**
  6588. * @brief Set the fast mode of an external event.
  6589. * @rmtoll EECR1 EE1FAST LL_HRTIM_EE_SetFastMode\n
  6590. * EECR1 EE2FAST LL_HRTIM_EE_SetFastMode\n
  6591. * EECR1 EE3FAST LL_HRTIM_EE_SetFastMode\n
  6592. * EECR1 EE4FAST LL_HRTIM_EE_SetFastMode\n
  6593. * EECR1 EE5FAST LL_HRTIM_EE_SetFastMode\n
  6594. * EECR2 EE6FAST LL_HRTIM_EE_SetFastMode\n
  6595. * EECR2 EE7FAST LL_HRTIM_EE_SetFastMode\n
  6596. * EECR2 EE8FAST LL_HRTIM_EE_SetFastMode\n
  6597. * EECR2 EE9FAST LL_HRTIM_EE_SetFastMode\n
  6598. * EECR2 EE10FAST LL_HRTIM_EE_SetFastMode
  6599. * @note This function must not be called when the timer counter is enabled.
  6600. * @param HRTIMx High Resolution Timer instance
  6601. * @param Event This parameter can be one of the following values:
  6602. * @arg @ref LL_HRTIM_EVENT_1
  6603. * @arg @ref LL_HRTIM_EVENT_2
  6604. * @arg @ref LL_HRTIM_EVENT_3
  6605. * @arg @ref LL_HRTIM_EVENT_4
  6606. * @arg @ref LL_HRTIM_EVENT_5
  6607. * @param FastMode This parameter can be one of the following values:
  6608. * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE
  6609. * @arg @ref LL_HRTIM_EE_FASTMODE_ENABLE
  6610. * @retval None
  6611. */
  6612. __STATIC_INLINE void LL_HRTIM_EE_SetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t FastMode)
  6613. {
  6614. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6615. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6616. REG_OFFSET_TAB_EECR[iEvent]));
  6617. MODIFY_REG(*pReg, (HRTIM_EECR1_EE1FAST << REG_SHIFT_TAB_EExSRC[iEvent]), (FastMode << REG_SHIFT_TAB_EExSRC[iEvent]));
  6618. }
  6619. /**
  6620. * @brief Get actual fast mode setting of an external event.
  6621. * @rmtoll EECR1 EE1FAST LL_HRTIM_EE_GetFastMode\n
  6622. * EECR1 EE2FAST LL_HRTIM_EE_GetFastMode\n
  6623. * EECR1 EE3FAST LL_HRTIM_EE_GetFastMode\n
  6624. * EECR1 EE4FAST LL_HRTIM_EE_GetFastMode\n
  6625. * EECR1 EE5FAST LL_HRTIM_EE_GetFastMode\n
  6626. * EECR2 EE6FAST LL_HRTIM_EE_GetFastMode\n
  6627. * EECR2 EE7FAST LL_HRTIM_EE_GetFastMode\n
  6628. * EECR2 EE8FAST LL_HRTIM_EE_GetFastMode\n
  6629. * EECR2 EE9FAST LL_HRTIM_EE_GetFastMode\n
  6630. * EECR2 EE10FAST LL_HRTIM_EE_GetFastMode
  6631. * @param HRTIMx High Resolution Timer instance
  6632. * @param Event This parameter can be one of the following values:
  6633. * @arg @ref LL_HRTIM_EVENT_1
  6634. * @arg @ref LL_HRTIM_EVENT_2
  6635. * @arg @ref LL_HRTIM_EVENT_3
  6636. * @arg @ref LL_HRTIM_EVENT_4
  6637. * @arg @ref LL_HRTIM_EVENT_5
  6638. * @retval FastMode This parameter can be one of the following values:
  6639. * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE
  6640. * @arg @ref LL_HRTIM_EE_FASTMODE_ENABLE
  6641. */
  6642. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetFastMode(HRTIM_TypeDef *HRTIMx, uint32_t Event)
  6643. {
  6644. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6645. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.EECR1) +
  6646. REG_OFFSET_TAB_EECR[iEvent]));
  6647. return (READ_BIT(*pReg, (uint32_t)(HRTIM_EECR1_EE1FAST) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]);
  6648. }
  6649. /**
  6650. * @brief Set the digital noise filter of a external event.
  6651. * @rmtoll EECR3 EE6F LL_HRTIM_EE_SetFilter\n
  6652. * EECR3 EE7F LL_HRTIM_EE_SetFilter\n
  6653. * EECR3 EE8F LL_HRTIM_EE_SetFilter\n
  6654. * EECR3 EE9F LL_HRTIM_EE_SetFilter\n
  6655. * EECR3 EE10F LL_HRTIM_EE_SetFilter
  6656. * @param HRTIMx High Resolution Timer instance
  6657. * @param Event This parameter can be one of the following values:
  6658. * @arg @ref LL_HRTIM_EVENT_6
  6659. * @arg @ref LL_HRTIM_EVENT_7
  6660. * @arg @ref LL_HRTIM_EVENT_8
  6661. * @arg @ref LL_HRTIM_EVENT_9
  6662. * @arg @ref LL_HRTIM_EVENT_10
  6663. * @param Filter This parameter can be one of the following values:
  6664. * @arg @ref LL_HRTIM_EE_FILTER_NONE
  6665. * @arg @ref LL_HRTIM_EE_FILTER_1
  6666. * @arg @ref LL_HRTIM_EE_FILTER_2
  6667. * @arg @ref LL_HRTIM_EE_FILTER_3
  6668. * @arg @ref LL_HRTIM_EE_FILTER_4
  6669. * @arg @ref LL_HRTIM_EE_FILTER_5
  6670. * @arg @ref LL_HRTIM_EE_FILTER_6
  6671. * @arg @ref LL_HRTIM_EE_FILTER_7
  6672. * @arg @ref LL_HRTIM_EE_FILTER_8
  6673. * @arg @ref LL_HRTIM_EE_FILTER_9
  6674. * @arg @ref LL_HRTIM_EE_FILTER_10
  6675. * @arg @ref LL_HRTIM_EE_FILTER_11
  6676. * @arg @ref LL_HRTIM_EE_FILTER_12
  6677. * @arg @ref LL_HRTIM_EE_FILTER_13
  6678. * @arg @ref LL_HRTIM_EE_FILTER_14
  6679. * @arg @ref LL_HRTIM_EE_FILTER_15
  6680. * @retval None
  6681. */
  6682. __STATIC_INLINE void LL_HRTIM_EE_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Event, uint32_t Filter)
  6683. {
  6684. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_1));
  6685. MODIFY_REG(HRTIMx->sCommonRegs.EECR3, (HRTIM_EECR3_EE6F << REG_SHIFT_TAB_EExSRC[iEvent]),
  6686. (Filter << REG_SHIFT_TAB_EExSRC[iEvent]));
  6687. }
  6688. /**
  6689. * @brief Get actual digital noise filter setting of a external event.
  6690. * @rmtoll EECR3 EE6F LL_HRTIM_EE_GetFilter\n
  6691. * EECR3 EE7F LL_HRTIM_EE_GetFilter\n
  6692. * EECR3 EE8F LL_HRTIM_EE_GetFilter\n
  6693. * EECR3 EE9F LL_HRTIM_EE_GetFilter\n
  6694. * EECR3 EE10F LL_HRTIM_EE_GetFilter
  6695. * @param HRTIMx High Resolution Timer instance
  6696. * @param Event This parameter can be one of the following values:
  6697. * @arg @ref LL_HRTIM_EVENT_6
  6698. * @arg @ref LL_HRTIM_EVENT_7
  6699. * @arg @ref LL_HRTIM_EVENT_8
  6700. * @arg @ref LL_HRTIM_EVENT_9
  6701. * @arg @ref LL_HRTIM_EVENT_10
  6702. * @retval Filter This parameter can be one of the following values:
  6703. * @arg @ref LL_HRTIM_EE_FILTER_NONE
  6704. * @arg @ref LL_HRTIM_EE_FILTER_1
  6705. * @arg @ref LL_HRTIM_EE_FILTER_2
  6706. * @arg @ref LL_HRTIM_EE_FILTER_3
  6707. * @arg @ref LL_HRTIM_EE_FILTER_4
  6708. * @arg @ref LL_HRTIM_EE_FILTER_5
  6709. * @arg @ref LL_HRTIM_EE_FILTER_6
  6710. * @arg @ref LL_HRTIM_EE_FILTER_7
  6711. * @arg @ref LL_HRTIM_EE_FILTER_8
  6712. * @arg @ref LL_HRTIM_EE_FILTER_9
  6713. * @arg @ref LL_HRTIM_EE_FILTER_10
  6714. * @arg @ref LL_HRTIM_EE_FILTER_11
  6715. * @arg @ref LL_HRTIM_EE_FILTER_12
  6716. * @arg @ref LL_HRTIM_EE_FILTER_13
  6717. * @arg @ref LL_HRTIM_EE_FILTER_14
  6718. * @arg @ref LL_HRTIM_EE_FILTER_15
  6719. */
  6720. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Event)
  6721. {
  6722. register uint32_t iEvent = (uint8_t)(POSITION_VAL(Event) - POSITION_VAL(LL_HRTIM_EVENT_6));
  6723. return (READ_BIT(HRTIMx->sCommonRegs.EECR3,
  6724. (uint32_t)(HRTIM_EECR3_EE6F) << REG_SHIFT_TAB_EExSRC[iEvent]) >> REG_SHIFT_TAB_EExSRC[iEvent]);
  6725. }
  6726. /**
  6727. * @brief Set the external event prescaler.
  6728. * @rmtoll EECR3 EEVSD LL_HRTIM_EE_SetPrescaler
  6729. * @param HRTIMx High Resolution Timer instance
  6730. * @param Prescaler This parameter can be one of the following values:
  6731. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV1
  6732. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV2
  6733. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV4
  6734. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV8
  6735. * @retval None
  6736. */
  6737. __STATIC_INLINE void LL_HRTIM_EE_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Prescaler)
  6738. {
  6739. MODIFY_REG(HRTIMx->sCommonRegs.EECR3, HRTIM_EECR3_EEVSD, Prescaler);
  6740. }
  6741. /**
  6742. * @brief Get actual external event prescaler setting.
  6743. * @rmtoll EECR3 EEVSD LL_HRTIM_EE_GetPrescaler
  6744. * @param HRTIMx High Resolution Timer instance
  6745. * @retval Prescaler This parameter can be one of the following values:
  6746. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV1
  6747. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV2
  6748. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV4
  6749. * @arg @ref LL_HRTIM_EE_PRESCALER_DIV8
  6750. */
  6751. __STATIC_INLINE uint32_t LL_HRTIM_EE_GetPrescaler(HRTIM_TypeDef *HRTIMx)
  6752. {
  6753. return (READ_BIT(HRTIMx->sCommonRegs.EECR3, HRTIM_EECR3_EEVSD));
  6754. }
  6755. /**
  6756. * @}
  6757. */
  6758. /** @defgroup HRTIM_LL_EF_Fault_management Fault_management
  6759. * @{
  6760. */
  6761. /**
  6762. * @brief Configure fault signal conditioning Polarity and Source.
  6763. * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_Config\n
  6764. * FLTINR1 FLT1SRC LL_HRTIM_FLT_Config\n
  6765. * FLTINR1 FLT2P LL_HRTIM_FLT_Config\n
  6766. * FLTINR1 FLT2SRC LL_HRTIM_FLT_Config\n
  6767. * FLTINR1 FLT3P LL_HRTIM_FLT_Config\n
  6768. * FLTINR1 FLT3SRC LL_HRTIM_FLT_Config\n
  6769. * FLTINR1 FLT4P LL_HRTIM_FLT_Config\n
  6770. * FLTINR1 FLT4SRC LL_HRTIM_FLT_Config\n
  6771. * FLTINR2 FLT5P LL_HRTIM_FLT_Config\n
  6772. * FLTINR2 FLT5SRC LL_HRTIM_FLT_Config
  6773. * @note This function must not be called when the fault channel is enabled.
  6774. * @param HRTIMx High Resolution Timer instance
  6775. * @param Fault This parameter can be one of the following values:
  6776. * @arg @ref LL_HRTIM_FAULT_1
  6777. * @arg @ref LL_HRTIM_FAULT_2
  6778. * @arg @ref LL_HRTIM_FAULT_3
  6779. * @arg @ref LL_HRTIM_FAULT_4
  6780. * @arg @ref LL_HRTIM_FAULT_5
  6781. * @param Configuration This parameter must be a combination of all the following values:
  6782. * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT..LL_HRTIM_FLT_SRC_INTERNAL
  6783. * @arg @ref LL_HRTIM_FLT_POLARITY_LOW..LL_HRTIM_FLT_POLARITY_HIGH
  6784. * @retval None
  6785. */
  6786. __STATIC_INLINE void LL_HRTIM_FLT_Config(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Configuration)
  6787. {
  6788. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6789. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6790. REG_OFFSET_TAB_FLTINR[iFault]));
  6791. MODIFY_REG(*pReg, (HRTIM_FLT_CONFIG_MASK << REG_SHIFT_TAB_FLTxE[iFault]),
  6792. (Configuration << REG_SHIFT_TAB_FLTxE[iFault]));
  6793. }
  6794. /**
  6795. * @brief Set the source of a fault signal.
  6796. * @rmtoll FLTINR1 FLT1SRC LL_HRTIM_FLT_SetSrc\n
  6797. * FLTINR1 FLT2SRC LL_HRTIM_FLT_SetSrc\n
  6798. * FLTINR1 FLT3SRC LL_HRTIM_FLT_SetSrc\n
  6799. * FLTINR1 FLT4SRC LL_HRTIM_FLT_SetSrc\n
  6800. * FLTINR2 FLT5SRC LL_HRTIM_FLT_SetSrc
  6801. * @note This function must not be called when the fault channel is enabled.
  6802. * @param HRTIMx High Resolution Timer instance
  6803. * @param Fault This parameter can be one of the following values:
  6804. * @arg @ref LL_HRTIM_FAULT_1
  6805. * @arg @ref LL_HRTIM_FAULT_2
  6806. * @arg @ref LL_HRTIM_FAULT_3
  6807. * @arg @ref LL_HRTIM_FAULT_4
  6808. * @arg @ref LL_HRTIM_FAULT_5
  6809. * @param Src This parameter can be one of the following values:
  6810. * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT
  6811. * @arg @ref LL_HRTIM_FLT_SRC_INTERNAL
  6812. * @retval None
  6813. */
  6814. __STATIC_INLINE void LL_HRTIM_FLT_SetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Src)
  6815. {
  6816. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6817. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6818. REG_OFFSET_TAB_FLTINR[iFault]));
  6819. MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1SRC << REG_SHIFT_TAB_FLTxE[iFault]), (Src << REG_SHIFT_TAB_FLTxE[iFault]));
  6820. }
  6821. /**
  6822. * @brief Get actual source of a fault signal.
  6823. * @rmtoll FLTINR1 FLT1SRC LL_HRTIM_FLT_GetSrc\n
  6824. * FLTINR1 FLT2SRC LL_HRTIM_FLT_GetSrc\n
  6825. * FLTINR1 FLT3SRC LL_HRTIM_FLT_GetSrc\n
  6826. * FLTINR1 FLT4SRC LL_HRTIM_FLT_GetSrc\n
  6827. * FLTINR2 FLT5SRC LL_HRTIM_FLT_GetSrc
  6828. * @param HRTIMx High Resolution Timer instance
  6829. * @param Fault This parameter can be one of the following values:
  6830. * @arg @ref LL_HRTIM_FAULT_1
  6831. * @arg @ref LL_HRTIM_FAULT_2
  6832. * @arg @ref LL_HRTIM_FAULT_3
  6833. * @arg @ref LL_HRTIM_FAULT_4
  6834. * @arg @ref LL_HRTIM_FAULT_5
  6835. * @retval Source This parameter can be one of the following values:
  6836. * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT
  6837. * @arg @ref LL_HRTIM_FLT_SRC_INTERNAL
  6838. */
  6839. __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetSrc(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  6840. {
  6841. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6842. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6843. REG_OFFSET_TAB_FLTINR[iFault]));
  6844. return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1SRC << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]);
  6845. }
  6846. /**
  6847. * @brief Set the polarity of a fault signal.
  6848. * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_SetPolarity\n
  6849. * FLTINR1 FLT2P LL_HRTIM_FLT_SetPolarity\n
  6850. * FLTINR1 FLT3P LL_HRTIM_FLT_SetPolarity\n
  6851. * FLTINR1 FLT4P LL_HRTIM_FLT_SetPolarity\n
  6852. * FLTINR2 FLT5P LL_HRTIM_FLT_SetPolarity
  6853. * @note This function must not be called when the fault channel is enabled.
  6854. * @param HRTIMx High Resolution Timer instance
  6855. * @param Fault This parameter can be one of the following values:
  6856. * @arg @ref LL_HRTIM_FAULT_1
  6857. * @arg @ref LL_HRTIM_FAULT_2
  6858. * @arg @ref LL_HRTIM_FAULT_3
  6859. * @arg @ref LL_HRTIM_FAULT_4
  6860. * @arg @ref LL_HRTIM_FAULT_5
  6861. * @param Polarity This parameter can be one of the following values:
  6862. * @arg @ref LL_HRTIM_FLT_POLARITY_LOW
  6863. * @arg @ref LL_HRTIM_FLT_POLARITY_HIGH
  6864. * @retval None
  6865. */
  6866. __STATIC_INLINE void LL_HRTIM_FLT_SetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Polarity)
  6867. {
  6868. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6869. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6870. REG_OFFSET_TAB_FLTINR[iFault]));
  6871. MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1P << REG_SHIFT_TAB_FLTxE[iFault]), (Polarity << REG_SHIFT_TAB_FLTxE[iFault]));
  6872. }
  6873. /**
  6874. * @brief Get actual polarity of a fault signal.
  6875. * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_GetPolarity\n
  6876. * FLTINR1 FLT2P LL_HRTIM_FLT_GetPolarity\n
  6877. * FLTINR1 FLT3P LL_HRTIM_FLT_GetPolarity\n
  6878. * FLTINR1 FLT4P LL_HRTIM_FLT_GetPolarity\n
  6879. * FLTINR2 FLT5P LL_HRTIM_FLT_GetPolarity
  6880. * @param HRTIMx High Resolution Timer instance
  6881. * @param Fault This parameter can be one of the following values:
  6882. * @arg @ref LL_HRTIM_FAULT_1
  6883. * @arg @ref LL_HRTIM_FAULT_2
  6884. * @arg @ref LL_HRTIM_FAULT_3
  6885. * @arg @ref LL_HRTIM_FAULT_4
  6886. * @arg @ref LL_HRTIM_FAULT_5
  6887. * @retval Polarity This parameter can be one of the following values:
  6888. * @arg @ref LL_HRTIM_FLT_POLARITY_LOW
  6889. * @arg @ref LL_HRTIM_FLT_POLARITY_HIGH
  6890. */
  6891. __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetPolarity(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  6892. {
  6893. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6894. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6895. REG_OFFSET_TAB_FLTINR[iFault]));
  6896. return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1P << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]);
  6897. }
  6898. /**
  6899. * @brief Set the digital noise filter of a fault signal.
  6900. * @rmtoll FLTINR1 FLT1F LL_HRTIM_FLT_SetFilter\n
  6901. * FLTINR1 FLT2F LL_HRTIM_FLT_SetFilter\n
  6902. * FLTINR1 FLT3F LL_HRTIM_FLT_SetFilter\n
  6903. * FLTINR1 FLT4F LL_HRTIM_FLT_SetFilter\n
  6904. * FLTINR2 FLT5F LL_HRTIM_FLT_SetFilter
  6905. * @note This function must not be called when the fault channel is enabled.
  6906. * @param HRTIMx High Resolution Timer instance
  6907. * @param Fault This parameter can be one of the following values:
  6908. * @arg @ref LL_HRTIM_FAULT_1
  6909. * @arg @ref LL_HRTIM_FAULT_2
  6910. * @arg @ref LL_HRTIM_FAULT_3
  6911. * @arg @ref LL_HRTIM_FAULT_4
  6912. * @arg @ref LL_HRTIM_FAULT_5
  6913. * @param Filter This parameter can be one of the following values:
  6914. * @arg @ref LL_HRTIM_FLT_FILTER_NONE
  6915. * @arg @ref LL_HRTIM_FLT_FILTER_1
  6916. * @arg @ref LL_HRTIM_FLT_FILTER_2
  6917. * @arg @ref LL_HRTIM_FLT_FILTER_3
  6918. * @arg @ref LL_HRTIM_FLT_FILTER_4
  6919. * @arg @ref LL_HRTIM_FLT_FILTER_5
  6920. * @arg @ref LL_HRTIM_FLT_FILTER_6
  6921. * @arg @ref LL_HRTIM_FLT_FILTER_7
  6922. * @arg @ref LL_HRTIM_FLT_FILTER_8
  6923. * @arg @ref LL_HRTIM_FLT_FILTER_9
  6924. * @arg @ref LL_HRTIM_FLT_FILTER_10
  6925. * @arg @ref LL_HRTIM_FLT_FILTER_11
  6926. * @arg @ref LL_HRTIM_FLT_FILTER_12
  6927. * @arg @ref LL_HRTIM_FLT_FILTER_13
  6928. * @arg @ref LL_HRTIM_FLT_FILTER_14
  6929. * @arg @ref LL_HRTIM_FLT_FILTER_15
  6930. * @retval None
  6931. */
  6932. __STATIC_INLINE void LL_HRTIM_FLT_SetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Fault, uint32_t Filter)
  6933. {
  6934. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6935. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6936. REG_OFFSET_TAB_FLTINR[iFault]));
  6937. MODIFY_REG(*pReg, (HRTIM_FLTINR1_FLT1F << REG_SHIFT_TAB_FLTxE[iFault]), (Filter << REG_SHIFT_TAB_FLTxE[iFault]));
  6938. }
  6939. /**
  6940. * @brief Get actual digital noise filter setting of a fault signal.
  6941. * @rmtoll FLTINR1 FLT1F LL_HRTIM_FLT_GetFilter\n
  6942. * FLTINR1 FLT2F LL_HRTIM_FLT_GetFilter\n
  6943. * FLTINR1 FLT3F LL_HRTIM_FLT_GetFilter\n
  6944. * FLTINR1 FLT4F LL_HRTIM_FLT_GetFilter\n
  6945. * FLTINR2 FLT5F LL_HRTIM_FLT_GetFilter
  6946. * @param HRTIMx High Resolution Timer instance
  6947. * @param Fault This parameter can be one of the following values:
  6948. * @arg @ref LL_HRTIM_FAULT_1
  6949. * @arg @ref LL_HRTIM_FAULT_2
  6950. * @arg @ref LL_HRTIM_FAULT_3
  6951. * @arg @ref LL_HRTIM_FAULT_4
  6952. * @arg @ref LL_HRTIM_FAULT_5
  6953. * @retval Filter This parameter can be one of the following values:
  6954. * @arg @ref LL_HRTIM_FLT_FILTER_NONE
  6955. * @arg @ref LL_HRTIM_FLT_FILTER_1
  6956. * @arg @ref LL_HRTIM_FLT_FILTER_2
  6957. * @arg @ref LL_HRTIM_FLT_FILTER_3
  6958. * @arg @ref LL_HRTIM_FLT_FILTER_4
  6959. * @arg @ref LL_HRTIM_FLT_FILTER_5
  6960. * @arg @ref LL_HRTIM_FLT_FILTER_6
  6961. * @arg @ref LL_HRTIM_FLT_FILTER_7
  6962. * @arg @ref LL_HRTIM_FLT_FILTER_8
  6963. * @arg @ref LL_HRTIM_FLT_FILTER_9
  6964. * @arg @ref LL_HRTIM_FLT_FILTER_10
  6965. * @arg @ref LL_HRTIM_FLT_FILTER_11
  6966. * @arg @ref LL_HRTIM_FLT_FILTER_12
  6967. * @arg @ref LL_HRTIM_FLT_FILTER_13
  6968. * @arg @ref LL_HRTIM_FLT_FILTER_14
  6969. * @arg @ref LL_HRTIM_FLT_FILTER_15
  6970. */
  6971. __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetFilter(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  6972. {
  6973. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  6974. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  6975. REG_OFFSET_TAB_FLTINR[iFault]));
  6976. return (READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1F << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]);
  6977. }
  6978. /**
  6979. * @brief Set the fault circuitry prescaler.
  6980. * @rmtoll FLTINR2 FLTSD LL_HRTIM_FLT_SetPrescaler
  6981. * @param HRTIMx High Resolution Timer instance
  6982. * @param Prescaler This parameter can be one of the following values:
  6983. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV1
  6984. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV2
  6985. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV4
  6986. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV8
  6987. * @retval None
  6988. */
  6989. __STATIC_INLINE void LL_HRTIM_FLT_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Prescaler)
  6990. {
  6991. MODIFY_REG(HRTIMx->sCommonRegs.FLTINR2, HRTIM_FLTINR2_FLTSD, Prescaler);
  6992. }
  6993. /**
  6994. * @brief Get actual fault circuitry prescaler setting.
  6995. * @rmtoll FLTINR2 FLTSD LL_HRTIM_FLT_GetPrescaler
  6996. * @param HRTIMx High Resolution Timer instance
  6997. * @retval Prescaler This parameter can be one of the following values:
  6998. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV1
  6999. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV2
  7000. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV4
  7001. * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV8
  7002. */
  7003. __STATIC_INLINE uint32_t LL_HRTIM_FLT_GetPrescaler(HRTIM_TypeDef *HRTIMx)
  7004. {
  7005. return (READ_BIT(HRTIMx->sCommonRegs.FLTINR2, HRTIM_FLTINR2_FLTSD));
  7006. }
  7007. /**
  7008. * @brief Lock the fault signal conditioning settings.
  7009. * @rmtoll FLTINR1 FLT1LCK LL_HRTIM_FLT_Lock\n
  7010. * FLTINR1 FLT2LCK LL_HRTIM_FLT_Lock\n
  7011. * FLTINR1 FLT3LCK LL_HRTIM_FLT_Lock\n
  7012. * FLTINR1 FLT4LCK LL_HRTIM_FLT_Lock\n
  7013. * FLTINR2 FLT5LCK LL_HRTIM_FLT_Lock
  7014. * @param HRTIMx High Resolution Timer instance
  7015. * @param Fault This parameter can be one of the following values:
  7016. * @arg @ref LL_HRTIM_FAULT_1
  7017. * @arg @ref LL_HRTIM_FAULT_2
  7018. * @arg @ref LL_HRTIM_FAULT_3
  7019. * @arg @ref LL_HRTIM_FAULT_4
  7020. * @arg @ref LL_HRTIM_FAULT_5
  7021. * @retval None
  7022. */
  7023. __STATIC_INLINE void LL_HRTIM_FLT_Lock(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  7024. {
  7025. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  7026. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  7027. REG_OFFSET_TAB_FLTINR[iFault]));
  7028. SET_BIT(*pReg, (HRTIM_FLTINR1_FLT1LCK << REG_SHIFT_TAB_FLTxE[iFault]));
  7029. }
  7030. /**
  7031. * @brief Enable the fault circuitry for the designated fault input.
  7032. * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_Enable\n
  7033. * FLTINR1 FLT2E LL_HRTIM_FLT_Enable\n
  7034. * FLTINR1 FLT3E LL_HRTIM_FLT_Enable\n
  7035. * FLTINR1 FLT4E LL_HRTIM_FLT_Enable\n
  7036. * FLTINR2 FLT5E LL_HRTIM_FLT_Enable
  7037. * @param HRTIMx High Resolution Timer instance
  7038. * @param Fault This parameter can be one of the following values:
  7039. * @arg @ref LL_HRTIM_FAULT_1
  7040. * @arg @ref LL_HRTIM_FAULT_2
  7041. * @arg @ref LL_HRTIM_FAULT_3
  7042. * @arg @ref LL_HRTIM_FAULT_4
  7043. * @arg @ref LL_HRTIM_FAULT_5
  7044. * @retval None
  7045. */
  7046. __STATIC_INLINE void LL_HRTIM_FLT_Enable(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  7047. {
  7048. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  7049. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  7050. REG_OFFSET_TAB_FLTINR[iFault]));
  7051. SET_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault]));
  7052. }
  7053. /**
  7054. * @brief Disable the fault circuitry for for the designated fault input.
  7055. * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_Disable\n
  7056. * FLTINR1 FLT2E LL_HRTIM_FLT_Disable\n
  7057. * FLTINR1 FLT3E LL_HRTIM_FLT_Disable\n
  7058. * FLTINR1 FLT4E LL_HRTIM_FLT_Disable\n
  7059. * FLTINR2 FLT5E LL_HRTIM_FLT_Disable
  7060. * @param HRTIMx High Resolution Timer instance
  7061. * @param Fault This parameter can be one of the following values:
  7062. * @arg @ref LL_HRTIM_FAULT_1
  7063. * @arg @ref LL_HRTIM_FAULT_2
  7064. * @arg @ref LL_HRTIM_FAULT_3
  7065. * @arg @ref LL_HRTIM_FAULT_4
  7066. * @arg @ref LL_HRTIM_FAULT_5
  7067. * @retval None
  7068. */
  7069. __STATIC_INLINE void LL_HRTIM_FLT_Disable(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  7070. {
  7071. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  7072. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  7073. REG_OFFSET_TAB_FLTINR[iFault]));
  7074. CLEAR_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault]));
  7075. }
  7076. /**
  7077. * @brief Indicate whether the fault circuitry is enabled for a given fault input.
  7078. * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_IsEnabled\n
  7079. * FLTINR1 FLT2E LL_HRTIM_FLT_IsEnabled\n
  7080. * FLTINR1 FLT3E LL_HRTIM_FLT_IsEnabled\n
  7081. * FLTINR1 FLT4E LL_HRTIM_FLT_IsEnabled\n
  7082. * FLTINR2 FLT5E LL_HRTIM_FLT_IsEnabled
  7083. * @param HRTIMx High Resolution Timer instance
  7084. * @param Fault This parameter can be one of the following values:
  7085. * @arg @ref LL_HRTIM_FAULT_1
  7086. * @arg @ref LL_HRTIM_FAULT_2
  7087. * @arg @ref LL_HRTIM_FAULT_3
  7088. * @arg @ref LL_HRTIM_FAULT_4
  7089. * @arg @ref LL_HRTIM_FAULT_5
  7090. * @retval State of FLTxEN bit in HRTIM_FLTINRx register (1 or 0).
  7091. */
  7092. __STATIC_INLINE uint32_t LL_HRTIM_FLT_IsEnabled(HRTIM_TypeDef *HRTIMx, uint32_t Fault)
  7093. {
  7094. register uint32_t iFault = (uint8_t)POSITION_VAL(Fault);
  7095. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sCommonRegs.FLTINR1) +
  7096. REG_OFFSET_TAB_FLTINR[iFault]));
  7097. return (((READ_BIT(*pReg, (HRTIM_FLTINR1_FLT1E << REG_SHIFT_TAB_FLTxE[iFault])) >> REG_SHIFT_TAB_FLTxE[iFault]) ==
  7098. (HRTIM_IER_FLT1)) ? 1UL : 0UL);
  7099. }
  7100. /**
  7101. * @}
  7102. */
  7103. /** @defgroup HRTIM_LL_EF_Burst_Mode_management Burst_Mode_management
  7104. * @{
  7105. */
  7106. /**
  7107. * @brief Configure the burst mode controller.
  7108. * @rmtoll BMCR BMOM LL_HRTIM_BM_Config\n
  7109. * BMCR BMCLK LL_HRTIM_BM_Config\n
  7110. * BMCR BMPRSC LL_HRTIM_BM_Config
  7111. * @param HRTIMx High Resolution Timer instance
  7112. * @param Configuration This parameter must be a combination of all the following values:
  7113. * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT or @ref LL_HRTIM_BM_MODE_CONTINOUS
  7114. * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER or ... or @ref LL_HRTIM_BM_CLKSRC_FHRTIM
  7115. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1 or ... @ref LL_HRTIM_BM_PRESCALER_DIV32768
  7116. * @retval None
  7117. */
  7118. __STATIC_INLINE void LL_HRTIM_BM_Config(HRTIM_TypeDef *HRTIMx, uint32_t Configuration)
  7119. {
  7120. MODIFY_REG(HRTIMx->sCommonRegs.BMCR, HRTIM_BM_CONFIG_MASK, Configuration);
  7121. }
  7122. /**
  7123. * @brief Set the burst mode controller operating mode.
  7124. * @rmtoll BMCR BMOM LL_HRTIM_BM_SetMode
  7125. * @param HRTIMx High Resolution Timer instance
  7126. * @param Mode This parameter can be one of the following values:
  7127. * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT
  7128. * @arg @ref LL_HRTIM_BM_MODE_CONTINOUS
  7129. * @retval None
  7130. */
  7131. __STATIC_INLINE void LL_HRTIM_BM_SetMode(HRTIM_TypeDef *HRTIMx, uint32_t Mode)
  7132. {
  7133. MODIFY_REG(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMOM, Mode);
  7134. }
  7135. /**
  7136. * @brief Get actual burst mode controller operating mode.
  7137. * @rmtoll BMCR BMOM LL_HRTIM_BM_GetMode
  7138. * @param HRTIMx High Resolution Timer instance
  7139. * @retval Mode This parameter can be one of the following values:
  7140. * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT
  7141. * @arg @ref LL_HRTIM_BM_MODE_CONTINOUS
  7142. */
  7143. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetMode(HRTIM_TypeDef *HRTIMx)
  7144. {
  7145. return (uint32_t)READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMOM);
  7146. }
  7147. /**
  7148. * @brief Set the burst mode controller clock source.
  7149. * @rmtoll BMCR BMCLK LL_HRTIM_BM_SetClockSrc
  7150. * @param HRTIMx High Resolution Timer instance
  7151. * @param ClockSrc This parameter can be one of the following values:
  7152. * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
  7153. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
  7154. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
  7155. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
  7156. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
  7157. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
  7158. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
  7159. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
  7160. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
  7161. * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
  7162. * @retval None
  7163. */
  7164. __STATIC_INLINE void LL_HRTIM_BM_SetClockSrc(HRTIM_TypeDef *HRTIMx, uint32_t ClockSrc)
  7165. {
  7166. MODIFY_REG(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMCLK, ClockSrc);
  7167. }
  7168. /**
  7169. * @brief Get actual burst mode controller clock source.
  7170. * @rmtoll BMCR BMCLK LL_HRTIM_BM_GetClockSrc
  7171. * @param HRTIMx High Resolution Timer instance
  7172. * @retval ClockSrc This parameter can be one of the following values:
  7173. * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
  7174. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
  7175. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
  7176. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
  7177. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
  7178. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
  7179. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
  7180. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
  7181. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
  7182. * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
  7183. * @retval ClockSrc This parameter can be one of the following values:
  7184. * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
  7185. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
  7186. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
  7187. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
  7188. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
  7189. * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
  7190. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
  7191. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
  7192. * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
  7193. * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
  7194. */
  7195. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetClockSrc(HRTIM_TypeDef *HRTIMx)
  7196. {
  7197. return (uint32_t)READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMCLK);
  7198. }
  7199. /**
  7200. * @brief Set the burst mode controller prescaler.
  7201. * @rmtoll BMCR BMPRSC LL_HRTIM_BM_SetPrescaler
  7202. * @param HRTIMx High Resolution Timer instance
  7203. * @param Prescaler This parameter can be one of the following values:
  7204. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1
  7205. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2
  7206. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4
  7207. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8
  7208. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16
  7209. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32
  7210. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV64
  7211. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV128
  7212. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV256
  7213. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV512
  7214. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1024
  7215. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2048
  7216. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4096
  7217. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8192
  7218. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16384
  7219. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32768
  7220. * @retval None
  7221. */
  7222. __STATIC_INLINE void LL_HRTIM_BM_SetPrescaler(HRTIM_TypeDef *HRTIMx, uint32_t Prescaler)
  7223. {
  7224. MODIFY_REG(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMPRSC, Prescaler);
  7225. }
  7226. /**
  7227. * @brief Get actual burst mode controller prescaler setting.
  7228. * @rmtoll BMCR BMPRSC LL_HRTIM_BM_GetPrescaler
  7229. * @param HRTIMx High Resolution Timer instance
  7230. * @retval Prescaler This parameter can be one of the following values:
  7231. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1
  7232. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2
  7233. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4
  7234. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8
  7235. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16
  7236. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32
  7237. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV64
  7238. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV128
  7239. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV256
  7240. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV512
  7241. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1024
  7242. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2048
  7243. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4096
  7244. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8192
  7245. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16384
  7246. * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32768
  7247. */
  7248. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetPrescaler(HRTIM_TypeDef *HRTIMx)
  7249. {
  7250. return (uint32_t)READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMPRSC);
  7251. }
  7252. /**
  7253. * @brief Enable burst mode compare and period registers preload.
  7254. * @rmtoll BMCR BMPREN LL_HRTIM_BM_EnablePreload
  7255. * @param HRTIMx High Resolution Timer instance
  7256. * @retval None
  7257. */
  7258. __STATIC_INLINE void LL_HRTIM_BM_EnablePreload(HRTIM_TypeDef *HRTIMx)
  7259. {
  7260. SET_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMPREN);
  7261. }
  7262. /**
  7263. * @brief Disable burst mode compare and period registers preload.
  7264. * @rmtoll BMCR BMPREN LL_HRTIM_BM_DisablePreload
  7265. * @param HRTIMx High Resolution Timer instance
  7266. * @retval None
  7267. */
  7268. __STATIC_INLINE void LL_HRTIM_BM_DisablePreload(HRTIM_TypeDef *HRTIMx)
  7269. {
  7270. CLEAR_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMPREN);
  7271. }
  7272. /**
  7273. * @brief Indicate whether burst mode compare and period registers are preloaded.
  7274. * @rmtoll BMCR BMPREN LL_HRTIM_BM_IsEnabledPreload
  7275. * @param HRTIMx High Resolution Timer instance
  7276. * @retval State of BMPREN bit in HRTIM_BMCR register (1 or 0).
  7277. */
  7278. __STATIC_INLINE uint32_t LL_HRTIM_BM_IsEnabledPreload(HRTIM_TypeDef *HRTIMx)
  7279. {
  7280. uint32_t temp; /* MISRAC-2012 compliancy */
  7281. temp = READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMPREN);
  7282. return ((temp == (HRTIM_BMCR_BMPREN)) ? 1UL : 0UL);
  7283. }
  7284. /**
  7285. * @brief Set the burst mode controller trigger
  7286. * @rmtoll BMTRGR SW LL_HRTIM_BM_SetTrig\n
  7287. * BMTRGR MSTRST LL_HRTIM_BM_SetTrig\n
  7288. * BMTRGR MSTREP LL_HRTIM_BM_SetTrig\n
  7289. * BMTRGR MSTCMP1 LL_HRTIM_BM_SetTrig\n
  7290. * BMTRGR MSTCMP2 LL_HRTIM_BM_SetTrig\n
  7291. * BMTRGR MSTCMP3 LL_HRTIM_BM_SetTrig\n
  7292. * BMTRGR MSTCMP4 LL_HRTIM_BM_SetTrig\n
  7293. * BMTRGR TARST LL_HRTIM_BM_SetTrig\n
  7294. * BMTRGR TAREP LL_HRTIM_BM_SetTrig\n
  7295. * BMTRGR TACMP1 LL_HRTIM_BM_SetTrig\n
  7296. * BMTRGR TACMP2 LL_HRTIM_BM_SetTrig\n
  7297. * BMTRGR TBRST LL_HRTIM_BM_SetTrig\n
  7298. * BMTRGR TBREP LL_HRTIM_BM_SetTrig\n
  7299. * BMTRGR TBCMP1 LL_HRTIM_BM_SetTrig\n
  7300. * BMTRGR TBCMP2 LL_HRTIM_BM_SetTrig\n
  7301. * BMTRGR TCRST LL_HRTIM_BM_SetTrig\n
  7302. * BMTRGR TCREP LL_HRTIM_BM_SetTrig\n
  7303. * BMTRGR TCCMP1 LL_HRTIM_BM_SetTrig\n
  7304. * BMTRGR TCCMP2 LL_HRTIM_BM_SetTrig\n
  7305. * BMTRGR TDRST LL_HRTIM_BM_SetTrig\n
  7306. * BMTRGR TDREP LL_HRTIM_BM_SetTrig\n
  7307. * BMTRGR TDCMP1 LL_HRTIM_BM_SetTrig\n
  7308. * BMTRGR TDCMP2 LL_HRTIM_BM_SetTrig\n
  7309. * BMTRGR TERST LL_HRTIM_BM_SetTrig\n
  7310. * BMTRGR TEREP LL_HRTIM_BM_SetTrig\n
  7311. * BMTRGR TECMP1 LL_HRTIM_BM_SetTrig\n
  7312. * BMTRGR TECMP2 LL_HRTIM_BM_SetTrig\n
  7313. * BMTRGR TAEEV7 LL_HRTIM_BM_SetTrig\n
  7314. * BMTRGR TAEEV8 LL_HRTIM_BM_SetTrig\n
  7315. * BMTRGR EEV7 LL_HRTIM_BM_SetTrig\n
  7316. * BMTRGR EEV8 LL_HRTIM_BM_SetTrig\n
  7317. * BMTRGR OCHIPEV LL_HRTIM_BM_SetTrig
  7318. * @param HRTIMx High Resolution Timer instance
  7319. * @param Trig This parameter can be a combination of the following values:
  7320. * @arg @ref LL_HRTIM_BM_TRIG_NONE
  7321. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_RESET
  7322. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_REPETITION
  7323. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP1
  7324. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP2
  7325. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP3
  7326. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP4
  7327. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_RESET
  7328. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_REPETITION
  7329. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP1
  7330. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP2
  7331. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_RESET
  7332. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_REPETITION
  7333. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP1
  7334. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP2
  7335. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_RESET
  7336. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_REPETITION
  7337. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP1
  7338. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP2
  7339. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_RESET
  7340. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_REPETITION
  7341. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP1
  7342. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP2
  7343. * @arg @ref LL_HRTIM_BM_TRIG_TIME_RESET
  7344. * @arg @ref LL_HRTIM_BM_TRIG_TIME_REPETITION
  7345. * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP1
  7346. * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP2
  7347. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_EVENT7
  7348. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_EVENT8
  7349. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_7
  7350. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_8
  7351. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_ONCHIP
  7352. * @retval None
  7353. */
  7354. __STATIC_INLINE void LL_HRTIM_BM_SetTrig(HRTIM_TypeDef *HRTIMx, uint32_t Trig)
  7355. {
  7356. WRITE_REG(HRTIMx->sCommonRegs.BMTRGR, Trig);
  7357. }
  7358. /**
  7359. * @brief Get actual burst mode controller trigger.
  7360. * @rmtoll BMTRGR SW LL_HRTIM_BM_GetTrig\n
  7361. * BMTRGR MSTRST LL_HRTIM_BM_GetTrig\n
  7362. * BMTRGR MSTREP LL_HRTIM_BM_GetTrig\n
  7363. * BMTRGR MSTCMP1 LL_HRTIM_BM_GetTrig\n
  7364. * BMTRGR MSTCMP2 LL_HRTIM_BM_GetTrig\n
  7365. * BMTRGR MSTCMP3 LL_HRTIM_BM_GetTrig\n
  7366. * BMTRGR MSTCMP4 LL_HRTIM_BM_GetTrig\n
  7367. * BMTRGR TARST LL_HRTIM_BM_GetTrig\n
  7368. * BMTRGR TAREP LL_HRTIM_BM_GetTrig\n
  7369. * BMTRGR TACMP1 LL_HRTIM_BM_GetTrig\n
  7370. * BMTRGR TACMP2 LL_HRTIM_BM_GetTrig\n
  7371. * BMTRGR TBRST LL_HRTIM_BM_GetTrig\n
  7372. * BMTRGR TBREP LL_HRTIM_BM_GetTrig\n
  7373. * BMTRGR TBCMP1 LL_HRTIM_BM_GetTrig\n
  7374. * BMTRGR TBCMP2 LL_HRTIM_BM_GetTrig\n
  7375. * BMTRGR TCRST LL_HRTIM_BM_GetTrig\n
  7376. * BMTRGR TCREP LL_HRTIM_BM_GetTrig\n
  7377. * BMTRGR TCCMP1 LL_HRTIM_BM_GetTrig\n
  7378. * BMTRGR TCCMP2 LL_HRTIM_BM_GetTrig\n
  7379. * BMTRGR TDRST LL_HRTIM_BM_GetTrig\n
  7380. * BMTRGR TDREP LL_HRTIM_BM_GetTrig\n
  7381. * BMTRGR TDCMP1 LL_HRTIM_BM_GetTrig\n
  7382. * BMTRGR TDCMP2 LL_HRTIM_BM_GetTrig\n
  7383. * BMTRGR TERST LL_HRTIM_BM_GetTrig\n
  7384. * BMTRGR TEREP LL_HRTIM_BM_GetTrig\n
  7385. * BMTRGR TECMP1 LL_HRTIM_BM_GetTrig\n
  7386. * BMTRGR TECMP2 LL_HRTIM_BM_GetTrig\n
  7387. * BMTRGR TAEEV7 LL_HRTIM_BM_GetTrig\n
  7388. * BMTRGR TAEEV8 LL_HRTIM_BM_GetTrig\n
  7389. * BMTRGR EEV7 LL_HRTIM_BM_GetTrig\n
  7390. * BMTRGR EEV8 LL_HRTIM_BM_GetTrig\n
  7391. * BMTRGR OCHIPEV LL_HRTIM_BM_GetTrig
  7392. * @param HRTIMx High Resolution Timer instance
  7393. * @retval Trig This parameter can be a combination of the following values:
  7394. * @arg @ref LL_HRTIM_BM_TRIG_NONE
  7395. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_RESET
  7396. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_REPETITION
  7397. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP1
  7398. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP2
  7399. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP3
  7400. * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP4
  7401. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_RESET
  7402. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_REPETITION
  7403. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP1
  7404. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP2
  7405. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_RESET
  7406. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_REPETITION
  7407. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP1
  7408. * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP2
  7409. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_RESET
  7410. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_REPETITION
  7411. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP1
  7412. * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP2
  7413. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_RESET
  7414. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_REPETITION
  7415. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP1
  7416. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP2
  7417. * @arg @ref LL_HRTIM_BM_TRIG_TIME_RESET
  7418. * @arg @ref LL_HRTIM_BM_TRIG_TIME_REPETITION
  7419. * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP1
  7420. * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP2
  7421. * @arg @ref LL_HRTIM_BM_TRIG_TIMA_EVENT7
  7422. * @arg @ref LL_HRTIM_BM_TRIG_TIMD_EVENT8
  7423. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_7
  7424. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_8
  7425. * @arg @ref LL_HRTIM_BM_TRIG_EVENT_ONCHIP
  7426. */
  7427. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetTrig(HRTIM_TypeDef *HRTIMx)
  7428. {
  7429. return (uint32_t)READ_REG(HRTIMx->sCommonRegs.BMTRGR);
  7430. }
  7431. /**
  7432. * @brief Set the burst mode controller compare value.
  7433. * @rmtoll BMCMPR BMCMP LL_HRTIM_BM_SetCompare
  7434. * @param HRTIMx High Resolution Timer instance
  7435. * @param CompareValue Compare value must be above or equal to 3
  7436. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  7437. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  7438. * @retval None
  7439. */
  7440. __STATIC_INLINE void LL_HRTIM_BM_SetCompare(HRTIM_TypeDef *HRTIMx, uint32_t CompareValue)
  7441. {
  7442. WRITE_REG(HRTIMx->sCommonRegs.BMCMPR, CompareValue);
  7443. }
  7444. /**
  7445. * @brief Get actual burst mode controller compare value.
  7446. * @rmtoll BMCMPR BMCMP LL_HRTIM_BM_GetCompare
  7447. * @param HRTIMx High Resolution Timer instance
  7448. * @retval CompareValue Compare value must be above or equal to 3
  7449. * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
  7450. * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  7451. */
  7452. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetCompare(HRTIM_TypeDef *HRTIMx)
  7453. {
  7454. return (uint32_t)READ_REG(HRTIMx->sCommonRegs.BMCMPR);
  7455. }
  7456. /**
  7457. * @brief Set the burst mode controller period.
  7458. * @rmtoll BMPER BMPER LL_HRTIM_BM_SetPeriod
  7459. * @param HRTIMx High Resolution Timer instance
  7460. * @param Period The period value must be above or equal to 3 periods of the fHRTIM clock,
  7461. * that is 0x60 if CKPSC[2:0] = 0, 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  7462. * The maximum value is 0x0000 FFDF.
  7463. * @retval None
  7464. */
  7465. __STATIC_INLINE void LL_HRTIM_BM_SetPeriod(HRTIM_TypeDef *HRTIMx, uint32_t Period)
  7466. {
  7467. WRITE_REG(HRTIMx->sCommonRegs.BMPER, Period);
  7468. }
  7469. /**
  7470. * @brief Get actual burst mode controller period.
  7471. * @rmtoll BMPER BMPER LL_HRTIM_BM_GetPeriod
  7472. * @param HRTIMx High Resolution Timer instance
  7473. * @retval The period value must be above or equal to 3 periods of the fHRTIM clock,
  7474. * that is 0x60 if CKPSC[2:0] = 0, 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
  7475. * The maximum value is 0x0000 FFDF.
  7476. */
  7477. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetPeriod(HRTIM_TypeDef *HRTIMx)
  7478. {
  7479. return (uint32_t)READ_REG(HRTIMx->sCommonRegs.BMPER);
  7480. }
  7481. /**
  7482. * @brief Enable the burst mode controller
  7483. * @rmtoll BMCR BME LL_HRTIM_BM_Enable
  7484. * @param HRTIMx High Resolution Timer instance
  7485. * @retval None
  7486. */
  7487. __STATIC_INLINE void LL_HRTIM_BM_Enable(HRTIM_TypeDef *HRTIMx)
  7488. {
  7489. SET_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BME);
  7490. }
  7491. /**
  7492. * @brief Disable the burst mode controller
  7493. * @rmtoll BMCR BME LL_HRTIM_BM_Disable
  7494. * @param HRTIMx High Resolution Timer instance
  7495. * @retval None
  7496. */
  7497. __STATIC_INLINE void LL_HRTIM_BM_Disable(HRTIM_TypeDef *HRTIMx)
  7498. {
  7499. CLEAR_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BME);
  7500. }
  7501. /**
  7502. * @brief Indicate whether the burst mode controller is enabled.
  7503. * @rmtoll BMCR BME LL_HRTIM_BM_IsEnabled
  7504. * @param HRTIMx High Resolution Timer instance
  7505. * @retval State of BME bit in HRTIM_BMCR register (1 or 0).
  7506. */
  7507. __STATIC_INLINE uint32_t LL_HRTIM_BM_IsEnabled(HRTIM_TypeDef *HRTIMx)
  7508. {
  7509. return ((READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BME) == (HRTIM_BMCR_BME)) ? 1UL : 0UL);
  7510. }
  7511. /**
  7512. * @brief Trigger the burst operation (software trigger)
  7513. * @rmtoll BMTRGR SW LL_HRTIM_BM_Start
  7514. * @param HRTIMx High Resolution Timer instance
  7515. * @retval None
  7516. */
  7517. __STATIC_INLINE void LL_HRTIM_BM_Start(HRTIM_TypeDef *HRTIMx)
  7518. {
  7519. SET_BIT(HRTIMx->sCommonRegs.BMTRGR, HRTIM_BMTRGR_SW);
  7520. }
  7521. /**
  7522. * @brief Stop the burst mode operation.
  7523. * @rmtoll BMCR BMSTAT LL_HRTIM_BM_Stop
  7524. * @note Causes a burst mode early termination.
  7525. * @param HRTIMx High Resolution Timer instance
  7526. * @retval None
  7527. */
  7528. __STATIC_INLINE void LL_HRTIM_BM_Stop(HRTIM_TypeDef *HRTIMx)
  7529. {
  7530. CLEAR_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMSTAT);
  7531. }
  7532. /**
  7533. * @brief Get actual burst mode status
  7534. * @rmtoll BMCR BMSTAT LL_HRTIM_BM_GetStatus
  7535. * @param HRTIMx High Resolution Timer instance
  7536. * @retval Status This parameter can be one of the following values:
  7537. * @arg @ref LL_HRTIM_BM_STATUS_NORMAL
  7538. * @arg @ref LL_HRTIM_BM_STATUS_BURST_ONGOING
  7539. */
  7540. __STATIC_INLINE uint32_t LL_HRTIM_BM_GetStatus(HRTIM_TypeDef *HRTIMx)
  7541. {
  7542. return (READ_BIT(HRTIMx->sCommonRegs.BMCR, HRTIM_BMCR_BMSTAT));
  7543. }
  7544. /**
  7545. * @}
  7546. */
  7547. /** @defgroup HRTIM_LL_EF_FLAG_Management FLAG_Management
  7548. * @{
  7549. */
  7550. /**
  7551. * @brief Clear the Fault 1 interrupt flag.
  7552. * @rmtoll ICR FLT1C LL_HRTIM_ClearFlag_FLT1
  7553. * @param HRTIMx High Resolution Timer instance
  7554. * @retval None
  7555. */
  7556. __STATIC_INLINE void LL_HRTIM_ClearFlag_FLT1(HRTIM_TypeDef *HRTIMx)
  7557. {
  7558. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_FLT1C);
  7559. }
  7560. /**
  7561. * @brief Indicate whether Fault 1 interrupt occurred.
  7562. * @rmtoll ICR FLT1 LL_HRTIM_IsActiveFlag_FLT1
  7563. * @param HRTIMx High Resolution Timer instance
  7564. * @retval State of FLT1 bit in HRTIM_ISR register (1 or 0).
  7565. */
  7566. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_FLT1(HRTIM_TypeDef *HRTIMx)
  7567. {
  7568. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_FLT1) == (HRTIM_ISR_FLT1)) ? 1UL : 0UL);
  7569. }
  7570. /**
  7571. * @brief Clear the Fault 2 interrupt flag.
  7572. * @rmtoll ICR FLT2C LL_HRTIM_ClearFlag_FLT2
  7573. * @param HRTIMx High Resolution Timer instance
  7574. * @retval None
  7575. */
  7576. __STATIC_INLINE void LL_HRTIM_ClearFlag_FLT2(HRTIM_TypeDef *HRTIMx)
  7577. {
  7578. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_FLT2C);
  7579. }
  7580. /**
  7581. * @brief Indicate whether Fault 2 interrupt occurred.
  7582. * @rmtoll ICR FLT2 LL_HRTIM_IsActiveFlag_FLT2
  7583. * @param HRTIMx High Resolution Timer instance
  7584. * @retval State of FLT2 bit in HRTIM_ISR register (1 or 0).
  7585. */
  7586. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_FLT2(HRTIM_TypeDef *HRTIMx)
  7587. {
  7588. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_FLT2) == (HRTIM_ISR_FLT2)) ? 1UL : 0UL);
  7589. }
  7590. /**
  7591. * @brief Clear the Fault 3 interrupt flag.
  7592. * @rmtoll ICR FLT3C LL_HRTIM_ClearFlag_FLT3
  7593. * @param HRTIMx High Resolution Timer instance
  7594. * @retval None
  7595. */
  7596. __STATIC_INLINE void LL_HRTIM_ClearFlag_FLT3(HRTIM_TypeDef *HRTIMx)
  7597. {
  7598. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_FLT3C);
  7599. }
  7600. /**
  7601. * @brief Indicate whether Fault 3 interrupt occurred.
  7602. * @rmtoll ICR FLT3 LL_HRTIM_IsActiveFlag_FLT3
  7603. * @param HRTIMx High Resolution Timer instance
  7604. * @retval State of FLT3 bit in HRTIM_ISR register (1 or 0).
  7605. */
  7606. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_FLT3(HRTIM_TypeDef *HRTIMx)
  7607. {
  7608. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_FLT3) == (HRTIM_ISR_FLT3)) ? 1UL : 0UL);
  7609. }
  7610. /**
  7611. * @brief Clear the Fault 4 interrupt flag.
  7612. * @rmtoll ICR FLT4C LL_HRTIM_ClearFlag_FLT4
  7613. * @param HRTIMx High Resolution Timer instance
  7614. * @retval None
  7615. */
  7616. __STATIC_INLINE void LL_HRTIM_ClearFlag_FLT4(HRTIM_TypeDef *HRTIMx)
  7617. {
  7618. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_FLT4C);
  7619. }
  7620. /**
  7621. * @brief Indicate whether Fault 4 interrupt occurred.
  7622. * @rmtoll ICR FLT4 LL_HRTIM_IsActiveFlag_FLT4
  7623. * @param HRTIMx High Resolution Timer instance
  7624. * @retval State of FLT4 bit in HRTIM_ISR register (1 or 0).
  7625. */
  7626. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_FLT4(HRTIM_TypeDef *HRTIMx)
  7627. {
  7628. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_FLT4) == (HRTIM_ISR_FLT4)) ? 1UL : 0UL);
  7629. }
  7630. /**
  7631. * @brief Clear the Fault 5 interrupt flag.
  7632. * @rmtoll ICR FLT5C LL_HRTIM_ClearFlag_FLT5
  7633. * @param HRTIMx High Resolution Timer instance
  7634. * @retval None
  7635. */
  7636. __STATIC_INLINE void LL_HRTIM_ClearFlag_FLT5(HRTIM_TypeDef *HRTIMx)
  7637. {
  7638. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_FLT5C);
  7639. }
  7640. /**
  7641. * @brief Indicate whether Fault 5 interrupt occurred.
  7642. * @rmtoll ICR FLT5 LL_HRTIM_IsActiveFlag_FLT5
  7643. * @param HRTIMx High Resolution Timer instance
  7644. * @retval State of FLT5 bit in HRTIM_ISR register (1 or 0).
  7645. */
  7646. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_FLT5(HRTIM_TypeDef *HRTIMx)
  7647. {
  7648. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_FLT5) == (HRTIM_ISR_FLT5)) ? 1UL : 0UL);
  7649. }
  7650. /**
  7651. * @brief Clear the System Fault interrupt flag.
  7652. * @rmtoll ICR SYSFLTC LL_HRTIM_ClearFlag_SYSFLT
  7653. * @param HRTIMx High Resolution Timer instance
  7654. * @retval None
  7655. */
  7656. __STATIC_INLINE void LL_HRTIM_ClearFlag_SYSFLT(HRTIM_TypeDef *HRTIMx)
  7657. {
  7658. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_SYSFLTC);
  7659. }
  7660. /**
  7661. * @brief Indicate whether System Fault interrupt occurred.
  7662. * @rmtoll ISR SYSFLT LL_HRTIM_IsActiveFlag_SYSFLT
  7663. * @param HRTIMx High Resolution Timer instance
  7664. * @retval State of SYSFLT bit in HRTIM_ISR register (1 or 0).
  7665. */
  7666. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SYSFLT(HRTIM_TypeDef *HRTIMx)
  7667. {
  7668. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_SYSFLT) == (HRTIM_ISR_SYSFLT)) ? 1UL : 0UL);
  7669. }
  7670. /**
  7671. * @brief Clear the Burst Mode period interrupt flag.
  7672. * @rmtoll ICR BMPERC LL_HRTIM_ClearFlag_BMPER
  7673. * @param HRTIMx High Resolution Timer instance
  7674. * @retval None
  7675. */
  7676. __STATIC_INLINE void LL_HRTIM_ClearFlag_BMPER(HRTIM_TypeDef *HRTIMx)
  7677. {
  7678. SET_BIT(HRTIMx->sCommonRegs.ICR, HRTIM_ICR_BMPERC);
  7679. }
  7680. /**
  7681. * @brief Indicate whether Burst Mode period interrupt occurred.
  7682. * @rmtoll ISR BMPER LL_HRTIM_IsActiveFlag_BMPER
  7683. * @param HRTIMx High Resolution Timer instance
  7684. * @retval State of BMPER bit in HRTIM_ISR register (1 or 0).
  7685. */
  7686. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_BMPER(HRTIM_TypeDef *HRTIMx)
  7687. {
  7688. return ((READ_BIT(HRTIMx->sCommonRegs.ISR, HRTIM_ISR_BMPER) == (HRTIM_ISR_BMPER)) ? 1UL : 0UL);
  7689. }
  7690. /**
  7691. * @brief Clear the Synchronization Input interrupt flag.
  7692. * @rmtoll MICR SYNCC LL_HRTIM_ClearFlag_SYNC
  7693. * @param HRTIMx High Resolution Timer instance
  7694. * @retval None
  7695. */
  7696. __STATIC_INLINE void LL_HRTIM_ClearFlag_SYNC(HRTIM_TypeDef *HRTIMx)
  7697. {
  7698. SET_BIT(HRTIMx->sMasterRegs.MICR, HRTIM_MICR_SYNC);
  7699. }
  7700. /**
  7701. * @brief Indicate whether the Synchronization Input interrupt occurred.
  7702. * @rmtoll MISR SYNC LL_HRTIM_IsActiveFlag_SYNC
  7703. * @param HRTIMx High Resolution Timer instance
  7704. * @retval State of SYNC bit in HRTIM_MISR register (1 or 0).
  7705. */
  7706. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SYNC(HRTIM_TypeDef *HRTIMx)
  7707. {
  7708. return ((READ_BIT(HRTIMx->sMasterRegs.MISR, HRTIM_MISR_SYNC) == (HRTIM_MISR_SYNC)) ? 1UL : 0UL);
  7709. }
  7710. /**
  7711. * @brief Clear the update interrupt flag for a given timer (including the master timer) .
  7712. * @rmtoll MICR MUPDC LL_HRTIM_ClearFlag_UPDATE\n
  7713. * TIMxICR UPDC LL_HRTIM_ClearFlag_UPDATE
  7714. * @param HRTIMx High Resolution Timer instance
  7715. * @param Timer This parameter can be one of the following values:
  7716. * @arg @ref LL_HRTIM_TIMER_MASTER
  7717. * @arg @ref LL_HRTIM_TIMER_A
  7718. * @arg @ref LL_HRTIM_TIMER_B
  7719. * @arg @ref LL_HRTIM_TIMER_C
  7720. * @arg @ref LL_HRTIM_TIMER_D
  7721. * @arg @ref LL_HRTIM_TIMER_E
  7722. * @retval None
  7723. */
  7724. __STATIC_INLINE void LL_HRTIM_ClearFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7725. {
  7726. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7727. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7728. REG_OFFSET_TAB_TIMER[iTimer]));
  7729. SET_BIT(*pReg, HRTIM_MICR_MUPD);
  7730. }
  7731. /**
  7732. * @brief Indicate whether the update interrupt has occurred for a given timer (including the master timer) .
  7733. * @rmtoll MISR MUPD LL_HRTIM_IsActiveFlag_UPDATE\n
  7734. * TIMxISR UPD LL_HRTIM_IsActiveFlag_UPDATE
  7735. * @param HRTIMx High Resolution Timer instance
  7736. * @param Timer This parameter can be one of the following values:
  7737. * @arg @ref LL_HRTIM_TIMER_MASTER
  7738. * @arg @ref LL_HRTIM_TIMER_A
  7739. * @arg @ref LL_HRTIM_TIMER_B
  7740. * @arg @ref LL_HRTIM_TIMER_C
  7741. * @arg @ref LL_HRTIM_TIMER_D
  7742. * @arg @ref LL_HRTIM_TIMER_E
  7743. * @retval State of MUPD/UPD bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7744. */
  7745. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7746. {
  7747. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7748. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7749. REG_OFFSET_TAB_TIMER[iTimer]));
  7750. return ((READ_BIT(*pReg, HRTIM_MISR_MUPD) == (HRTIM_MISR_MUPD)) ? 1UL : 0UL);
  7751. }
  7752. /**
  7753. * @brief Clear the repetition interrupt flag for a given timer (including the master timer) .
  7754. * @rmtoll MICR MREPC LL_HRTIM_ClearFlag_REP\n
  7755. * TIMxICR REPC LL_HRTIM_ClearFlag_REP
  7756. * @param HRTIMx High Resolution Timer instance
  7757. * @param Timer This parameter can be one of the following values:
  7758. * @arg @ref LL_HRTIM_TIMER_MASTER
  7759. * @arg @ref LL_HRTIM_TIMER_A
  7760. * @arg @ref LL_HRTIM_TIMER_B
  7761. * @arg @ref LL_HRTIM_TIMER_C
  7762. * @arg @ref LL_HRTIM_TIMER_D
  7763. * @arg @ref LL_HRTIM_TIMER_E
  7764. * @retval None
  7765. */
  7766. __STATIC_INLINE void LL_HRTIM_ClearFlag_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7767. {
  7768. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7769. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7770. REG_OFFSET_TAB_TIMER[iTimer]));
  7771. SET_BIT(*pReg, HRTIM_MICR_MREP);
  7772. }
  7773. /**
  7774. * @brief Indicate whether the repetition interrupt has occurred for a given timer (including the master timer) .
  7775. * @rmtoll MISR MREP LL_HRTIM_IsActiveFlag_REP\n
  7776. * TIMxISR REP LL_HRTIM_IsActiveFlag_REP
  7777. * @param HRTIMx High Resolution Timer instance
  7778. * @param Timer This parameter can be one of the following values:
  7779. * @arg @ref LL_HRTIM_TIMER_MASTER
  7780. * @arg @ref LL_HRTIM_TIMER_A
  7781. * @arg @ref LL_HRTIM_TIMER_B
  7782. * @arg @ref LL_HRTIM_TIMER_C
  7783. * @arg @ref LL_HRTIM_TIMER_D
  7784. * @arg @ref LL_HRTIM_TIMER_E
  7785. * @retval State of MREP/REP bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7786. */
  7787. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7788. {
  7789. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7790. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7791. REG_OFFSET_TAB_TIMER[iTimer]));
  7792. return ((READ_BIT(*pReg, HRTIM_MISR_MREP) == (HRTIM_MISR_MREP)) ? 1UL : 0UL);
  7793. }
  7794. /**
  7795. * @brief Clear the compare 1 match interrupt for a given timer (including the master timer).
  7796. * @rmtoll MICR MCMP1C LL_HRTIM_ClearFlag_CMP1\n
  7797. * TIMxICR CMP1C LL_HRTIM_ClearFlag_CMP1
  7798. * @param HRTIMx High Resolution Timer instance
  7799. * @param Timer This parameter can be one of the following values:
  7800. * @arg @ref LL_HRTIM_TIMER_MASTER
  7801. * @arg @ref LL_HRTIM_TIMER_A
  7802. * @arg @ref LL_HRTIM_TIMER_B
  7803. * @arg @ref LL_HRTIM_TIMER_C
  7804. * @arg @ref LL_HRTIM_TIMER_D
  7805. * @arg @ref LL_HRTIM_TIMER_E
  7806. * @retval None
  7807. */
  7808. __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7809. {
  7810. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7811. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7812. REG_OFFSET_TAB_TIMER[iTimer]));
  7813. SET_BIT(*pReg, HRTIM_MICR_MCMP1);
  7814. }
  7815. /**
  7816. * @brief Indicate whether the compare match 1 interrupt has occurred for a given timer (including the master timer) .
  7817. * @rmtoll MISR MCMP1 LL_HRTIM_IsActiveFlag_CMP1\n
  7818. * TIMxISR CMP1 LL_HRTIM_IsActiveFlag_CMP1
  7819. * @param HRTIMx High Resolution Timer instance
  7820. * @param Timer This parameter can be one of the following values:
  7821. * @arg @ref LL_HRTIM_TIMER_MASTER
  7822. * @arg @ref LL_HRTIM_TIMER_A
  7823. * @arg @ref LL_HRTIM_TIMER_B
  7824. * @arg @ref LL_HRTIM_TIMER_C
  7825. * @arg @ref LL_HRTIM_TIMER_D
  7826. * @arg @ref LL_HRTIM_TIMER_E
  7827. * @retval State of MCMP1/CMP1 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7828. */
  7829. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7830. {
  7831. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7832. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7833. REG_OFFSET_TAB_TIMER[iTimer]));
  7834. return ((READ_BIT(*pReg, HRTIM_MISR_MCMP1) == (HRTIM_MISR_MCMP1)) ? 1UL : 0UL);
  7835. }
  7836. /**
  7837. * @brief Clear the compare 2 match interrupt for a given timer (including the master timer).
  7838. * @rmtoll MICR MCMP2C LL_HRTIM_ClearFlag_CMP2\n
  7839. * TIMxICR CMP2C LL_HRTIM_ClearFlag_CMP2
  7840. * @param HRTIMx High Resolution Timer instance
  7841. * @param Timer This parameter can be one of the following values:
  7842. * @arg @ref LL_HRTIM_TIMER_MASTER
  7843. * @arg @ref LL_HRTIM_TIMER_A
  7844. * @arg @ref LL_HRTIM_TIMER_B
  7845. * @arg @ref LL_HRTIM_TIMER_C
  7846. * @arg @ref LL_HRTIM_TIMER_D
  7847. * @arg @ref LL_HRTIM_TIMER_E
  7848. * @retval None
  7849. */
  7850. __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7851. {
  7852. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7853. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7854. REG_OFFSET_TAB_TIMER[iTimer]));
  7855. SET_BIT(*pReg, HRTIM_MICR_MCMP2);
  7856. }
  7857. /**
  7858. * @brief Indicate whether the compare match 2 interrupt has occurred for a given timer (including the master timer) .
  7859. * @rmtoll MISR MCMP2 LL_HRTIM_IsActiveFlag_CMP2\n
  7860. * TIMxISR CMP2 LL_HRTIM_IsActiveFlag_CMP2
  7861. * @param HRTIMx High Resolution Timer instance
  7862. * @param Timer This parameter can be one of the following values:
  7863. * @arg @ref LL_HRTIM_TIMER_MASTER
  7864. * @arg @ref LL_HRTIM_TIMER_A
  7865. * @arg @ref LL_HRTIM_TIMER_B
  7866. * @arg @ref LL_HRTIM_TIMER_C
  7867. * @arg @ref LL_HRTIM_TIMER_D
  7868. * @arg @ref LL_HRTIM_TIMER_E
  7869. * @retval State of MCMP2/CMP2 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7870. */
  7871. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7872. {
  7873. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7874. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7875. REG_OFFSET_TAB_TIMER[iTimer]));
  7876. return ((READ_BIT(*pReg, HRTIM_MISR_MCMP2) == (HRTIM_MISR_MCMP2)) ? 1UL : 0UL);
  7877. }
  7878. /**
  7879. * @brief Clear the compare 3 match interrupt for a given timer (including the master timer).
  7880. * @rmtoll MICR MCMP3C LL_HRTIM_ClearFlag_CMP3\n
  7881. * TIMxICR CMP3C LL_HRTIM_ClearFlag_CMP3
  7882. * @param HRTIMx High Resolution Timer instance
  7883. * @param Timer This parameter can be one of the following values:
  7884. * @arg @ref LL_HRTIM_TIMER_MASTER
  7885. * @arg @ref LL_HRTIM_TIMER_A
  7886. * @arg @ref LL_HRTIM_TIMER_B
  7887. * @arg @ref LL_HRTIM_TIMER_C
  7888. * @arg @ref LL_HRTIM_TIMER_D
  7889. * @arg @ref LL_HRTIM_TIMER_E
  7890. * @retval None
  7891. */
  7892. __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7893. {
  7894. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7895. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7896. REG_OFFSET_TAB_TIMER[iTimer]));
  7897. SET_BIT(*pReg, HRTIM_MICR_MCMP3);
  7898. }
  7899. /**
  7900. * @brief Indicate whether the compare match 3 interrupt has occurred for a given timer (including the master timer) .
  7901. * @rmtoll MISR MCMP3 LL_HRTIM_IsActiveFlag_CMP3\n
  7902. * TIMxISR CMP3 LL_HRTIM_IsActiveFlag_CMP3
  7903. * @param HRTIMx High Resolution Timer instance
  7904. * @param Timer This parameter can be one of the following values:
  7905. * @arg @ref LL_HRTIM_TIMER_MASTER
  7906. * @arg @ref LL_HRTIM_TIMER_A
  7907. * @arg @ref LL_HRTIM_TIMER_B
  7908. * @arg @ref LL_HRTIM_TIMER_C
  7909. * @arg @ref LL_HRTIM_TIMER_D
  7910. * @arg @ref LL_HRTIM_TIMER_E
  7911. * @retval State of MCMP3/CMP3 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7912. */
  7913. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7914. {
  7915. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7916. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7917. REG_OFFSET_TAB_TIMER[iTimer]));
  7918. return ((READ_BIT(*pReg, HRTIM_MISR_MCMP3) == (HRTIM_MISR_MCMP3)) ? 1UL : 0UL);
  7919. }
  7920. /**
  7921. * @brief Clear the compare 4 match interrupt for a given timer (including the master timer).
  7922. * @rmtoll MICR MCMP4C LL_HRTIM_ClearFlag_CMP4\n
  7923. * TIMxICR CMP4C LL_HRTIM_ClearFlag_CMP4
  7924. * @param HRTIMx High Resolution Timer instance
  7925. * @param Timer This parameter can be one of the following values:
  7926. * @arg @ref LL_HRTIM_TIMER_MASTER
  7927. * @arg @ref LL_HRTIM_TIMER_A
  7928. * @arg @ref LL_HRTIM_TIMER_B
  7929. * @arg @ref LL_HRTIM_TIMER_C
  7930. * @arg @ref LL_HRTIM_TIMER_D
  7931. * @arg @ref LL_HRTIM_TIMER_E
  7932. * @retval None
  7933. */
  7934. __STATIC_INLINE void LL_HRTIM_ClearFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7935. {
  7936. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7937. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7938. REG_OFFSET_TAB_TIMER[iTimer]));
  7939. SET_BIT(*pReg, HRTIM_MICR_MCMP4);
  7940. }
  7941. /**
  7942. * @brief Indicate whether the compare match 4 interrupt has occurred for a given timer (including the master timer) .
  7943. * @rmtoll MISR MCMP4 LL_HRTIM_IsActiveFlag_CMP4\n
  7944. * TIMxISR CMP4 LL_HRTIM_IsActiveFlag_CMP4
  7945. * @param HRTIMx High Resolution Timer instance
  7946. * @param Timer This parameter can be one of the following values:
  7947. * @arg @ref LL_HRTIM_TIMER_MASTER
  7948. * @arg @ref LL_HRTIM_TIMER_A
  7949. * @arg @ref LL_HRTIM_TIMER_B
  7950. * @arg @ref LL_HRTIM_TIMER_C
  7951. * @arg @ref LL_HRTIM_TIMER_D
  7952. * @arg @ref LL_HRTIM_TIMER_E
  7953. * @retval State of MCMP4/CMP4 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
  7954. */
  7955. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7956. {
  7957. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7958. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7959. REG_OFFSET_TAB_TIMER[iTimer]));
  7960. return ((READ_BIT(*pReg, HRTIM_MISR_MCMP4) == (HRTIM_MISR_MCMP4)) ? 1UL : 0UL);
  7961. }
  7962. /**
  7963. * @brief Clear the capture 1 interrupt flag for a given timer.
  7964. * @rmtoll TIMxICR CPT1C LL_HRTIM_ClearFlag_CPT1
  7965. * @param HRTIMx High Resolution Timer instance
  7966. * @param Timer This parameter can be one of the following values:
  7967. * @arg @ref LL_HRTIM_TIMER_A
  7968. * @arg @ref LL_HRTIM_TIMER_B
  7969. * @arg @ref LL_HRTIM_TIMER_C
  7970. * @arg @ref LL_HRTIM_TIMER_D
  7971. * @arg @ref LL_HRTIM_TIMER_E
  7972. * @retval None
  7973. */
  7974. __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7975. {
  7976. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7977. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  7978. REG_OFFSET_TAB_TIMER[iTimer]));
  7979. SET_BIT(*pReg, HRTIM_TIMICR_CPT1C);
  7980. }
  7981. /**
  7982. * @brief Indicate whether the capture 1 interrupt occurred for a given timer.
  7983. * @rmtoll TIMxISR CPT1 LL_HRTIM_IsActiveFlag_CPT1
  7984. * @param HRTIMx High Resolution Timer instance
  7985. * @param Timer This parameter can be one of the following values:
  7986. * @arg @ref LL_HRTIM_TIMER_A
  7987. * @arg @ref LL_HRTIM_TIMER_B
  7988. * @arg @ref LL_HRTIM_TIMER_C
  7989. * @arg @ref LL_HRTIM_TIMER_D
  7990. * @arg @ref LL_HRTIM_TIMER_E
  7991. * @retval State of CPT1 bit in HRTIM_TIMxISR register (1 or 0).
  7992. */
  7993. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  7994. {
  7995. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  7996. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  7997. REG_OFFSET_TAB_TIMER[iTimer]));
  7998. return ((READ_BIT(*pReg, HRTIM_TIMISR_CPT1) == (HRTIM_TIMISR_CPT1)) ? 1UL : 0UL);
  7999. }
  8000. /**
  8001. * @brief Clear the capture 2 interrupt flag for a given timer.
  8002. * @rmtoll TIMxICR CPT2C LL_HRTIM_ClearFlag_CPT2
  8003. * @param HRTIMx High Resolution Timer instance
  8004. * @param Timer This parameter can be one of the following values:
  8005. * @arg @ref LL_HRTIM_TIMER_A
  8006. * @arg @ref LL_HRTIM_TIMER_B
  8007. * @arg @ref LL_HRTIM_TIMER_C
  8008. * @arg @ref LL_HRTIM_TIMER_D
  8009. * @arg @ref LL_HRTIM_TIMER_E
  8010. * @retval None
  8011. */
  8012. __STATIC_INLINE void LL_HRTIM_ClearFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8013. {
  8014. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8015. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8016. REG_OFFSET_TAB_TIMER[iTimer]));
  8017. SET_BIT(*pReg, HRTIM_TIMICR_CPT2C);
  8018. }
  8019. /**
  8020. * @brief Indicate whether the capture 2 interrupt occurred for a given timer.
  8021. * @rmtoll TIMxISR CPT2 LL_HRTIM_IsActiveFlag_CPT2
  8022. * @param HRTIMx High Resolution Timer instance
  8023. * @param Timer This parameter can be one of the following values:
  8024. * @arg @ref LL_HRTIM_TIMER_A
  8025. * @arg @ref LL_HRTIM_TIMER_B
  8026. * @arg @ref LL_HRTIM_TIMER_C
  8027. * @arg @ref LL_HRTIM_TIMER_D
  8028. * @arg @ref LL_HRTIM_TIMER_E
  8029. * @retval State of CPT2 bit in HRTIM_TIMxISR register (1 or 0).
  8030. */
  8031. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8032. {
  8033. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8034. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8035. REG_OFFSET_TAB_TIMER[iTimer]));
  8036. return ((READ_BIT(*pReg, HRTIM_TIMISR_CPT2) == (HRTIM_TIMISR_CPT2)) ? 1UL : 0UL);
  8037. }
  8038. /**
  8039. * @brief Clear the output 1 set interrupt flag for a given timer.
  8040. * @rmtoll TIMxICR SET1C LL_HRTIM_ClearFlag_SET1
  8041. * @param HRTIMx High Resolution Timer instance
  8042. * @param Timer This parameter can be one of the following values:
  8043. * @arg @ref LL_HRTIM_TIMER_A
  8044. * @arg @ref LL_HRTIM_TIMER_B
  8045. * @arg @ref LL_HRTIM_TIMER_C
  8046. * @arg @ref LL_HRTIM_TIMER_D
  8047. * @arg @ref LL_HRTIM_TIMER_E
  8048. * @retval None
  8049. */
  8050. __STATIC_INLINE void LL_HRTIM_ClearFlag_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8051. {
  8052. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8053. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8054. REG_OFFSET_TAB_TIMER[iTimer]));
  8055. SET_BIT(*pReg, HRTIM_TIMICR_SET1C);
  8056. }
  8057. /**
  8058. * @brief Indicate whether the output 1 set interrupt occurred for a given timer.
  8059. * @rmtoll TIMxISR SET1 LL_HRTIM_IsActiveFlag_SET1
  8060. * @param HRTIMx High Resolution Timer instance
  8061. * @param Timer This parameter can be one of the following values:
  8062. * @arg @ref LL_HRTIM_TIMER_A
  8063. * @arg @ref LL_HRTIM_TIMER_B
  8064. * @arg @ref LL_HRTIM_TIMER_C
  8065. * @arg @ref LL_HRTIM_TIMER_D
  8066. * @arg @ref LL_HRTIM_TIMER_E
  8067. * @retval State of SETx1 bit in HRTIM_TIMxISR register (1 or 0).
  8068. */
  8069. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8070. {
  8071. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8072. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8073. REG_OFFSET_TAB_TIMER[iTimer]));
  8074. return ((READ_BIT(*pReg, HRTIM_TIMISR_SET1) == (HRTIM_TIMISR_SET1)) ? 1UL : 0UL);
  8075. }
  8076. /**
  8077. * @brief Clear the output 1 reset interrupt flag for a given timer.
  8078. * @rmtoll TIMxICR RST1C LL_HRTIM_ClearFlag_RST1
  8079. * @param HRTIMx High Resolution Timer instance
  8080. * @param Timer This parameter can be one of the following values:
  8081. * @arg @ref LL_HRTIM_TIMER_A
  8082. * @arg @ref LL_HRTIM_TIMER_B
  8083. * @arg @ref LL_HRTIM_TIMER_C
  8084. * @arg @ref LL_HRTIM_TIMER_D
  8085. * @arg @ref LL_HRTIM_TIMER_E
  8086. * @retval None
  8087. */
  8088. __STATIC_INLINE void LL_HRTIM_ClearFlag_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8089. {
  8090. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8091. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8092. REG_OFFSET_TAB_TIMER[iTimer]));
  8093. SET_BIT(*pReg, HRTIM_TIMICR_RST1C);
  8094. }
  8095. /**
  8096. * @brief Indicate whether the output 1 reset interrupt occurred for a given timer.
  8097. * @rmtoll TIMxISR RST1 LL_HRTIM_IsActiveFlag_RST1
  8098. * @param HRTIMx High Resolution Timer instance
  8099. * @param Timer This parameter can be one of the following values:
  8100. * @arg @ref LL_HRTIM_TIMER_A
  8101. * @arg @ref LL_HRTIM_TIMER_B
  8102. * @arg @ref LL_HRTIM_TIMER_C
  8103. * @arg @ref LL_HRTIM_TIMER_D
  8104. * @arg @ref LL_HRTIM_TIMER_E
  8105. * @retval State of RSTx1 bit in HRTIM_TIMxISR register (1 or 0).
  8106. */
  8107. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8108. {
  8109. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8110. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8111. REG_OFFSET_TAB_TIMER[iTimer]));
  8112. return ((READ_BIT(*pReg, HRTIM_TIMISR_RST1) == (HRTIM_TIMISR_RST1)) ? 1UL : 0UL);
  8113. }
  8114. /**
  8115. * @brief Clear the output 2 set interrupt flag for a given timer.
  8116. * @rmtoll TIMxICR SET2C LL_HRTIM_ClearFlag_SET2
  8117. * @param HRTIMx High Resolution Timer instance
  8118. * @param Timer This parameter can be one of the following values:
  8119. * @arg @ref LL_HRTIM_TIMER_A
  8120. * @arg @ref LL_HRTIM_TIMER_B
  8121. * @arg @ref LL_HRTIM_TIMER_C
  8122. * @arg @ref LL_HRTIM_TIMER_D
  8123. * @arg @ref LL_HRTIM_TIMER_E
  8124. * @retval None
  8125. */
  8126. __STATIC_INLINE void LL_HRTIM_ClearFlag_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8127. {
  8128. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8129. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8130. REG_OFFSET_TAB_TIMER[iTimer]));
  8131. SET_BIT(*pReg, HRTIM_TIMICR_SET2C);
  8132. }
  8133. /**
  8134. * @brief Indicate whether the output 2 set interrupt occurred for a given timer.
  8135. * @rmtoll TIMxISR SET2 LL_HRTIM_IsActiveFlag_SET2
  8136. * @param HRTIMx High Resolution Timer instance
  8137. * @param Timer This parameter can be one of the following values:
  8138. * @arg @ref LL_HRTIM_TIMER_A
  8139. * @arg @ref LL_HRTIM_TIMER_B
  8140. * @arg @ref LL_HRTIM_TIMER_C
  8141. * @arg @ref LL_HRTIM_TIMER_D
  8142. * @arg @ref LL_HRTIM_TIMER_E
  8143. * @retval State of SETx2 bit in HRTIM_TIMxISR register (1 or 0).
  8144. */
  8145. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8146. {
  8147. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8148. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8149. REG_OFFSET_TAB_TIMER[iTimer]));
  8150. return ((READ_BIT(*pReg, HRTIM_TIMISR_SET2) == (HRTIM_TIMISR_SET2)) ? 1UL : 0UL);
  8151. }
  8152. /**
  8153. * @brief Clear the output 2reset interrupt flag for a given timer.
  8154. * @rmtoll TIMxICR RST2C LL_HRTIM_ClearFlag_RST2
  8155. * @param HRTIMx High Resolution Timer instance
  8156. * @param Timer This parameter can be one of the following values:
  8157. * @arg @ref LL_HRTIM_TIMER_A
  8158. * @arg @ref LL_HRTIM_TIMER_B
  8159. * @arg @ref LL_HRTIM_TIMER_C
  8160. * @arg @ref LL_HRTIM_TIMER_D
  8161. * @arg @ref LL_HRTIM_TIMER_E
  8162. * @retval None
  8163. */
  8164. __STATIC_INLINE void LL_HRTIM_ClearFlag_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8165. {
  8166. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8167. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8168. REG_OFFSET_TAB_TIMER[iTimer]));
  8169. SET_BIT(*pReg, HRTIM_TIMICR_RST2C);
  8170. }
  8171. /**
  8172. * @brief Indicate whether the output 2 reset interrupt occurred for a given timer.
  8173. * @rmtoll TIMxISR RST2 LL_HRTIM_IsActiveFlag_RST2
  8174. * @param HRTIMx High Resolution Timer instance
  8175. * @param Timer This parameter can be one of the following values:
  8176. * @arg @ref LL_HRTIM_TIMER_A
  8177. * @arg @ref LL_HRTIM_TIMER_B
  8178. * @arg @ref LL_HRTIM_TIMER_C
  8179. * @arg @ref LL_HRTIM_TIMER_D
  8180. * @arg @ref LL_HRTIM_TIMER_E
  8181. * @retval State of RSTx2 bit in HRTIM_TIMxISR register (1 or 0).
  8182. */
  8183. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8184. {
  8185. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8186. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8187. REG_OFFSET_TAB_TIMER[iTimer]));
  8188. return ((READ_BIT(*pReg, HRTIM_TIMISR_RST2) == (HRTIM_TIMISR_RST2)) ? 1UL : 0UL);
  8189. }
  8190. /**
  8191. * @brief Clear the reset and/or roll-over interrupt flag for a given timer.
  8192. * @rmtoll TIMxICR RSTC LL_HRTIM_ClearFlag_RST
  8193. * @param HRTIMx High Resolution Timer instance
  8194. * @param Timer This parameter can be one of the following values:
  8195. * @arg @ref LL_HRTIM_TIMER_A
  8196. * @arg @ref LL_HRTIM_TIMER_B
  8197. * @arg @ref LL_HRTIM_TIMER_C
  8198. * @arg @ref LL_HRTIM_TIMER_D
  8199. * @arg @ref LL_HRTIM_TIMER_E
  8200. * @retval None
  8201. */
  8202. __STATIC_INLINE void LL_HRTIM_ClearFlag_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8203. {
  8204. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8205. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8206. REG_OFFSET_TAB_TIMER[iTimer]));
  8207. SET_BIT(*pReg, HRTIM_TIMICR_RSTC);
  8208. }
  8209. /**
  8210. * @brief Indicate whether the reset and/or roll-over interrupt occurred for a given timer.
  8211. * @rmtoll TIMxISR RST LL_HRTIM_IsActiveFlag_RST
  8212. * @param HRTIMx High Resolution Timer instance
  8213. * @param Timer This parameter can be one of the following values:
  8214. * @arg @ref LL_HRTIM_TIMER_A
  8215. * @arg @ref LL_HRTIM_TIMER_B
  8216. * @arg @ref LL_HRTIM_TIMER_C
  8217. * @arg @ref LL_HRTIM_TIMER_D
  8218. * @arg @ref LL_HRTIM_TIMER_E
  8219. * @retval State of RST bit in HRTIM_TIMxISR register (1 or 0).
  8220. */
  8221. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8222. {
  8223. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8224. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8225. REG_OFFSET_TAB_TIMER[iTimer]));
  8226. return ((READ_BIT(*pReg, HRTIM_TIMISR_RST) == (HRTIM_TIMISR_RST)) ? 1UL : 0UL);
  8227. }
  8228. /**
  8229. * @brief Clear the delayed protection interrupt flag for a given timer.
  8230. * @rmtoll TIMxICR DLYPRTC LL_HRTIM_ClearFlag_DLYPRT
  8231. * @param HRTIMx High Resolution Timer instance
  8232. * @param Timer This parameter can be one of the following values:
  8233. * @arg @ref LL_HRTIM_TIMER_A
  8234. * @arg @ref LL_HRTIM_TIMER_B
  8235. * @arg @ref LL_HRTIM_TIMER_C
  8236. * @arg @ref LL_HRTIM_TIMER_D
  8237. * @arg @ref LL_HRTIM_TIMER_E
  8238. * @retval None
  8239. */
  8240. __STATIC_INLINE void LL_HRTIM_ClearFlag_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8241. {
  8242. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8243. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MICR) +
  8244. REG_OFFSET_TAB_TIMER[iTimer]));
  8245. SET_BIT(*pReg, HRTIM_TIMICR_DLYPRTC);
  8246. }
  8247. /**
  8248. * @brief Indicate whether the delayed protection interrupt occurred for a given timer.
  8249. * @rmtoll TIMxISR DLYPRT LL_HRTIM_IsActiveFlag_DLYPRT
  8250. * @param HRTIMx High Resolution Timer instance
  8251. * @param Timer This parameter can be one of the following values:
  8252. * @arg @ref LL_HRTIM_TIMER_A
  8253. * @arg @ref LL_HRTIM_TIMER_B
  8254. * @arg @ref LL_HRTIM_TIMER_C
  8255. * @arg @ref LL_HRTIM_TIMER_D
  8256. * @arg @ref LL_HRTIM_TIMER_E
  8257. * @retval State of DLYPRT bit in HRTIM_TIMxISR register (1 or 0).
  8258. */
  8259. __STATIC_INLINE uint32_t LL_HRTIM_IsActiveFlag_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8260. {
  8261. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8262. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MISR) +
  8263. REG_OFFSET_TAB_TIMER[iTimer]));
  8264. return ((READ_BIT(*pReg, HRTIM_TIMISR_DLYPRT) == (HRTIM_TIMISR_DLYPRT)) ? 1UL : 0UL);
  8265. }
  8266. /**
  8267. * @}
  8268. */
  8269. /** @defgroup HRTIM_LL_EF_IT_Management IT_Management
  8270. * @{
  8271. */
  8272. /**
  8273. * @brief Enable the fault 1 interrupt.
  8274. * @rmtoll IER FLT1IE LL_HRTIM_EnableIT_FLT1
  8275. * @param HRTIMx High Resolution Timer instance
  8276. * @retval None
  8277. */
  8278. __STATIC_INLINE void LL_HRTIM_EnableIT_FLT1(HRTIM_TypeDef *HRTIMx)
  8279. {
  8280. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT1);
  8281. }
  8282. /**
  8283. * @brief Disable the fault 1 interrupt.
  8284. * @rmtoll IER FLT1IE LL_HRTIM_DisableIT_FLT1
  8285. * @param HRTIMx High Resolution Timer instance
  8286. * @retval None
  8287. */
  8288. __STATIC_INLINE void LL_HRTIM_DisableIT_FLT1(HRTIM_TypeDef *HRTIMx)
  8289. {
  8290. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT1);
  8291. }
  8292. /**
  8293. * @brief Indicate whether the fault 1 interrupt is enabled.
  8294. * @rmtoll IER FLT1IE LL_HRTIM_IsEnabledIT_FLT1
  8295. * @param HRTIMx High Resolution Timer instance
  8296. * @retval State of FLT1IE bit in HRTIM_IER register (1 or 0).
  8297. */
  8298. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_FLT1(HRTIM_TypeDef *HRTIMx)
  8299. {
  8300. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT1) == (HRTIM_IER_FLT1)) ? 1UL : 0UL);
  8301. }
  8302. /**
  8303. * @brief Enable the fault 2 interrupt.
  8304. * @rmtoll IER FLT2IE LL_HRTIM_EnableIT_FLT2
  8305. * @param HRTIMx High Resolution Timer instance
  8306. * @retval None
  8307. */
  8308. __STATIC_INLINE void LL_HRTIM_EnableIT_FLT2(HRTIM_TypeDef *HRTIMx)
  8309. {
  8310. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT2);
  8311. }
  8312. /**
  8313. * @brief Disable the fault 2 interrupt.
  8314. * @rmtoll IER FLT2IE LL_HRTIM_DisableIT_FLT2
  8315. * @param HRTIMx High Resolution Timer instance
  8316. * @retval None
  8317. */
  8318. __STATIC_INLINE void LL_HRTIM_DisableIT_FLT2(HRTIM_TypeDef *HRTIMx)
  8319. {
  8320. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT2);
  8321. }
  8322. /**
  8323. * @brief Indicate whether the fault 2 interrupt is enabled.
  8324. * @rmtoll IER FLT2IE LL_HRTIM_IsEnabledIT_FLT2
  8325. * @param HRTIMx High Resolution Timer instance
  8326. * @retval State of FLT2IE bit in HRTIM_IER register (1 or 0).
  8327. */
  8328. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_FLT2(HRTIM_TypeDef *HRTIMx)
  8329. {
  8330. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT2) == (HRTIM_IER_FLT2)) ? 1UL : 0UL);
  8331. }
  8332. /**
  8333. * @brief Enable the fault 3 interrupt.
  8334. * @rmtoll IER FLT3IE LL_HRTIM_EnableIT_FLT3
  8335. * @param HRTIMx High Resolution Timer instance
  8336. * @retval None
  8337. */
  8338. __STATIC_INLINE void LL_HRTIM_EnableIT_FLT3(HRTIM_TypeDef *HRTIMx)
  8339. {
  8340. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT3);
  8341. }
  8342. /**
  8343. * @brief Disable the fault 3 interrupt.
  8344. * @rmtoll IER FLT3IE LL_HRTIM_DisableIT_FLT3
  8345. * @param HRTIMx High Resolution Timer instance
  8346. * @retval None
  8347. */
  8348. __STATIC_INLINE void LL_HRTIM_DisableIT_FLT3(HRTIM_TypeDef *HRTIMx)
  8349. {
  8350. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT3);
  8351. }
  8352. /**
  8353. * @brief Indicate whether the fault 3 interrupt is enabled.
  8354. * @rmtoll IER FLT3IE LL_HRTIM_IsEnabledIT_FLT3
  8355. * @param HRTIMx High Resolution Timer instance
  8356. * @retval State of FLT3IE bit in HRTIM_IER register (1 or 0).
  8357. */
  8358. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_FLT3(HRTIM_TypeDef *HRTIMx)
  8359. {
  8360. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT3) == (HRTIM_IER_FLT3)) ? 1UL : 0UL);
  8361. }
  8362. /**
  8363. * @brief Enable the fault 4 interrupt.
  8364. * @rmtoll IER FLT4IE LL_HRTIM_EnableIT_FLT4
  8365. * @param HRTIMx High Resolution Timer instance
  8366. * @retval None
  8367. */
  8368. __STATIC_INLINE void LL_HRTIM_EnableIT_FLT4(HRTIM_TypeDef *HRTIMx)
  8369. {
  8370. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT4);
  8371. }
  8372. /**
  8373. * @brief Disable the fault 4 interrupt.
  8374. * @rmtoll IER FLT4IE LL_HRTIM_DisableIT_FLT4
  8375. * @param HRTIMx High Resolution Timer instance
  8376. * @retval None
  8377. */
  8378. __STATIC_INLINE void LL_HRTIM_DisableIT_FLT4(HRTIM_TypeDef *HRTIMx)
  8379. {
  8380. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT4);
  8381. }
  8382. /**
  8383. * @brief Indicate whether the fault 4 interrupt is enabled.
  8384. * @rmtoll IER FLT4IE LL_HRTIM_IsEnabledIT_FLT4
  8385. * @param HRTIMx High Resolution Timer instance
  8386. * @retval State of FLT4IE bit in HRTIM_IER register (1 or 0).
  8387. */
  8388. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_FLT4(HRTIM_TypeDef *HRTIMx)
  8389. {
  8390. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT4) == (HRTIM_IER_FLT4)) ? 1UL : 0UL);
  8391. }
  8392. /**
  8393. * @brief Enable the fault 5 interrupt.
  8394. * @rmtoll IER FLT5IE LL_HRTIM_EnableIT_FLT5
  8395. * @param HRTIMx High Resolution Timer instance
  8396. * @retval None
  8397. */
  8398. __STATIC_INLINE void LL_HRTIM_EnableIT_FLT5(HRTIM_TypeDef *HRTIMx)
  8399. {
  8400. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT5);
  8401. }
  8402. /**
  8403. * @brief Disable the fault 5 interrupt.
  8404. * @rmtoll IER FLT5IE LL_HRTIM_DisableIT_FLT5
  8405. * @param HRTIMx High Resolution Timer instance
  8406. * @retval None
  8407. */
  8408. __STATIC_INLINE void LL_HRTIM_DisableIT_FLT5(HRTIM_TypeDef *HRTIMx)
  8409. {
  8410. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT5);
  8411. }
  8412. /**
  8413. * @brief Indicate whether the fault 5 interrupt is enabled.
  8414. * @rmtoll IER FLT5IE LL_HRTIM_IsEnabledIT_FLT5
  8415. * @param HRTIMx High Resolution Timer instance
  8416. * @retval State of FLT5IE bit in HRTIM_IER register (1 or 0).
  8417. */
  8418. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_FLT5(HRTIM_TypeDef *HRTIMx)
  8419. {
  8420. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_FLT5) == (HRTIM_IER_FLT5)) ? 1UL : 0UL);
  8421. }
  8422. /**
  8423. * @brief Enable the system fault interrupt.
  8424. * @rmtoll IER SYSFLTIE LL_HRTIM_EnableIT_SYSFLT
  8425. * @param HRTIMx High Resolution Timer instance
  8426. * @retval None
  8427. */
  8428. __STATIC_INLINE void LL_HRTIM_EnableIT_SYSFLT(HRTIM_TypeDef *HRTIMx)
  8429. {
  8430. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_SYSFLT);
  8431. }
  8432. /**
  8433. * @brief Disable the system fault interrupt.
  8434. * @rmtoll IER SYSFLTIE LL_HRTIM_DisableIT_SYSFLT
  8435. * @param HRTIMx High Resolution Timer instance
  8436. * @retval None
  8437. */
  8438. __STATIC_INLINE void LL_HRTIM_DisableIT_SYSFLT(HRTIM_TypeDef *HRTIMx)
  8439. {
  8440. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_SYSFLT);
  8441. }
  8442. /**
  8443. * @brief Indicate whether the system fault interrupt is enabled.
  8444. * @rmtoll IER SYSFLTIE LL_HRTIM_IsEnabledIT_SYSFLT
  8445. * @param HRTIMx High Resolution Timer instance
  8446. * @retval State of SYSFLTIE bit in HRTIM_IER register (1 or 0).
  8447. */
  8448. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SYSFLT(HRTIM_TypeDef *HRTIMx)
  8449. {
  8450. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_SYSFLT) == (HRTIM_IER_SYSFLT)) ? 1UL : 0UL);
  8451. }
  8452. /**
  8453. * @brief Enable the burst mode period interrupt.
  8454. * @rmtoll IER BMPERIE LL_HRTIM_EnableIT_BMPER
  8455. * @param HRTIMx High Resolution Timer instance
  8456. * @retval None
  8457. */
  8458. __STATIC_INLINE void LL_HRTIM_EnableIT_BMPER(HRTIM_TypeDef *HRTIMx)
  8459. {
  8460. SET_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_BMPER);
  8461. }
  8462. /**
  8463. * @brief Disable the burst mode period interrupt.
  8464. * @rmtoll IER BMPERIE LL_HRTIM_DisableIT_BMPER
  8465. * @param HRTIMx High Resolution Timer instance
  8466. * @retval None
  8467. */
  8468. __STATIC_INLINE void LL_HRTIM_DisableIT_BMPER(HRTIM_TypeDef *HRTIMx)
  8469. {
  8470. CLEAR_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_BMPER);
  8471. }
  8472. /**
  8473. * @brief Indicate whether the burst mode period interrupt is enabled.
  8474. * @rmtoll IER BMPERIE LL_HRTIM_IsEnabledIT_BMPER
  8475. * @param HRTIMx High Resolution Timer instance
  8476. * @retval State of BMPERIE bit in HRTIM_IER register (1 or 0).
  8477. */
  8478. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_BMPER(HRTIM_TypeDef *HRTIMx)
  8479. {
  8480. return ((READ_BIT(HRTIMx->sCommonRegs.IER, HRTIM_IER_BMPER) == (HRTIM_IER_BMPER)) ? 1UL : 0UL);
  8481. }
  8482. /**
  8483. * @brief Enable the synchronization input interrupt.
  8484. * @rmtoll MDIER SYNCIE LL_HRTIM_EnableIT_SYNC
  8485. * @param HRTIMx High Resolution Timer instance
  8486. * @retval None
  8487. */
  8488. __STATIC_INLINE void LL_HRTIM_EnableIT_SYNC(HRTIM_TypeDef *HRTIMx)
  8489. {
  8490. SET_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCIE);
  8491. }
  8492. /**
  8493. * @brief Disable the synchronization input interrupt.
  8494. * @rmtoll MDIER SYNCIE LL_HRTIM_DisableIT_SYNC
  8495. * @param HRTIMx High Resolution Timer instance
  8496. * @retval None
  8497. */
  8498. __STATIC_INLINE void LL_HRTIM_DisableIT_SYNC(HRTIM_TypeDef *HRTIMx)
  8499. {
  8500. CLEAR_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCIE);
  8501. }
  8502. /**
  8503. * @brief Indicate whether the synchronization input interrupt is enabled.
  8504. * @rmtoll MDIER SYNCIE LL_HRTIM_IsEnabledIT_SYNC
  8505. * @param HRTIMx High Resolution Timer instance
  8506. * @retval State of SYNCIE bit in HRTIM_MDIER register (1 or 0).
  8507. */
  8508. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SYNC(HRTIM_TypeDef *HRTIMx)
  8509. {
  8510. return ((READ_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCIE) == (HRTIM_MDIER_SYNCIE)) ? 1UL : 0UL);
  8511. }
  8512. /**
  8513. * @brief Enable the update interrupt for a given timer.
  8514. * @rmtoll MDIER MUPDIE LL_HRTIM_EnableIT_UPDATE\n
  8515. * TIMxDIER UPDIE LL_HRTIM_EnableIT_UPDATE
  8516. * @param HRTIMx High Resolution Timer instance
  8517. * @param Timer This parameter can be one of the following values:
  8518. * @arg @ref LL_HRTIM_TIMER_MASTER
  8519. * @arg @ref LL_HRTIM_TIMER_A
  8520. * @arg @ref LL_HRTIM_TIMER_B
  8521. * @arg @ref LL_HRTIM_TIMER_C
  8522. * @arg @ref LL_HRTIM_TIMER_D
  8523. * @arg @ref LL_HRTIM_TIMER_E
  8524. * @retval None
  8525. */
  8526. __STATIC_INLINE void LL_HRTIM_EnableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8527. {
  8528. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8529. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8530. REG_OFFSET_TAB_TIMER[iTimer]));
  8531. SET_BIT(*pReg, HRTIM_MDIER_MUPDIE);
  8532. }
  8533. /**
  8534. * @brief Disable the update interrupt for a given timer.
  8535. * @rmtoll MDIER MUPDIE LL_HRTIM_DisableIT_UPDATE\n
  8536. * TIMxDIER UPDIE LL_HRTIM_DisableIT_UPDATE
  8537. * @param HRTIMx High Resolution Timer instance
  8538. * @param Timer This parameter can be one of the following values:
  8539. * @arg @ref LL_HRTIM_TIMER_MASTER
  8540. * @arg @ref LL_HRTIM_TIMER_A
  8541. * @arg @ref LL_HRTIM_TIMER_B
  8542. * @arg @ref LL_HRTIM_TIMER_C
  8543. * @arg @ref LL_HRTIM_TIMER_D
  8544. * @arg @ref LL_HRTIM_TIMER_E
  8545. * @retval None
  8546. */
  8547. __STATIC_INLINE void LL_HRTIM_DisableIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8548. {
  8549. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8550. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8551. REG_OFFSET_TAB_TIMER[iTimer]));
  8552. CLEAR_BIT(*pReg, HRTIM_MDIER_MUPDIE);
  8553. }
  8554. /**
  8555. * @brief Indicate whether the update interrupt is enabled for a given timer.
  8556. * @rmtoll MDIER MUPDIE LL_HRTIM_IsEnabledIT_UPDATE\n
  8557. * TIMxDIER UPDIE LL_HRTIM_IsEnabledIT_UPDATE
  8558. * @param HRTIMx High Resolution Timer instance
  8559. * @param Timer This parameter can be one of the following values:
  8560. * @arg @ref LL_HRTIM_TIMER_MASTER
  8561. * @arg @ref LL_HRTIM_TIMER_A
  8562. * @arg @ref LL_HRTIM_TIMER_B
  8563. * @arg @ref LL_HRTIM_TIMER_C
  8564. * @arg @ref LL_HRTIM_TIMER_D
  8565. * @arg @ref LL_HRTIM_TIMER_E
  8566. * @retval State of MUPDIE/UPDIE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8567. */
  8568. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8569. {
  8570. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8571. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8572. REG_OFFSET_TAB_TIMER[iTimer]));
  8573. return ((READ_BIT(*pReg, HRTIM_MDIER_MUPDIE) == (HRTIM_MDIER_MUPDIE)) ? 1UL : 0UL);
  8574. }
  8575. /**
  8576. * @brief Enable the repetition interrupt for a given timer.
  8577. * @rmtoll MDIER MREPIE LL_HRTIM_EnableIT_REP\n
  8578. * TIMxDIER REPIE LL_HRTIM_EnableIT_REP
  8579. * @param HRTIMx High Resolution Timer instance
  8580. * @param Timer This parameter can be one of the following values:
  8581. * @arg @ref LL_HRTIM_TIMER_MASTER
  8582. * @arg @ref LL_HRTIM_TIMER_A
  8583. * @arg @ref LL_HRTIM_TIMER_B
  8584. * @arg @ref LL_HRTIM_TIMER_C
  8585. * @arg @ref LL_HRTIM_TIMER_D
  8586. * @arg @ref LL_HRTIM_TIMER_E
  8587. * @retval None
  8588. */
  8589. __STATIC_INLINE void LL_HRTIM_EnableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8590. {
  8591. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8592. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8593. REG_OFFSET_TAB_TIMER[iTimer]));
  8594. SET_BIT(*pReg, HRTIM_MDIER_MREPIE);
  8595. }
  8596. /**
  8597. * @brief Disable the repetition interrupt for a given timer.
  8598. * @rmtoll MDIER MREPIE LL_HRTIM_DisableIT_REP\n
  8599. * TIMxDIER REPIE LL_HRTIM_DisableIT_REP
  8600. * @param HRTIMx High Resolution Timer instance
  8601. * @param Timer This parameter can be one of the following values:
  8602. * @arg @ref LL_HRTIM_TIMER_MASTER
  8603. * @arg @ref LL_HRTIM_TIMER_A
  8604. * @arg @ref LL_HRTIM_TIMER_B
  8605. * @arg @ref LL_HRTIM_TIMER_C
  8606. * @arg @ref LL_HRTIM_TIMER_D
  8607. * @arg @ref LL_HRTIM_TIMER_E
  8608. * @retval None
  8609. */
  8610. __STATIC_INLINE void LL_HRTIM_DisableIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8611. {
  8612. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8613. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8614. REG_OFFSET_TAB_TIMER[iTimer]));
  8615. CLEAR_BIT(*pReg, HRTIM_MDIER_MREPIE);
  8616. }
  8617. /**
  8618. * @brief Indicate whether the repetition interrupt is enabled for a given timer.
  8619. * @rmtoll MDIER MREPIE LL_HRTIM_IsEnabledIT_REP\n
  8620. * TIMxDIER REPIE LL_HRTIM_IsEnabledIT_REP
  8621. * @param HRTIMx High Resolution Timer instance
  8622. * @param Timer This parameter can be one of the following values:
  8623. * @arg @ref LL_HRTIM_TIMER_MASTER
  8624. * @arg @ref LL_HRTIM_TIMER_A
  8625. * @arg @ref LL_HRTIM_TIMER_B
  8626. * @arg @ref LL_HRTIM_TIMER_C
  8627. * @arg @ref LL_HRTIM_TIMER_D
  8628. * @arg @ref LL_HRTIM_TIMER_E
  8629. * @retval State of MREPIE/REPIE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8630. */
  8631. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8632. {
  8633. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8634. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8635. REG_OFFSET_TAB_TIMER[iTimer]));
  8636. return ((READ_BIT(*pReg, HRTIM_MDIER_MREPIE) == (HRTIM_MDIER_MREPIE)) ? 1UL : 0UL);
  8637. }
  8638. /**
  8639. * @brief Enable the compare 1 interrupt for a given timer.
  8640. * @rmtoll MDIER MCMP1IE LL_HRTIM_EnableIT_CMP1\n
  8641. * TIMxDIER CMP1IE LL_HRTIM_EnableIT_CMP1
  8642. * @param HRTIMx High Resolution Timer instance
  8643. * @param Timer This parameter can be one of the following values:
  8644. * @arg @ref LL_HRTIM_TIMER_MASTER
  8645. * @arg @ref LL_HRTIM_TIMER_A
  8646. * @arg @ref LL_HRTIM_TIMER_B
  8647. * @arg @ref LL_HRTIM_TIMER_C
  8648. * @arg @ref LL_HRTIM_TIMER_D
  8649. * @arg @ref LL_HRTIM_TIMER_E
  8650. * @retval None
  8651. */
  8652. __STATIC_INLINE void LL_HRTIM_EnableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8653. {
  8654. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8655. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8656. REG_OFFSET_TAB_TIMER[iTimer]));
  8657. SET_BIT(*pReg, HRTIM_MDIER_MCMP1IE);
  8658. }
  8659. /**
  8660. * @brief Disable the compare 1 interrupt for a given timer.
  8661. * @rmtoll MDIER MCMP1IE LL_HRTIM_DisableIT_CMP1\n
  8662. * TIMxDIER CMP1IE LL_HRTIM_DisableIT_CMP1
  8663. * @param HRTIMx High Resolution Timer instance
  8664. * @param Timer This parameter can be one of the following values:
  8665. * @arg @ref LL_HRTIM_TIMER_MASTER
  8666. * @arg @ref LL_HRTIM_TIMER_A
  8667. * @arg @ref LL_HRTIM_TIMER_B
  8668. * @arg @ref LL_HRTIM_TIMER_C
  8669. * @arg @ref LL_HRTIM_TIMER_D
  8670. * @arg @ref LL_HRTIM_TIMER_E
  8671. * @retval None
  8672. */
  8673. __STATIC_INLINE void LL_HRTIM_DisableIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8674. {
  8675. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8676. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8677. REG_OFFSET_TAB_TIMER[iTimer]));
  8678. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP1IE);
  8679. }
  8680. /**
  8681. * @brief Indicate whether the compare 1 interrupt is enabled for a given timer.
  8682. * @rmtoll MDIER MCMP1IE LL_HRTIM_IsEnabledIT_CMP1\n
  8683. * TIMxDIER CMP1IE LL_HRTIM_IsEnabledIT_CMP1
  8684. * @param HRTIMx High Resolution Timer instance
  8685. * @param Timer This parameter can be one of the following values:
  8686. * @arg @ref LL_HRTIM_TIMER_MASTER
  8687. * @arg @ref LL_HRTIM_TIMER_A
  8688. * @arg @ref LL_HRTIM_TIMER_B
  8689. * @arg @ref LL_HRTIM_TIMER_C
  8690. * @arg @ref LL_HRTIM_TIMER_D
  8691. * @arg @ref LL_HRTIM_TIMER_E
  8692. * @retval State of MCMP1IE/CMP1IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8693. */
  8694. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8695. {
  8696. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8697. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8698. REG_OFFSET_TAB_TIMER[iTimer]));
  8699. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP1IE) == (HRTIM_MDIER_MCMP1IE)) ? 1UL : 0UL);
  8700. }
  8701. /**
  8702. * @brief Enable the compare 2 interrupt for a given timer.
  8703. * @rmtoll MDIER MCMP2IE LL_HRTIM_EnableIT_CMP2\n
  8704. * TIMxDIER CMP2IE LL_HRTIM_EnableIT_CMP2
  8705. * @param HRTIMx High Resolution Timer instance
  8706. * @param Timer This parameter can be one of the following values:
  8707. * @arg @ref LL_HRTIM_TIMER_MASTER
  8708. * @arg @ref LL_HRTIM_TIMER_A
  8709. * @arg @ref LL_HRTIM_TIMER_B
  8710. * @arg @ref LL_HRTIM_TIMER_C
  8711. * @arg @ref LL_HRTIM_TIMER_D
  8712. * @arg @ref LL_HRTIM_TIMER_E
  8713. * @retval None
  8714. */
  8715. __STATIC_INLINE void LL_HRTIM_EnableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8716. {
  8717. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8718. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8719. REG_OFFSET_TAB_TIMER[iTimer]));
  8720. SET_BIT(*pReg, HRTIM_MDIER_MCMP2IE);
  8721. }
  8722. /**
  8723. * @brief Disable the compare 2 interrupt for a given timer.
  8724. * @rmtoll MDIER MCMP2IE LL_HRTIM_DisableIT_CMP2\n
  8725. * TIMxDIER CMP2IE LL_HRTIM_DisableIT_CMP2
  8726. * @param HRTIMx High Resolution Timer instance
  8727. * @param Timer This parameter can be one of the following values:
  8728. * @arg @ref LL_HRTIM_TIMER_MASTER
  8729. * @arg @ref LL_HRTIM_TIMER_A
  8730. * @arg @ref LL_HRTIM_TIMER_B
  8731. * @arg @ref LL_HRTIM_TIMER_C
  8732. * @arg @ref LL_HRTIM_TIMER_D
  8733. * @arg @ref LL_HRTIM_TIMER_E
  8734. * @retval None
  8735. */
  8736. __STATIC_INLINE void LL_HRTIM_DisableIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8737. {
  8738. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8739. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8740. REG_OFFSET_TAB_TIMER[iTimer]));
  8741. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP2IE);
  8742. }
  8743. /**
  8744. * @brief Indicate whether the compare 2 interrupt is enabled for a given timer.
  8745. * @rmtoll MDIER MCMP2IE LL_HRTIM_IsEnabledIT_CMP2\n
  8746. * TIMxDIER CMP2IE LL_HRTIM_IsEnabledIT_CMP2
  8747. * @param HRTIMx High Resolution Timer instance
  8748. * @param Timer This parameter can be one of the following values:
  8749. * @arg @ref LL_HRTIM_TIMER_MASTER
  8750. * @arg @ref LL_HRTIM_TIMER_A
  8751. * @arg @ref LL_HRTIM_TIMER_B
  8752. * @arg @ref LL_HRTIM_TIMER_C
  8753. * @arg @ref LL_HRTIM_TIMER_D
  8754. * @arg @ref LL_HRTIM_TIMER_E
  8755. * @retval State of MCMP2IE/CMP2IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8756. */
  8757. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8758. {
  8759. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8760. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8761. REG_OFFSET_TAB_TIMER[iTimer]));
  8762. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP2IE) == (HRTIM_MDIER_MCMP2IE)) ? 1UL : 0UL);
  8763. }
  8764. /**
  8765. * @brief Enable the compare 3 interrupt for a given timer.
  8766. * @rmtoll MDIER MCMP3IE LL_HRTIM_EnableIT_CMP3\n
  8767. * TIMxDIER CMP3IE LL_HRTIM_EnableIT_CMP3
  8768. * @param HRTIMx High Resolution Timer instance
  8769. * @param Timer This parameter can be one of the following values:
  8770. * @arg @ref LL_HRTIM_TIMER_MASTER
  8771. * @arg @ref LL_HRTIM_TIMER_A
  8772. * @arg @ref LL_HRTIM_TIMER_B
  8773. * @arg @ref LL_HRTIM_TIMER_C
  8774. * @arg @ref LL_HRTIM_TIMER_D
  8775. * @arg @ref LL_HRTIM_TIMER_E
  8776. * @retval None
  8777. */
  8778. __STATIC_INLINE void LL_HRTIM_EnableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8779. {
  8780. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8781. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8782. REG_OFFSET_TAB_TIMER[iTimer]));
  8783. SET_BIT(*pReg, HRTIM_MDIER_MCMP3IE);
  8784. }
  8785. /**
  8786. * @brief Disable the compare 3 interrupt for a given timer.
  8787. * @rmtoll MDIER MCMP3IE LL_HRTIM_DisableIT_CMP3\n
  8788. * TIMxDIER CMP3IE LL_HRTIM_DisableIT_CMP3
  8789. * @param HRTIMx High Resolution Timer instance
  8790. * @param Timer This parameter can be one of the following values:
  8791. * @arg @ref LL_HRTIM_TIMER_MASTER
  8792. * @arg @ref LL_HRTIM_TIMER_A
  8793. * @arg @ref LL_HRTIM_TIMER_B
  8794. * @arg @ref LL_HRTIM_TIMER_C
  8795. * @arg @ref LL_HRTIM_TIMER_D
  8796. * @arg @ref LL_HRTIM_TIMER_E
  8797. * @retval None
  8798. */
  8799. __STATIC_INLINE void LL_HRTIM_DisableIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8800. {
  8801. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8802. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8803. REG_OFFSET_TAB_TIMER[iTimer]));
  8804. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP3IE);
  8805. }
  8806. /**
  8807. * @brief Indicate whether the compare 3 interrupt is enabled for a given timer.
  8808. * @rmtoll MDIER MCMP3IE LL_HRTIM_IsEnabledIT_CMP3\n
  8809. * TIMxDIER CMP3IE LL_HRTIM_IsEnabledIT_CMP3
  8810. * @param HRTIMx High Resolution Timer instance
  8811. * @param Timer This parameter can be one of the following values:
  8812. * @arg @ref LL_HRTIM_TIMER_MASTER
  8813. * @arg @ref LL_HRTIM_TIMER_A
  8814. * @arg @ref LL_HRTIM_TIMER_B
  8815. * @arg @ref LL_HRTIM_TIMER_C
  8816. * @arg @ref LL_HRTIM_TIMER_D
  8817. * @arg @ref LL_HRTIM_TIMER_E
  8818. * @retval State of MCMP3IE/CMP3IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8819. */
  8820. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8821. {
  8822. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8823. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8824. REG_OFFSET_TAB_TIMER[iTimer]));
  8825. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP3IE) == (HRTIM_MDIER_MCMP3IE)) ? 1UL : 0UL);
  8826. }
  8827. /**
  8828. * @brief Enable the compare 4 interrupt for a given timer.
  8829. * @rmtoll MDIER MCMP4IE LL_HRTIM_EnableIT_CMP4\n
  8830. * TIMxDIER CMP4IE LL_HRTIM_EnableIT_CMP4
  8831. * @param HRTIMx High Resolution Timer instance
  8832. * @param Timer This parameter can be one of the following values:
  8833. * @arg @ref LL_HRTIM_TIMER_MASTER
  8834. * @arg @ref LL_HRTIM_TIMER_A
  8835. * @arg @ref LL_HRTIM_TIMER_B
  8836. * @arg @ref LL_HRTIM_TIMER_C
  8837. * @arg @ref LL_HRTIM_TIMER_D
  8838. * @arg @ref LL_HRTIM_TIMER_E
  8839. * @retval None
  8840. */
  8841. __STATIC_INLINE void LL_HRTIM_EnableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8842. {
  8843. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8844. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8845. REG_OFFSET_TAB_TIMER[iTimer]));
  8846. SET_BIT(*pReg, HRTIM_MDIER_MCMP4IE);
  8847. }
  8848. /**
  8849. * @brief Disable the compare 4 interrupt for a given timer.
  8850. * @rmtoll MDIER MCMP4IE LL_HRTIM_DisableIT_CMP4\n
  8851. * TIMxDIER CMP4IE LL_HRTIM_DisableIT_CMP4
  8852. * @param HRTIMx High Resolution Timer instance
  8853. * @param Timer This parameter can be one of the following values:
  8854. * @arg @ref LL_HRTIM_TIMER_MASTER
  8855. * @arg @ref LL_HRTIM_TIMER_A
  8856. * @arg @ref LL_HRTIM_TIMER_B
  8857. * @arg @ref LL_HRTIM_TIMER_C
  8858. * @arg @ref LL_HRTIM_TIMER_D
  8859. * @arg @ref LL_HRTIM_TIMER_E
  8860. * @retval None
  8861. */
  8862. __STATIC_INLINE void LL_HRTIM_DisableIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8863. {
  8864. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8865. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8866. REG_OFFSET_TAB_TIMER[iTimer]));
  8867. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP4IE);
  8868. }
  8869. /**
  8870. * @brief Indicate whether the compare 4 interrupt is enabled for a given timer.
  8871. * @rmtoll MDIER MCMP4IE LL_HRTIM_IsEnabledIT_CMP4\n
  8872. * TIMxDIER CMP4IE LL_HRTIM_IsEnabledIT_CMP4
  8873. * @param HRTIMx High Resolution Timer instance
  8874. * @param Timer This parameter can be one of the following values:
  8875. * @arg @ref LL_HRTIM_TIMER_MASTER
  8876. * @arg @ref LL_HRTIM_TIMER_A
  8877. * @arg @ref LL_HRTIM_TIMER_B
  8878. * @arg @ref LL_HRTIM_TIMER_C
  8879. * @arg @ref LL_HRTIM_TIMER_D
  8880. * @arg @ref LL_HRTIM_TIMER_E
  8881. * @retval State of MCMP4IE/CMP4IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  8882. */
  8883. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8884. {
  8885. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8886. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8887. REG_OFFSET_TAB_TIMER[iTimer]));
  8888. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP4IE) == (HRTIM_MDIER_MCMP4IE)) ? 1UL : 0UL);
  8889. }
  8890. /**
  8891. * @brief Enable the capture 1 interrupt for a given timer.
  8892. * @rmtoll TIMxDIER CPT1IE LL_HRTIM_EnableIT_CPT1
  8893. * @param HRTIMx High Resolution Timer instance
  8894. * @param Timer This parameter can be one of the following values:
  8895. * @arg @ref LL_HRTIM_TIMER_A
  8896. * @arg @ref LL_HRTIM_TIMER_B
  8897. * @arg @ref LL_HRTIM_TIMER_C
  8898. * @arg @ref LL_HRTIM_TIMER_D
  8899. * @arg @ref LL_HRTIM_TIMER_E
  8900. * @retval None
  8901. */
  8902. __STATIC_INLINE void LL_HRTIM_EnableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8903. {
  8904. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8905. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8906. REG_OFFSET_TAB_TIMER[iTimer]));
  8907. SET_BIT(*pReg, HRTIM_TIMDIER_CPT1IE);
  8908. }
  8909. /**
  8910. * @brief Enable the capture 1 interrupt for a given timer.
  8911. * @rmtoll TIMxDIER CPT1IE LL_HRTIM_DisableIT_CPT1
  8912. * @param HRTIMx High Resolution Timer instance
  8913. * @param Timer This parameter can be one of the following values:
  8914. * @arg @ref LL_HRTIM_TIMER_A
  8915. * @arg @ref LL_HRTIM_TIMER_B
  8916. * @arg @ref LL_HRTIM_TIMER_C
  8917. * @arg @ref LL_HRTIM_TIMER_D
  8918. * @arg @ref LL_HRTIM_TIMER_E
  8919. * @retval None
  8920. */
  8921. __STATIC_INLINE void LL_HRTIM_DisableIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8922. {
  8923. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8924. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8925. REG_OFFSET_TAB_TIMER[iTimer]));
  8926. CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT1IE);
  8927. }
  8928. /**
  8929. * @brief Indicate whether the capture 1 interrupt is enabled for a given timer.
  8930. * @rmtoll TIMxDIER CPT1IE LL_HRTIM_IsEnabledIT_CPT1
  8931. * @param HRTIMx High Resolution Timer instance
  8932. * @param Timer This parameter can be one of the following values:
  8933. * @arg @ref LL_HRTIM_TIMER_A
  8934. * @arg @ref LL_HRTIM_TIMER_B
  8935. * @arg @ref LL_HRTIM_TIMER_C
  8936. * @arg @ref LL_HRTIM_TIMER_D
  8937. * @arg @ref LL_HRTIM_TIMER_E
  8938. * @retval State of CPT1IE bit in HRTIM_TIMxDIER register (1 or 0).
  8939. */
  8940. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8941. {
  8942. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8943. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8944. REG_OFFSET_TAB_TIMER[iTimer]));
  8945. return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT1IE) == (HRTIM_TIMDIER_CPT1IE)) ? 1UL : 0UL);
  8946. }
  8947. /**
  8948. * @brief Enable the capture 2 interrupt for a given timer.
  8949. * @rmtoll TIMxDIER CPT2IE LL_HRTIM_EnableIT_CPT2
  8950. * @param HRTIMx High Resolution Timer instance
  8951. * @param Timer This parameter can be one of the following values:
  8952. * @arg @ref LL_HRTIM_TIMER_A
  8953. * @arg @ref LL_HRTIM_TIMER_B
  8954. * @arg @ref LL_HRTIM_TIMER_C
  8955. * @arg @ref LL_HRTIM_TIMER_D
  8956. * @arg @ref LL_HRTIM_TIMER_E
  8957. * @retval None
  8958. */
  8959. __STATIC_INLINE void LL_HRTIM_EnableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8960. {
  8961. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8962. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8963. REG_OFFSET_TAB_TIMER[iTimer]));
  8964. SET_BIT(*pReg, HRTIM_TIMDIER_CPT2IE);
  8965. }
  8966. /**
  8967. * @brief Enable the capture 2 interrupt for a given timer.
  8968. * @rmtoll TIMxDIER CPT2IE LL_HRTIM_DisableIT_CPT2
  8969. * @param HRTIMx High Resolution Timer instance
  8970. * @param Timer This parameter can be one of the following values:
  8971. * @arg @ref LL_HRTIM_TIMER_A
  8972. * @arg @ref LL_HRTIM_TIMER_B
  8973. * @arg @ref LL_HRTIM_TIMER_C
  8974. * @arg @ref LL_HRTIM_TIMER_D
  8975. * @arg @ref LL_HRTIM_TIMER_E
  8976. * @retval None
  8977. */
  8978. __STATIC_INLINE void LL_HRTIM_DisableIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8979. {
  8980. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  8981. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  8982. REG_OFFSET_TAB_TIMER[iTimer]));
  8983. CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT2IE);
  8984. }
  8985. /**
  8986. * @brief Indicate whether the capture 2 interrupt is enabled for a given timer.
  8987. * @rmtoll TIMxDIER CPT2IE LL_HRTIM_IsEnabledIT_CPT2
  8988. * @param HRTIMx High Resolution Timer instance
  8989. * @param Timer This parameter can be one of the following values:
  8990. * @arg @ref LL_HRTIM_TIMER_A
  8991. * @arg @ref LL_HRTIM_TIMER_B
  8992. * @arg @ref LL_HRTIM_TIMER_C
  8993. * @arg @ref LL_HRTIM_TIMER_D
  8994. * @arg @ref LL_HRTIM_TIMER_E
  8995. * @retval State of CPT2IE bit in HRTIM_TIMxDIER register (1 or 0).
  8996. */
  8997. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  8998. {
  8999. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9000. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9001. REG_OFFSET_TAB_TIMER[iTimer]));
  9002. return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT2IE) == (HRTIM_TIMDIER_CPT2IE)) ? 1UL : 0UL);
  9003. }
  9004. /**
  9005. * @brief Enable the output 1 set interrupt for a given timer.
  9006. * @rmtoll TIMxDIER SET1IE LL_HRTIM_EnableIT_SET1
  9007. * @param HRTIMx High Resolution Timer instance
  9008. * @param Timer This parameter can be one of the following values:
  9009. * @arg @ref LL_HRTIM_TIMER_A
  9010. * @arg @ref LL_HRTIM_TIMER_B
  9011. * @arg @ref LL_HRTIM_TIMER_C
  9012. * @arg @ref LL_HRTIM_TIMER_D
  9013. * @arg @ref LL_HRTIM_TIMER_E
  9014. * @retval None
  9015. */
  9016. __STATIC_INLINE void LL_HRTIM_EnableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9017. {
  9018. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9019. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9020. REG_OFFSET_TAB_TIMER[iTimer]));
  9021. SET_BIT(*pReg, HRTIM_TIMDIER_SET1IE);
  9022. }
  9023. /**
  9024. * @brief Disable the output 1 set interrupt for a given timer.
  9025. * @rmtoll TIMxDIER SET1IE LL_HRTIM_DisableIT_SET1
  9026. * @param HRTIMx High Resolution Timer instance
  9027. * @param Timer This parameter can be one of the following values:
  9028. * @arg @ref LL_HRTIM_TIMER_A
  9029. * @arg @ref LL_HRTIM_TIMER_B
  9030. * @arg @ref LL_HRTIM_TIMER_C
  9031. * @arg @ref LL_HRTIM_TIMER_D
  9032. * @arg @ref LL_HRTIM_TIMER_E
  9033. * @retval None
  9034. */
  9035. __STATIC_INLINE void LL_HRTIM_DisableIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9036. {
  9037. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9038. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9039. REG_OFFSET_TAB_TIMER[iTimer]));
  9040. CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET1IE);
  9041. }
  9042. /**
  9043. * @brief Indicate whether the output 1 set interrupt is enabled for a given timer.
  9044. * @rmtoll TIMxDIER SET1IE LL_HRTIM_IsEnabledIT_SET1
  9045. * @param HRTIMx High Resolution Timer instance
  9046. * @param Timer This parameter can be one of the following values:
  9047. * @arg @ref LL_HRTIM_TIMER_A
  9048. * @arg @ref LL_HRTIM_TIMER_B
  9049. * @arg @ref LL_HRTIM_TIMER_C
  9050. * @arg @ref LL_HRTIM_TIMER_D
  9051. * @arg @ref LL_HRTIM_TIMER_E
  9052. * @retval State of SET1xIE bit in HRTIM_TIMxDIER register (1 or 0).
  9053. */
  9054. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9055. {
  9056. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9057. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9058. REG_OFFSET_TAB_TIMER[iTimer]));
  9059. return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET1IE) == (HRTIM_TIMDIER_SET1IE)) ? 1UL : 0UL);
  9060. }
  9061. /**
  9062. * @brief Enable the output 1 reset interrupt for a given timer.
  9063. * @rmtoll TIMxDIER RST1IE LL_HRTIM_EnableIT_RST1
  9064. * @param HRTIMx High Resolution Timer instance
  9065. * @param Timer This parameter can be one of the following values:
  9066. * @arg @ref LL_HRTIM_TIMER_A
  9067. * @arg @ref LL_HRTIM_TIMER_B
  9068. * @arg @ref LL_HRTIM_TIMER_C
  9069. * @arg @ref LL_HRTIM_TIMER_D
  9070. * @arg @ref LL_HRTIM_TIMER_E
  9071. * @retval None
  9072. */
  9073. __STATIC_INLINE void LL_HRTIM_EnableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9074. {
  9075. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9076. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9077. REG_OFFSET_TAB_TIMER[iTimer]));
  9078. SET_BIT(*pReg, HRTIM_TIMDIER_RST1IE);
  9079. }
  9080. /**
  9081. * @brief Disable the output 1 reset interrupt for a given timer.
  9082. * @rmtoll TIMxDIER RST1IE LL_HRTIM_DisableIT_RST1
  9083. * @param HRTIMx High Resolution Timer instance
  9084. * @param Timer This parameter can be one of the following values:
  9085. * @arg @ref LL_HRTIM_TIMER_A
  9086. * @arg @ref LL_HRTIM_TIMER_B
  9087. * @arg @ref LL_HRTIM_TIMER_C
  9088. * @arg @ref LL_HRTIM_TIMER_D
  9089. * @arg @ref LL_HRTIM_TIMER_E
  9090. * @retval None
  9091. */
  9092. __STATIC_INLINE void LL_HRTIM_DisableIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9093. {
  9094. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9095. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9096. REG_OFFSET_TAB_TIMER[iTimer]));
  9097. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST1IE);
  9098. }
  9099. /**
  9100. * @brief Indicate whether the output 1 reset interrupt is enabled for a given timer.
  9101. * @rmtoll TIMxDIER RST1IE LL_HRTIM_IsEnabledIT_RST1
  9102. * @param HRTIMx High Resolution Timer instance
  9103. * @param Timer This parameter can be one of the following values:
  9104. * @arg @ref LL_HRTIM_TIMER_A
  9105. * @arg @ref LL_HRTIM_TIMER_B
  9106. * @arg @ref LL_HRTIM_TIMER_C
  9107. * @arg @ref LL_HRTIM_TIMER_D
  9108. * @arg @ref LL_HRTIM_TIMER_E
  9109. * @retval State of RST1xIE bit in HRTIM_TIMxDIER register (1 or 0).
  9110. */
  9111. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9112. {
  9113. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9114. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9115. REG_OFFSET_TAB_TIMER[iTimer]));
  9116. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST1IE) == (HRTIM_TIMDIER_RST1IE)) ? 1UL : 0UL);
  9117. }
  9118. /**
  9119. * @brief Enable the output 2 set interrupt for a given timer.
  9120. * @rmtoll TIMxDIER SET2IE LL_HRTIM_EnableIT_SET2
  9121. * @param HRTIMx High Resolution Timer instance
  9122. * @param Timer This parameter can be one of the following values:
  9123. * @arg @ref LL_HRTIM_TIMER_A
  9124. * @arg @ref LL_HRTIM_TIMER_B
  9125. * @arg @ref LL_HRTIM_TIMER_C
  9126. * @arg @ref LL_HRTIM_TIMER_D
  9127. * @arg @ref LL_HRTIM_TIMER_E
  9128. * @retval None
  9129. */
  9130. __STATIC_INLINE void LL_HRTIM_EnableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9131. {
  9132. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9133. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9134. REG_OFFSET_TAB_TIMER[iTimer]));
  9135. SET_BIT(*pReg, HRTIM_TIMDIER_SET2IE);
  9136. }
  9137. /**
  9138. * @brief Disable the output 2 set interrupt for a given timer.
  9139. * @rmtoll TIMxDIER SET2IE LL_HRTIM_DisableIT_SET2
  9140. * @param HRTIMx High Resolution Timer instance
  9141. * @param Timer This parameter can be one of the following values:
  9142. * @arg @ref LL_HRTIM_TIMER_A
  9143. * @arg @ref LL_HRTIM_TIMER_B
  9144. * @arg @ref LL_HRTIM_TIMER_C
  9145. * @arg @ref LL_HRTIM_TIMER_D
  9146. * @arg @ref LL_HRTIM_TIMER_E
  9147. * @retval None
  9148. */
  9149. __STATIC_INLINE void LL_HRTIM_DisableIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9150. {
  9151. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9152. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9153. REG_OFFSET_TAB_TIMER[iTimer]));
  9154. CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET2IE);
  9155. }
  9156. /**
  9157. * @brief Indicate whether the output 2 set interrupt is enabled for a given timer.
  9158. * @rmtoll TIMxDIER SET2IE LL_HRTIM_IsEnabledIT_SET2
  9159. * @param HRTIMx High Resolution Timer instance
  9160. * @param Timer This parameter can be one of the following values:
  9161. * @arg @ref LL_HRTIM_TIMER_A
  9162. * @arg @ref LL_HRTIM_TIMER_B
  9163. * @arg @ref LL_HRTIM_TIMER_C
  9164. * @arg @ref LL_HRTIM_TIMER_D
  9165. * @arg @ref LL_HRTIM_TIMER_E
  9166. * @retval State of SET2xIE bit in HRTIM_TIMxDIER register (1 or 0).
  9167. */
  9168. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9169. {
  9170. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9171. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9172. REG_OFFSET_TAB_TIMER[iTimer]));
  9173. return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET2IE) == (HRTIM_TIMDIER_SET2IE)) ? 1UL : 0UL);
  9174. }
  9175. /**
  9176. * @brief Enable the output 2 reset interrupt for a given timer.
  9177. * @rmtoll TIMxDIER RST2IE LL_HRTIM_EnableIT_RST2
  9178. * @param HRTIMx High Resolution Timer instance
  9179. * @param Timer This parameter can be one of the following values:
  9180. * @arg @ref LL_HRTIM_TIMER_A
  9181. * @arg @ref LL_HRTIM_TIMER_B
  9182. * @arg @ref LL_HRTIM_TIMER_C
  9183. * @arg @ref LL_HRTIM_TIMER_D
  9184. * @arg @ref LL_HRTIM_TIMER_E
  9185. * @retval None
  9186. */
  9187. __STATIC_INLINE void LL_HRTIM_EnableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9188. {
  9189. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9190. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9191. REG_OFFSET_TAB_TIMER[iTimer]));
  9192. SET_BIT(*pReg, HRTIM_TIMDIER_RST2IE);
  9193. }
  9194. /**
  9195. * @brief Disable the output 2 reset interrupt for a given timer.
  9196. * @rmtoll TIMxDIER RST2IE LL_HRTIM_DisableIT_RST2
  9197. * @param HRTIMx High Resolution Timer instance
  9198. * @param Timer This parameter can be one of the following values:
  9199. * @arg @ref LL_HRTIM_TIMER_A
  9200. * @arg @ref LL_HRTIM_TIMER_B
  9201. * @arg @ref LL_HRTIM_TIMER_C
  9202. * @arg @ref LL_HRTIM_TIMER_D
  9203. * @arg @ref LL_HRTIM_TIMER_E
  9204. * @retval None
  9205. */
  9206. __STATIC_INLINE void LL_HRTIM_DisableIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9207. {
  9208. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9209. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9210. REG_OFFSET_TAB_TIMER[iTimer]));
  9211. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST2IE);
  9212. }
  9213. /**
  9214. * @brief Indicate whether the output 2 reset LL_HRTIM_IsEnabledIT_RST2 is enabled for a given timer.
  9215. * @rmtoll TIMxDIER RST2IE LL_HRTIM_DisableIT_RST2
  9216. * @param HRTIMx High Resolution Timer instance
  9217. * @param Timer This parameter can be one of the following values:
  9218. * @arg @ref LL_HRTIM_TIMER_A
  9219. * @arg @ref LL_HRTIM_TIMER_B
  9220. * @arg @ref LL_HRTIM_TIMER_C
  9221. * @arg @ref LL_HRTIM_TIMER_D
  9222. * @arg @ref LL_HRTIM_TIMER_E
  9223. * @retval State of RST2xIE bit in HRTIM_TIMxDIER register (1 or 0).
  9224. */
  9225. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9226. {
  9227. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9228. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9229. REG_OFFSET_TAB_TIMER[iTimer]));
  9230. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST2IE) == (HRTIM_TIMDIER_RST2IE)) ? 1UL : 0UL);
  9231. }
  9232. /**
  9233. * @brief Enable the reset/roll-over interrupt for a given timer.
  9234. * @rmtoll TIMxDIER RSTIE LL_HRTIM_EnableIT_RST
  9235. * @param HRTIMx High Resolution Timer instance
  9236. * @param Timer This parameter can be one of the following values:
  9237. * @arg @ref LL_HRTIM_TIMER_A
  9238. * @arg @ref LL_HRTIM_TIMER_B
  9239. * @arg @ref LL_HRTIM_TIMER_C
  9240. * @arg @ref LL_HRTIM_TIMER_D
  9241. * @arg @ref LL_HRTIM_TIMER_E
  9242. * @retval None
  9243. */
  9244. __STATIC_INLINE void LL_HRTIM_EnableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9245. {
  9246. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9247. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9248. REG_OFFSET_TAB_TIMER[iTimer]));
  9249. SET_BIT(*pReg, HRTIM_TIMDIER_RSTIE);
  9250. }
  9251. /**
  9252. * @brief Disable the reset/roll-over interrupt for a given timer.
  9253. * @rmtoll TIMxDIER RSTIE LL_HRTIM_DisableIT_RST
  9254. * @param HRTIMx High Resolution Timer instance
  9255. * @param Timer This parameter can be one of the following values:
  9256. * @arg @ref LL_HRTIM_TIMER_A
  9257. * @arg @ref LL_HRTIM_TIMER_B
  9258. * @arg @ref LL_HRTIM_TIMER_C
  9259. * @arg @ref LL_HRTIM_TIMER_D
  9260. * @arg @ref LL_HRTIM_TIMER_E
  9261. * @retval None
  9262. */
  9263. __STATIC_INLINE void LL_HRTIM_DisableIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9264. {
  9265. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9266. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9267. REG_OFFSET_TAB_TIMER[iTimer]));
  9268. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RSTIE);
  9269. }
  9270. /**
  9271. * @brief Indicate whether the reset/roll-over interrupt is enabled for a given timer.
  9272. * @rmtoll TIMxDIER RSTIE LL_HRTIM_IsEnabledIT_RST
  9273. * @param HRTIMx High Resolution Timer instance
  9274. * @param Timer This parameter can be one of the following values:
  9275. * @arg @ref LL_HRTIM_TIMER_A
  9276. * @arg @ref LL_HRTIM_TIMER_B
  9277. * @arg @ref LL_HRTIM_TIMER_C
  9278. * @arg @ref LL_HRTIM_TIMER_D
  9279. * @arg @ref LL_HRTIM_TIMER_E
  9280. * @retval State of RSTIE bit in HRTIM_TIMxDIER register (1 or 0).
  9281. */
  9282. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9283. {
  9284. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9285. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9286. REG_OFFSET_TAB_TIMER[iTimer]));
  9287. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RSTIE) == (HRTIM_TIMDIER_RSTIE)) ? 1UL : 0UL);
  9288. }
  9289. /**
  9290. * @brief Enable the delayed protection interrupt for a given timer.
  9291. * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_EnableIT_DLYPRT
  9292. * @param HRTIMx High Resolution Timer instance
  9293. * @param Timer This parameter can be one of the following values:
  9294. * @arg @ref LL_HRTIM_TIMER_A
  9295. * @arg @ref LL_HRTIM_TIMER_B
  9296. * @arg @ref LL_HRTIM_TIMER_C
  9297. * @arg @ref LL_HRTIM_TIMER_D
  9298. * @arg @ref LL_HRTIM_TIMER_E
  9299. * @retval None
  9300. */
  9301. __STATIC_INLINE void LL_HRTIM_EnableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9302. {
  9303. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9304. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9305. REG_OFFSET_TAB_TIMER[iTimer]));
  9306. SET_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE);
  9307. }
  9308. /**
  9309. * @brief Disable the delayed protection interrupt for a given timer.
  9310. * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_DisableIT_DLYPRT
  9311. * @param HRTIMx High Resolution Timer instance
  9312. * @param Timer This parameter can be one of the following values:
  9313. * @arg @ref LL_HRTIM_TIMER_A
  9314. * @arg @ref LL_HRTIM_TIMER_B
  9315. * @arg @ref LL_HRTIM_TIMER_C
  9316. * @arg @ref LL_HRTIM_TIMER_D
  9317. * @arg @ref LL_HRTIM_TIMER_E
  9318. * @retval None
  9319. */
  9320. __STATIC_INLINE void LL_HRTIM_DisableIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9321. {
  9322. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9323. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9324. REG_OFFSET_TAB_TIMER[iTimer]));
  9325. CLEAR_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE);
  9326. }
  9327. /**
  9328. * @brief Indicate whether the delayed protection interrupt is enabled for a given timer.
  9329. * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_IsEnabledIT_DLYPRT
  9330. * @param HRTIMx High Resolution Timer instance
  9331. * @param Timer This parameter can be one of the following values:
  9332. * @arg @ref LL_HRTIM_TIMER_A
  9333. * @arg @ref LL_HRTIM_TIMER_B
  9334. * @arg @ref LL_HRTIM_TIMER_C
  9335. * @arg @ref LL_HRTIM_TIMER_D
  9336. * @arg @ref LL_HRTIM_TIMER_E
  9337. * @retval State of DLYPRTIE bit in HRTIM_TIMxDIER register (1 or 0).
  9338. */
  9339. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledIT_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9340. {
  9341. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9342. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9343. REG_OFFSET_TAB_TIMER[iTimer]));
  9344. return ((READ_BIT(*pReg, HRTIM_TIMDIER_DLYPRTIE) == (HRTIM_TIMDIER_DLYPRTIE)) ? 1UL : 0UL);
  9345. }
  9346. /**
  9347. * @}
  9348. */
  9349. /** @defgroup HRTIM_LL_EF_DMA_Management DMA_Management
  9350. * @{
  9351. */
  9352. /**
  9353. * @brief Enable the synchronization input DMA request.
  9354. * @rmtoll MDIER SYNCDE LL_HRTIM_EnableDMAReq_SYNC
  9355. * @param HRTIMx High Resolution Timer instance
  9356. * @retval None
  9357. */
  9358. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SYNC(HRTIM_TypeDef *HRTIMx)
  9359. {
  9360. SET_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCDE);
  9361. }
  9362. /**
  9363. * @brief Disable the synchronization input DMA request
  9364. * @rmtoll MDIER SYNCDE LL_HRTIM_DisableDMAReq_SYNC
  9365. * @param HRTIMx High Resolution Timer instance
  9366. * @retval None
  9367. */
  9368. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SYNC(HRTIM_TypeDef *HRTIMx)
  9369. {
  9370. CLEAR_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCDE);
  9371. }
  9372. /**
  9373. * @brief Indicate whether the synchronization input DMA request is enabled.
  9374. * @rmtoll MDIER SYNCDE LL_HRTIM_IsEnabledDMAReq_SYNC
  9375. * @param HRTIMx High Resolution Timer instance
  9376. * @retval State of SYNCDE bit in HRTIM_MDIER register (1 or 0).
  9377. */
  9378. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SYNC(HRTIM_TypeDef *HRTIMx)
  9379. {
  9380. return ((READ_BIT(HRTIMx->sMasterRegs.MDIER, HRTIM_MDIER_SYNCDE) == (HRTIM_MDIER_SYNCDE)) ? 1UL : 0UL);
  9381. }
  9382. /**
  9383. * @brief Enable the update DMA request for a given timer.
  9384. * @rmtoll MDIER MUPDDE LL_HRTIM_EnableDMAReq_UPDATE\n
  9385. * TIMxDIER UPDDE LL_HRTIM_EnableDMAReq_UPDATE
  9386. * @param HRTIMx High Resolution Timer instance
  9387. * @param Timer This parameter can be one of the following values:
  9388. * @arg @ref LL_HRTIM_TIMER_MASTER
  9389. * @arg @ref LL_HRTIM_TIMER_A
  9390. * @arg @ref LL_HRTIM_TIMER_B
  9391. * @arg @ref LL_HRTIM_TIMER_C
  9392. * @arg @ref LL_HRTIM_TIMER_D
  9393. * @arg @ref LL_HRTIM_TIMER_E
  9394. * @retval None
  9395. */
  9396. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9397. {
  9398. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9399. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9400. REG_OFFSET_TAB_TIMER[iTimer]));
  9401. SET_BIT(*pReg, HRTIM_MDIER_MUPDDE);
  9402. }
  9403. /**
  9404. * @brief Disable the update DMA request for a given timer.
  9405. * @rmtoll MDIER MUPDDE LL_HRTIM_DisableDMAReq_UPDATE\n
  9406. * TIMxDIER UPDDE LL_HRTIM_DisableDMAReq_UPDATE
  9407. * @param HRTIMx High Resolution Timer instance
  9408. * @param Timer This parameter can be one of the following values:
  9409. * @arg @ref LL_HRTIM_TIMER_MASTER
  9410. * @arg @ref LL_HRTIM_TIMER_A
  9411. * @arg @ref LL_HRTIM_TIMER_B
  9412. * @arg @ref LL_HRTIM_TIMER_C
  9413. * @arg @ref LL_HRTIM_TIMER_D
  9414. * @arg @ref LL_HRTIM_TIMER_E
  9415. * @retval None
  9416. */
  9417. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9418. {
  9419. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9420. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9421. REG_OFFSET_TAB_TIMER[iTimer]));
  9422. CLEAR_BIT(*pReg, HRTIM_MDIER_MUPDDE);
  9423. }
  9424. /**
  9425. * @brief Indicate whether the update DMA request is enabled for a given timer.
  9426. * @rmtoll MDIER MUPDDE LL_HRTIM_IsEnabledDMAReq_UPDATE\n
  9427. * TIMxDIER UPDDE LL_HRTIM_IsEnabledDMAReq_UPDATE
  9428. * @param HRTIMx High Resolution Timer instance
  9429. * @param Timer This parameter can be one of the following values:
  9430. * @arg @ref LL_HRTIM_TIMER_MASTER
  9431. * @arg @ref LL_HRTIM_TIMER_A
  9432. * @arg @ref LL_HRTIM_TIMER_B
  9433. * @arg @ref LL_HRTIM_TIMER_C
  9434. * @arg @ref LL_HRTIM_TIMER_D
  9435. * @arg @ref LL_HRTIM_TIMER_E
  9436. * @retval State of MUPDDE/UPDDE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9437. */
  9438. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_UPDATE(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9439. {
  9440. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9441. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9442. REG_OFFSET_TAB_TIMER[iTimer]));
  9443. return ((READ_BIT(*pReg, HRTIM_MDIER_MUPDDE) == (HRTIM_MDIER_MUPDDE)) ? 1UL : 0UL);
  9444. }
  9445. /**
  9446. * @brief Enable the repetition DMA request for a given timer.
  9447. * @rmtoll MDIER MREPDE LL_HRTIM_EnableDMAReq_REP\n
  9448. * TIMxDIER REPDE LL_HRTIM_EnableDMAReq_REP
  9449. * @param HRTIMx High Resolution Timer instance
  9450. * @param Timer This parameter can be one of the following values:
  9451. * @arg @ref LL_HRTIM_TIMER_MASTER
  9452. * @arg @ref LL_HRTIM_TIMER_A
  9453. * @arg @ref LL_HRTIM_TIMER_B
  9454. * @arg @ref LL_HRTIM_TIMER_C
  9455. * @arg @ref LL_HRTIM_TIMER_D
  9456. * @arg @ref LL_HRTIM_TIMER_E
  9457. * @retval None
  9458. */
  9459. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9460. {
  9461. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9462. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9463. REG_OFFSET_TAB_TIMER[iTimer]));
  9464. SET_BIT(*pReg, HRTIM_MDIER_MREPDE);
  9465. }
  9466. /**
  9467. * @brief Disable the repetition DMA request for a given timer.
  9468. * @rmtoll MDIER MREPDE LL_HRTIM_DisableDMAReq_REP\n
  9469. * TIMxDIER REPDE LL_HRTIM_DisableDMAReq_REP
  9470. * @param HRTIMx High Resolution Timer instance
  9471. * @param Timer This parameter can be one of the following values:
  9472. * @arg @ref LL_HRTIM_TIMER_MASTER
  9473. * @arg @ref LL_HRTIM_TIMER_A
  9474. * @arg @ref LL_HRTIM_TIMER_B
  9475. * @arg @ref LL_HRTIM_TIMER_C
  9476. * @arg @ref LL_HRTIM_TIMER_D
  9477. * @arg @ref LL_HRTIM_TIMER_E
  9478. * @retval None
  9479. */
  9480. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9481. {
  9482. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9483. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9484. REG_OFFSET_TAB_TIMER[iTimer]));
  9485. CLEAR_BIT(*pReg, HRTIM_MDIER_MREPDE);
  9486. }
  9487. /**
  9488. * @brief Indicate whether the repetition DMA request is enabled for a given timer.
  9489. * @rmtoll MDIER MREPDE LL_HRTIM_IsEnabledDMAReq_REP\n
  9490. * TIMxDIER REPDE LL_HRTIM_IsEnabledDMAReq_REP
  9491. * @param HRTIMx High Resolution Timer instance
  9492. * @param Timer This parameter can be one of the following values:
  9493. * @arg @ref LL_HRTIM_TIMER_MASTER
  9494. * @arg @ref LL_HRTIM_TIMER_A
  9495. * @arg @ref LL_HRTIM_TIMER_B
  9496. * @arg @ref LL_HRTIM_TIMER_C
  9497. * @arg @ref LL_HRTIM_TIMER_D
  9498. * @arg @ref LL_HRTIM_TIMER_E
  9499. * @retval State of MREPDE/REPDE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9500. */
  9501. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_REP(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9502. {
  9503. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9504. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9505. REG_OFFSET_TAB_TIMER[iTimer]));
  9506. return ((READ_BIT(*pReg, HRTIM_MDIER_MREPDE) == (HRTIM_MDIER_MREPDE)) ? 1UL : 0UL);
  9507. }
  9508. /**
  9509. * @brief Enable the compare 1 DMA request for a given timer.
  9510. * @rmtoll MDIER MCMP1DE LL_HRTIM_EnableDMAReq_CMP1\n
  9511. * TIMxDIER CMP1DE LL_HRTIM_EnableDMAReq_CMP1
  9512. * @param HRTIMx High Resolution Timer instance
  9513. * @param Timer This parameter can be one of the following values:
  9514. * @arg @ref LL_HRTIM_TIMER_MASTER
  9515. * @arg @ref LL_HRTIM_TIMER_A
  9516. * @arg @ref LL_HRTIM_TIMER_B
  9517. * @arg @ref LL_HRTIM_TIMER_C
  9518. * @arg @ref LL_HRTIM_TIMER_D
  9519. * @arg @ref LL_HRTIM_TIMER_E
  9520. * @retval None
  9521. */
  9522. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9523. {
  9524. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9525. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9526. REG_OFFSET_TAB_TIMER[iTimer]));
  9527. SET_BIT(*pReg, HRTIM_MDIER_MCMP1DE);
  9528. }
  9529. /**
  9530. * @brief Disable the compare 1 DMA request for a given timer.
  9531. * @rmtoll MDIER MCMP1DE LL_HRTIM_DisableDMAReq_CMP1\n
  9532. * TIMxDIER CMP1DE LL_HRTIM_DisableDMAReq_CMP1
  9533. * @param HRTIMx High Resolution Timer instance
  9534. * @param Timer This parameter can be one of the following values:
  9535. * @arg @ref LL_HRTIM_TIMER_MASTER
  9536. * @arg @ref LL_HRTIM_TIMER_A
  9537. * @arg @ref LL_HRTIM_TIMER_B
  9538. * @arg @ref LL_HRTIM_TIMER_C
  9539. * @arg @ref LL_HRTIM_TIMER_D
  9540. * @arg @ref LL_HRTIM_TIMER_E
  9541. * @retval None
  9542. */
  9543. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9544. {
  9545. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9546. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9547. REG_OFFSET_TAB_TIMER[iTimer]));
  9548. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP1DE);
  9549. }
  9550. /**
  9551. * @brief Indicate whether the compare 1 DMA request is enabled for a given timer.
  9552. * @rmtoll MDIER MCMP1DE LL_HRTIM_IsEnabledDMAReq_CMP1\n
  9553. * TIMxDIER CMP1DE LL_HRTIM_IsEnabledDMAReq_CMP1
  9554. * @param HRTIMx High Resolution Timer instance
  9555. * @param Timer This parameter can be one of the following values:
  9556. * @arg @ref LL_HRTIM_TIMER_MASTER
  9557. * @arg @ref LL_HRTIM_TIMER_A
  9558. * @arg @ref LL_HRTIM_TIMER_B
  9559. * @arg @ref LL_HRTIM_TIMER_C
  9560. * @arg @ref LL_HRTIM_TIMER_D
  9561. * @arg @ref LL_HRTIM_TIMER_E
  9562. * @retval State of MCMP1DE/CMP1DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9563. */
  9564. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9565. {
  9566. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9567. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9568. REG_OFFSET_TAB_TIMER[iTimer]));
  9569. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP1DE) == (HRTIM_MDIER_MCMP1DE)) ? 1UL : 0UL);
  9570. }
  9571. /**
  9572. * @brief Enable the compare 2 DMA request for a given timer.
  9573. * @rmtoll MDIER MCMP2DE LL_HRTIM_EnableDMAReq_CMP2\n
  9574. * TIMxDIER CMP2DE LL_HRTIM_EnableDMAReq_CMP2
  9575. * @param HRTIMx High Resolution Timer instance
  9576. * @param Timer This parameter can be one of the following values:
  9577. * @arg @ref LL_HRTIM_TIMER_MASTER
  9578. * @arg @ref LL_HRTIM_TIMER_A
  9579. * @arg @ref LL_HRTIM_TIMER_B
  9580. * @arg @ref LL_HRTIM_TIMER_C
  9581. * @arg @ref LL_HRTIM_TIMER_D
  9582. * @arg @ref LL_HRTIM_TIMER_E
  9583. * @retval None
  9584. */
  9585. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9586. {
  9587. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9588. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9589. REG_OFFSET_TAB_TIMER[iTimer]));
  9590. SET_BIT(*pReg, HRTIM_MDIER_MCMP2DE);
  9591. }
  9592. /**
  9593. * @brief Disable the compare 2 DMA request for a given timer.
  9594. * @rmtoll MDIER MCMP2DE LL_HRTIM_DisableDMAReq_CMP2\n
  9595. * TIMxDIER CMP2DE LL_HRTIM_DisableDMAReq_CMP2
  9596. * @param HRTIMx High Resolution Timer instance
  9597. * @param Timer This parameter can be one of the following values:
  9598. * @arg @ref LL_HRTIM_TIMER_MASTER
  9599. * @arg @ref LL_HRTIM_TIMER_A
  9600. * @arg @ref LL_HRTIM_TIMER_B
  9601. * @arg @ref LL_HRTIM_TIMER_C
  9602. * @arg @ref LL_HRTIM_TIMER_D
  9603. * @arg @ref LL_HRTIM_TIMER_E
  9604. * @retval None
  9605. */
  9606. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9607. {
  9608. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9609. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9610. REG_OFFSET_TAB_TIMER[iTimer]));
  9611. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP2DE);
  9612. }
  9613. /**
  9614. * @brief Indicate whether the compare 2 DMA request is enabled for a given timer.
  9615. * @rmtoll MDIER MCMP2DE LL_HRTIM_IsEnabledDMAReq_CMP2\n
  9616. * TIMxDIER CMP2DE LL_HRTIM_IsEnabledDMAReq_CMP2
  9617. * @param HRTIMx High Resolution Timer instance
  9618. * @param Timer This parameter can be one of the following values:
  9619. * @arg @ref LL_HRTIM_TIMER_MASTER
  9620. * @arg @ref LL_HRTIM_TIMER_A
  9621. * @arg @ref LL_HRTIM_TIMER_B
  9622. * @arg @ref LL_HRTIM_TIMER_C
  9623. * @arg @ref LL_HRTIM_TIMER_D
  9624. * @arg @ref LL_HRTIM_TIMER_E
  9625. * @retval State of MCMP2DE/CMP2DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9626. */
  9627. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9628. {
  9629. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9630. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9631. REG_OFFSET_TAB_TIMER[iTimer]));
  9632. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP2DE) == (HRTIM_MDIER_MCMP2DE)) ? 1UL : 0UL);
  9633. }
  9634. /**
  9635. * @brief Enable the compare 3 DMA request for a given timer.
  9636. * @rmtoll MDIER MCMP3DE LL_HRTIM_EnableDMAReq_CMP3\n
  9637. * TIMxDIER CMP3DE LL_HRTIM_EnableDMAReq_CMP3
  9638. * @param HRTIMx High Resolution Timer instance
  9639. * @param Timer This parameter can be one of the following values:
  9640. * @arg @ref LL_HRTIM_TIMER_MASTER
  9641. * @arg @ref LL_HRTIM_TIMER_A
  9642. * @arg @ref LL_HRTIM_TIMER_B
  9643. * @arg @ref LL_HRTIM_TIMER_C
  9644. * @arg @ref LL_HRTIM_TIMER_D
  9645. * @arg @ref LL_HRTIM_TIMER_E
  9646. * @retval None
  9647. */
  9648. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9649. {
  9650. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9651. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9652. REG_OFFSET_TAB_TIMER[iTimer]));
  9653. SET_BIT(*pReg, HRTIM_MDIER_MCMP3DE);
  9654. }
  9655. /**
  9656. * @brief Disable the compare 3 DMA request for a given timer.
  9657. * @rmtoll MDIER MCMP3DE LL_HRTIM_DisableDMAReq_CMP3\n
  9658. * TIMxDIER CMP3DE LL_HRTIM_DisableDMAReq_CMP3
  9659. * @param HRTIMx High Resolution Timer instance
  9660. * @param Timer This parameter can be one of the following values:
  9661. * @arg @ref LL_HRTIM_TIMER_MASTER
  9662. * @arg @ref LL_HRTIM_TIMER_A
  9663. * @arg @ref LL_HRTIM_TIMER_B
  9664. * @arg @ref LL_HRTIM_TIMER_C
  9665. * @arg @ref LL_HRTIM_TIMER_D
  9666. * @arg @ref LL_HRTIM_TIMER_E
  9667. * @retval None
  9668. */
  9669. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9670. {
  9671. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9672. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9673. REG_OFFSET_TAB_TIMER[iTimer]));
  9674. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP3DE);
  9675. }
  9676. /**
  9677. * @brief Indicate whether the compare 3 DMA request is enabled for a given timer.
  9678. * @rmtoll MDIER MCMP3DE LL_HRTIM_IsEnabledDMAReq_CMP3\n
  9679. * TIMxDIER CMP3DE LL_HRTIM_IsEnabledDMAReq_CMP3
  9680. * @param HRTIMx High Resolution Timer instance
  9681. * @param Timer This parameter can be one of the following values:
  9682. * @arg @ref LL_HRTIM_TIMER_MASTER
  9683. * @arg @ref LL_HRTIM_TIMER_A
  9684. * @arg @ref LL_HRTIM_TIMER_B
  9685. * @arg @ref LL_HRTIM_TIMER_C
  9686. * @arg @ref LL_HRTIM_TIMER_D
  9687. * @arg @ref LL_HRTIM_TIMER_E
  9688. * @retval State of MCMP3DE/CMP3DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9689. */
  9690. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP3(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9691. {
  9692. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9693. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9694. REG_OFFSET_TAB_TIMER[iTimer]));
  9695. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP3DE) == (HRTIM_MDIER_MCMP3DE)) ? 1UL : 0UL);
  9696. }
  9697. /**
  9698. * @brief Enable the compare 4 DMA request for a given timer.
  9699. * @rmtoll MDIER MCMP4DE LL_HRTIM_EnableDMAReq_CMP4\n
  9700. * TIMxDIER CMP4DE LL_HRTIM_EnableDMAReq_CMP4
  9701. * @param HRTIMx High Resolution Timer instance
  9702. * @param Timer This parameter can be one of the following values:
  9703. * @arg @ref LL_HRTIM_TIMER_MASTER
  9704. * @arg @ref LL_HRTIM_TIMER_A
  9705. * @arg @ref LL_HRTIM_TIMER_B
  9706. * @arg @ref LL_HRTIM_TIMER_C
  9707. * @arg @ref LL_HRTIM_TIMER_D
  9708. * @arg @ref LL_HRTIM_TIMER_E
  9709. * @retval None
  9710. */
  9711. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9712. {
  9713. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9714. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9715. REG_OFFSET_TAB_TIMER[iTimer]));
  9716. SET_BIT(*pReg, HRTIM_MDIER_MCMP4DE);
  9717. }
  9718. /**
  9719. * @brief Disable the compare 4 DMA request for a given timer.
  9720. * @rmtoll MDIER MCMP4DE LL_HRTIM_DisableDMAReq_CMP4\n
  9721. * TIMxDIER CMP4DE LL_HRTIM_DisableDMAReq_CMP4
  9722. * @param HRTIMx High Resolution Timer instance
  9723. * @param Timer This parameter can be one of the following values:
  9724. * @arg @ref LL_HRTIM_TIMER_MASTER
  9725. * @arg @ref LL_HRTIM_TIMER_A
  9726. * @arg @ref LL_HRTIM_TIMER_B
  9727. * @arg @ref LL_HRTIM_TIMER_C
  9728. * @arg @ref LL_HRTIM_TIMER_D
  9729. * @arg @ref LL_HRTIM_TIMER_E
  9730. * @retval None
  9731. */
  9732. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9733. {
  9734. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9735. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9736. REG_OFFSET_TAB_TIMER[iTimer]));
  9737. CLEAR_BIT(*pReg, HRTIM_MDIER_MCMP4DE);
  9738. }
  9739. /**
  9740. * @brief Indicate whether the compare 4 DMA request is enabled for a given timer.
  9741. * @rmtoll MDIER MCMP4DE LL_HRTIM_IsEnabledDMAReq_CMP4\n
  9742. * TIMxDIER CMP4DE LL_HRTIM_IsEnabledDMAReq_CMP4
  9743. * @param HRTIMx High Resolution Timer instance
  9744. * @param Timer This parameter can be one of the following values:
  9745. * @arg @ref LL_HRTIM_TIMER_MASTER
  9746. * @arg @ref LL_HRTIM_TIMER_A
  9747. * @arg @ref LL_HRTIM_TIMER_B
  9748. * @arg @ref LL_HRTIM_TIMER_C
  9749. * @arg @ref LL_HRTIM_TIMER_D
  9750. * @arg @ref LL_HRTIM_TIMER_E
  9751. * @retval State of MCMP4DE/CMP4DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
  9752. */
  9753. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CMP4(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9754. {
  9755. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9756. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9757. REG_OFFSET_TAB_TIMER[iTimer]));
  9758. return ((READ_BIT(*pReg, HRTIM_MDIER_MCMP4DE) == (HRTIM_MDIER_MCMP4DE)) ? 1UL : 0UL);
  9759. }
  9760. /**
  9761. * @brief Enable the capture 1 DMA request for a given timer.
  9762. * @rmtoll TIMxDIER CPT1DE LL_HRTIM_EnableDMAReq_CPT1
  9763. * @param HRTIMx High Resolution Timer instance
  9764. * @param Timer This parameter can be one of the following values:
  9765. * @arg @ref LL_HRTIM_TIMER_A
  9766. * @arg @ref LL_HRTIM_TIMER_B
  9767. * @arg @ref LL_HRTIM_TIMER_C
  9768. * @arg @ref LL_HRTIM_TIMER_D
  9769. * @arg @ref LL_HRTIM_TIMER_E
  9770. * @retval None
  9771. */
  9772. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9773. {
  9774. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9775. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9776. REG_OFFSET_TAB_TIMER[iTimer]));
  9777. SET_BIT(*pReg, HRTIM_TIMDIER_CPT1DE);
  9778. }
  9779. /**
  9780. * @brief Disable the capture 1 DMA request for a given timer.
  9781. * @rmtoll TIMxDIER CPT1DE LL_HRTIM_DisableDMAReq_CPT1
  9782. * @param HRTIMx High Resolution Timer instance
  9783. * @param Timer This parameter can be one of the following values:
  9784. * @arg @ref LL_HRTIM_TIMER_A
  9785. * @arg @ref LL_HRTIM_TIMER_B
  9786. * @arg @ref LL_HRTIM_TIMER_C
  9787. * @arg @ref LL_HRTIM_TIMER_D
  9788. * @arg @ref LL_HRTIM_TIMER_E
  9789. * @retval None
  9790. */
  9791. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9792. {
  9793. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9794. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9795. REG_OFFSET_TAB_TIMER[iTimer]));
  9796. CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT1DE);
  9797. }
  9798. /**
  9799. * @brief Indicate whether the capture 1 DMA request is enabled for a given timer.
  9800. * @rmtoll TIMxDIER CPT1DE LL_HRTIM_IsEnabledDMAReq_CPT1
  9801. * @param HRTIMx High Resolution Timer instance
  9802. * @param Timer This parameter can be one of the following values:
  9803. * @arg @ref LL_HRTIM_TIMER_A
  9804. * @arg @ref LL_HRTIM_TIMER_B
  9805. * @arg @ref LL_HRTIM_TIMER_C
  9806. * @arg @ref LL_HRTIM_TIMER_D
  9807. * @arg @ref LL_HRTIM_TIMER_E
  9808. * @retval State of CPT1DE bit in HRTIM_TIMxDIER register (1 or 0).
  9809. */
  9810. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9811. {
  9812. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9813. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9814. REG_OFFSET_TAB_TIMER[iTimer]));
  9815. return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT1DE) == (HRTIM_TIMDIER_CPT1DE)) ? 1UL : 0UL);
  9816. }
  9817. /**
  9818. * @brief Enable the capture 2 DMA request for a given timer.
  9819. * @rmtoll TIMxDIER CPT2DE LL_HRTIM_EnableDMAReq_CPT2
  9820. * @param HRTIMx High Resolution Timer instance
  9821. * @param Timer This parameter can be one of the following values:
  9822. * @arg @ref LL_HRTIM_TIMER_A
  9823. * @arg @ref LL_HRTIM_TIMER_B
  9824. * @arg @ref LL_HRTIM_TIMER_C
  9825. * @arg @ref LL_HRTIM_TIMER_D
  9826. * @arg @ref LL_HRTIM_TIMER_E
  9827. * @retval None
  9828. */
  9829. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9830. {
  9831. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9832. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9833. REG_OFFSET_TAB_TIMER[iTimer]));
  9834. SET_BIT(*pReg, HRTIM_TIMDIER_CPT2DE);
  9835. }
  9836. /**
  9837. * @brief Disable the capture 2 DMA request for a given timer.
  9838. * @rmtoll TIMxDIER CPT2DE LL_HRTIM_DisableDMAReq_CPT2
  9839. * @param HRTIMx High Resolution Timer instance
  9840. * @param Timer This parameter can be one of the following values:
  9841. * @arg @ref LL_HRTIM_TIMER_A
  9842. * @arg @ref LL_HRTIM_TIMER_B
  9843. * @arg @ref LL_HRTIM_TIMER_C
  9844. * @arg @ref LL_HRTIM_TIMER_D
  9845. * @arg @ref LL_HRTIM_TIMER_E
  9846. * @retval None
  9847. */
  9848. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9849. {
  9850. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9851. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9852. REG_OFFSET_TAB_TIMER[iTimer]));
  9853. CLEAR_BIT(*pReg, HRTIM_TIMDIER_CPT2DE);
  9854. }
  9855. /**
  9856. * @brief Indicate whether the capture 2 DMA request is enabled for a given timer.
  9857. * @rmtoll TIMxDIER CPT2DE LL_HRTIM_IsEnabledDMAReq_CPT2
  9858. * @param HRTIMx High Resolution Timer instance
  9859. * @param Timer This parameter can be one of the following values:
  9860. * @arg @ref LL_HRTIM_TIMER_A
  9861. * @arg @ref LL_HRTIM_TIMER_B
  9862. * @arg @ref LL_HRTIM_TIMER_C
  9863. * @arg @ref LL_HRTIM_TIMER_D
  9864. * @arg @ref LL_HRTIM_TIMER_E
  9865. * @retval State of CPT2DE bit in HRTIM_TIMxDIER register (1 or 0).
  9866. */
  9867. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_CPT2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9868. {
  9869. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9870. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9871. REG_OFFSET_TAB_TIMER[iTimer]));
  9872. return ((READ_BIT(*pReg, HRTIM_TIMDIER_CPT2DE) == (HRTIM_TIMDIER_CPT2DE)) ? 1UL : 0UL);
  9873. }
  9874. /**
  9875. * @brief Enable the output 1 set DMA request for a given timer.
  9876. * @rmtoll TIMxDIER SET1DE LL_HRTIM_EnableDMAReq_SET1
  9877. * @param HRTIMx High Resolution Timer instance
  9878. * @param Timer This parameter can be one of the following values:
  9879. * @arg @ref LL_HRTIM_TIMER_A
  9880. * @arg @ref LL_HRTIM_TIMER_B
  9881. * @arg @ref LL_HRTIM_TIMER_C
  9882. * @arg @ref LL_HRTIM_TIMER_D
  9883. * @arg @ref LL_HRTIM_TIMER_E
  9884. * @retval None
  9885. */
  9886. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9887. {
  9888. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9889. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9890. REG_OFFSET_TAB_TIMER[iTimer]));
  9891. SET_BIT(*pReg, HRTIM_TIMDIER_SET1DE);
  9892. }
  9893. /**
  9894. * @brief Disable the output 1 set DMA request for a given timer.
  9895. * @rmtoll TIMxDIER SET1DE LL_HRTIM_DisableDMAReq_SET1
  9896. * @param HRTIMx High Resolution Timer instance
  9897. * @param Timer This parameter can be one of the following values:
  9898. * @arg @ref LL_HRTIM_TIMER_A
  9899. * @arg @ref LL_HRTIM_TIMER_B
  9900. * @arg @ref LL_HRTIM_TIMER_C
  9901. * @arg @ref LL_HRTIM_TIMER_D
  9902. * @arg @ref LL_HRTIM_TIMER_E
  9903. * @retval None
  9904. */
  9905. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9906. {
  9907. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9908. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9909. REG_OFFSET_TAB_TIMER[iTimer]));
  9910. CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET1DE);
  9911. }
  9912. /**
  9913. * @brief Indicate whether the output 1 set DMA request is enabled for a given timer.
  9914. * @rmtoll TIMxDIER SET1DE LL_HRTIM_IsEnabledDMAReq_SET1
  9915. * @param HRTIMx High Resolution Timer instance
  9916. * @param Timer This parameter can be one of the following values:
  9917. * @arg @ref LL_HRTIM_TIMER_A
  9918. * @arg @ref LL_HRTIM_TIMER_B
  9919. * @arg @ref LL_HRTIM_TIMER_C
  9920. * @arg @ref LL_HRTIM_TIMER_D
  9921. * @arg @ref LL_HRTIM_TIMER_E
  9922. * @retval State of SET1xDE bit in HRTIM_TIMxDIER register (1 or 0).
  9923. */
  9924. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9925. {
  9926. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9927. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9928. REG_OFFSET_TAB_TIMER[iTimer]));
  9929. return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET1DE) == (HRTIM_TIMDIER_SET1DE)) ? 1UL : 0UL);
  9930. }
  9931. /**
  9932. * @brief Enable the output 1 reset DMA request for a given timer.
  9933. * @rmtoll TIMxDIER RST1DE LL_HRTIM_EnableDMAReq_RST1
  9934. * @param HRTIMx High Resolution Timer instance
  9935. * @param Timer This parameter can be one of the following values:
  9936. * @arg @ref LL_HRTIM_TIMER_A
  9937. * @arg @ref LL_HRTIM_TIMER_B
  9938. * @arg @ref LL_HRTIM_TIMER_C
  9939. * @arg @ref LL_HRTIM_TIMER_D
  9940. * @arg @ref LL_HRTIM_TIMER_E
  9941. * @retval None
  9942. */
  9943. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9944. {
  9945. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9946. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9947. REG_OFFSET_TAB_TIMER[iTimer]));
  9948. SET_BIT(*pReg, HRTIM_TIMDIER_RST1DE);
  9949. }
  9950. /**
  9951. * @brief Disable the output 1 reset DMA request for a given timer.
  9952. * @rmtoll TIMxDIER RST1DE LL_HRTIM_DisableDMAReq_RST1
  9953. * @param HRTIMx High Resolution Timer instance
  9954. * @param Timer This parameter can be one of the following values:
  9955. * @arg @ref LL_HRTIM_TIMER_A
  9956. * @arg @ref LL_HRTIM_TIMER_B
  9957. * @arg @ref LL_HRTIM_TIMER_C
  9958. * @arg @ref LL_HRTIM_TIMER_D
  9959. * @arg @ref LL_HRTIM_TIMER_E
  9960. * @retval None
  9961. */
  9962. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9963. {
  9964. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9965. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9966. REG_OFFSET_TAB_TIMER[iTimer]));
  9967. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST1DE);
  9968. }
  9969. /**
  9970. * @brief Indicate whether the output 1 reset interrupt is enabled for a given timer.
  9971. * @rmtoll TIMxDIER RST1DE LL_HRTIM_IsEnabledDMAReq_RST1
  9972. * @param HRTIMx High Resolution Timer instance
  9973. * @param Timer This parameter can be one of the following values:
  9974. * @arg @ref LL_HRTIM_TIMER_A
  9975. * @arg @ref LL_HRTIM_TIMER_B
  9976. * @arg @ref LL_HRTIM_TIMER_C
  9977. * @arg @ref LL_HRTIM_TIMER_D
  9978. * @arg @ref LL_HRTIM_TIMER_E
  9979. * @retval State of RST1xDE bit in HRTIM_TIMxDIER register (1 or 0).
  9980. */
  9981. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST1(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  9982. {
  9983. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  9984. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  9985. REG_OFFSET_TAB_TIMER[iTimer]));
  9986. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST1DE) == (HRTIM_TIMDIER_RST1DE)) ? 1UL : 0UL);
  9987. }
  9988. /**
  9989. * @brief Enable the output 2 set DMA request for a given timer.
  9990. * @rmtoll TIMxDIER SET2DE LL_HRTIM_EnableDMAReq_SET2
  9991. * @param HRTIMx High Resolution Timer instance
  9992. * @param Timer This parameter can be one of the following values:
  9993. * @arg @ref LL_HRTIM_TIMER_A
  9994. * @arg @ref LL_HRTIM_TIMER_B
  9995. * @arg @ref LL_HRTIM_TIMER_C
  9996. * @arg @ref LL_HRTIM_TIMER_D
  9997. * @arg @ref LL_HRTIM_TIMER_E
  9998. * @retval None
  9999. */
  10000. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10001. {
  10002. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10003. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10004. REG_OFFSET_TAB_TIMER[iTimer]));
  10005. SET_BIT(*pReg, HRTIM_TIMDIER_SET2DE);
  10006. }
  10007. /**
  10008. * @brief Disable the output 2 set DMA request for a given timer.
  10009. * @rmtoll TIMxDIER SET2DE LL_HRTIM_DisableDMAReq_SET2
  10010. * @param HRTIMx High Resolution Timer instance
  10011. * @param Timer This parameter can be one of the following values:
  10012. * @arg @ref LL_HRTIM_TIMER_A
  10013. * @arg @ref LL_HRTIM_TIMER_B
  10014. * @arg @ref LL_HRTIM_TIMER_C
  10015. * @arg @ref LL_HRTIM_TIMER_D
  10016. * @arg @ref LL_HRTIM_TIMER_E
  10017. * @retval None
  10018. */
  10019. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10020. {
  10021. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10022. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10023. REG_OFFSET_TAB_TIMER[iTimer]));
  10024. CLEAR_BIT(*pReg, HRTIM_TIMDIER_SET2DE);
  10025. }
  10026. /**
  10027. * @brief Indicate whether the output 2 set DMA request is enabled for a given timer.
  10028. * @rmtoll TIMxDIER SET2DE LL_HRTIM_IsEnabledDMAReq_SET2
  10029. * @param HRTIMx High Resolution Timer instance
  10030. * @param Timer This parameter can be one of the following values:
  10031. * @arg @ref LL_HRTIM_TIMER_A
  10032. * @arg @ref LL_HRTIM_TIMER_B
  10033. * @arg @ref LL_HRTIM_TIMER_C
  10034. * @arg @ref LL_HRTIM_TIMER_D
  10035. * @arg @ref LL_HRTIM_TIMER_E
  10036. * @retval State of SET2xDE bit in HRTIM_TIMxDIER register (1 or 0).
  10037. */
  10038. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_SET2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10039. {
  10040. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10041. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10042. REG_OFFSET_TAB_TIMER[iTimer]));
  10043. return ((READ_BIT(*pReg, HRTIM_TIMDIER_SET2DE) == (HRTIM_TIMDIER_SET2DE)) ? 1UL : 0UL);
  10044. }
  10045. /**
  10046. * @brief Enable the output 2 reset DMA request for a given timer.
  10047. * @rmtoll TIMxDIER RST2DE LL_HRTIM_EnableDMAReq_RST2
  10048. * @param HRTIMx High Resolution Timer instance
  10049. * @param Timer This parameter can be one of the following values:
  10050. * @arg @ref LL_HRTIM_TIMER_A
  10051. * @arg @ref LL_HRTIM_TIMER_B
  10052. * @arg @ref LL_HRTIM_TIMER_C
  10053. * @arg @ref LL_HRTIM_TIMER_D
  10054. * @arg @ref LL_HRTIM_TIMER_E
  10055. * @retval None
  10056. */
  10057. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10058. {
  10059. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10060. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10061. REG_OFFSET_TAB_TIMER[iTimer]));
  10062. SET_BIT(*pReg, HRTIM_TIMDIER_RST2DE);
  10063. }
  10064. /**
  10065. * @brief Disable the output 2 reset DMA request for a given timer.
  10066. * @rmtoll TIMxDIER RST2DE LL_HRTIM_DisableDMAReq_RST2
  10067. * @param HRTIMx High Resolution Timer instance
  10068. * @param Timer This parameter can be one of the following values:
  10069. * @arg @ref LL_HRTIM_TIMER_A
  10070. * @arg @ref LL_HRTIM_TIMER_B
  10071. * @arg @ref LL_HRTIM_TIMER_C
  10072. * @arg @ref LL_HRTIM_TIMER_D
  10073. * @arg @ref LL_HRTIM_TIMER_E
  10074. * @retval None
  10075. */
  10076. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10077. {
  10078. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10079. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10080. REG_OFFSET_TAB_TIMER[iTimer]));
  10081. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RST2DE);
  10082. }
  10083. /**
  10084. * @brief Indicate whether the output 2 reset DMA request is enabled for a given timer.
  10085. * @rmtoll TIMxDIER RST2DE LL_HRTIM_IsEnabledDMAReq_RST2
  10086. * @param HRTIMx High Resolution Timer instance
  10087. * @param Timer This parameter can be one of the following values:
  10088. * @arg @ref LL_HRTIM_TIMER_A
  10089. * @arg @ref LL_HRTIM_TIMER_B
  10090. * @arg @ref LL_HRTIM_TIMER_C
  10091. * @arg @ref LL_HRTIM_TIMER_D
  10092. * @arg @ref LL_HRTIM_TIMER_E
  10093. * @retval State of RST2xDE bit in HRTIM_TIMxDIER register (1 or 0).
  10094. */
  10095. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST2(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10096. {
  10097. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10098. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10099. REG_OFFSET_TAB_TIMER[iTimer]));
  10100. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RST2DE) == (HRTIM_TIMDIER_RST2DE)) ? 1UL : 0UL);
  10101. }
  10102. /**
  10103. * @brief Enable the reset/roll-over DMA request for a given timer.
  10104. * @rmtoll TIMxDIER RSTDE LL_HRTIM_EnableDMAReq_RST
  10105. * @param HRTIMx High Resolution Timer instance
  10106. * @param Timer This parameter can be one of the following values:
  10107. * @arg @ref LL_HRTIM_TIMER_A
  10108. * @arg @ref LL_HRTIM_TIMER_B
  10109. * @arg @ref LL_HRTIM_TIMER_C
  10110. * @arg @ref LL_HRTIM_TIMER_D
  10111. * @arg @ref LL_HRTIM_TIMER_E
  10112. * @retval None
  10113. */
  10114. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10115. {
  10116. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10117. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10118. REG_OFFSET_TAB_TIMER[iTimer]));
  10119. SET_BIT(*pReg, HRTIM_TIMDIER_RSTDE);
  10120. }
  10121. /**
  10122. * @brief Disable the reset/roll-over DMA request for a given timer.
  10123. * @rmtoll TIMxDIER RSTDE LL_HRTIM_DisableDMAReq_RST
  10124. * @param HRTIMx High Resolution Timer instance
  10125. * @param Timer This parameter can be one of the following values:
  10126. * @arg @ref LL_HRTIM_TIMER_A
  10127. * @arg @ref LL_HRTIM_TIMER_B
  10128. * @arg @ref LL_HRTIM_TIMER_C
  10129. * @arg @ref LL_HRTIM_TIMER_D
  10130. * @arg @ref LL_HRTIM_TIMER_E
  10131. * @retval None
  10132. */
  10133. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10134. {
  10135. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10136. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10137. REG_OFFSET_TAB_TIMER[iTimer]));
  10138. CLEAR_BIT(*pReg, HRTIM_TIMDIER_RSTDE);
  10139. }
  10140. /**
  10141. * @brief Indicate whether the reset/roll-over DMA request is enabled for a given timer.
  10142. * @rmtoll TIMxDIER RSTDE LL_HRTIM_IsEnabledDMAReq_RST
  10143. * @param HRTIMx High Resolution Timer instance
  10144. * @param Timer This parameter can be one of the following values:
  10145. * @arg @ref LL_HRTIM_TIMER_A
  10146. * @arg @ref LL_HRTIM_TIMER_B
  10147. * @arg @ref LL_HRTIM_TIMER_C
  10148. * @arg @ref LL_HRTIM_TIMER_D
  10149. * @arg @ref LL_HRTIM_TIMER_E
  10150. * @retval State of RSTDE bit in HRTIM_TIMxDIER register (1 or 0).
  10151. */
  10152. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_RST(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10153. {
  10154. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10155. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10156. REG_OFFSET_TAB_TIMER[iTimer]));
  10157. return ((READ_BIT(*pReg, HRTIM_TIMDIER_RSTDE) == (HRTIM_TIMDIER_RSTDE)) ? 1UL : 0UL);
  10158. }
  10159. /**
  10160. * @brief Enable the delayed protection DMA request for a given timer.
  10161. * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_EnableDMAReq_DLYPRT
  10162. * @param HRTIMx High Resolution Timer instance
  10163. * @param Timer This parameter can be one of the following values:
  10164. * @arg @ref LL_HRTIM_TIMER_A
  10165. * @arg @ref LL_HRTIM_TIMER_B
  10166. * @arg @ref LL_HRTIM_TIMER_C
  10167. * @arg @ref LL_HRTIM_TIMER_D
  10168. * @arg @ref LL_HRTIM_TIMER_E
  10169. * @retval None
  10170. */
  10171. __STATIC_INLINE void LL_HRTIM_EnableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10172. {
  10173. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10174. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10175. REG_OFFSET_TAB_TIMER[iTimer]));
  10176. SET_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE);
  10177. }
  10178. /**
  10179. * @brief Disable the delayed protection DMA request for a given timer.
  10180. * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_DisableDMAReq_DLYPRT
  10181. * @param HRTIMx High Resolution Timer instance
  10182. * @param Timer This parameter can be one of the following values:
  10183. * @arg @ref LL_HRTIM_TIMER_A
  10184. * @arg @ref LL_HRTIM_TIMER_B
  10185. * @arg @ref LL_HRTIM_TIMER_C
  10186. * @arg @ref LL_HRTIM_TIMER_D
  10187. * @arg @ref LL_HRTIM_TIMER_E
  10188. * @retval None
  10189. */
  10190. __STATIC_INLINE void LL_HRTIM_DisableDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10191. {
  10192. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10193. register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10194. REG_OFFSET_TAB_TIMER[iTimer]));
  10195. CLEAR_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE);
  10196. }
  10197. /**
  10198. * @brief Indicate whether the delayed protection DMA request is enabled for a given timer.
  10199. * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_IsEnabledDMAReq_DLYPRT
  10200. * @param HRTIMx High Resolution Timer instance
  10201. * @param Timer This parameter can be one of the following values:
  10202. * @arg @ref LL_HRTIM_TIMER_A
  10203. * @arg @ref LL_HRTIM_TIMER_B
  10204. * @arg @ref LL_HRTIM_TIMER_C
  10205. * @arg @ref LL_HRTIM_TIMER_D
  10206. * @arg @ref LL_HRTIM_TIMER_E
  10207. * @retval State of DLYPRTDE bit in HRTIM_TIMxDIER register (1 or 0).
  10208. */
  10209. __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_DLYPRT(HRTIM_TypeDef *HRTIMx, uint32_t Timer)
  10210. {
  10211. register uint32_t iTimer = (uint8_t)(POSITION_VAL(Timer) - HRTIM_MCR_MCEN_Pos);
  10212. register const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&HRTIMx->sMasterRegs.MDIER) +
  10213. REG_OFFSET_TAB_TIMER[iTimer]));
  10214. return ((READ_BIT(*pReg, HRTIM_TIMDIER_DLYPRTDE) == (HRTIM_TIMDIER_DLYPRTDE)) ? 1UL : 0UL);
  10215. }
  10216. /**
  10217. * @}
  10218. */
  10219. #if defined(USE_FULL_LL_DRIVER)
  10220. /** @defgroup HRTIM_LL_LL_EF_Init In-initialization and de-initialization functions
  10221. * @{
  10222. */
  10223. ErrorStatus LL_HRTIM_DeInit(HRTIM_TypeDef* HRTIMx);
  10224. /**
  10225. * @}
  10226. */
  10227. #endif /* USE_FULL_LL_DRIVER */
  10228. /**
  10229. * @}
  10230. */
  10231. /**
  10232. * @}
  10233. */
  10234. #endif /* HRTIM1 */
  10235. /**
  10236. * @}
  10237. */
  10238. #ifdef __cplusplus
  10239. }
  10240. #endif
  10241. #endif /* STM32H7xx_LL_HRTIM_H */
  10242. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/