stm32f4xx_ll_system.h 72 KB

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