stm32f4xx_ll_system.h 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_ll_system.h
  4. * @author MCD Application Team
  5. * @brief Header file of SYSTEM LL module.
  6. @verbatim
  7. ==============================================================================
  8. ##### How to use this driver #####
  9. ==============================================================================
  10. [..]
  11. The LL SYSTEM driver contains a set of generic APIs that can be
  12. used by user:
  13. (+) Some of the FLASH features need to be handled in the SYSTEM file.
  14. (+) Access to DBGCMU registers
  15. (+) Access to SYSCFG registers
  16. @endverbatim
  17. ******************************************************************************
  18. * @attention
  19. *
  20. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  21. * All rights reserved.</center></h2>
  22. *
  23. * This software component is licensed by ST under BSD 3-Clause license,
  24. * the "License"; You may not use this file except in compliance with the
  25. * License. You may obtain a copy of the License at:
  26. * opensource.org/licenses/BSD-3-Clause
  27. *
  28. ******************************************************************************
  29. */
  30. /* Define to prevent recursive inclusion -------------------------------------*/
  31. #ifndef __STM32F4xx_LL_SYSTEM_H
  32. #define __STM32F4xx_LL_SYSTEM_H
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. /* Includes ------------------------------------------------------------------*/
  37. #include "stm32f4xx.h"
  38. /** @addtogroup STM32F4xx_LL_Driver
  39. * @{
  40. */
  41. #if defined (FLASH) || defined (SYSCFG) || defined (DBGMCU)
  42. /** @defgroup SYSTEM_LL SYSTEM
  43. * @{
  44. */
  45. /* Private types -------------------------------------------------------------*/
  46. /* Private variables ---------------------------------------------------------*/
  47. /* Private constants ---------------------------------------------------------*/
  48. /** @defgroup SYSTEM_LL_Private_Constants SYSTEM Private Constants
  49. * @{
  50. */
  51. /**
  52. * @}
  53. */
  54. /* Private macros ------------------------------------------------------------*/
  55. /* Exported types ------------------------------------------------------------*/
  56. /* Exported constants --------------------------------------------------------*/
  57. /** @defgroup SYSTEM_LL_Exported_Constants SYSTEM Exported Constants
  58. * @{
  59. */
  60. /** @defgroup SYSTEM_LL_EC_REMAP SYSCFG REMAP
  61. * @{
  62. */
  63. #define LL_SYSCFG_REMAP_FLASH (uint32_t)0x00000000 /*!< Main Flash memory mapped at 0x00000000 */
  64. #define LL_SYSCFG_REMAP_SYSTEMFLASH SYSCFG_MEMRMP_MEM_MODE_0 /*!< System Flash memory mapped at 0x00000000 */
  65. #if defined(FSMC_Bank1)
  66. #define LL_SYSCFG_REMAP_FSMC SYSCFG_MEMRMP_MEM_MODE_1 /*!< FSMC(NOR/PSRAM 1 and 2) mapped at 0x00000000 */
  67. #endif /* FSMC_Bank1 */
  68. #if defined(FMC_Bank1)
  69. #define LL_SYSCFG_REMAP_FMC SYSCFG_MEMRMP_MEM_MODE_1 /*!< FMC(NOR/PSRAM 1 and 2) mapped at 0x00000000 */
  70. #define LL_SYSCFG_REMAP_SDRAM SYSCFG_MEMRMP_MEM_MODE_2 /*!< FMC/SDRAM mapped at 0x00000000 */
  71. #endif /* FMC_Bank1 */
  72. #define LL_SYSCFG_REMAP_SRAM (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0) /*!< SRAM1 mapped at 0x00000000 */
  73. /**
  74. * @}
  75. */
  76. #if defined(SYSCFG_PMC_MII_RMII_SEL)
  77. /** @defgroup SYSTEM_LL_EC_PMC SYSCFG PMC
  78. * @{
  79. */
  80. #define LL_SYSCFG_PMC_ETHMII (uint32_t)0x00000000 /*!< ETH Media MII interface */
  81. #define LL_SYSCFG_PMC_ETHRMII (uint32_t)SYSCFG_PMC_MII_RMII_SEL /*!< ETH Media RMII interface */
  82. /**
  83. * @}
  84. */
  85. #endif /* SYSCFG_PMC_MII_RMII_SEL */
  86. #if defined(SYSCFG_MEMRMP_UFB_MODE)
  87. /** @defgroup SYSTEM_LL_EC_BANKMODE SYSCFG BANK MODE
  88. * @{
  89. */
  90. #define LL_SYSCFG_BANKMODE_BANK1 (uint32_t)0x00000000 /*!< Flash Bank 1 base address mapped at 0x0800 0000 (AXI) and 0x0020 0000 (TCM)
  91. and Flash Bank 2 base address mapped at 0x0810 0000 (AXI) and 0x0030 0000 (TCM)*/
  92. #define LL_SYSCFG_BANKMODE_BANK2 SYSCFG_MEMRMP_UFB_MODE /*!< Flash Bank 2 base address mapped at 0x0800 0000 (AXI) and 0x0020 0000(TCM)
  93. and Flash Bank 1 base address mapped at 0x0810 0000 (AXI) and 0x0030 0000(TCM) */
  94. /**
  95. * @}
  96. */
  97. #endif /* SYSCFG_MEMRMP_UFB_MODE */
  98. /** @defgroup SYSTEM_LL_EC_I2C_FASTMODEPLUS SYSCFG I2C FASTMODEPLUS
  99. * @{
  100. */
  101. #if defined(SYSCFG_CFGR_FMPI2C1_SCL)
  102. #define LL_SYSCFG_I2C_FASTMODEPLUS_SCL SYSCFG_CFGR_FMPI2C1_SCL /*!< Enable Fast Mode Plus on FMPI2C_SCL pin */
  103. #define LL_SYSCFG_I2C_FASTMODEPLUS_SDA SYSCFG_CFGR_FMPI2C1_SDA /*!< Enable Fast Mode Plus on FMPI2C_SDA pin*/
  104. #endif /* SYSCFG_CFGR_FMPI2C1_SCL */
  105. /**
  106. * @}
  107. */
  108. /** @defgroup SYSTEM_LL_EC_EXTI_PORT SYSCFG EXTI PORT
  109. * @{
  110. */
  111. #define LL_SYSCFG_EXTI_PORTA (uint32_t)0 /*!< EXTI PORT A */
  112. #define LL_SYSCFG_EXTI_PORTB (uint32_t)1 /*!< EXTI PORT B */
  113. #define LL_SYSCFG_EXTI_PORTC (uint32_t)2 /*!< EXTI PORT C */
  114. #define LL_SYSCFG_EXTI_PORTD (uint32_t)3 /*!< EXTI PORT D */
  115. #define LL_SYSCFG_EXTI_PORTE (uint32_t)4 /*!< EXTI PORT E */
  116. #if defined(GPIOF)
  117. #define LL_SYSCFG_EXTI_PORTF (uint32_t)5 /*!< EXTI PORT F */
  118. #endif /* GPIOF */
  119. #if defined(GPIOG)
  120. #define LL_SYSCFG_EXTI_PORTG (uint32_t)6 /*!< EXTI PORT G */
  121. #endif /* GPIOG */
  122. #define LL_SYSCFG_EXTI_PORTH (uint32_t)7 /*!< EXTI PORT H */
  123. #if defined(GPIOI)
  124. #define LL_SYSCFG_EXTI_PORTI (uint32_t)8 /*!< EXTI PORT I */
  125. #endif /* GPIOI */
  126. #if defined(GPIOJ)
  127. #define LL_SYSCFG_EXTI_PORTJ (uint32_t)9 /*!< EXTI PORT J */
  128. #endif /* GPIOJ */
  129. #if defined(GPIOK)
  130. #define LL_SYSCFG_EXTI_PORTK (uint32_t)10 /*!< EXTI PORT k */
  131. #endif /* GPIOK */
  132. /**
  133. * @}
  134. */
  135. /** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE
  136. * @{
  137. */
  138. #define LL_SYSCFG_EXTI_LINE0 (uint32_t)(0x000FU << 16 | 0) /*!< EXTI_POSITION_0 | EXTICR[0] */
  139. #define LL_SYSCFG_EXTI_LINE1 (uint32_t)(0x00F0U << 16 | 0) /*!< EXTI_POSITION_4 | EXTICR[0] */
  140. #define LL_SYSCFG_EXTI_LINE2 (uint32_t)(0x0F00U << 16 | 0) /*!< EXTI_POSITION_8 | EXTICR[0] */
  141. #define LL_SYSCFG_EXTI_LINE3 (uint32_t)(0xF000U << 16 | 0) /*!< EXTI_POSITION_12 | EXTICR[0] */
  142. #define LL_SYSCFG_EXTI_LINE4 (uint32_t)(0x000FU << 16 | 1) /*!< EXTI_POSITION_0 | EXTICR[1] */
  143. #define LL_SYSCFG_EXTI_LINE5 (uint32_t)(0x00F0U << 16 | 1) /*!< EXTI_POSITION_4 | EXTICR[1] */
  144. #define LL_SYSCFG_EXTI_LINE6 (uint32_t)(0x0F00U << 16 | 1) /*!< EXTI_POSITION_8 | EXTICR[1] */
  145. #define LL_SYSCFG_EXTI_LINE7 (uint32_t)(0xF000U << 16 | 1) /*!< EXTI_POSITION_12 | EXTICR[1] */
  146. #define LL_SYSCFG_EXTI_LINE8 (uint32_t)(0x000FU << 16 | 2) /*!< EXTI_POSITION_0 | EXTICR[2] */
  147. #define LL_SYSCFG_EXTI_LINE9 (uint32_t)(0x00F0U << 16 | 2) /*!< EXTI_POSITION_4 | EXTICR[2] */
  148. #define LL_SYSCFG_EXTI_LINE10 (uint32_t)(0x0F00U << 16 | 2) /*!< EXTI_POSITION_8 | EXTICR[2] */
  149. #define LL_SYSCFG_EXTI_LINE11 (uint32_t)(0xF000U << 16 | 2) /*!< EXTI_POSITION_12 | EXTICR[2] */
  150. #define LL_SYSCFG_EXTI_LINE12 (uint32_t)(0x000FU << 16 | 3) /*!< EXTI_POSITION_0 | EXTICR[3] */
  151. #define LL_SYSCFG_EXTI_LINE13 (uint32_t)(0x00F0U << 16 | 3) /*!< EXTI_POSITION_4 | EXTICR[3] */
  152. #define LL_SYSCFG_EXTI_LINE14 (uint32_t)(0x0F00U << 16 | 3) /*!< EXTI_POSITION_8 | EXTICR[3] */
  153. #define LL_SYSCFG_EXTI_LINE15 (uint32_t)(0xF000U << 16 | 3) /*!< EXTI_POSITION_12 | EXTICR[3] */
  154. /**
  155. * @}
  156. */
  157. /** @defgroup SYSTEM_LL_EC_TIMBREAK SYSCFG TIMER BREAK
  158. * @{
  159. */
  160. #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
  161. #define LL_SYSCFG_TIMBREAK_LOCKUP SYSCFG_CFGR2_LOCKUP_LOCK /*!< Enables and locks the LOCKUP output of CortexM4
  162. with Break Input of TIM1/8 */
  163. #define LL_SYSCFG_TIMBREAK_PVD SYSCFG_CFGR2_PVD_LOCK /*!< Enables and locks the PVD connection with TIM1/8 Break Input
  164. and also the PVDE and PLS bits of the Power Control Interface */
  165. #endif /* SYSCFG_CFGR2_CLL */
  166. /**
  167. * @}
  168. */
  169. #if defined(SYSCFG_MCHDLYCR_BSCKSEL)
  170. /** @defgroup SYSTEM_LL_DFSDM_BitStream_ClockSource SYSCFG MCHDLY BCKKSEL
  171. * @{
  172. */
  173. #define LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1 (uint32_t)0x00000000
  174. #define LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2 SYSCFG_MCHDLYCR_BSCKSEL
  175. /**
  176. * @}
  177. */
  178. /** @defgroup SYSTEM_LL_DFSDM_MCHDLYEN SYSCFG MCHDLY MCHDLYEN
  179. * @{
  180. */
  181. #define LL_SYSCFG_DFSDM1_MCHDLYEN SYSCFG_MCHDLYCR_MCHDLY1EN
  182. #define LL_SYSCFG_DFSDM2_MCHDLYEN SYSCFG_MCHDLYCR_MCHDLY2EN
  183. /**
  184. * @}
  185. */
  186. /** @defgroup SYSTEM_LL_DFSDM_DataIn0_Source SYSCFG MCHDLY DFSDMD0SEL
  187. * @{
  188. */
  189. #define LL_SYSCFG_DFSDM1_DataIn0 SYSCFG_MCHDLYCR_DFSDM1D0SEL
  190. #define LL_SYSCFG_DFSDM2_DataIn0 SYSCFG_MCHDLYCR_DFSDM2D0SEL
  191. #define LL_SYSCFG_DFSDM1_DataIn0_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D0SEL << 16) | 0x00000000)
  192. #define LL_SYSCFG_DFSDM1_DataIn0_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D0SEL << 16) | SYSCFG_MCHDLYCR_DFSDM1D0SEL)
  193. #define LL_SYSCFG_DFSDM2_DataIn0_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D0SEL << 16) | 0x00000000)
  194. #define LL_SYSCFG_DFSDM2_DataIn0_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D0SEL << 16) | SYSCFG_MCHDLYCR_DFSDM2D0SEL)
  195. /**
  196. * @}
  197. */
  198. /** @defgroup SYSTEM_LL_DFSDM_DataIn2_Source SYSCFG MCHDLY DFSDMD2SEL
  199. * @{
  200. */
  201. #define LL_SYSCFG_DFSDM1_DataIn2 SYSCFG_MCHDLYCR_DFSDM1D2SEL
  202. #define LL_SYSCFG_DFSDM2_DataIn2 SYSCFG_MCHDLYCR_DFSDM2D2SEL
  203. #define LL_SYSCFG_DFSDM1_DataIn2_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D2SEL << 16) | 0x00000000)
  204. #define LL_SYSCFG_DFSDM1_DataIn2_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM1D2SEL << 16) | SYSCFG_MCHDLYCR_DFSDM1D2SEL)
  205. #define LL_SYSCFG_DFSDM2_DataIn2_PAD (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D2SEL << 16) | 0x00000000)
  206. #define LL_SYSCFG_DFSDM2_DataIn2_DM (uint32_t)((SYSCFG_MCHDLYCR_DFSDM2D2SEL << 16) | SYSCFG_MCHDLYCR_DFSDM2D2SEL)
  207. /**
  208. * @}
  209. */
  210. /** @defgroup SYSTEM_LL_DFSDM1_TIM4OC2_BitstreamDistribution SYSCFG MCHDLY DFSDM1CK02SEL
  211. * @{
  212. */
  213. #define LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0 (uint32_t)0x00000000
  214. #define LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2 SYSCFG_MCHDLYCR_DFSDM1CK02SEL
  215. /**
  216. * @}
  217. */
  218. /** @defgroup SYSTEM_LL_DFSDM1_TIM4OC1_BitstreamDistribution SYSCFG MCHDLY DFSDM1CK13SEL
  219. * @{
  220. */
  221. #define LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1 (uint32_t)0x00000000
  222. #define LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3 SYSCFG_MCHDLYCR_DFSDM1CK13SEL
  223. /**
  224. * @}
  225. */
  226. /** @defgroup SYSTEM_LL_DFSDM1_CLKIN_SourceSelection SYSCFG MCHDLY DFSDMCFG
  227. * @{
  228. */
  229. #define LL_SYSCFG_DFSDM1_CKIN_PAD (uint32_t)0x00000000
  230. #define LL_SYSCFG_DFSDM1_CKIN_DM SYSCFG_MCHDLYCR_DFSDM1CFG
  231. /**
  232. * @}
  233. */
  234. /** @defgroup SYSTEM_LL_DFSDM1_CLKOUT_SourceSelection SYSCFG MCHDLY DFSDM1CKOSEL
  235. * @{
  236. */
  237. #define LL_SYSCFG_DFSDM1_CKOUT (uint32_t)0x00000000
  238. #define LL_SYSCFG_DFSDM1_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM1CKOSEL
  239. /**
  240. * @}
  241. */
  242. /** @defgroup SYSTEM_LL_DFSDM2_DataIn4_SourceSelection SYSCFG MCHDLY DFSDM2D4SEL
  243. * @{
  244. */
  245. #define LL_SYSCFG_DFSDM2_DataIn4_PAD (uint32_t)0x00000000
  246. #define LL_SYSCFG_DFSDM2_DataIn4_DM SYSCFG_MCHDLYCR_DFSDM2D4SEL
  247. /**
  248. * @}
  249. */
  250. /** @defgroup SYSTEM_LL_DFSDM2_DataIn6_SourceSelection SYSCFG MCHDLY DFSDM2D6SEL
  251. * @{
  252. */
  253. #define LL_SYSCFG_DFSDM2_DataIn6_PAD (uint32_t)0x00000000
  254. #define LL_SYSCFG_DFSDM2_DataIn6_DM SYSCFG_MCHDLYCR_DFSDM2D6SEL
  255. /**
  256. * @}
  257. */
  258. /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC4_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK04SEL
  259. * @{
  260. */
  261. #define LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0 (uint32_t)0x00000000
  262. #define LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4 SYSCFG_MCHDLYCR_DFSDM2CK04SEL
  263. /**
  264. * @}
  265. */
  266. /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC3_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK15SEL
  267. * @{
  268. */
  269. #define LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1 (uint32_t)0x00000000
  270. #define LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5 SYSCFG_MCHDLYCR_DFSDM2CK15SEL
  271. /**
  272. * @}
  273. */
  274. /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC2_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK26SEL
  275. * @{
  276. */
  277. #define LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2 (uint32_t)0x00000000
  278. #define LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6 SYSCFG_MCHDLYCR_DFSDM2CK26SEL
  279. /**
  280. * @}
  281. */
  282. /** @defgroup SYSTEM_LL_DFSDM2_TIM3OC1_BitstreamDistribution SYSCFG MCHDLY DFSDM2CK37SEL
  283. * @{
  284. */
  285. #define LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3 (uint32_t)0x00000000
  286. #define LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7 SYSCFG_MCHDLYCR_DFSDM2CK37SEL
  287. /**
  288. * @}
  289. */
  290. /** @defgroup SYSTEM_LL_DFSDM2_CLKIN_SourceSelection SYSCFG MCHDLY DFSDM2CFG
  291. * @{
  292. */
  293. #define LL_SYSCFG_DFSDM2_CKIN_PAD (uint32_t)0x00000000
  294. #define LL_SYSCFG_DFSDM2_CKIN_DM SYSCFG_MCHDLYCR_DFSDM2CFG
  295. /**
  296. * @}
  297. */
  298. /** @defgroup SYSTEM_LL_DFSDM2_CLKOUT_SourceSelection SYSCFG MCHDLY DFSDM2CKOSEL
  299. * @{
  300. */
  301. #define LL_SYSCFG_DFSDM2_CKOUT (uint32_t)0x00000000
  302. #define LL_SYSCFG_DFSDM2_CKOUT_M27 SYSCFG_MCHDLYCR_DFSDM2CKOSEL
  303. /**
  304. * @}
  305. */
  306. #endif /* SYSCFG_MCHDLYCR_BSCKSEL */
  307. /** @defgroup SYSTEM_LL_EC_TRACE DBGMCU TRACE Pin Assignment
  308. * @{
  309. */
  310. #define LL_DBGMCU_TRACE_NONE 0x00000000U /*!< TRACE pins not assigned (default state) */
  311. #define LL_DBGMCU_TRACE_ASYNCH DBGMCU_CR_TRACE_IOEN /*!< TRACE pin assignment for Asynchronous Mode */
  312. #define LL_DBGMCU_TRACE_SYNCH_SIZE1 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_0) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 1 */
  313. #define LL_DBGMCU_TRACE_SYNCH_SIZE2 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_1) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 2 */
  314. #define LL_DBGMCU_TRACE_SYNCH_SIZE4 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 4 */
  315. /**
  316. * @}
  317. */
  318. /** @defgroup SYSTEM_LL_EC_APB1_GRP1_STOP_IP DBGMCU APB1 GRP1 STOP IP
  319. * @{
  320. */
  321. #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
  322. #define LL_DBGMCU_APB1_GRP1_TIM2_STOP DBGMCU_APB1_FZ_DBG_TIM2_STOP /*!< TIM2 counter stopped when core is halted */
  323. #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
  324. #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
  325. #define LL_DBGMCU_APB1_GRP1_TIM3_STOP DBGMCU_APB1_FZ_DBG_TIM3_STOP /*!< TIM3 counter stopped when core is halted */
  326. #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
  327. #if defined(DBGMCU_APB1_FZ_DBG_TIM4_STOP)
  328. #define LL_DBGMCU_APB1_GRP1_TIM4_STOP DBGMCU_APB1_FZ_DBG_TIM4_STOP /*!< TIM4 counter stopped when core is halted */
  329. #endif /* DBGMCU_APB1_FZ_DBG_TIM4_STOP */
  330. #define LL_DBGMCU_APB1_GRP1_TIM5_STOP DBGMCU_APB1_FZ_DBG_TIM5_STOP /*!< TIM5 counter stopped when core is halted */
  331. #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
  332. #define LL_DBGMCU_APB1_GRP1_TIM6_STOP DBGMCU_APB1_FZ_DBG_TIM6_STOP /*!< TIM6 counter stopped when core is halted */
  333. #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
  334. #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
  335. #define LL_DBGMCU_APB1_GRP1_TIM7_STOP DBGMCU_APB1_FZ_DBG_TIM7_STOP /*!< TIM7 counter stopped when core is halted */
  336. #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
  337. #if defined(DBGMCU_APB1_FZ_DBG_TIM12_STOP)
  338. #define LL_DBGMCU_APB1_GRP1_TIM12_STOP DBGMCU_APB1_FZ_DBG_TIM12_STOP /*!< TIM12 counter stopped when core is halted */
  339. #endif /* DBGMCU_APB1_FZ_DBG_TIM12_STOP */
  340. #if defined(DBGMCU_APB1_FZ_DBG_TIM13_STOP)
  341. #define LL_DBGMCU_APB1_GRP1_TIM13_STOP DBGMCU_APB1_FZ_DBG_TIM13_STOP /*!< TIM13 counter stopped when core is halted */
  342. #endif /* DBGMCU_APB1_FZ_DBG_TIM13_STOP */
  343. #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
  344. #define LL_DBGMCU_APB1_GRP1_TIM14_STOP DBGMCU_APB1_FZ_DBG_TIM14_STOP /*!< TIM14 counter stopped when core is halted */
  345. #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
  346. #if defined(DBGMCU_APB1_FZ_DBG_LPTIM_STOP)
  347. #define LL_DBGMCU_APB1_GRP1_LPTIM_STOP DBGMCU_APB1_FZ_DBG_LPTIM_STOP /*!< LPTIM counter stopped when core is halted */
  348. #endif /* DBGMCU_APB1_FZ_DBG_LPTIM_STOP */
  349. #define LL_DBGMCU_APB1_GRP1_RTC_STOP DBGMCU_APB1_FZ_DBG_RTC_STOP /*!< RTC counter stopped when core is halted */
  350. #define LL_DBGMCU_APB1_GRP1_WWDG_STOP DBGMCU_APB1_FZ_DBG_WWDG_STOP /*!< Debug Window Watchdog stopped when Core is halted */
  351. #define LL_DBGMCU_APB1_GRP1_IWDG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP /*!< Debug Independent Watchdog stopped when Core is halted */
  352. #define LL_DBGMCU_APB1_GRP1_I2C1_STOP DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT /*!< I2C1 SMBUS timeout mode stopped when Core is halted */
  353. #define LL_DBGMCU_APB1_GRP1_I2C2_STOP DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT /*!< I2C2 SMBUS timeout mode stopped when Core is halted */
  354. #if defined(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)
  355. #define LL_DBGMCU_APB1_GRP1_I2C3_STOP DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT /*!< I2C3 SMBUS timeout mode stopped when Core is halted */
  356. #endif /* DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT */
  357. #if defined(DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT)
  358. #define LL_DBGMCU_APB1_GRP1_I2C4_STOP DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT /*!< I2C4 SMBUS timeout mode stopped when Core is halted */
  359. #endif /* DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT */
  360. #if defined(DBGMCU_APB1_FZ_DBG_CAN1_STOP)
  361. #define LL_DBGMCU_APB1_GRP1_CAN1_STOP DBGMCU_APB1_FZ_DBG_CAN1_STOP /*!< CAN1 debug stopped when Core is halted */
  362. #endif /* DBGMCU_APB1_FZ_DBG_CAN1_STOP */
  363. #if defined(DBGMCU_APB1_FZ_DBG_CAN2_STOP)
  364. #define LL_DBGMCU_APB1_GRP1_CAN2_STOP DBGMCU_APB1_FZ_DBG_CAN2_STOP /*!< CAN2 debug stopped when Core is halted */
  365. #endif /* DBGMCU_APB1_FZ_DBG_CAN2_STOP */
  366. #if defined(DBGMCU_APB1_FZ_DBG_CAN3_STOP)
  367. #define LL_DBGMCU_APB1_GRP1_CAN3_STOP DBGMCU_APB1_FZ_DBG_CAN3_STOP /*!< CAN3 debug stopped when Core is halted */
  368. #endif /* DBGMCU_APB1_FZ_DBG_CAN3_STOP */
  369. /**
  370. * @}
  371. */
  372. /** @defgroup SYSTEM_LL_EC_APB2_GRP1_STOP_IP DBGMCU APB2 GRP1 STOP IP
  373. * @{
  374. */
  375. #define LL_DBGMCU_APB2_GRP1_TIM1_STOP DBGMCU_APB2_FZ_DBG_TIM1_STOP /*!< TIM1 counter stopped when core is halted */
  376. #if defined(DBGMCU_APB2_FZ_DBG_TIM8_STOP)
  377. #define LL_DBGMCU_APB2_GRP1_TIM8_STOP DBGMCU_APB2_FZ_DBG_TIM8_STOP /*!< TIM8 counter stopped when core is halted */
  378. #endif /* DBGMCU_APB2_FZ_DBG_TIM8_STOP */
  379. #define LL_DBGMCU_APB2_GRP1_TIM9_STOP DBGMCU_APB2_FZ_DBG_TIM9_STOP /*!< TIM9 counter stopped when core is halted */
  380. #if defined(DBGMCU_APB2_FZ_DBG_TIM10_STOP)
  381. #define LL_DBGMCU_APB2_GRP1_TIM10_STOP DBGMCU_APB2_FZ_DBG_TIM10_STOP /*!< TIM10 counter stopped when core is halted */
  382. #endif /* DBGMCU_APB2_FZ_DBG_TIM10_STOP */
  383. #define LL_DBGMCU_APB2_GRP1_TIM11_STOP DBGMCU_APB2_FZ_DBG_TIM11_STOP /*!< TIM11 counter stopped when core is halted */
  384. /**
  385. * @}
  386. */
  387. /** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY
  388. * @{
  389. */
  390. #define LL_FLASH_LATENCY_0 FLASH_ACR_LATENCY_0WS /*!< FLASH Zero wait state */
  391. #define LL_FLASH_LATENCY_1 FLASH_ACR_LATENCY_1WS /*!< FLASH One wait state */
  392. #define LL_FLASH_LATENCY_2 FLASH_ACR_LATENCY_2WS /*!< FLASH Two wait states */
  393. #define LL_FLASH_LATENCY_3 FLASH_ACR_LATENCY_3WS /*!< FLASH Three wait states */
  394. #define LL_FLASH_LATENCY_4 FLASH_ACR_LATENCY_4WS /*!< FLASH Four wait states */
  395. #define LL_FLASH_LATENCY_5 FLASH_ACR_LATENCY_5WS /*!< FLASH five wait state */
  396. #define LL_FLASH_LATENCY_6 FLASH_ACR_LATENCY_6WS /*!< FLASH six wait state */
  397. #define LL_FLASH_LATENCY_7 FLASH_ACR_LATENCY_7WS /*!< FLASH seven wait states */
  398. #define LL_FLASH_LATENCY_8 FLASH_ACR_LATENCY_8WS /*!< FLASH eight wait states */
  399. #define LL_FLASH_LATENCY_9 FLASH_ACR_LATENCY_9WS /*!< FLASH nine wait states */
  400. #define LL_FLASH_LATENCY_10 FLASH_ACR_LATENCY_10WS /*!< FLASH ten wait states */
  401. #define LL_FLASH_LATENCY_11 FLASH_ACR_LATENCY_11WS /*!< FLASH eleven wait states */
  402. #define LL_FLASH_LATENCY_12 FLASH_ACR_LATENCY_12WS /*!< FLASH twelve wait states */
  403. #define LL_FLASH_LATENCY_13 FLASH_ACR_LATENCY_13WS /*!< FLASH thirteen wait states */
  404. #define LL_FLASH_LATENCY_14 FLASH_ACR_LATENCY_14WS /*!< FLASH fourteen wait states */
  405. #define LL_FLASH_LATENCY_15 FLASH_ACR_LATENCY_15WS /*!< FLASH fifteen wait states */
  406. /**
  407. * @}
  408. */
  409. /**
  410. * @}
  411. */
  412. /* Exported macro ------------------------------------------------------------*/
  413. /* Exported functions --------------------------------------------------------*/
  414. /** @defgroup SYSTEM_LL_Exported_Functions SYSTEM Exported Functions
  415. * @{
  416. */
  417. /** @defgroup SYSTEM_LL_EF_SYSCFG SYSCFG
  418. * @{
  419. */
  420. /**
  421. * @brief Set memory mapping at address 0x00000000
  422. * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_SetRemapMemory
  423. * @param Memory This parameter can be one of the following values:
  424. * @arg @ref LL_SYSCFG_REMAP_FLASH
  425. * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
  426. * @arg @ref LL_SYSCFG_REMAP_SRAM
  427. * @arg @ref LL_SYSCFG_REMAP_FSMC (*)
  428. * @arg @ref LL_SYSCFG_REMAP_FMC (*)
  429. * @retval None
  430. */
  431. __STATIC_INLINE void LL_SYSCFG_SetRemapMemory(uint32_t Memory)
  432. {
  433. MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, Memory);
  434. }
  435. /**
  436. * @brief Get memory mapping at address 0x00000000
  437. * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_GetRemapMemory
  438. * @retval Returned value can be one of the following values:
  439. * @arg @ref LL_SYSCFG_REMAP_FLASH
  440. * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
  441. * @arg @ref LL_SYSCFG_REMAP_SRAM
  442. * @arg @ref LL_SYSCFG_REMAP_FSMC (*)
  443. * @arg @ref LL_SYSCFG_REMAP_FMC (*)
  444. */
  445. __STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory(void)
  446. {
  447. return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE));
  448. }
  449. #if defined(SYSCFG_MEMRMP_SWP_FMC)
  450. /**
  451. * @brief Enables the FMC Memory Mapping Swapping
  452. * @rmtoll SYSCFG_MEMRMP SWP_FMC LL_SYSCFG_EnableFMCMemorySwapping
  453. * @note SDRAM is accessible at 0x60000000 and NOR/RAM
  454. * is accessible at 0xC0000000
  455. * @retval None
  456. */
  457. __STATIC_INLINE void LL_SYSCFG_EnableFMCMemorySwapping(void)
  458. {
  459. SET_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_SWP_FMC_0);
  460. }
  461. /**
  462. * @brief Disables the FMC Memory Mapping Swapping
  463. * @rmtoll SYSCFG_MEMRMP SWP_FMC LL_SYSCFG_DisableFMCMemorySwapping
  464. * @note SDRAM is accessible at 0xC0000000 (default mapping)
  465. * and NOR/RAM is accessible at 0x60000000 (default mapping)
  466. * @retval None
  467. */
  468. __STATIC_INLINE void LL_SYSCFG_DisableFMCMemorySwapping(void)
  469. {
  470. CLEAR_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_SWP_FMC);
  471. }
  472. #endif /* SYSCFG_MEMRMP_SWP_FMC */
  473. /**
  474. * @brief Enables the Compensation cell Power Down
  475. * @rmtoll SYSCFG_CMPCR CMP_PD LL_SYSCFG_EnableCompensationCell
  476. * @note The I/O compensation cell can be used only when the device supply
  477. * voltage ranges from 2.4 to 3.6 V
  478. * @retval None
  479. */
  480. __STATIC_INLINE void LL_SYSCFG_EnableCompensationCell(void)
  481. {
  482. SET_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_CMP_PD);
  483. }
  484. /**
  485. * @brief Disables the Compensation cell Power Down
  486. * @rmtoll SYSCFG_CMPCR CMP_PD LL_SYSCFG_DisableCompensationCell
  487. * @note The I/O compensation cell can be used only when the device supply
  488. * voltage ranges from 2.4 to 3.6 V
  489. * @retval None
  490. */
  491. __STATIC_INLINE void LL_SYSCFG_DisableCompensationCell(void)
  492. {
  493. CLEAR_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_CMP_PD);
  494. }
  495. /**
  496. * @brief Get Compensation Cell ready Flag
  497. * @rmtoll SYSCFG_CMPCR READY LL_SYSCFG_IsActiveFlag_CMPCR
  498. * @retval State of bit (1 or 0).
  499. */
  500. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CMPCR(void)
  501. {
  502. return (READ_BIT(SYSCFG->CMPCR, SYSCFG_CMPCR_READY) == (SYSCFG_CMPCR_READY));
  503. }
  504. #if defined(SYSCFG_PMC_MII_RMII_SEL)
  505. /**
  506. * @brief Select Ethernet PHY interface
  507. * @rmtoll SYSCFG_PMC MII_RMII_SEL LL_SYSCFG_SetPHYInterface
  508. * @param Interface This parameter can be one of the following values:
  509. * @arg @ref LL_SYSCFG_PMC_ETHMII
  510. * @arg @ref LL_SYSCFG_PMC_ETHRMII
  511. * @retval None
  512. */
  513. __STATIC_INLINE void LL_SYSCFG_SetPHYInterface(uint32_t Interface)
  514. {
  515. MODIFY_REG(SYSCFG->PMC, SYSCFG_PMC_MII_RMII_SEL, Interface);
  516. }
  517. /**
  518. * @brief Get Ethernet PHY interface
  519. * @rmtoll SYSCFG_PMC MII_RMII_SEL LL_SYSCFG_GetPHYInterface
  520. * @retval Returned value can be one of the following values:
  521. * @arg @ref LL_SYSCFG_PMC_ETHMII
  522. * @arg @ref LL_SYSCFG_PMC_ETHRMII
  523. * @retval None
  524. */
  525. __STATIC_INLINE uint32_t LL_SYSCFG_GetPHYInterface(void)
  526. {
  527. return (uint32_t)(READ_BIT(SYSCFG->PMC, SYSCFG_PMC_MII_RMII_SEL));
  528. }
  529. #endif /* SYSCFG_PMC_MII_RMII_SEL */
  530. #if defined(SYSCFG_MEMRMP_UFB_MODE)
  531. /**
  532. * @brief Select Flash bank mode (Bank flashed at 0x08000000)
  533. * @rmtoll SYSCFG_MEMRMP UFB_MODE LL_SYSCFG_SetFlashBankMode
  534. * @param Bank This parameter can be one of the following values:
  535. * @arg @ref LL_SYSCFG_BANKMODE_BANK1
  536. * @arg @ref LL_SYSCFG_BANKMODE_BANK2
  537. * @retval None
  538. */
  539. __STATIC_INLINE void LL_SYSCFG_SetFlashBankMode(uint32_t Bank)
  540. {
  541. MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_UFB_MODE, Bank);
  542. }
  543. /**
  544. * @brief Get Flash bank mode (Bank flashed at 0x08000000)
  545. * @rmtoll SYSCFG_MEMRMP UFB_MODE LL_SYSCFG_GetFlashBankMode
  546. * @retval Returned value can be one of the following values:
  547. * @arg @ref LL_SYSCFG_BANKMODE_BANK1
  548. * @arg @ref LL_SYSCFG_BANKMODE_BANK2
  549. */
  550. __STATIC_INLINE uint32_t LL_SYSCFG_GetFlashBankMode(void)
  551. {
  552. return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_UFB_MODE));
  553. }
  554. #endif /* SYSCFG_MEMRMP_UFB_MODE */
  555. #if defined(SYSCFG_CFGR_FMPI2C1_SCL)
  556. /**
  557. * @brief Enable the I2C fast mode plus driving capability.
  558. * @rmtoll SYSCFG_CFGR FMPI2C1_SCL LL_SYSCFG_EnableFastModePlus\n
  559. * SYSCFG_CFGR FMPI2C1_SDA LL_SYSCFG_EnableFastModePlus
  560. * @param ConfigFastModePlus This parameter can be a combination of the following values:
  561. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SCL
  562. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SDA
  563. * (*) value not defined in all devices
  564. * @retval None
  565. */
  566. __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus)
  567. {
  568. SET_BIT(SYSCFG->CFGR, ConfigFastModePlus);
  569. }
  570. /**
  571. * @brief Disable the I2C fast mode plus driving capability.
  572. * @rmtoll SYSCFG_CFGR FMPI2C1_SCL LL_SYSCFG_DisableFastModePlus\n
  573. * SYSCFG_CFGR FMPI2C1_SDA LL_SYSCFG_DisableFastModePlus\n
  574. * @param ConfigFastModePlus This parameter can be a combination of the following values:
  575. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SCL
  576. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_SDA
  577. * (*) value not defined in all devices
  578. * @retval None
  579. */
  580. __STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus)
  581. {
  582. CLEAR_BIT(SYSCFG->CFGR, ConfigFastModePlus);
  583. }
  584. #endif /* SYSCFG_CFGR_FMPI2C1_SCL */
  585. /**
  586. * @brief Configure source input for the EXTI external interrupt.
  587. * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_SetEXTISource\n
  588. * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_SetEXTISource\n
  589. * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_SetEXTISource\n
  590. * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_SetEXTISource
  591. * @param Port This parameter can be one of the following values:
  592. * @arg @ref LL_SYSCFG_EXTI_PORTA
  593. * @arg @ref LL_SYSCFG_EXTI_PORTB
  594. * @arg @ref LL_SYSCFG_EXTI_PORTC
  595. * @arg @ref LL_SYSCFG_EXTI_PORTD
  596. * @arg @ref LL_SYSCFG_EXTI_PORTE
  597. * @arg @ref LL_SYSCFG_EXTI_PORTF (*)
  598. * @arg @ref LL_SYSCFG_EXTI_PORTG (*)
  599. * @arg @ref LL_SYSCFG_EXTI_PORTH
  600. *
  601. * (*) value not defined in all devices
  602. * @param Line This parameter can be one of the following values:
  603. * @arg @ref LL_SYSCFG_EXTI_LINE0
  604. * @arg @ref LL_SYSCFG_EXTI_LINE1
  605. * @arg @ref LL_SYSCFG_EXTI_LINE2
  606. * @arg @ref LL_SYSCFG_EXTI_LINE3
  607. * @arg @ref LL_SYSCFG_EXTI_LINE4
  608. * @arg @ref LL_SYSCFG_EXTI_LINE5
  609. * @arg @ref LL_SYSCFG_EXTI_LINE6
  610. * @arg @ref LL_SYSCFG_EXTI_LINE7
  611. * @arg @ref LL_SYSCFG_EXTI_LINE8
  612. * @arg @ref LL_SYSCFG_EXTI_LINE9
  613. * @arg @ref LL_SYSCFG_EXTI_LINE10
  614. * @arg @ref LL_SYSCFG_EXTI_LINE11
  615. * @arg @ref LL_SYSCFG_EXTI_LINE12
  616. * @arg @ref LL_SYSCFG_EXTI_LINE13
  617. * @arg @ref LL_SYSCFG_EXTI_LINE14
  618. * @arg @ref LL_SYSCFG_EXTI_LINE15
  619. * @retval None
  620. */
  621. __STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line)
  622. {
  623. MODIFY_REG(SYSCFG->EXTICR[Line & 0xFF], (Line >> 16), Port << POSITION_VAL((Line >> 16)));
  624. }
  625. /**
  626. * @brief Get the configured defined for specific EXTI Line
  627. * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_GetEXTISource\n
  628. * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_GetEXTISource\n
  629. * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_GetEXTISource\n
  630. * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_GetEXTISource
  631. * @param Line This parameter can be one of the following values:
  632. * @arg @ref LL_SYSCFG_EXTI_LINE0
  633. * @arg @ref LL_SYSCFG_EXTI_LINE1
  634. * @arg @ref LL_SYSCFG_EXTI_LINE2
  635. * @arg @ref LL_SYSCFG_EXTI_LINE3
  636. * @arg @ref LL_SYSCFG_EXTI_LINE4
  637. * @arg @ref LL_SYSCFG_EXTI_LINE5
  638. * @arg @ref LL_SYSCFG_EXTI_LINE6
  639. * @arg @ref LL_SYSCFG_EXTI_LINE7
  640. * @arg @ref LL_SYSCFG_EXTI_LINE8
  641. * @arg @ref LL_SYSCFG_EXTI_LINE9
  642. * @arg @ref LL_SYSCFG_EXTI_LINE10
  643. * @arg @ref LL_SYSCFG_EXTI_LINE11
  644. * @arg @ref LL_SYSCFG_EXTI_LINE12
  645. * @arg @ref LL_SYSCFG_EXTI_LINE13
  646. * @arg @ref LL_SYSCFG_EXTI_LINE14
  647. * @arg @ref LL_SYSCFG_EXTI_LINE15
  648. * @retval Returned value can be one of the following values:
  649. * @arg @ref LL_SYSCFG_EXTI_PORTA
  650. * @arg @ref LL_SYSCFG_EXTI_PORTB
  651. * @arg @ref LL_SYSCFG_EXTI_PORTC
  652. * @arg @ref LL_SYSCFG_EXTI_PORTD
  653. * @arg @ref LL_SYSCFG_EXTI_PORTE
  654. * @arg @ref LL_SYSCFG_EXTI_PORTF (*)
  655. * @arg @ref LL_SYSCFG_EXTI_PORTG (*)
  656. * @arg @ref LL_SYSCFG_EXTI_PORTH
  657. * (*) value not defined in all devices
  658. */
  659. __STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line)
  660. {
  661. return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0xFF], (Line >> 16)) >> POSITION_VAL(Line >> 16));
  662. }
  663. #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
  664. /**
  665. * @brief Set connections to TIM1/8 break inputs
  666. * @rmtoll SYSCFG_CFGR2 LockUp Lock LL_SYSCFG_SetTIMBreakInputs \n
  667. * SYSCFG_CFGR2 PVD Lock LL_SYSCFG_SetTIMBreakInputs
  668. * @param Break This parameter can be a combination of the following values:
  669. * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
  670. * @arg @ref LL_SYSCFG_TIMBREAK_PVD
  671. * @retval None
  672. */
  673. __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break)
  674. {
  675. MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_LOCKUP_LOCK | SYSCFG_CFGR2_PVD_LOCK, Break);
  676. }
  677. /**
  678. * @brief Get connections to TIM1/8 Break inputs
  679. * @rmtoll SYSCFG_CFGR2 LockUp Lock LL_SYSCFG_SetTIMBreakInputs \n
  680. * SYSCFG_CFGR2 PVD Lock LL_SYSCFG_SetTIMBreakInputs
  681. * @retval Returned value can be can be a combination of the following values:
  682. * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
  683. * @arg @ref LL_SYSCFG_TIMBREAK_PVD
  684. */
  685. __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void)
  686. {
  687. return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_LOCKUP_LOCK | SYSCFG_CFGR2_PVD_LOCK));
  688. }
  689. #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
  690. #if defined(SYSCFG_MCHDLYCR_BSCKSEL)
  691. /**
  692. * @brief Select the DFSDM2 or TIM2_OC1 as clock source for the bitstream clock.
  693. * @rmtoll SYSCFG_MCHDLYCR BSCKSEL LL_SYSCFG_DFSDM_SetBitstreamClockSourceSelection
  694. * @param ClockSource This parameter can be one of the following values:
  695. * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2
  696. * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1
  697. * @retval None
  698. */
  699. __STATIC_INLINE void LL_SYSCFG_DFSDM_SetBitstreamClockSourceSelection(uint32_t ClockSource)
  700. {
  701. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_BSCKSEL, ClockSource);
  702. }
  703. /**
  704. * @brief Get the DFSDM2 or TIM2_OC1 as clock source for the bitstream clock.
  705. * @rmtoll SYSCFG_MCHDLYCR BSCKSEL LL_SYSCFG_DFSDM_GetBitstreamClockSourceSelection
  706. * @retval Returned value can be one of the following values:
  707. * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_DFSDM2
  708. * @arg @ref LL_SYSCFG_BITSTREAM_CLOCK_TIM2OC1
  709. * @retval None
  710. */
  711. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetBitstreamClockSourceSelection(void)
  712. {
  713. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_BSCKSEL));
  714. }
  715. /**
  716. * @brief Enables the DFSDM1 or DFSDM2 Delay clock
  717. * @rmtoll SYSCFG_MCHDLYCR MCHDLYEN LL_SYSCFG_DFSDM_EnableDelayClock
  718. * @param MCHDLY This paramater can be one of the following values
  719. * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN
  720. * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN
  721. * @retval None
  722. */
  723. __STATIC_INLINE void LL_SYSCFG_DFSDM_EnableDelayClock(uint32_t MCHDLY)
  724. {
  725. SET_BIT(SYSCFG->MCHDLYCR, MCHDLY);
  726. }
  727. /**
  728. * @brief Disables the DFSDM1 or the DFSDM2 Delay clock
  729. * @rmtoll SYSCFG_MCHDLYCR MCHDLY1EN LL_SYSCFG_DFSDM1_DisableDelayClock
  730. * @param MCHDLY This paramater can be one of the following values
  731. * @arg @ref LL_SYSCFG_DFSDM1_MCHDLYEN
  732. * @arg @ref LL_SYSCFG_DFSDM2_MCHDLYEN
  733. * @retval None
  734. */
  735. __STATIC_INLINE void LL_SYSCFG_DFSDM_DisableDelayClock(uint32_t MCHDLY)
  736. {
  737. CLEAR_BIT(SYSCFG->MCHDLYCR, MCHDLY);
  738. }
  739. /**
  740. * @brief Select the source for DFSDM1 or DFSDM2 DatIn0
  741. * @rmtoll SYSCFG_MCHDLYCR DFSDMD0SEL LL_SYSCFG_DFSDM_SetDataIn0Source
  742. * @param Source This parameter can be one of the following values:
  743. * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_PAD
  744. * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_DM
  745. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD
  746. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM
  747. * @retval None
  748. */
  749. __STATIC_INLINE void LL_SYSCFG_DFSDM_SetDataIn0Source(uint32_t Source)
  750. {
  751. MODIFY_REG(SYSCFG->MCHDLYCR, (Source >> 16), (Source & 0x0000FFFF));
  752. }
  753. /**
  754. * @brief Get the source for DFSDM1 or DFSDM2 DatIn0.
  755. * @rmtoll SYSCFG_MCHDLYCR DFSDMD0SEL LL_SYSCFG_DFSDM_GetDataIn0Source
  756. * @param Source This parameter can be one of the following values:
  757. * @arg @ref LL_SYSCFG_DFSDM1_DataIn0
  758. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0
  759. * @retval Returned value can be one of the following values:
  760. * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_PAD
  761. * @arg @ref LL_SYSCFG_DFSDM1_DataIn0_DM
  762. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD
  763. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM
  764. * @retval None
  765. */
  766. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetDataIn0Source(uint32_t Source)
  767. {
  768. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, Source));
  769. }
  770. /**
  771. * @brief Select the source for DFSDM1 or DFSDM2 DatIn2
  772. * @rmtoll SYSCFG_MCHDLYCR DFSDMD2SEL LL_SYSCFG_DFSDM_SetDataIn2Source
  773. * @param Source This parameter can be one of the following values:
  774. * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_PAD
  775. * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_DM
  776. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD
  777. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM
  778. * @retval None
  779. */
  780. __STATIC_INLINE void LL_SYSCFG_DFSDM_SetDataIn2Source(uint32_t Source)
  781. {
  782. MODIFY_REG(SYSCFG->MCHDLYCR, (Source >> 16), (Source & 0x0000FFFF));
  783. }
  784. /**
  785. * @brief Get the source for DFSDM1 or DFSDM2 DatIn2.
  786. * @rmtoll SYSCFG_MCHDLYCR DFSDMD2SEL LL_SYSCFG_DFSDM_GetDataIn2Source
  787. * @param Source This parameter can be one of the following values:
  788. * @arg @ref LL_SYSCFG_DFSDM1_DataIn2
  789. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2
  790. * @retval Returned value can be one of the following values:
  791. * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_PAD
  792. * @arg @ref LL_SYSCFG_DFSDM1_DataIn2_DM
  793. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD
  794. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM
  795. * @retval None
  796. */
  797. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM_GetDataIn2Source(uint32_t Source)
  798. {
  799. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, Source));
  800. }
  801. /**
  802. * @brief Select the distribution of the bitsream lock gated by TIM4 OC2
  803. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CK02SEL LL_SYSCFG_DFSDM1_SetTIM4OC2BitStreamDistribution
  804. * @param Source This parameter can be one of the following values:
  805. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0
  806. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2
  807. * @retval None
  808. */
  809. __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetTIM4OC2BitStreamDistribution(uint32_t Source)
  810. {
  811. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK02SEL, Source);
  812. }
  813. /**
  814. * @brief Get the distribution of the bitsream lock gated by TIM4 OC2
  815. * @rmtoll SYSCFG_MCHDLYCR DFSDM1D2SEL LL_SYSCFG_DFSDM1_GetTIM4OC2BitStreamDistribution
  816. * @retval Returned value can be one of the following values:
  817. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN0
  818. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC2_CLKIN2
  819. * @retval None
  820. */
  821. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetTIM4OC2BitStreamDistribution(void)
  822. {
  823. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK02SEL));
  824. }
  825. /**
  826. * @brief Select the distribution of the bitsream lock gated by TIM4 OC1
  827. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CK13SEL LL_SYSCFG_DFSDM1_SetTIM4OC1BitStreamDistribution
  828. * @param Source This parameter can be one of the following values:
  829. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1
  830. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3
  831. * @retval None
  832. */
  833. __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetTIM4OC1BitStreamDistribution(uint32_t Source)
  834. {
  835. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK13SEL, Source);
  836. }
  837. /**
  838. * @brief Get the distribution of the bitsream lock gated by TIM4 OC1
  839. * @rmtoll SYSCFG_MCHDLYCR DFSDM1D2SEL LL_SYSCFG_DFSDM1_GetTIM4OC1BitStreamDistribution
  840. * @retval Returned value can be one of the following values:
  841. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN1
  842. * @arg @ref LL_SYSCFG_DFSDM1_TIM4OC1_CLKIN3
  843. * @retval None
  844. */
  845. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetTIM4OC1BitStreamDistribution(void)
  846. {
  847. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CK13SEL));
  848. }
  849. /**
  850. * @brief Select the DFSDM1 Clock In
  851. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CFG LL_SYSCFG_DFSDM1_SetClockInSourceSelection
  852. * @param ClockSource This parameter can be one of the following values:
  853. * @arg @ref LL_SYSCFG_DFSDM1_CKIN_PAD
  854. * @arg @ref LL_SYSCFG_DFSDM1_CKIN_DM
  855. * @retval None
  856. */
  857. __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetClockInSourceSelection(uint32_t ClockSource)
  858. {
  859. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CFG, ClockSource);
  860. }
  861. /**
  862. * @brief GET the DFSDM1 Clock In
  863. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CFG LL_SYSCFG_DFSDM1_GetClockInSourceSelection
  864. * @retval Returned value can be one of the following values:
  865. * @arg @ref LL_SYSCFG_DFSDM1_CKIN_PAD
  866. * @arg @ref LL_SYSCFG_DFSDM1_CKIN_DM
  867. * @retval None
  868. */
  869. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetClockInSourceSelection(void)
  870. {
  871. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CFG));
  872. }
  873. /**
  874. * @brief Select the DFSDM1 Clock Out
  875. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CKOSEL LL_SYSCFG_DFSDM1_SetClockOutSourceSelection
  876. * @param ClockSource This parameter can be one of the following values:
  877. * @arg @ref LL_SYSCFG_DFSDM1_CKOUT
  878. * @arg @ref LL_SYSCFG_DFSDM1_CKOUT_M27
  879. * @retval None
  880. */
  881. __STATIC_INLINE void LL_SYSCFG_DFSDM1_SetClockOutSourceSelection(uint32_t ClockSource)
  882. {
  883. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CKOSEL, ClockSource);
  884. }
  885. /**
  886. * @brief GET the DFSDM1 Clock Out
  887. * @rmtoll SYSCFG_MCHDLYCR DFSDM1CKOSEL LL_SYSCFG_DFSDM1_GetClockOutSourceSelection
  888. * @retval Returned value can be one of the following values:
  889. * @arg @ref LL_SYSCFG_DFSDM1_CKOUT
  890. * @arg @ref LL_SYSCFG_DFSDM1_CKOUT_M27
  891. * @retval None
  892. */
  893. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM1_GetClockOutSourceSelection(void)
  894. {
  895. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM1CKOSEL));
  896. }
  897. /**
  898. * @brief Enables the DFSDM2 Delay clock
  899. * @rmtoll SYSCFG_MCHDLYCR MCHDLY2EN LL_SYSCFG_DFSDM2_EnableDelayClock
  900. * @retval None
  901. */
  902. __STATIC_INLINE void LL_SYSCFG_DFSDM2_EnableDelayClock(void)
  903. {
  904. SET_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_MCHDLY2EN);
  905. }
  906. /**
  907. * @brief Disables the DFSDM2 Delay clock
  908. * @rmtoll SYSCFG_MCHDLYCR MCHDLY2EN LL_SYSCFG_DFSDM2_DisableDelayClock
  909. * @retval None
  910. */
  911. __STATIC_INLINE void LL_SYSCFG_DFSDM2_DisableDelayClock(void)
  912. {
  913. CLEAR_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_MCHDLY2EN);
  914. }
  915. /**
  916. * @brief Select the source for DFSDM2 DatIn0
  917. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D0SEL LL_SYSCFG_DFSDM2_SetDataIn0Source
  918. * @param Source This parameter can be one of the following values:
  919. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD
  920. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM
  921. * @retval None
  922. */
  923. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn0Source(uint32_t Source)
  924. {
  925. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D0SEL, Source);
  926. }
  927. /**
  928. * @brief Get the source for DFSDM2 DatIn0.
  929. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D0SEL LL_SYSCFG_DFSDM2_GetDataIn0Source
  930. * @retval Returned value can be one of the following values:
  931. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_PAD
  932. * @arg @ref LL_SYSCFG_DFSDM2_DataIn0_DM
  933. * @retval None
  934. */
  935. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn0Source(void)
  936. {
  937. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D0SEL));
  938. }
  939. /**
  940. * @brief Select the source for DFSDM2 DatIn2
  941. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D2SEL LL_SYSCFG_DFSDM2_SetDataIn2Source
  942. * @param Source This parameter can be one of the following values:
  943. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD
  944. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM
  945. * @retval None
  946. */
  947. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn2Source(uint32_t Source)
  948. {
  949. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D2SEL, Source);
  950. }
  951. /**
  952. * @brief Get the source for DFSDM2 DatIn2.
  953. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D2SEL LL_SYSCFG_DFSDM2_GetDataIn2Source
  954. * @retval Returned value can be one of the following values:
  955. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_PAD
  956. * @arg @ref LL_SYSCFG_DFSDM2_DataIn2_DM
  957. * @retval None
  958. */
  959. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn2Source(void)
  960. {
  961. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D2SEL));
  962. }
  963. /**
  964. * @brief Select the source for DFSDM2 DatIn4
  965. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D4SEL LL_SYSCFG_DFSDM2_SetDataIn4Source
  966. * @param Source This parameter can be one of the following values:
  967. * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_PAD
  968. * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_DM
  969. * @retval None
  970. */
  971. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn4Source(uint32_t Source)
  972. {
  973. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D4SEL, Source);
  974. }
  975. /**
  976. * @brief Get the source for DFSDM2 DatIn4.
  977. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D4SEL LL_SYSCFG_DFSDM2_GetDataIn4Source
  978. * @retval Returned value can be one of the following values:
  979. * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_PAD
  980. * @arg @ref LL_SYSCFG_DFSDM2_DataIn4_DM
  981. * @retval None
  982. */
  983. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn4Source(void)
  984. {
  985. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D4SEL));
  986. }
  987. /**
  988. * @brief Select the source for DFSDM2 DatIn6
  989. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D6SEL LL_SYSCFG_DFSDM2_SetDataIn6Source
  990. * @param Source This parameter can be one of the following values:
  991. * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_PAD
  992. * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_DM
  993. * @retval None
  994. */
  995. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetDataIn6Source(uint32_t Source)
  996. {
  997. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D6SEL, Source);
  998. }
  999. /**
  1000. * @brief Get the source for DFSDM2 DatIn6.
  1001. * @rmtoll SYSCFG_MCHDLYCR DFSDM2D6SEL LL_SYSCFG_DFSDM2_GetDataIn6Source
  1002. * @retval Returned value can be one of the following values:
  1003. * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_PAD
  1004. * @arg @ref LL_SYSCFG_DFSDM2_DataIn6_DM
  1005. * @retval None
  1006. */
  1007. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetDataIn6Source(void)
  1008. {
  1009. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2D6SEL));
  1010. }
  1011. /**
  1012. * @brief Select the distribution of the bitsream lock gated by TIM3 OC4
  1013. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_SetTIM3OC4BitStreamDistribution
  1014. * @param Source This parameter can be one of the following values:
  1015. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0
  1016. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4
  1017. * @retval None
  1018. */
  1019. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC4BitStreamDistribution(uint32_t Source)
  1020. {
  1021. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK04SEL, Source);
  1022. }
  1023. /**
  1024. * @brief Get the distribution of the bitsream lock gated by TIM3 OC4
  1025. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC4BitStreamDistribution
  1026. * @retval Returned value can be one of the following values:
  1027. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN0
  1028. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC4_CLKIN4
  1029. * @retval None
  1030. */
  1031. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC4BitStreamDistribution(void)
  1032. {
  1033. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK04SEL));
  1034. }
  1035. /**
  1036. * @brief Select the distribution of the bitsream lock gated by TIM3 OC3
  1037. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK15SEL LL_SYSCFG_DFSDM2_SetTIM3OC3BitStreamDistribution
  1038. * @param Source This parameter can be one of the following values:
  1039. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1
  1040. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5
  1041. * @retval None
  1042. */
  1043. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC3BitStreamDistribution(uint32_t Source)
  1044. {
  1045. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK15SEL, Source);
  1046. }
  1047. /**
  1048. * @brief Get the distribution of the bitsream lock gated by TIM3 OC4
  1049. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC3BitStreamDistribution
  1050. * @retval Returned value can be one of the following values:
  1051. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN1
  1052. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC3_CLKIN5
  1053. * @retval None
  1054. */
  1055. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC3BitStreamDistribution(void)
  1056. {
  1057. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK15SEL));
  1058. }
  1059. /**
  1060. * @brief Select the distribution of the bitsream lock gated by TIM3 OC2
  1061. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK26SEL LL_SYSCFG_DFSDM2_SetTIM3OC2BitStreamDistribution
  1062. * @param Source This parameter can be one of the following values:
  1063. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2
  1064. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6
  1065. * @retval None
  1066. */
  1067. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC2BitStreamDistribution(uint32_t Source)
  1068. {
  1069. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK26SEL, Source);
  1070. }
  1071. /**
  1072. * @brief Get the distribution of the bitsream lock gated by TIM3 OC2
  1073. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK04SEL LL_SYSCFG_DFSDM2_GetTIM3OC2BitStreamDistribution
  1074. * @retval Returned value can be one of the following values:
  1075. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN2
  1076. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC2_CLKIN6
  1077. * @retval None
  1078. */
  1079. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC2BitStreamDistribution(void)
  1080. {
  1081. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK26SEL));
  1082. }
  1083. /**
  1084. * @brief Select the distribution of the bitsream lock gated by TIM3 OC1
  1085. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK37SEL LL_SYSCFG_DFSDM2_SetTIM3OC1BitStreamDistribution
  1086. * @param Source This parameter can be one of the following values:
  1087. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3
  1088. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7
  1089. * @retval None
  1090. */
  1091. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetTIM3OC1BitStreamDistribution(uint32_t Source)
  1092. {
  1093. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK37SEL, Source);
  1094. }
  1095. /**
  1096. * @brief Get the distribution of the bitsream lock gated by TIM3 OC1
  1097. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CK37SEL LL_SYSCFG_DFSDM2_GetTIM3OC1BitStreamDistribution
  1098. * @retval Returned value can be one of the following values:
  1099. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN3
  1100. * @arg @ref LL_SYSCFG_DFSDM2_TIM3OC1_CLKIN7
  1101. * @retval None
  1102. */
  1103. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetTIM3OC1BitStreamDistribution(void)
  1104. {
  1105. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CK37SEL));
  1106. }
  1107. /**
  1108. * @brief Select the DFSDM2 Clock In
  1109. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CFG LL_SYSCFG_DFSDM2_SetClockInSourceSelection
  1110. * @param ClockSource This parameter can be one of the following values:
  1111. * @arg @ref LL_SYSCFG_DFSDM2_CKIN_PAD
  1112. * @arg @ref LL_SYSCFG_DFSDM2_CKIN_DM
  1113. * @retval None
  1114. */
  1115. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetClockInSourceSelection(uint32_t ClockSource)
  1116. {
  1117. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CFG, ClockSource);
  1118. }
  1119. /**
  1120. * @brief GET the DFSDM2 Clock In
  1121. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CFG LL_SYSCFG_DFSDM2_GetClockInSourceSelection
  1122. * @retval Returned value can be one of the following values:
  1123. * @arg @ref LL_SYSCFG_DFSDM2_CKIN_PAD
  1124. * @arg @ref LL_SYSCFG_DFSDM2_CKIN_DM
  1125. * @retval None
  1126. */
  1127. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetClockInSourceSelection(void)
  1128. {
  1129. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CFG));
  1130. }
  1131. /**
  1132. * @brief Select the DFSDM2 Clock Out
  1133. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CKOSEL LL_SYSCFG_DFSDM2_SetClockOutSourceSelection
  1134. * @param ClockSource This parameter can be one of the following values:
  1135. * @arg @ref LL_SYSCFG_DFSDM2_CKOUT
  1136. * @arg @ref LL_SYSCFG_DFSDM2_CKOUT_M27
  1137. * @retval None
  1138. */
  1139. __STATIC_INLINE void LL_SYSCFG_DFSDM2_SetClockOutSourceSelection(uint32_t ClockSource)
  1140. {
  1141. MODIFY_REG(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CKOSEL, ClockSource);
  1142. }
  1143. /**
  1144. * @brief GET the DFSDM2 Clock Out
  1145. * @rmtoll SYSCFG_MCHDLYCR DFSDM2CKOSEL LL_SYSCFG_DFSDM2_GetClockOutSourceSelection
  1146. * @retval Returned value can be one of the following values:
  1147. * @arg @ref LL_SYSCFG_DFSDM2_CKOUT
  1148. * @arg @ref LL_SYSCFG_DFSDM2_CKOUT_M27
  1149. * @retval None
  1150. */
  1151. __STATIC_INLINE uint32_t LL_SYSCFG_DFSDM2_GetClockOutSourceSelection(void)
  1152. {
  1153. return (uint32_t)(READ_BIT(SYSCFG->MCHDLYCR, SYSCFG_MCHDLYCR_DFSDM2CKOSEL));
  1154. }
  1155. #endif /* SYSCFG_MCHDLYCR_BSCKSEL */
  1156. /**
  1157. * @}
  1158. */
  1159. /** @defgroup SYSTEM_LL_EF_DBGMCU DBGMCU
  1160. * @{
  1161. */
  1162. /**
  1163. * @brief Return the device identifier
  1164. * @note For STM32F405/407xx and STM32F415/417xx devices, the device ID is 0x413
  1165. * @note For STM32F42xxx and STM32F43xxx devices, the device ID is 0x419
  1166. * @note For STM32F401xx devices, the device ID is 0x423
  1167. * @note For STM32F401xx devices, the device ID is 0x433
  1168. * @note For STM32F411xx devices, the device ID is 0x431
  1169. * @note For STM32F410xx devices, the device ID is 0x458
  1170. * @note For STM32F412xx devices, the device ID is 0x441
  1171. * @note For STM32F413xx and STM32423xx devices, the device ID is 0x463
  1172. * @note For STM32F446xx devices, the device ID is 0x421
  1173. * @note For STM32F469xx and STM32F479xx devices, the device ID is 0x434
  1174. * @rmtoll DBGMCU_IDCODE DEV_ID LL_DBGMCU_GetDeviceID
  1175. * @retval Values between Min_Data=0x00 and Max_Data=0xFFF
  1176. */
  1177. __STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void)
  1178. {
  1179. return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID));
  1180. }
  1181. /**
  1182. * @brief Return the device revision identifier
  1183. * @note This field indicates the revision of the device.
  1184. For example, it is read as RevA -> 0x1000, Cat 2 revZ -> 0x1001, rev1 -> 0x1003, rev2 ->0x1007, revY -> 0x100F for STM32F405/407xx and STM32F415/417xx devices
  1185. For example, it is read as RevA -> 0x1000, Cat 2 revY -> 0x1003, rev1 -> 0x1007, rev3 ->0x2001 for STM32F42xxx and STM32F43xxx devices
  1186. For example, it is read as RevZ -> 0x1000, Cat 2 revA -> 0x1001 for STM32F401xB/C devices
  1187. For example, it is read as RevA -> 0x1000, Cat 2 revZ -> 0x1001 for STM32F401xD/E devices
  1188. For example, it is read as RevA -> 0x1000 for STM32F411xx,STM32F413/423xx,STM32F469/423xx, STM32F446xx and STM32F410xx devices
  1189. For example, it is read as RevZ -> 0x1001, Cat 2 revB -> 0x2000, revC -> 0x3000 for STM32F412xx devices
  1190. * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID
  1191. * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF
  1192. */
  1193. __STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void)
  1194. {
  1195. return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos);
  1196. }
  1197. /**
  1198. * @brief Enable the Debug Module during SLEEP mode
  1199. * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_EnableDBGSleepMode
  1200. * @retval None
  1201. */
  1202. __STATIC_INLINE void LL_DBGMCU_EnableDBGSleepMode(void)
  1203. {
  1204. SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
  1205. }
  1206. /**
  1207. * @brief Disable the Debug Module during SLEEP mode
  1208. * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_DisableDBGSleepMode
  1209. * @retval None
  1210. */
  1211. __STATIC_INLINE void LL_DBGMCU_DisableDBGSleepMode(void)
  1212. {
  1213. CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
  1214. }
  1215. /**
  1216. * @brief Enable the Debug Module during STOP mode
  1217. * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_EnableDBGStopMode
  1218. * @retval None
  1219. */
  1220. __STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode(void)
  1221. {
  1222. SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
  1223. }
  1224. /**
  1225. * @brief Disable the Debug Module during STOP mode
  1226. * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_DisableDBGStopMode
  1227. * @retval None
  1228. */
  1229. __STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode(void)
  1230. {
  1231. CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
  1232. }
  1233. /**
  1234. * @brief Enable the Debug Module during STANDBY mode
  1235. * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_EnableDBGStandbyMode
  1236. * @retval None
  1237. */
  1238. __STATIC_INLINE void LL_DBGMCU_EnableDBGStandbyMode(void)
  1239. {
  1240. SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
  1241. }
  1242. /**
  1243. * @brief Disable the Debug Module during STANDBY mode
  1244. * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_DisableDBGStandbyMode
  1245. * @retval None
  1246. */
  1247. __STATIC_INLINE void LL_DBGMCU_DisableDBGStandbyMode(void)
  1248. {
  1249. CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
  1250. }
  1251. /**
  1252. * @brief Set Trace pin assignment control
  1253. * @rmtoll DBGMCU_CR TRACE_IOEN LL_DBGMCU_SetTracePinAssignment\n
  1254. * DBGMCU_CR TRACE_MODE LL_DBGMCU_SetTracePinAssignment
  1255. * @param PinAssignment This parameter can be one of the following values:
  1256. * @arg @ref LL_DBGMCU_TRACE_NONE
  1257. * @arg @ref LL_DBGMCU_TRACE_ASYNCH
  1258. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1
  1259. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2
  1260. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4
  1261. * @retval None
  1262. */
  1263. __STATIC_INLINE void LL_DBGMCU_SetTracePinAssignment(uint32_t PinAssignment)
  1264. {
  1265. MODIFY_REG(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE, PinAssignment);
  1266. }
  1267. /**
  1268. * @brief Get Trace pin assignment control
  1269. * @rmtoll DBGMCU_CR TRACE_IOEN LL_DBGMCU_GetTracePinAssignment\n
  1270. * DBGMCU_CR TRACE_MODE LL_DBGMCU_GetTracePinAssignment
  1271. * @retval Returned value can be one of the following values:
  1272. * @arg @ref LL_DBGMCU_TRACE_NONE
  1273. * @arg @ref LL_DBGMCU_TRACE_ASYNCH
  1274. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE1
  1275. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE2
  1276. * @arg @ref LL_DBGMCU_TRACE_SYNCH_SIZE4
  1277. */
  1278. __STATIC_INLINE uint32_t LL_DBGMCU_GetTracePinAssignment(void)
  1279. {
  1280. return (uint32_t)(READ_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE));
  1281. }
  1282. /**
  1283. * @brief Freeze APB1 peripherals (group1 peripherals)
  1284. * @rmtoll DBGMCU_APB1_FZ DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1285. * DBGMCU_APB1_FZ DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1286. * DBGMCU_APB1_FZ DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1287. * DBGMCU_APB1_FZ DBG_TIM5_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1288. * DBGMCU_APB1_FZ DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1289. * DBGMCU_APB1_FZ DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1290. * DBGMCU_APB1_FZ DBG_TIM12_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1291. * DBGMCU_APB1_FZ DBG_TIM13_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1292. * DBGMCU_APB1_FZ DBG_TIM14_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1293. * DBGMCU_APB1_FZ DBG_LPTIM_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1294. * DBGMCU_APB1_FZ DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1295. * DBGMCU_APB1_FZ DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1296. * DBGMCU_APB1_FZ DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1297. * DBGMCU_APB1_FZ DBG_I2C1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1298. * DBGMCU_APB1_FZ DBG_I2C2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1299. * DBGMCU_APB1_FZ DBG_I2C3_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1300. * DBGMCU_APB1_FZ DBG_I2C4_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1301. * DBGMCU_APB1_FZ DBG_CAN1_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1302. * DBGMCU_APB1_FZ DBG_CAN2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1303. * DBGMCU_APB1_FZ DBG_CAN3_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph
  1304. * @param Periphs This parameter can be a combination of the following values:
  1305. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
  1306. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*)
  1307. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
  1308. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP
  1309. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
  1310. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
  1311. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM12_STOP (*)
  1312. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM13_STOP (*)
  1313. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM14_STOP (*)
  1314. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM_STOP (*)
  1315. * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
  1316. * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
  1317. * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
  1318. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
  1319. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP
  1320. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP (*)
  1321. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C4_STOP (*)
  1322. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN1_STOP (*)
  1323. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*)
  1324. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN3_STOP (*)
  1325. *
  1326. * (*) value not defined in all devices.
  1327. * @retval None
  1328. */
  1329. __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs)
  1330. {
  1331. SET_BIT(DBGMCU->APB1FZ, Periphs);
  1332. }
  1333. /**
  1334. * @brief Unfreeze APB1 peripherals (group1 peripherals)
  1335. * @rmtoll DBGMCU_APB1_FZ DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1336. * DBGMCU_APB1_FZ DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1337. * DBGMCU_APB1_FZ DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1338. * DBGMCU_APB1_FZ DBG_TIM5_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1339. * DBGMCU_APB1_FZ DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1340. * DBGMCU_APB1_FZ DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1341. * DBGMCU_APB1_FZ DBG_TIM12_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1342. * DBGMCU_APB1_FZ DBG_TIM13_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1343. * DBGMCU_APB1_FZ DBG_TIM14_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1344. * DBGMCU_APB1_FZ DBG_LPTIM_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1345. * DBGMCU_APB1_FZ DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1346. * DBGMCU_APB1_FZ DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1347. * DBGMCU_APB1_FZ DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1348. * DBGMCU_APB1_FZ DBG_I2C1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1349. * DBGMCU_APB1_FZ DBG_I2C2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1350. * DBGMCU_APB1_FZ DBG_I2C3_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1351. * DBGMCU_APB1_FZ DBG_I2C4_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1352. * DBGMCU_APB1_FZ DBG_CAN1_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1353. * DBGMCU_APB1_FZ DBG_CAN2_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1354. * DBGMCU_APB1_FZ DBG_CAN3_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph
  1355. * @param Periphs This parameter can be a combination of the following values:
  1356. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
  1357. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP (*)
  1358. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
  1359. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM5_STOP
  1360. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
  1361. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
  1362. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM12_STOP (*)
  1363. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM13_STOP (*)
  1364. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM14_STOP (*)
  1365. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM_STOP (*)
  1366. * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
  1367. * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
  1368. * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
  1369. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
  1370. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP
  1371. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP (*)
  1372. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C4_STOP (*)
  1373. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN1_STOP (*)
  1374. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN2_STOP (*)
  1375. * @arg @ref LL_DBGMCU_APB1_GRP1_CAN3_STOP (*)
  1376. *
  1377. * (*) value not defined in all devices.
  1378. * @retval None
  1379. */
  1380. __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs)
  1381. {
  1382. CLEAR_BIT(DBGMCU->APB1FZ, Periphs);
  1383. }
  1384. /**
  1385. * @brief Freeze APB2 peripherals
  1386. * @rmtoll DBGMCU_APB2_FZ DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1387. * DBGMCU_APB2_FZ DBG_TIM8_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1388. * DBGMCU_APB2_FZ DBG_TIM9_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1389. * DBGMCU_APB2_FZ DBG_TIM10_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1390. * DBGMCU_APB2_FZ DBG_TIM11_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph
  1391. * @param Periphs This parameter can be a combination of the following values:
  1392. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
  1393. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*)
  1394. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM9_STOP (*)
  1395. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM10_STOP (*)
  1396. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM11_STOP (*)
  1397. *
  1398. * (*) value not defined in all devices.
  1399. * @retval None
  1400. */
  1401. __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs)
  1402. {
  1403. SET_BIT(DBGMCU->APB2FZ, Periphs);
  1404. }
  1405. /**
  1406. * @brief Unfreeze APB2 peripherals
  1407. * @rmtoll DBGMCU_APB2_FZ DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1408. * DBGMCU_APB2_FZ DBG_TIM8_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1409. * DBGMCU_APB2_FZ DBG_TIM9_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1410. * DBGMCU_APB2_FZ DBG_TIM10_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1411. * DBGMCU_APB2_FZ DBG_TIM11_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph
  1412. * @param Periphs This parameter can be a combination of the following values:
  1413. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
  1414. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM8_STOP (*)
  1415. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM9_STOP (*)
  1416. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM10_STOP (*)
  1417. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM11_STOP (*)
  1418. *
  1419. * (*) value not defined in all devices.
  1420. * @retval None
  1421. */
  1422. __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs)
  1423. {
  1424. CLEAR_BIT(DBGMCU->APB2FZ, Periphs);
  1425. }
  1426. /**
  1427. * @}
  1428. */
  1429. /** @defgroup SYSTEM_LL_EF_FLASH FLASH
  1430. * @{
  1431. */
  1432. /**
  1433. * @brief Set FLASH Latency
  1434. * @rmtoll FLASH_ACR LATENCY LL_FLASH_SetLatency
  1435. * @param Latency This parameter can be one of the following values:
  1436. * @arg @ref LL_FLASH_LATENCY_0
  1437. * @arg @ref LL_FLASH_LATENCY_1
  1438. * @arg @ref LL_FLASH_LATENCY_2
  1439. * @arg @ref LL_FLASH_LATENCY_3
  1440. * @arg @ref LL_FLASH_LATENCY_4
  1441. * @arg @ref LL_FLASH_LATENCY_5
  1442. * @arg @ref LL_FLASH_LATENCY_6
  1443. * @arg @ref LL_FLASH_LATENCY_7
  1444. * @arg @ref LL_FLASH_LATENCY_8
  1445. * @arg @ref LL_FLASH_LATENCY_9
  1446. * @arg @ref LL_FLASH_LATENCY_10
  1447. * @arg @ref LL_FLASH_LATENCY_11
  1448. * @arg @ref LL_FLASH_LATENCY_12
  1449. * @arg @ref LL_FLASH_LATENCY_13
  1450. * @arg @ref LL_FLASH_LATENCY_14
  1451. * @arg @ref LL_FLASH_LATENCY_15
  1452. * @retval None
  1453. */
  1454. __STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency)
  1455. {
  1456. MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency);
  1457. }
  1458. /**
  1459. * @brief Get FLASH Latency
  1460. * @rmtoll FLASH_ACR LATENCY LL_FLASH_GetLatency
  1461. * @retval Returned value can be one of the following values:
  1462. * @arg @ref LL_FLASH_LATENCY_0
  1463. * @arg @ref LL_FLASH_LATENCY_1
  1464. * @arg @ref LL_FLASH_LATENCY_2
  1465. * @arg @ref LL_FLASH_LATENCY_3
  1466. * @arg @ref LL_FLASH_LATENCY_4
  1467. * @arg @ref LL_FLASH_LATENCY_5
  1468. * @arg @ref LL_FLASH_LATENCY_6
  1469. * @arg @ref LL_FLASH_LATENCY_7
  1470. * @arg @ref LL_FLASH_LATENCY_8
  1471. * @arg @ref LL_FLASH_LATENCY_9
  1472. * @arg @ref LL_FLASH_LATENCY_10
  1473. * @arg @ref LL_FLASH_LATENCY_11
  1474. * @arg @ref LL_FLASH_LATENCY_12
  1475. * @arg @ref LL_FLASH_LATENCY_13
  1476. * @arg @ref LL_FLASH_LATENCY_14
  1477. * @arg @ref LL_FLASH_LATENCY_15
  1478. */
  1479. __STATIC_INLINE uint32_t LL_FLASH_GetLatency(void)
  1480. {
  1481. return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY));
  1482. }
  1483. /**
  1484. * @brief Enable Prefetch
  1485. * @rmtoll FLASH_ACR PRFTEN LL_FLASH_EnablePrefetch
  1486. * @retval None
  1487. */
  1488. __STATIC_INLINE void LL_FLASH_EnablePrefetch(void)
  1489. {
  1490. SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
  1491. }
  1492. /**
  1493. * @brief Disable Prefetch
  1494. * @rmtoll FLASH_ACR PRFTEN LL_FLASH_DisablePrefetch
  1495. * @retval None
  1496. */
  1497. __STATIC_INLINE void LL_FLASH_DisablePrefetch(void)
  1498. {
  1499. CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
  1500. }
  1501. /**
  1502. * @brief Check if Prefetch buffer is enabled
  1503. * @rmtoll FLASH_ACR PRFTEN LL_FLASH_IsPrefetchEnabled
  1504. * @retval State of bit (1 or 0).
  1505. */
  1506. __STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled(void)
  1507. {
  1508. return (READ_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) == (FLASH_ACR_PRFTEN));
  1509. }
  1510. /**
  1511. * @brief Enable Instruction cache
  1512. * @rmtoll FLASH_ACR ICEN LL_FLASH_EnableInstCache
  1513. * @retval None
  1514. */
  1515. __STATIC_INLINE void LL_FLASH_EnableInstCache(void)
  1516. {
  1517. SET_BIT(FLASH->ACR, FLASH_ACR_ICEN);
  1518. }
  1519. /**
  1520. * @brief Disable Instruction cache
  1521. * @rmtoll FLASH_ACR ICEN LL_FLASH_DisableInstCache
  1522. * @retval None
  1523. */
  1524. __STATIC_INLINE void LL_FLASH_DisableInstCache(void)
  1525. {
  1526. CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN);
  1527. }
  1528. /**
  1529. * @brief Enable Data cache
  1530. * @rmtoll FLASH_ACR DCEN LL_FLASH_EnableDataCache
  1531. * @retval None
  1532. */
  1533. __STATIC_INLINE void LL_FLASH_EnableDataCache(void)
  1534. {
  1535. SET_BIT(FLASH->ACR, FLASH_ACR_DCEN);
  1536. }
  1537. /**
  1538. * @brief Disable Data cache
  1539. * @rmtoll FLASH_ACR DCEN LL_FLASH_DisableDataCache
  1540. * @retval None
  1541. */
  1542. __STATIC_INLINE void LL_FLASH_DisableDataCache(void)
  1543. {
  1544. CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCEN);
  1545. }
  1546. /**
  1547. * @brief Enable Instruction cache reset
  1548. * @note bit can be written only when the instruction cache is disabled
  1549. * @rmtoll FLASH_ACR ICRST LL_FLASH_EnableInstCacheReset
  1550. * @retval None
  1551. */
  1552. __STATIC_INLINE void LL_FLASH_EnableInstCacheReset(void)
  1553. {
  1554. SET_BIT(FLASH->ACR, FLASH_ACR_ICRST);
  1555. }
  1556. /**
  1557. * @brief Disable Instruction cache reset
  1558. * @rmtoll FLASH_ACR ICRST LL_FLASH_DisableInstCacheReset
  1559. * @retval None
  1560. */
  1561. __STATIC_INLINE void LL_FLASH_DisableInstCacheReset(void)
  1562. {
  1563. CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST);
  1564. }
  1565. /**
  1566. * @brief Enable Data cache reset
  1567. * @note bit can be written only when the data cache is disabled
  1568. * @rmtoll FLASH_ACR DCRST LL_FLASH_EnableDataCacheReset
  1569. * @retval None
  1570. */
  1571. __STATIC_INLINE void LL_FLASH_EnableDataCacheReset(void)
  1572. {
  1573. SET_BIT(FLASH->ACR, FLASH_ACR_DCRST);
  1574. }
  1575. /**
  1576. * @brief Disable Data cache reset
  1577. * @rmtoll FLASH_ACR DCRST LL_FLASH_DisableDataCacheReset
  1578. * @retval None
  1579. */
  1580. __STATIC_INLINE void LL_FLASH_DisableDataCacheReset(void)
  1581. {
  1582. CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCRST);
  1583. }
  1584. /**
  1585. * @}
  1586. */
  1587. /**
  1588. * @}
  1589. */
  1590. /**
  1591. * @}
  1592. */
  1593. #endif /* defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) */
  1594. /**
  1595. * @}
  1596. */
  1597. #ifdef __cplusplus
  1598. }
  1599. #endif
  1600. #endif /* __STM32F4xx_LL_SYSTEM_H */
  1601. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/