stm32g0xx_ll_system.h 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084
  1. /**
  2. ******************************************************************************
  3. * @file stm32g0xx_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 DBG registers
  15. (+) Access to SYSCFG registers
  16. (+) Access to VREFBUF registers
  17. @endverbatim
  18. ******************************************************************************
  19. * @attention
  20. *
  21. * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics.
  22. * All rights reserved.</center></h2>
  23. *
  24. * This software component is licensed by ST under BSD 3-Clause license,
  25. * the "License"; You may not use this file except in compliance with the
  26. * License. You may obtain a copy of the License at:
  27. * opensource.org/licenses/BSD-3-Clause
  28. *
  29. ******************************************************************************
  30. */
  31. /* Define to prevent recursive inclusion -------------------------------------*/
  32. #ifndef STM32G0xx_LL_SYSTEM_H
  33. #define STM32G0xx_LL_SYSTEM_H
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. /* Includes ------------------------------------------------------------------*/
  38. #include "stm32g0xx.h"
  39. /** @addtogroup STM32G0xx_LL_Driver
  40. * @{
  41. */
  42. #if defined (FLASH) || defined (SYSCFG) || defined (DBG)
  43. /** @defgroup SYSTEM_LL SYSTEM
  44. * @{
  45. */
  46. /* Private types -------------------------------------------------------------*/
  47. /* Private variables ---------------------------------------------------------*/
  48. /* Private constants ---------------------------------------------------------*/
  49. /** @defgroup SYSTEM_LL_Private_Constants SYSTEM Private Constants
  50. * @{
  51. */
  52. /**
  53. * @}
  54. */
  55. /* Private macros ------------------------------------------------------------*/
  56. /* Exported types ------------------------------------------------------------*/
  57. /* Exported constants --------------------------------------------------------*/
  58. /** @defgroup SYSTEM_LL_Exported_Constants SYSTEM Exported Constants
  59. * @{
  60. */
  61. /** @defgroup SYSTEM_LL_EC_REMAP SYSCFG REMAP
  62. * @{
  63. */
  64. #define LL_SYSCFG_REMAP_FLASH 0x00000000U /*!< Main Flash memory mapped at 0x00000000 */
  65. #define LL_SYSCFG_REMAP_SYSTEMFLASH SYSCFG_CFGR1_MEM_MODE_0 /*!< System Flash memory mapped at 0x00000000 */
  66. #define LL_SYSCFG_REMAP_SRAM (SYSCFG_CFGR1_MEM_MODE_1 | SYSCFG_CFGR1_MEM_MODE_0) /*!< Embedded SRAM mapped at 0x00000000 */
  67. /**
  68. * @}
  69. */
  70. /** @defgroup SYSTEM_LL_EC_PIN_RMP SYSCFG PIN RMP
  71. * @{
  72. */
  73. #define LL_SYSCFG_PIN_RMP_PA11 SYSCFG_CFGR1_PA11_RMP /*!< PA11 pad behaves as PA9 pin */
  74. #define LL_SYSCFG_PIN_RMP_PA12 SYSCFG_CFGR1_PA12_RMP /*!< PA12 pad behaves as PA10 pin */
  75. /**
  76. * @}
  77. */
  78. #if defined(SYSCFG_CFGR1_IR_MOD)
  79. /** @defgroup SYSTEM_LL_EC_IR_MOD SYSCFG IR Modulation
  80. * @{
  81. */
  82. #define LL_SYSCFG_IR_MOD_TIM16 (SYSCFG_CFGR1_IR_MOD_0 & SYSCFG_CFGR1_IR_MOD_1) /*!< 00: Timer16 is selected as IRDA Modulation enveloppe source */
  83. #define LL_SYSCFG_IR_MOD_USART1 (SYSCFG_CFGR1_IR_MOD_0) /*!< 01: USART1 is selected as IRDA Modulation enveloppe source */
  84. #if defined(USART4)
  85. #define LL_SYSCFG_IR_MOD_USART4 (SYSCFG_CFGR1_IR_MOD_1) /*!< 10: USART4 is selected as IRDA Modulation enveloppe source */
  86. #else
  87. #define LL_SYSCFG_IR_MOD_USART2 (SYSCFG_CFGR1_IR_MOD_1) /*!< 10: USART2 is selected as IRDA Modulation enveloppe source */
  88. #endif /* USART4 */
  89. /**
  90. * @}
  91. */
  92. /** @defgroup SYSTEM_LL_EC_IR_POL SYSCFG IR Polarity
  93. * @{
  94. */
  95. #define LL_SYSCFG_IR_POL_NOT_INVERTED 0x00000000U /*!< 0: Output of IRDA (IROut) not inverted */
  96. #define LL_SYSCFG_IR_POL_INVERTED (SYSCFG_CFGR1_IR_POL) /*!< 1: Output of IRDA (IROut) inverted */
  97. /**
  98. * @}
  99. */
  100. #endif /* SYSCFG_CFGR1_IR_MOD */
  101. #if defined(SYSCFG_CFGR1_BOOSTEN)
  102. /** @defgroup SYSTEM_LL_EC_BOOSTEN SYSCFG I/O analog switch voltage booster enable
  103. * @{
  104. */
  105. #define LL_SYSCFG_CFGR1_BOOSTEN SYSCFG_CFGR1_BOOSTEN /*!< I/O analog switch voltage booster enable */
  106. /**
  107. * @}
  108. */
  109. #endif /* SYSCFG_CFGR1_BOOSTEN */
  110. #if defined(SYSCFG_CFGR1_UCPD1_STROBE) || defined(SYSCFG_CFGR1_UCPD2_STROBE)
  111. /** @defgroup SYSTEM_LL_EC_UCPD_DBATTDIS SYSCFG UCPD Dead Battery feature Disable
  112. * @{
  113. */
  114. #define LL_SYSCFG_UCPD1_STROBE SYSCFG_CFGR1_UCPD1_STROBE /*!< UCPD1 STROBE sw configuration */
  115. #define LL_SYSCFG_UCPD2_STROBE SYSCFG_CFGR1_UCPD2_STROBE /*!< UCPD2 STROBE sw configuration */
  116. /**
  117. * @}
  118. */
  119. #endif /* SYSCFG_CFGR1_UCPD1_STROBE) || SYSCFG_CFGR1_UCPD2_STROBE */
  120. /** @defgroup SYSTEM_LL_EC_I2C_FASTMODEPLUS SYSCFG I2C FASTMODEPLUS
  121. * @{
  122. */
  123. #define LL_SYSCFG_I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< I2C PB6 Fast mode plus */
  124. #define LL_SYSCFG_I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< I2C PB7 Fast mode plus */
  125. #define LL_SYSCFG_I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< I2C PB8 Fast mode plus */
  126. #define LL_SYSCFG_I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< I2C PB9 Fast mode plus */
  127. #if defined(SYSCFG_CFGR1_I2C1_FMP)
  128. #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable I2C1 Fast mode Plus */
  129. #endif /*SYSCFG_CFGR1_I2C1_FMP*/
  130. #if defined(SYSCFG_CFGR1_I2C2_FMP)
  131. #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 SYSCFG_CFGR1_I2C2_FMP /*!< Enable I2C2 Fast mode plus */
  132. #endif /*SYSCFG_CFGR1_I2C2_FMP*/
  133. #if defined(SYSCFG_CFGR1_I2C_PA9_FMP)
  134. #define LL_SYSCFG_I2C_FASTMODEPLUS_PA9 SYSCFG_CFGR1_I2C_PA9_FMP /*!< Enable Fast Mode Plus on PA9 */
  135. #endif /*SYSCFG_CFGR1_I2C_PA9_FMP*/
  136. #if defined(SYSCFG_CFGR1_I2C_PA10_FMP)
  137. #define LL_SYSCFG_I2C_FASTMODEPLUS_PA10 SYSCFG_CFGR1_I2C_PA10_FMP /*!< Enable Fast Mode Plus on PA10 */
  138. #endif /*SYSCFG_CFGR1_I2C_PA10_FMP*/
  139. #if defined(STM32G0C1xx) || defined(STM32G0B1xx) || defined(STM32G0B0xx)
  140. #if defined(SYSCFG_CFGR1_I2C3_FMP)
  141. #define LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 SYSCFG_CFGR1_I2C3_FMP /*!< Enable I2C3 Fast mode plus */
  142. #endif /*SYSCFG_CFGR1_I2C3_FMP*/
  143. #endif /* STM32G0C1xx || STM32G0B1xx || STM32G0B0xx */
  144. /**
  145. * @}
  146. */
  147. /** @defgroup SYSTEM_LL_EC_TIMBREAK SYSCFG TIMER BREAK
  148. * @{
  149. */
  150. #define LL_SYSCFG_TIMBREAK_ECC SYSCFG_CFGR2_ECCL /*!< Enables and locks the ECC error signal
  151. with Break Input of TIM1/15/16/17 */
  152. #if defined (PWR_PVD_SUPPORT)
  153. #define LL_SYSCFG_TIMBREAK_PVD SYSCFG_CFGR2_PVDL /*!< Enables and locks the PVD connection
  154. with TIM1/15/16/17 Break Input and also
  155. the PVDE and PLS bits of the Power Control Interface */
  156. #endif /* PWR_PVD_SUPPORT */
  157. #define LL_SYSCFG_TIMBREAK_SRAM_PARITY SYSCFG_CFGR2_SPL /*!< Enables and locks the SRAM_PARITY error signal
  158. with Break Input of TIM1/15/16/17 */
  159. #define LL_SYSCFG_TIMBREAK_LOCKUP SYSCFG_CFGR2_CLL /*!< Enables and locks the LOCKUP (Hardfault) output of
  160. CortexM0 with Break Input of TIM1/15/16/17 */
  161. /**
  162. * @}
  163. */
  164. #if defined(SYSCFG_CDEN_SUPPORT)
  165. /** @defgroup SYSTEM_LL_EC_CLAMPING_DIODE SYSCFG CLAMPING DIODE
  166. * @{
  167. */
  168. #define LL_SYSCFG_CFGR2_PA1_CDEN SYSCFG_CFGR2_PA1_CDEN /*!< Enables Clamping diode of PA1 */
  169. #define LL_SYSCFG_CFGR2_PA3_CDEN SYSCFG_CFGR2_PA3_CDEN /*!< Enables Clamping diode of PA3 */
  170. #define LL_SYSCFG_CFGR2_PA5_CDEN SYSCFG_CFGR2_PA5_CDEN /*!< Enables Clamping diode of PA5 */
  171. #define LL_SYSCFG_CFGR2_PA6_CDEN SYSCFG_CFGR2_PA6_CDEN /*!< Enables Clamping diode of PA6 */
  172. #define LL_SYSCFG_CFGR2_PA13_CDEN SYSCFG_CFGR2_PA13_CDEN /*!< Enables Clamping diode of PA13 */
  173. #define LL_SYSCFG_CFGR2_PB0_CDEN SYSCFG_CFGR2_PB0_CDEN /*!< Enables Clamping diode of PB0 */
  174. #define LL_SYSCFG_CFGR2_PB1_CDEN SYSCFG_CFGR2_PB1_CDEN /*!< Enables Clamping diode of PB1 */
  175. #define LL_SYSCFG_CFGR2_PB2_CDEN SYSCFG_CFGR2_PB2_CDEN /*!< Enables Clamping diode of PB2 */
  176. /**
  177. * @}
  178. */
  179. #endif /* SYSCFG_CDEN_SUPPORT */
  180. /** @defgroup SYSTEM_LL_EC_APB1_GRP1_STOP_IP DBGMCU APB1 GRP1 STOP IP
  181. * @{
  182. */
  183. #if defined(DBG_APB_FZ1_DBG_TIM2_STOP)
  184. #define LL_DBGMCU_APB1_GRP1_TIM2_STOP DBG_APB_FZ1_DBG_TIM2_STOP /*!< TIM2 counter stopped when core is halted */
  185. #endif /*DBG_APB_FZ1_DBG_TIM2_STOP*/
  186. #define LL_DBGMCU_APB1_GRP1_TIM3_STOP DBG_APB_FZ1_DBG_TIM3_STOP /*!< TIM3 counter stopped when core is halted */
  187. #if defined(STM32G0C1xx) || defined(STM32G0B1xx) || defined(STM32G0B0xx)
  188. #define LL_DBGMCU_APB1_GRP1_TIM4_STOP DBG_APB_FZ1_DBG_TIM4_STOP /*!< TIM4 counter stopped when core is halted */
  189. #endif /* STM32G0C1xx || STM32G0B1xx || STM32G0B0xx */
  190. #if defined(DBG_APB_FZ1_DBG_TIM6_STOP)
  191. #define LL_DBGMCU_APB1_GRP1_TIM6_STOP DBG_APB_FZ1_DBG_TIM6_STOP /*!< TIM6 counter stopped when core is halted */
  192. #endif /*DBG_APB_FZ1_DBG_TIM6_STOP*/
  193. #if defined(DBG_APB_FZ1_DBG_TIM7_STOP)
  194. #define LL_DBGMCU_APB1_GRP1_TIM7_STOP DBG_APB_FZ1_DBG_TIM7_STOP /*!< TIM7 counter stopped when core is halted */
  195. #endif /*DBG_APB_FZ1_DBG_TIM7_STOP*/
  196. #define LL_DBGMCU_APB1_GRP1_RTC_STOP DBG_APB_FZ1_DBG_RTC_STOP /*!< RTC Calendar frozen when core is halted */
  197. #define LL_DBGMCU_APB1_GRP1_WWDG_STOP DBG_APB_FZ1_DBG_WWDG_STOP /*!< Debug Window Watchdog stopped when Core is halted */
  198. #define LL_DBGMCU_APB1_GRP1_IWDG_STOP DBG_APB_FZ1_DBG_IWDG_STOP /*!< Debug Independent Watchdog stopped when Core is halted */
  199. #define LL_DBGMCU_APB1_GRP1_I2C1_STOP DBG_APB_FZ1_DBG_I2C1_SMBUS_TIMEOUT_STOP /*!< I2C1 SMBUS timeout mode stopped when Core is halted */
  200. #if defined(STM32G0C1xx) || defined(STM32G0B1xx) || defined(STM32G0B0xx)
  201. #define LL_DBGMCU_APB1_GRP1_I2C2_STOP DBG_APB_FZ1_DBG_I2C2_SMBUS_TIMEOUT_STOP /*!< I2C2 SMBUS timeout mode stopped when Core is halted */
  202. #endif /* STM32G0C1xx || STM32G0B1xx || STM32G0B0xx */
  203. #if defined(DBG_APB_FZ1_DBG_LPTIM2_STOP)
  204. #define LL_DBGMCU_APB1_GRP1_LPTIM2_STOP DBG_APB_FZ1_DBG_LPTIM2_STOP /*!< LPTIM2 counter stopped when Core is halted */
  205. #endif /* DBG_APB_FZ1_DBG_LPTIM2_STOP */
  206. #if defined(DBG_APB_FZ1_DBG_LPTIM1_STOP)
  207. #define LL_DBGMCU_APB1_GRP1_LPTIM1_STOP DBG_APB_FZ1_DBG_LPTIM1_STOP /*!< LPTIM1 counter stopped when Core is halted */
  208. #endif /* DBG_APB_FZ1_DBG_LPTIM1_STOP */
  209. /**
  210. * @}
  211. */
  212. /** @defgroup SYSTEM_LL_EC_APB2_GRP1_STOP_IP DBGMCU APB2 GRP1 STOP IP
  213. * @{
  214. */
  215. #define LL_DBGMCU_APB2_GRP1_TIM1_STOP DBG_APB_FZ2_DBG_TIM1_STOP /*!< TIM1 counter stopped when core is halted */
  216. #if defined(DBG_APB_FZ2_DBG_TIM14_STOP)
  217. #define LL_DBGMCU_APB2_GRP1_TIM14_STOP DBG_APB_FZ2_DBG_TIM14_STOP /*!< TIM14 counter stopped when core is halted */
  218. #endif /* DBG_APB_FZ2_DBG_TIM14_STOP */
  219. #if defined(DBG_APB_FZ2_DBG_TIM15_STOP)
  220. #define LL_DBGMCU_APB2_GRP1_TIM15_STOP DBG_APB_FZ2_DBG_TIM15_STOP /*!< TIM15 counter stopped when core is halted */
  221. #endif /*DBG_APB_FZ2_DBG_TIM15_STOP*/
  222. #define LL_DBGMCU_APB2_GRP1_TIM16_STOP DBG_APB_FZ2_DBG_TIM16_STOP /*!< TIM16 counter stopped when core is halted */
  223. #define LL_DBGMCU_APB2_GRP1_TIM17_STOP DBG_APB_FZ2_DBG_TIM17_STOP /*!< TIM17 counter stopped when core is halted */
  224. /**
  225. * @}
  226. */
  227. #if defined(VREFBUF)
  228. /** @defgroup SYSTEM_LL_EC_VOLTAGE VREFBUF VOLTAGE
  229. * @{
  230. */
  231. #define LL_VREFBUF_VOLTAGE_SCALE0 0x00000000U /*!< Voltage reference scale 0 (VREF_OUT1) */
  232. #define LL_VREFBUF_VOLTAGE_SCALE1 VREFBUF_CSR_VRS /*!< Voltage reference scale 1 (VREF_OUT2) */
  233. /**
  234. * @}
  235. */
  236. #endif /* VREFBUF */
  237. /** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY
  238. * @{
  239. */
  240. #define LL_FLASH_LATENCY_0 0x00000000U /*!< FLASH Zero Latency cycle */
  241. #define LL_FLASH_LATENCY_1 FLASH_ACR_LATENCY_0 /*!< FLASH One Latency cycle */
  242. #define LL_FLASH_LATENCY_2 FLASH_ACR_LATENCY_1 /*!< FLASH Two wait states */
  243. #define LL_FLASH_LATENCY_3 (FLASH_ACR_LATENCY_1 | FLASH_ACR_LATENCY_0) /*!< FLASH Three wait states */
  244. /**
  245. * @}
  246. */
  247. /**
  248. * @}
  249. */
  250. /* Exported macro ------------------------------------------------------------*/
  251. /* Exported functions --------------------------------------------------------*/
  252. /** @defgroup SYSTEM_LL_Exported_Functions SYSTEM Exported Functions
  253. * @{
  254. */
  255. /** @defgroup SYSTEM_LL_EF_SYSCFG SYSCFG
  256. * @{
  257. */
  258. /**
  259. * @brief Set memory mapping at address 0x00000000
  260. * @rmtoll SYSCFG_CFGR1 MEM_MODE LL_SYSCFG_SetRemapMemory
  261. * @param Memory This parameter can be one of the following values:
  262. * @arg @ref LL_SYSCFG_REMAP_FLASH
  263. * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
  264. * @arg @ref LL_SYSCFG_REMAP_SRAM
  265. * @retval None
  266. */
  267. __STATIC_INLINE void LL_SYSCFG_SetRemapMemory(uint32_t Memory)
  268. {
  269. MODIFY_REG(SYSCFG->CFGR1, SYSCFG_CFGR1_MEM_MODE, Memory);
  270. }
  271. /**
  272. * @brief Get memory mapping at address 0x00000000
  273. * @rmtoll SYSCFG_CFGR1 MEM_MODE LL_SYSCFG_GetRemapMemory
  274. * @retval Returned value can be one of the following values:
  275. * @arg @ref LL_SYSCFG_REMAP_FLASH
  276. * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH
  277. * @arg @ref LL_SYSCFG_REMAP_SRAM
  278. */
  279. __STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory(void)
  280. {
  281. return (uint32_t)(READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_MEM_MODE));
  282. }
  283. /**
  284. * @brief Enable remap of a pin on different pad
  285. * @rmtoll SYSCFG_CFGR1 PA11_RMP LL_SYSCFG_EnablePinRemap\n
  286. * SYSCFG_CFGR1 PA12_RMP LL_SYSCFG_EnablePinRemap\n
  287. * @param PinRemap This parameter can be a combination of the following values:
  288. * @arg @ref LL_SYSCFG_PIN_RMP_PA11
  289. * @arg @ref LL_SYSCFG_PIN_RMP_PA12
  290. * @retval None
  291. */
  292. __STATIC_INLINE void LL_SYSCFG_EnablePinRemap(uint32_t PinRemap)
  293. {
  294. SET_BIT(SYSCFG->CFGR1, PinRemap);
  295. }
  296. /**
  297. * @brief Enable remap of a pin on different pad
  298. * @rmtoll SYSCFG_CFGR1 PA11_RMP LL_SYSCFG_DisablePinRemap\n
  299. * SYSCFG_CFGR1 PA12_RMP LL_SYSCFG_DisablePinRemap\n
  300. * @param PinRemap This parameter can be a combination of the following values:
  301. * @arg @ref LL_SYSCFG_PIN_RMP_PA11
  302. * @arg @ref LL_SYSCFG_PIN_RMP_PA12
  303. * @retval None
  304. */
  305. __STATIC_INLINE void LL_SYSCFG_DisablePinRemap(uint32_t PinRemap)
  306. {
  307. CLEAR_BIT(SYSCFG->CFGR1, PinRemap);
  308. }
  309. #if defined(SYSCFG_CFGR1_IR_MOD)
  310. /**
  311. * @brief Set IR Modulation Envelope signal source.
  312. * @rmtoll SYSCFG_CFGR1 IR_MOD LL_SYSCFG_SetIRModEnvelopeSignal
  313. * @param Source This parameter can be one of the following values:
  314. * @arg @ref LL_SYSCFG_IR_MOD_TIM16
  315. * @arg @ref LL_SYSCFG_IR_MOD_USART1
  316. * @arg @ref LL_SYSCFG_IR_MOD_USART4
  317. * @retval None
  318. */
  319. __STATIC_INLINE void LL_SYSCFG_SetIRModEnvelopeSignal(uint32_t Source)
  320. {
  321. MODIFY_REG(SYSCFG->CFGR1, SYSCFG_CFGR1_IR_MOD, Source);
  322. }
  323. /**
  324. * @brief Get IR Modulation Envelope signal source.
  325. * @rmtoll SYSCFG_CFGR1 IR_MOD LL_SYSCFG_GetIRModEnvelopeSignal
  326. * @retval Returned value can be one of the following values:
  327. * @arg @ref LL_SYSCFG_IR_MOD_TIM16
  328. * @arg @ref LL_SYSCFG_IR_MOD_USART1
  329. * @arg @ref LL_SYSCFG_IR_MOD_USART4
  330. */
  331. __STATIC_INLINE uint32_t LL_SYSCFG_GetIRModEnvelopeSignal(void)
  332. {
  333. return (uint32_t)(READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_IR_MOD));
  334. }
  335. /**
  336. * @brief Set IR Output polarity.
  337. * @rmtoll SYSCFG_CFGR1 IR_POL LL_SYSCFG_SetIRPolarity
  338. * @param Polarity This parameter can be one of the following values:
  339. * @arg @ref LL_SYSCFG_IR_POL_INVERTED
  340. * @arg @ref LL_SYSCFG_IR_POL_NOT_INVERTED
  341. * @retval None
  342. */
  343. __STATIC_INLINE void LL_SYSCFG_SetIRPolarity(uint32_t Polarity)
  344. {
  345. MODIFY_REG(SYSCFG->CFGR1, SYSCFG_CFGR1_IR_POL, Polarity);
  346. }
  347. /**
  348. * @brief Get IR Output polarity.
  349. * @rmtoll SYSCFG_CFGR1 IR_POL LL_SYSCFG_GetIRPolarity
  350. * @retval Returned value can be one of the following values:
  351. * @arg @ref LL_SYSCFG_IR_POL_INVERTED
  352. * @arg @ref LL_SYSCFG_IR_POL_NOT_INVERTED
  353. */
  354. __STATIC_INLINE uint32_t LL_SYSCFG_GetIRPolarity(void)
  355. {
  356. return (uint32_t)(READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_IR_POL));
  357. }
  358. #endif /* SYSCFG_CFGR1_IR_MOD */
  359. #if defined(SYSCFG_CFGR1_BOOSTEN)
  360. /**
  361. * @brief Enable I/O analog switch voltage booster.
  362. * @note When voltage booster is enabled, I/O analog switches are supplied
  363. * by a dedicated voltage booster, from VDD power domain. This is
  364. * the recommended configuration with low VDDA voltage operation.
  365. * @note The I/O analog switch voltage booster is relevant for peripherals
  366. * using I/O in analog input: ADC, COMP.
  367. * However, COMP and OPAMP inputs have a high impedance and
  368. * voltage booster do not impact performance significantly.
  369. * Therefore, the voltage booster is mainly intended for
  370. * usage with ADC.
  371. * @rmtoll SYSCFG_CFGR1 BOOSTEN LL_SYSCFG_EnableAnalogBooster
  372. * @retval None
  373. */
  374. __STATIC_INLINE void LL_SYSCFG_EnableAnalogBooster(void)
  375. {
  376. SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
  377. }
  378. /**
  379. * @brief Disable I/O analog switch voltage booster.
  380. * @note When voltage booster is enabled, I/O analog switches are supplied
  381. * by a dedicated voltage booster, from VDD power domain. This is
  382. * the recommended configuration with low VDDA voltage operation.
  383. * @note The I/O analog switch voltage booster is relevant for peripherals
  384. * using I/O in analog input: ADC, COMP.
  385. * However, COMP and OPAMP inputs have a high impedance and
  386. * voltage booster do not impact performance significantly.
  387. * Therefore, the voltage booster is mainly intended for
  388. * usage with ADC.
  389. * @rmtoll SYSCFG_CFGR1 BOOSTEN LL_SYSCFG_DisableAnalogBooster
  390. * @retval None
  391. */
  392. __STATIC_INLINE void LL_SYSCFG_DisableAnalogBooster(void)
  393. {
  394. CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
  395. }
  396. #endif /* SYSCFG_CFGR1_BOOSTEN */
  397. /**
  398. * @brief Enable the I2C fast mode plus driving capability.
  399. * @rmtoll SYSCFG_CFGR1 I2C_FMP_PB6 LL_SYSCFG_EnableFastModePlus\n
  400. * SYSCFG_CFGR1 I2C_FMP_PB7 LL_SYSCFG_EnableFastModePlus\n
  401. * SYSCFG_CFGR1 I2C_FMP_PB8 LL_SYSCFG_EnableFastModePlus\n
  402. * SYSCFG_CFGR1 I2C_FMP_PB9 LL_SYSCFG_EnableFastModePlus\n
  403. * SYSCFG_CFGR1 I2C_FMP_I2C1 LL_SYSCFG_EnableFastModePlus\n
  404. * SYSCFG_CFGR1 I2C_FMP_I2C2 LL_SYSCFG_EnableFastModePlus\n
  405. * SYSCFG_CFGR1 I2C_FMP_I2C3 LL_SYSCFG_EnableFastModePlus\n
  406. * SYSCFG_CFGR1 I2C_FMP_PA9 LL_SYSCFG_EnableFastModePlus\n
  407. * SYSCFG_CFGR1 I2C_FMP_PA10 LL_SYSCFG_EnableFastModePlus
  408. * @param ConfigFastModePlus This parameter can be a combination of the following values:
  409. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6
  410. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7
  411. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8
  412. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9
  413. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 (*)
  414. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*)
  415. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 (*)
  416. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PA9 (*)
  417. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PA10 (*)
  418. *
  419. * (*) value not defined in all devices
  420. * @retval None
  421. */
  422. __STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus)
  423. {
  424. SET_BIT(SYSCFG->CFGR1, ConfigFastModePlus);
  425. }
  426. /**
  427. * @brief Disable the I2C fast mode plus driving capability.
  428. * @rmtoll SYSCFG_CFGR1 I2C_FMP_PB6 LL_SYSCFG_DisableFastModePlus\n
  429. * SYSCFG_CFGR1 I2C_FMP_PB7 LL_SYSCFG_DisableFastModePlus\n
  430. * SYSCFG_CFGR1 I2C_FMP_PB8 LL_SYSCFG_DisableFastModePlus\n
  431. * SYSCFG_CFGR1 I2C_FMP_PB9 LL_SYSCFG_DisableFastModePlus\n
  432. * SYSCFG_CFGR1 I2C_FMP_I2C1 LL_SYSCFG_DisableFastModePlus\n
  433. * SYSCFG_CFGR1 I2C_FMP_I2C2 LL_SYSCFG_DisableFastModePlus\n
  434. * SYSCFG_CFGR1 I2C_FMP_I2C3 LL_SYSCFG_DisableFastModePlus\n
  435. * SYSCFG_CFGR1 I2C_FMP_PA9 LL_SYSCFG_DisableFastModePlus\n
  436. * SYSCFG_CFGR1 I2C_FMP_PA10 LL_SYSCFG_DisableFastModePlus
  437. * @param ConfigFastModePlus This parameter can be a combination of the following values:
  438. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6
  439. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7
  440. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8
  441. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9
  442. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 (*)
  443. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C2 (*)
  444. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 (*)
  445. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PA9 (*)
  446. * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PA10 (*)
  447. *
  448. * (*) value not defined in all devices
  449. * @retval None
  450. */
  451. __STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus)
  452. {
  453. CLEAR_BIT(SYSCFG->CFGR1, ConfigFastModePlus);
  454. }
  455. #if defined(SYSCFG_CFGR1_UCPD1_STROBE) || defined(SYSCFG_CFGR1_UCPD2_STROBE)
  456. /**
  457. * @brief Disable dead battery behavior
  458. * @rmtoll SYSCFG_CFGR1 UCPD1_STROBE LL_SYSCFG_DisableDBATT\n
  459. * SYSCFG_CFGR1 UCPD2_STROBE LL_SYSCFG_DisableDBATT
  460. * @param ConfigDeadBattery This parameter can be a combination of the following values:
  461. * @arg @ref LL_SYSCFG_UCPD1_STROBE\n
  462. * @arg @ref LL_SYSCFG_UCPD2_STROBE
  463. * (*) value not defined in all devices
  464. * @retval None
  465. */
  466. __STATIC_INLINE void LL_SYSCFG_DisableDBATT(uint32_t ConfigDeadBattery)
  467. {
  468. SET_BIT(SYSCFG->CFGR1, ConfigDeadBattery);
  469. }
  470. #endif /* SYSCFG_CFGR1_UCPD1_STROBE || SYSCFG_CFGR1_UCPD2_STROBE */
  471. #if defined(SYSCFG_ITLINE0_SR_EWDG)
  472. /**
  473. * @brief Check if Window watchdog interrupt occurred or not.
  474. * @rmtoll SYSCFG_ITLINE0 SR_EWDG LL_SYSCFG_IsActiveFlag_WWDG
  475. * @retval State of bit (1 or 0).
  476. */
  477. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_WWDG(void)
  478. {
  479. return ((READ_BIT(SYSCFG->IT_LINE_SR[0], SYSCFG_ITLINE0_SR_EWDG) == (SYSCFG_ITLINE0_SR_EWDG)) ? 1UL : 0UL);
  480. }
  481. #endif /* SYSCFG_ITLINE0_SR_EWDG */
  482. #if defined (PWR_PVD_SUPPORT)
  483. /**
  484. * @brief Check if PVD supply monitoring interrupt occurred or not (EXTI line 16).
  485. * @rmtoll SYSCFG_ITLINE1 SR_PVDOUT LL_SYSCFG_IsActiveFlag_PVDOUT
  486. * @retval State of bit (1 or 0).
  487. */
  488. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_PVDOUT(void)
  489. {
  490. return ((READ_BIT(SYSCFG->IT_LINE_SR[1], SYSCFG_ITLINE1_SR_PVDOUT) == (SYSCFG_ITLINE1_SR_PVDOUT)) ? 1UL : 0UL);
  491. }
  492. #endif /* PWR_PVD_SUPPORT */
  493. #if defined (PWR_PVM_SUPPORT)
  494. /**
  495. * @brief Check if VDDUSB supply monitoring interrupt occurred or not (EXTI line 34).
  496. * @rmtoll SYSCFG_ITLINE1 SR_PVMOUT LL_SYSCFG_IsActiveFlag_PVMOUT
  497. * @retval State of bit (1 or 0).
  498. */
  499. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_PVMOUT(void)
  500. {
  501. return ((READ_BIT(SYSCFG->IT_LINE_SR[1], SYSCFG_ITLINE1_SR_PVMOUT) == (SYSCFG_ITLINE1_SR_PVMOUT)) ? 1UL : 0UL);
  502. }
  503. #endif /* PWR_PVM_SUPPORT */
  504. #if defined(SYSCFG_ITLINE2_SR_RTC)
  505. /**
  506. * @brief Check if RTC Wake Up interrupt occurred or not (EXTI line 19).
  507. * @rmtoll SYSCFG_ITLINE2 SR_RTC_WAKEUP LL_SYSCFG_IsActiveFlag_RTC_WAKEUP
  508. * @retval State of bit (1 or 0).
  509. */
  510. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_RTC_WAKEUP(void)
  511. {
  512. return ((READ_BIT(SYSCFG->IT_LINE_SR[2], SYSCFG_ITLINE2_SR_RTC) == (SYSCFG_ITLINE2_SR_RTC)) ? 1UL : 0UL);
  513. }
  514. #endif /* SYSCFG_ITLINE2_SR_RTC */
  515. #if defined(SYSCFG_ITLINE2_SR_TAMPER)
  516. /**
  517. * @brief Check if RTC Tamper and TimeStamp interrupt occurred or not (EXTI line 21).
  518. * @rmtoll SYSCFG_ITLINE2 SR_TAMPER LL_SYSCFG_IsActiveFlag_TAMPER
  519. * @retval State of bit (1 or 0).
  520. */
  521. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TAMPER(void)
  522. {
  523. return ((READ_BIT(SYSCFG->IT_LINE_SR[2], SYSCFG_ITLINE2_SR_TAMPER) == (SYSCFG_ITLINE2_SR_TAMPER)) ? 1UL : 0UL);
  524. }
  525. #endif /* SYSCFG_ITLINE2_SR_TAMPER */
  526. #if defined(SYSCFG_ITLINE3_SR_FLASH_ITF)
  527. /**
  528. * @brief Check if Flash interface interrupt occurred or not.
  529. * @rmtoll SYSCFG_ITLINE3 SR_FLASH_ITF LL_SYSCFG_IsActiveFlag_FLASH_ITF
  530. * @retval State of bit (1 or 0).
  531. */
  532. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FLASH_ITF(void)
  533. {
  534. return ((READ_BIT(SYSCFG->IT_LINE_SR[3], SYSCFG_ITLINE3_SR_FLASH_ITF) == (SYSCFG_ITLINE3_SR_FLASH_ITF)) ? 1UL : 0UL);
  535. }
  536. #endif /* SYSCFG_ITLINE3_SR_FLASH_ITF */
  537. #if defined(SYSCFG_ITLINE3_SR_FLASH_ECC)
  538. /**
  539. * @brief Check if Flash interface interrupt occurred or not.
  540. * @rmtoll SYSCFG_ITLINE3 SR_FLASH_ECC LL_SYSCFG_IsActiveFlag_FLASH_ECC
  541. * @retval State of bit (1 or 0).
  542. */
  543. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FLASH_ECC(void)
  544. {
  545. return ((READ_BIT(SYSCFG->IT_LINE_SR[3], SYSCFG_ITLINE3_SR_FLASH_ECC) == (SYSCFG_ITLINE3_SR_FLASH_ECC)) ? 1UL : 0UL);
  546. }
  547. #endif /* SYSCFG_ITLINE3_SR_FLASH_ECC */
  548. #if defined(SYSCFG_ITLINE4_SR_CLK_CTRL)
  549. /**
  550. * @brief Check if Reset and clock control interrupt occurred or not.
  551. * @rmtoll SYSCFG_ITLINE4 SR_CLK_CTRL LL_SYSCFG_IsActiveFlag_CLK_CTRL
  552. * @retval State of bit (1 or 0).
  553. */
  554. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CLK_CTRL(void)
  555. {
  556. return ((READ_BIT(SYSCFG->IT_LINE_SR[4], SYSCFG_ITLINE4_SR_CLK_CTRL) == (SYSCFG_ITLINE4_SR_CLK_CTRL)) ? 1UL : 0UL);
  557. }
  558. #endif /* SYSCFG_ITLINE4_SR_CLK_CTRL */
  559. #if defined(CRS)
  560. /**
  561. * @brief Check if Reset and clock control interrupt occurred or not.
  562. * @rmtoll SYSCFG_ITLINE4 SR_CRS LL_SYSCFG_IsActiveFlag_CRS
  563. * @retval State of bit (1 or 0).
  564. */
  565. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CRS(void)
  566. {
  567. return ((READ_BIT(SYSCFG->IT_LINE_SR[4], SYSCFG_ITLINE4_SR_CRS) == (SYSCFG_ITLINE4_SR_CRS)) ? 1UL : 0UL);
  568. }
  569. #endif /* CRS */
  570. #if defined(SYSCFG_ITLINE5_SR_EXTI0)
  571. /**
  572. * @brief Check if EXTI line 0 interrupt occurred or not.
  573. * @rmtoll SYSCFG_ITLINE5 SR_EXTI0 LL_SYSCFG_IsActiveFlag_EXTI0
  574. * @retval State of bit (1 or 0).
  575. */
  576. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI0(void)
  577. {
  578. return ((READ_BIT(SYSCFG->IT_LINE_SR[5], SYSCFG_ITLINE5_SR_EXTI0) == (SYSCFG_ITLINE5_SR_EXTI0)) ? 1UL : 0UL);
  579. }
  580. #endif /* SYSCFG_ITLINE5_SR_EXTI0 */
  581. #if defined(SYSCFG_ITLINE5_SR_EXTI1)
  582. /**
  583. * @brief Check if EXTI line 1 interrupt occurred or not.
  584. * @rmtoll SYSCFG_ITLINE5 SR_EXTI1 LL_SYSCFG_IsActiveFlag_EXTI1
  585. * @retval State of bit (1 or 0).
  586. */
  587. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI1(void)
  588. {
  589. return ((READ_BIT(SYSCFG->IT_LINE_SR[5], SYSCFG_ITLINE5_SR_EXTI1) == (SYSCFG_ITLINE5_SR_EXTI1)) ? 1UL : 0UL);
  590. }
  591. #endif /* SYSCFG_ITLINE5_SR_EXTI1 */
  592. #if defined(SYSCFG_ITLINE6_SR_EXTI2)
  593. /**
  594. * @brief Check if EXTI line 2 interrupt occurred or not.
  595. * @rmtoll SYSCFG_ITLINE6 SR_EXTI2 LL_SYSCFG_IsActiveFlag_EXTI2
  596. * @retval State of bit (1 or 0).
  597. */
  598. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI2(void)
  599. {
  600. return ((READ_BIT(SYSCFG->IT_LINE_SR[6], SYSCFG_ITLINE6_SR_EXTI2) == (SYSCFG_ITLINE6_SR_EXTI2)) ? 1UL : 0UL);
  601. }
  602. #endif /* SYSCFG_ITLINE6_SR_EXTI2 */
  603. #if defined(SYSCFG_ITLINE6_SR_EXTI3)
  604. /**
  605. * @brief Check if EXTI line 3 interrupt occurred or not.
  606. * @rmtoll SYSCFG_ITLINE6 SR_EXTI3 LL_SYSCFG_IsActiveFlag_EXTI3
  607. * @retval State of bit (1 or 0).
  608. */
  609. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI3(void)
  610. {
  611. return ((READ_BIT(SYSCFG->IT_LINE_SR[6], SYSCFG_ITLINE6_SR_EXTI3) == (SYSCFG_ITLINE6_SR_EXTI3)) ? 1UL : 0UL);
  612. }
  613. #endif /* SYSCFG_ITLINE6_SR_EXTI3 */
  614. #if defined(SYSCFG_ITLINE7_SR_EXTI4)
  615. /**
  616. * @brief Check if EXTI line 4 interrupt occurred or not.
  617. * @rmtoll SYSCFG_ITLINE7 SR_EXTI4 LL_SYSCFG_IsActiveFlag_EXTI4
  618. * @retval State of bit (1 or 0).
  619. */
  620. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI4(void)
  621. {
  622. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI4) == (SYSCFG_ITLINE7_SR_EXTI4)) ? 1UL : 0UL);
  623. }
  624. #endif /* SYSCFG_ITLINE7_SR_EXTI4 */
  625. #if defined(SYSCFG_ITLINE7_SR_EXTI5)
  626. /**
  627. * @brief Check if EXTI line 5 interrupt occurred or not.
  628. * @rmtoll SYSCFG_ITLINE7 SR_EXTI5 LL_SYSCFG_IsActiveFlag_EXTI5
  629. * @retval State of bit (1 or 0).
  630. */
  631. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI5(void)
  632. {
  633. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI5) == (SYSCFG_ITLINE7_SR_EXTI5)) ? 1UL : 0UL);
  634. }
  635. #endif /* SYSCFG_ITLINE7_SR_EXTI5 */
  636. #if defined(SYSCFG_ITLINE7_SR_EXTI6)
  637. /**
  638. * @brief Check if EXTI line 6 interrupt occurred or not.
  639. * @rmtoll SYSCFG_ITLINE7 SR_EXTI6 LL_SYSCFG_IsActiveFlag_EXTI6
  640. * @retval State of bit (1 or 0).
  641. */
  642. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI6(void)
  643. {
  644. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI6) == (SYSCFG_ITLINE7_SR_EXTI6)) ? 1UL : 0UL);
  645. }
  646. #endif /* SYSCFG_ITLINE7_SR_EXTI6 */
  647. #if defined(SYSCFG_ITLINE7_SR_EXTI7)
  648. /**
  649. * @brief Check if EXTI line 7 interrupt occurred or not.
  650. * @rmtoll SYSCFG_ITLINE7 SR_EXTI7 LL_SYSCFG_IsActiveFlag_EXTI7
  651. * @retval State of bit (1 or 0).
  652. */
  653. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI7(void)
  654. {
  655. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI7) == (SYSCFG_ITLINE7_SR_EXTI7)) ? 1UL : 0UL);
  656. }
  657. #endif /* SYSCFG_ITLINE7_SR_EXTI7 */
  658. #if defined(SYSCFG_ITLINE7_SR_EXTI8)
  659. /**
  660. * @brief Check if EXTI line 8 interrupt occurred or not.
  661. * @rmtoll SYSCFG_ITLINE7 SR_EXTI8 LL_SYSCFG_IsActiveFlag_EXTI8
  662. * @retval State of bit (1 or 0).
  663. */
  664. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI8(void)
  665. {
  666. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI8) == (SYSCFG_ITLINE7_SR_EXTI8)) ? 1UL : 0UL);
  667. }
  668. #endif /* SYSCFG_ITLINE7_SR_EXTI8 */
  669. #if defined(SYSCFG_ITLINE7_SR_EXTI9)
  670. /**
  671. * @brief Check if EXTI line 9 interrupt occurred or not.
  672. * @rmtoll SYSCFG_ITLINE7 SR_EXTI9 LL_SYSCFG_IsActiveFlag_EXTI9
  673. * @retval State of bit (1 or 0).
  674. */
  675. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI9(void)
  676. {
  677. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI9) == (SYSCFG_ITLINE7_SR_EXTI9)) ? 1UL : 0UL);
  678. }
  679. #endif /* SYSCFG_ITLINE7_SR_EXTI9 */
  680. #if defined(SYSCFG_ITLINE7_SR_EXTI10)
  681. /**
  682. * @brief Check if EXTI line 10 interrupt occurred or not.
  683. * @rmtoll SYSCFG_ITLINE7 SR_EXTI10 LL_SYSCFG_IsActiveFlag_EXTI10
  684. * @retval State of bit (1 or 0).
  685. */
  686. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI10(void)
  687. {
  688. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI10) == (SYSCFG_ITLINE7_SR_EXTI10)) ? 1UL : 0UL);
  689. }
  690. #endif /* SYSCFG_ITLINE7_SR_EXTI10 */
  691. #if defined(SYSCFG_ITLINE7_SR_EXTI11)
  692. /**
  693. * @brief Check if EXTI line 11 interrupt occurred or not.
  694. * @rmtoll SYSCFG_ITLINE7 SR_EXTI11 LL_SYSCFG_IsActiveFlag_EXTI11
  695. * @retval State of bit (1 or 0).
  696. */
  697. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI11(void)
  698. {
  699. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI11) == (SYSCFG_ITLINE7_SR_EXTI11)) ? 1UL : 0UL);
  700. }
  701. #endif /* SYSCFG_ITLINE7_SR_EXTI11 */
  702. #if defined(SYSCFG_ITLINE7_SR_EXTI12)
  703. /**
  704. * @brief Check if EXTI line 12 interrupt occurred or not.
  705. * @rmtoll SYSCFG_ITLINE7 SR_EXTI12 LL_SYSCFG_IsActiveFlag_EXTI12
  706. * @retval State of bit (1 or 0).
  707. */
  708. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI12(void)
  709. {
  710. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI12) == (SYSCFG_ITLINE7_SR_EXTI12)) ? 1UL : 0UL);
  711. }
  712. #endif /* SYSCFG_ITLINE7_SR_EXTI12 */
  713. #if defined(SYSCFG_ITLINE7_SR_EXTI13)
  714. /**
  715. * @brief Check if EXTI line 13 interrupt occurred or not.
  716. * @rmtoll SYSCFG_ITLINE7 SR_EXTI13 LL_SYSCFG_IsActiveFlag_EXTI13
  717. * @retval State of bit (1 or 0).
  718. */
  719. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI13(void)
  720. {
  721. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI13) == (SYSCFG_ITLINE7_SR_EXTI13)) ? 1UL : 0UL);
  722. }
  723. #endif /* SYSCFG_ITLINE7_SR_EXTI13 */
  724. #if defined(SYSCFG_ITLINE7_SR_EXTI14)
  725. /**
  726. * @brief Check if EXTI line 14 interrupt occurred or not.
  727. * @rmtoll SYSCFG_ITLINE7 SR_EXTI14 LL_SYSCFG_IsActiveFlag_EXTI14
  728. * @retval State of bit (1 or 0).
  729. */
  730. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI14(void)
  731. {
  732. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI14) == (SYSCFG_ITLINE7_SR_EXTI14)) ? 1UL : 0UL);
  733. }
  734. #endif /* SYSCFG_ITLINE7_SR_EXTI14 */
  735. #if defined(SYSCFG_ITLINE7_SR_EXTI15)
  736. /**
  737. * @brief Check if EXTI line 15 interrupt occurred or not.
  738. * @rmtoll SYSCFG_ITLINE7 SR_EXTI15 LL_SYSCFG_IsActiveFlag_EXTI15
  739. * @retval State of bit (1 or 0).
  740. */
  741. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_EXTI15(void)
  742. {
  743. return ((READ_BIT(SYSCFG->IT_LINE_SR[7], SYSCFG_ITLINE7_SR_EXTI15) == (SYSCFG_ITLINE7_SR_EXTI15)) ? 1UL : 0UL);
  744. }
  745. #endif /* SYSCFG_ITLINE7_SR_EXTI15 */
  746. #if defined(SYSCFG_ITLINE8_SR_UCPD1)
  747. /**
  748. * @brief Check if UCPD1 interrupt occurred or not.
  749. * @rmtoll SYSCFG_ITLINE8 SR_UCPD1 LL_SYSCFG_IsActiveFlag_UCPD1
  750. * @retval State of bit (1 or 0).
  751. */
  752. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_UCPD1(void)
  753. {
  754. return ((READ_BIT(SYSCFG->IT_LINE_SR[8], SYSCFG_ITLINE8_SR_UCPD1) == (SYSCFG_ITLINE8_SR_UCPD1)) ? 1UL : 0UL);
  755. }
  756. #endif /* SYSCFG_ITLINE8_SR_UCPD1 */
  757. #if defined(SYSCFG_ITLINE8_SR_UCPD2)
  758. /**
  759. * @brief Check if UCPD2 interrupt occurred or not.
  760. * @rmtoll SYSCFG_ITLINE8 SR_UCPD2 LL_SYSCFG_IsActiveFlag_UCPD2
  761. * @retval State of bit (1 or 0).
  762. */
  763. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_UCPD2(void)
  764. {
  765. return ((READ_BIT(SYSCFG->IT_LINE_SR[8], SYSCFG_ITLINE8_SR_UCPD2) == (SYSCFG_ITLINE8_SR_UCPD2)) ? 1UL : 0UL);
  766. }
  767. #endif /* SYSCFG_ITLINE8_SR_UCPD2 */
  768. #if defined(SYSCFG_ITLINE8_SR_USB)
  769. /**
  770. * @brief Check if USB interrupt occurred or not.
  771. * @rmtoll SYSCFG_ITLINE8 SR_USB LL_SYSCFG_IsActiveFlag_USB
  772. * @retval State of bit (1 or 0).
  773. */
  774. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USB(void)
  775. {
  776. return ((READ_BIT(SYSCFG->IT_LINE_SR[8], SYSCFG_ITLINE8_SR_USB) == (SYSCFG_ITLINE8_SR_USB)) ? 1UL : 0UL);
  777. }
  778. #endif /* SYSCFG_ITLINE8_SR_USB */
  779. #if defined(SYSCFG_ITLINE9_SR_DMA1_CH1)
  780. /**
  781. * @brief Check if DMA1 channel 1 interrupt occurred or not.
  782. * @rmtoll SYSCFG_ITLINE9 SR_DMA1_CH1 LL_SYSCFG_IsActiveFlag_DMA1_CH1
  783. * @retval State of bit (1 or 0).
  784. */
  785. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH1(void)
  786. {
  787. return ((READ_BIT(SYSCFG->IT_LINE_SR[9], SYSCFG_ITLINE9_SR_DMA1_CH1) == (SYSCFG_ITLINE9_SR_DMA1_CH1)) ? 1UL : 0UL);
  788. }
  789. #endif /* SYSCFG_ITLINE9_SR_DMA1_CH1 */
  790. #if defined(SYSCFG_ITLINE10_SR_DMA1_CH2)
  791. /**
  792. * @brief Check if DMA1 channel 2 interrupt occurred or not.
  793. * @rmtoll SYSCFG_ITLINE10 SR_DMA1_CH2 LL_SYSCFG_IsActiveFlag_DMA1_CH2
  794. * @retval State of bit (1 or 0).
  795. */
  796. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH2(void)
  797. {
  798. return ((READ_BIT(SYSCFG->IT_LINE_SR[10], SYSCFG_ITLINE10_SR_DMA1_CH2) == (SYSCFG_ITLINE10_SR_DMA1_CH2)) ? 1UL : 0UL);
  799. }
  800. #endif /* SYSCFG_ITLINE10_SR_DMA1_CH2 */
  801. #if defined(SYSCFG_ITLINE10_SR_DMA1_CH3)
  802. /**
  803. * @brief Check if DMA1 channel 3 interrupt occurred or not.
  804. * @rmtoll SYSCFG_ITLINE10 SR_DMA1_CH3 LL_SYSCFG_IsActiveFlag_DMA1_CH3
  805. * @retval State of bit (1 or 0).
  806. */
  807. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH3(void)
  808. {
  809. return ((READ_BIT(SYSCFG->IT_LINE_SR[10], SYSCFG_ITLINE10_SR_DMA1_CH3) == (SYSCFG_ITLINE10_SR_DMA1_CH3)) ? 1UL : 0UL);
  810. }
  811. #endif /* SYSCFG_ITLINE10_SR_DMA1_CH3 */
  812. #if defined(SYSCFG_ITLINE11_SR_DMA1_CH4)
  813. /**
  814. * @brief Check if DMA1 channel 4 interrupt occurred or not.
  815. * @rmtoll SYSCFG_ITLINE11 SR_DMA1_CH4 LL_SYSCFG_IsActiveFlag_DMA1_CH4
  816. * @retval State of bit (1 or 0).
  817. */
  818. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH4(void)
  819. {
  820. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA1_CH4) == (SYSCFG_ITLINE11_SR_DMA1_CH4)) ? 1UL : 0UL);
  821. }
  822. #endif /* SYSCFG_ITLINE11_SR_DMA1_CH4 */
  823. #if defined(SYSCFG_ITLINE11_SR_DMA1_CH5)
  824. /**
  825. * @brief Check if DMA1 channel 5 interrupt occurred or not.
  826. * @rmtoll SYSCFG_ITLINE11 SR_DMA1_CH5 LL_SYSCFG_IsActiveFlag_DMA1_CH5
  827. * @retval State of bit (1 or 0).
  828. */
  829. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH5(void)
  830. {
  831. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA1_CH5) == (SYSCFG_ITLINE11_SR_DMA1_CH5)) ? 1UL : 0UL);
  832. }
  833. #endif /* SYSCFG_ITLINE11_SR_DMA1_CH5 */
  834. #if defined(SYSCFG_ITLINE11_SR_DMA1_CH6)
  835. /**
  836. * @brief Check if DMA1 channel 6 interrupt occurred or not.
  837. * @rmtoll SYSCFG_ITLINE11 SR_DMA1_CH6 LL_SYSCFG_IsActiveFlag_DMA1_CH6
  838. * @retval State of bit (1 or 0).
  839. */
  840. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH6(void)
  841. {
  842. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA1_CH6) == (SYSCFG_ITLINE11_SR_DMA1_CH6)) ? 1UL : 0UL);
  843. }
  844. #endif /* SYSCFG_ITLINE11_SR_DMA1_CH6 */
  845. #if defined(SYSCFG_ITLINE11_SR_DMA1_CH7)
  846. /**
  847. * @brief Check if DMA1 channel 7 interrupt occurred or not.
  848. * @rmtoll SYSCFG_ITLINE11 SR_DMA1_CH7 LL_SYSCFG_IsActiveFlag_DMA1_CH7
  849. * @retval State of bit (1 or 0).
  850. */
  851. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA1_CH7(void)
  852. {
  853. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA1_CH7) == (SYSCFG_ITLINE11_SR_DMA1_CH7)) ? 1UL : 0UL);
  854. }
  855. #endif /* SYSCFG_ITLINE11_SR_DMA1_CH7 */
  856. #if defined(SYSCFG_ITLINE11_SR_DMAMUX1)
  857. /**
  858. * @brief Check if DMAMUX interrupt occurred or not.
  859. * @rmtoll SYSCFG_ITLINE11 SR_DMAMUX1 LL_SYSCFG_IsActiveFlag_DMAMUX
  860. * @retval State of bit (1 or 0).
  861. */
  862. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMAMUX(void)
  863. {
  864. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMAMUX1) == (SYSCFG_ITLINE11_SR_DMAMUX1)) ? 1UL : 0UL);
  865. }
  866. #endif /* SYSCFG_ITLINE11_SR_DMAMUX */
  867. #if defined(SYSCFG_ITLINE11_SR_DMA2_CH1)
  868. /**
  869. * @brief Check if DMA2_CH1 interrupt occurred or not.
  870. * @rmtoll SYSCFG_ITLINE11 SR_DMA2_CH1 LL_SYSCFG_IsActiveFlag_DMA2_CH1
  871. * @retval State of bit (1 or 0).
  872. */
  873. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA2_CH1(void)
  874. {
  875. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA2_CH1) == (SYSCFG_ITLINE11_SR_DMA2_CH1)) ? 1UL : 0UL);
  876. }
  877. #endif /* SYSCFG_ITLINE11_SR_DMA2_CH1 */
  878. #if defined(SYSCFG_ITLINE11_SR_DMA2_CH2)
  879. /**
  880. * @brief Check if DMA2_CH2 interrupt occurred or not.
  881. * @rmtoll SYSCFG_ITLINE11 SR_DMA2_CH2 LL_SYSCFG_IsActiveFlag_DMA2_CH2
  882. * @retval State of bit (1 or 0).
  883. */
  884. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA2_CH2(void)
  885. {
  886. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA2_CH2) == (SYSCFG_ITLINE11_SR_DMA2_CH2)) ? 1UL : 0UL);
  887. }
  888. #endif /* SYSCFG_ITLINE11_SR_DMA2_CH2 */
  889. #if defined(SYSCFG_ITLINE11_SR_DMA2_CH3)
  890. /**
  891. * @brief Check if DMA2_CH3 interrupt occurred or not.
  892. * @rmtoll SYSCFG_ITLINE11 SR_DMA2_CH3 LL_SYSCFG_IsActiveFlag_DMA2_CH3
  893. * @retval State of bit (1 or 0).
  894. */
  895. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA2_CH3(void)
  896. {
  897. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA2_CH3) == (SYSCFG_ITLINE11_SR_DMA2_CH3)) ? 1UL : 0UL);
  898. }
  899. #endif /* SYSCFG_ITLINE11_SR_DMA2_CH3 */
  900. #if defined(SYSCFG_ITLINE11_SR_DMA2_CH4)
  901. /**
  902. * @brief Check if DMA2_CH4 interrupt occurred or not.
  903. * @rmtoll SYSCFG_ITLINE11 SR_DMA2_CH4 LL_SYSCFG_IsActiveFlag_DMA2_CH4
  904. * @retval State of bit (1 or 0).
  905. */
  906. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA2_CH4(void)
  907. {
  908. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA2_CH4) == (SYSCFG_ITLINE11_SR_DMA2_CH4)) ? 1UL : 0UL);
  909. }
  910. #endif /* SYSCFG_ITLINE11_SR_DMA2_CH4 */
  911. #if defined(SYSCFG_ITLINE11_SR_DMA2_CH5)
  912. /**
  913. * @brief Check if DMA2_CH5 interrupt occurred or not.
  914. * @rmtoll SYSCFG_ITLINE11 SR_DMA2_CH5 LL_SYSCFG_IsActiveFlag_DMA2_CH5
  915. * @retval State of bit (1 or 0).
  916. */
  917. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DMA2_CH5(void)
  918. {
  919. return ((READ_BIT(SYSCFG->IT_LINE_SR[11], SYSCFG_ITLINE11_SR_DMA2_CH5) == (SYSCFG_ITLINE11_SR_DMA2_CH5)) ? 1UL : 0UL);
  920. }
  921. #endif /* SYSCFG_ITLINE11_SR_DMA2_CH5 */
  922. #if defined(SYSCFG_ITLINE12_SR_ADC)
  923. /**
  924. * @brief Check if ADC interrupt occurred or not.
  925. * @rmtoll SYSCFG_ITLINE12 SR_ADC LL_SYSCFG_IsActiveFlag_ADC
  926. * @retval State of bit (1 or 0).
  927. */
  928. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_ADC(void)
  929. {
  930. return ((READ_BIT(SYSCFG->IT_LINE_SR[12], SYSCFG_ITLINE12_SR_ADC) == (SYSCFG_ITLINE12_SR_ADC)) ? 1UL : 0UL);
  931. }
  932. #endif /* SYSCFG_ITLINE12_SR_ADC */
  933. #if defined(SYSCFG_ITLINE12_SR_COMP1)
  934. /**
  935. * @brief Check if Comparator 1 interrupt occurred or not (EXTI line 21).
  936. * @rmtoll SYSCFG_ITLINE12 SR_COMP1 LL_SYSCFG_IsActiveFlag_COMP1
  937. * @retval State of bit (1 or 0).
  938. */
  939. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_COMP1(void)
  940. {
  941. return ((READ_BIT(SYSCFG->IT_LINE_SR[12], SYSCFG_ITLINE12_SR_COMP1) == (SYSCFG_ITLINE12_SR_COMP1)) ? 1UL : 0UL);
  942. }
  943. #endif /* SYSCFG_ITLINE12_SR_COMP1 */
  944. #if defined(SYSCFG_ITLINE12_SR_COMP2)
  945. /**
  946. * @brief Check if Comparator 2 interrupt occurred or not (EXTI line 22).
  947. * @rmtoll SYSCFG_ITLINE12 SR_COMP2 LL_SYSCFG_IsActiveFlag_COMP2
  948. * @retval State of bit (1 or 0).
  949. */
  950. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_COMP2(void)
  951. {
  952. return ((READ_BIT(SYSCFG->IT_LINE_SR[12], SYSCFG_ITLINE12_SR_COMP2) == (SYSCFG_ITLINE12_SR_COMP2)) ? 1UL : 0UL);
  953. }
  954. #endif /* SYSCFG_ITLINE12_SR_COMP2 */
  955. #if defined(SYSCFG_ITLINE12_SR_COMP3)
  956. /**
  957. * @brief Check if Comparator 3 interrupt occurred or not (EXTI line 20).
  958. * @rmtoll SYSCFG_ITLINE12 SR_COMP3 LL_SYSCFG_IsActiveFlag_COMP3
  959. * @retval State of bit (1 or 0).
  960. */
  961. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_COMP3(void)
  962. {
  963. return ((READ_BIT(SYSCFG->IT_LINE_SR[12], SYSCFG_ITLINE12_SR_COMP3) == (SYSCFG_ITLINE12_SR_COMP3)) ? 1UL : 0UL);
  964. }
  965. #endif /* SYSCFG_ITLINE12_SR_COMP3 */
  966. #if defined(SYSCFG_ITLINE13_SR_TIM1_BRK)
  967. /**
  968. * @brief Check if Timer 1 break interrupt occurred or not.
  969. * @rmtoll SYSCFG_ITLINE13 SR_TIM1_BRK LL_SYSCFG_IsActiveFlag_TIM1_BRK
  970. * @retval State of bit (1 or 0).
  971. */
  972. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM1_BRK(void)
  973. {
  974. return ((READ_BIT(SYSCFG->IT_LINE_SR[13], SYSCFG_ITLINE13_SR_TIM1_BRK) == (SYSCFG_ITLINE13_SR_TIM1_BRK)) ? 1UL : 0UL);
  975. }
  976. #endif /* SYSCFG_ITLINE13_SR_TIM1_BRK */
  977. #if defined(SYSCFG_ITLINE13_SR_TIM1_UPD)
  978. /**
  979. * @brief Check if Timer 1 update interrupt occurred or not.
  980. * @rmtoll SYSCFG_ITLINE13 SR_TIM1_UPD LL_SYSCFG_IsActiveFlag_TIM1_UPD
  981. * @retval State of bit (1 or 0).
  982. */
  983. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM1_UPD(void)
  984. {
  985. return ((READ_BIT(SYSCFG->IT_LINE_SR[13], SYSCFG_ITLINE13_SR_TIM1_UPD) == (SYSCFG_ITLINE13_SR_TIM1_UPD)) ? 1UL : 0UL);
  986. }
  987. #endif /* SYSCFG_ITLINE13_SR_TIM1_UPD */
  988. #if defined(SYSCFG_ITLINE13_SR_TIM1_TRG)
  989. /**
  990. * @brief Check if Timer 1 trigger interrupt occurred or not.
  991. * @rmtoll SYSCFG_ITLINE13 SR_TIM1_TRG LL_SYSCFG_IsActiveFlag_TIM1_TRG
  992. * @retval State of bit (1 or 0).
  993. */
  994. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM1_TRG(void)
  995. {
  996. return ((READ_BIT(SYSCFG->IT_LINE_SR[13], SYSCFG_ITLINE13_SR_TIM1_TRG) == (SYSCFG_ITLINE13_SR_TIM1_TRG)) ? 1UL : 0UL);
  997. }
  998. #endif /* SYSCFG_ITLINE13_SR_TIM1_TRG */
  999. #if defined(SYSCFG_ITLINE13_SR_TIM1_CCU)
  1000. /**
  1001. * @brief Check if Timer 1 commutation interrupt occurred or not.
  1002. * @rmtoll SYSCFG_ITLINE13 SR_TIM1_CCU LL_SYSCFG_IsActiveFlag_TIM1_CCU
  1003. * @retval State of bit (1 or 0).
  1004. */
  1005. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM1_CCU(void)
  1006. {
  1007. return ((READ_BIT(SYSCFG->IT_LINE_SR[13], SYSCFG_ITLINE13_SR_TIM1_CCU) == (SYSCFG_ITLINE13_SR_TIM1_CCU)) ? 1UL : 0UL);
  1008. }
  1009. #endif /* SYSCFG_ITLINE13_SR_TIM1_CCU */
  1010. #if defined(SYSCFG_ITLINE14_SR_TIM1_CC)
  1011. /**
  1012. * @brief Check if Timer 1 capture compare interrupt occurred or not.
  1013. * @rmtoll SYSCFG_ITLINE14 SR_TIM1_CC LL_SYSCFG_IsActiveFlag_TIM1_CC
  1014. * @retval State of bit (1 or 0).
  1015. */
  1016. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM1_CC(void)
  1017. {
  1018. return ((READ_BIT(SYSCFG->IT_LINE_SR[14], SYSCFG_ITLINE14_SR_TIM1_CC) == (SYSCFG_ITLINE14_SR_TIM1_CC)) ? 1UL : 0UL);
  1019. }
  1020. #endif /* SYSCFG_ITLINE14_SR_TIM1_CC */
  1021. #if defined(SYSCFG_ITLINE15_SR_TIM2_GLB)
  1022. /**
  1023. * @brief Check if Timer 2 interrupt occurred or not.
  1024. * @rmtoll SYSCFG_ITLINE15 SR_TIM2_GLB LL_SYSCFG_IsActiveFlag_TIM2
  1025. * @retval State of bit (1 or 0).
  1026. */
  1027. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM2(void)
  1028. {
  1029. return ((READ_BIT(SYSCFG->IT_LINE_SR[15], SYSCFG_ITLINE15_SR_TIM2_GLB) == (SYSCFG_ITLINE15_SR_TIM2_GLB)) ? 1UL : 0UL);
  1030. }
  1031. #endif /* SYSCFG_ITLINE15_SR_TIM2_GLB */
  1032. #if defined(SYSCFG_ITLINE16_SR_TIM3_GLB)
  1033. /**
  1034. * @brief Check if Timer 3 interrupt occurred or not.
  1035. * @rmtoll SYSCFG_ITLINE16 SR_TIM3_GLB LL_SYSCFG_IsActiveFlag_TIM3
  1036. * @retval State of bit (1 or 0).
  1037. */
  1038. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM3(void)
  1039. {
  1040. return ((READ_BIT(SYSCFG->IT_LINE_SR[16], SYSCFG_ITLINE16_SR_TIM3_GLB) == (SYSCFG_ITLINE16_SR_TIM3_GLB)) ? 1UL : 0UL);
  1041. }
  1042. #endif /* SYSCFG_ITLINE16_SR_TIM3_GLB */
  1043. #if defined(SYSCFG_ITLINE16_SR_TIM4_GLB)
  1044. /**
  1045. * @brief Check if Timer 3 interrupt occurred or not.
  1046. * @rmtoll SYSCFG_ITLINE16 SR_TIM4_GLB LL_SYSCFG_IsActiveFlag_TIM4
  1047. * @retval State of bit (1 or 0).
  1048. */
  1049. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM4(void)
  1050. {
  1051. return ((READ_BIT(SYSCFG->IT_LINE_SR[16], SYSCFG_ITLINE16_SR_TIM4_GLB) == (SYSCFG_ITLINE16_SR_TIM4_GLB)) ? 1UL : 0UL);
  1052. }
  1053. #endif /* SYSCFG_ITLINE16_SR_TIM4_GLB */
  1054. #if defined(SYSCFG_ITLINE17_SR_DAC)
  1055. /**
  1056. * @brief Check if DAC underrun interrupt occurred or not.
  1057. * @rmtoll SYSCFG_ITLINE17 SR_DAC LL_SYSCFG_IsActiveFlag_DAC
  1058. * @retval State of bit (1 or 0).
  1059. */
  1060. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_DAC(void)
  1061. {
  1062. return ((READ_BIT(SYSCFG->IT_LINE_SR[17], SYSCFG_ITLINE17_SR_DAC) == (SYSCFG_ITLINE17_SR_DAC)) ? 1UL : 0UL);
  1063. }
  1064. #endif /* SYSCFG_ITLINE17_SR_DAC */
  1065. #if defined(SYSCFG_ITLINE17_SR_TIM6_GLB)
  1066. /**
  1067. * @brief Check if Timer 6 interrupt occurred or not.
  1068. * @rmtoll SYSCFG_ITLINE17 SR_TIM6_GLB LL_SYSCFG_IsActiveFlag_TIM6
  1069. * @retval State of bit (1 or 0).
  1070. */
  1071. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM6(void)
  1072. {
  1073. return ((READ_BIT(SYSCFG->IT_LINE_SR[17], SYSCFG_ITLINE17_SR_TIM6_GLB) == (SYSCFG_ITLINE17_SR_TIM6_GLB)) ? 1UL : 0UL);
  1074. }
  1075. #endif /* SYSCFG_ITLINE17_SR_TIM6_GLB */
  1076. #if defined(SYSCFG_ITLINE17_SR_LPTIM1_GLB)
  1077. /**
  1078. * @brief Check if LPTIM1 interrupt occurred or not.
  1079. * @rmtoll SYSCFG_ITLINE17 SR_LPTIM1_GLB LL_SYSCFG_IsActiveFlag_LPTIM1
  1080. * @retval State of bit (1 or 0).
  1081. */
  1082. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_LPTIM1(void)
  1083. {
  1084. return ((READ_BIT(SYSCFG->IT_LINE_SR[17], SYSCFG_ITLINE17_SR_LPTIM1_GLB) == (SYSCFG_ITLINE17_SR_LPTIM1_GLB)) ? 1UL : 0UL);
  1085. }
  1086. #endif /* SYSCFG_ITLINE17_SR_LPTIM1_GLB */
  1087. #if defined(SYSCFG_ITLINE18_SR_TIM7_GLB)
  1088. /**
  1089. * @brief Check if Timer 7 interrupt occurred or not.
  1090. * @rmtoll SYSCFG_ITLINE18 SR_TIM7_GLB LL_SYSCFG_IsActiveFlag_TIM7
  1091. * @retval State of bit (1 or 0).
  1092. */
  1093. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM7(void)
  1094. {
  1095. return ((READ_BIT(SYSCFG->IT_LINE_SR[18], SYSCFG_ITLINE18_SR_TIM7_GLB) == (SYSCFG_ITLINE18_SR_TIM7_GLB)) ? 1UL : 0UL);
  1096. }
  1097. #endif /* SYSCFG_ITLINE18_SR_TIM7_GLB */
  1098. #if defined(SYSCFG_ITLINE18_SR_LPTIM2_GLB)
  1099. /**
  1100. * @brief Check if LPTIM2 interrupt occurred or not.
  1101. * @rmtoll SYSCFG_ITLINE18 SR_LPTIM2_GLB LL_SYSCFG_IsActiveFlag_LPTIM2
  1102. * @retval State of bit (1 or 0).
  1103. */
  1104. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_LPTIM2(void)
  1105. {
  1106. return ((READ_BIT(SYSCFG->IT_LINE_SR[18], SYSCFG_ITLINE18_SR_LPTIM2_GLB) == (SYSCFG_ITLINE18_SR_LPTIM2_GLB)) ? 1UL : 0UL);
  1107. }
  1108. #endif /* SYSCFG_ITLINE18_SR_LPTIM2_GLB */
  1109. #if defined(SYSCFG_ITLINE19_SR_TIM14_GLB)
  1110. /**
  1111. * @brief Check if Timer 14 interrupt occurred or not.
  1112. * @rmtoll SYSCFG_ITLINE19 SR_TIM14_GLB LL_SYSCFG_IsActiveFlag_TIM14
  1113. * @retval State of bit (1 or 0).
  1114. */
  1115. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM14(void)
  1116. {
  1117. return ((READ_BIT(SYSCFG->IT_LINE_SR[19], SYSCFG_ITLINE19_SR_TIM14_GLB) == (SYSCFG_ITLINE19_SR_TIM14_GLB)) ? 1UL : 0UL);
  1118. }
  1119. #endif /* SYSCFG_ITLINE19_SR_TIM14_GLB */
  1120. #if defined(SYSCFG_ITLINE20_SR_TIM15_GLB)
  1121. /**
  1122. * @brief Check if Timer 15 interrupt occurred or not.
  1123. * @rmtoll SYSCFG_ITLINE20 SR_TIM15_GLB LL_SYSCFG_IsActiveFlag_TIM15
  1124. * @retval State of bit (1 or 0).
  1125. */
  1126. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM15(void)
  1127. {
  1128. return ((READ_BIT(SYSCFG->IT_LINE_SR[20], SYSCFG_ITLINE20_SR_TIM15_GLB) == (SYSCFG_ITLINE20_SR_TIM15_GLB)) ? 1UL : 0UL);
  1129. }
  1130. #endif /* SYSCFG_ITLINE20_SR_TIM15_GLB */
  1131. #if defined(SYSCFG_ITLINE21_SR_TIM16_GLB)
  1132. /**
  1133. * @brief Check if Timer 16 interrupt occurred or not.
  1134. * @rmtoll SYSCFG_ITLINE21 SR_TIM16_GLB LL_SYSCFG_IsActiveFlag_TIM16
  1135. * @retval State of bit (1 or 0).
  1136. */
  1137. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM16(void)
  1138. {
  1139. return ((READ_BIT(SYSCFG->IT_LINE_SR[21], SYSCFG_ITLINE21_SR_TIM16_GLB) == (SYSCFG_ITLINE21_SR_TIM16_GLB)) ? 1UL : 0UL);
  1140. }
  1141. #endif /* SYSCFG_ITLINE21_SR_TIM16_GLB */
  1142. #if defined(SYSCFG_ITLINE21_SR_FDCAN1_IT0)
  1143. /**
  1144. * @brief Check if FDCAN1_IT0 interrupt occurred or not.
  1145. * @rmtoll SYSCFG_ITLINE21 SR_FDCAN1_IT0 LL_SYSCFG_IsActiveFlag_FDCAN1_IT0
  1146. * @retval State of bit (1 or 0).
  1147. */
  1148. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FDCAN1_IT0(void)
  1149. {
  1150. return ((READ_BIT(SYSCFG->IT_LINE_SR[21], SYSCFG_ITLINE21_SR_FDCAN1_IT0) == (SYSCFG_ITLINE21_SR_FDCAN1_IT0)) ? 1UL : 0UL);
  1151. }
  1152. #endif /* SYSCFG_ITLINE21_SR_FDCAN1_IT0 */
  1153. #if defined(SYSCFG_ITLINE21_SR_FDCAN2_IT0)
  1154. /**
  1155. * @brief Check if FDCAN2_IT0 interrupt occurred or not.
  1156. * @rmtoll SYSCFG_ITLINE21 SR_FDCAN2_IT0 LL_SYSCFG_IsActiveFlag_FDCAN2_IT0
  1157. * @retval State of bit (1 or 0).
  1158. */
  1159. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FDCAN2_IT0(void)
  1160. {
  1161. return ((READ_BIT(SYSCFG->IT_LINE_SR[21], SYSCFG_ITLINE21_SR_FDCAN2_IT0) == (SYSCFG_ITLINE21_SR_FDCAN2_IT0)) ? 1UL : 0UL);
  1162. }
  1163. #endif /* SYSCFG_ITLINE21_SR_FDCAN2_IT0 */
  1164. #if defined(SYSCFG_ITLINE22_SR_TIM17_GLB)
  1165. /**
  1166. * @brief Check if Timer 17 interrupt occurred or not.
  1167. * @rmtoll SYSCFG_ITLINE22 SR_TIM17_GLB LL_SYSCFG_IsActiveFlag_TIM17
  1168. * @retval State of bit (1 or 0).
  1169. */
  1170. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_TIM17(void)
  1171. {
  1172. return ((READ_BIT(SYSCFG->IT_LINE_SR[22], SYSCFG_ITLINE22_SR_TIM17_GLB) == (SYSCFG_ITLINE22_SR_TIM17_GLB)) ? 1UL : 0UL);
  1173. }
  1174. #endif /* SYSCFG_ITLINE22_SR_TIM17_GLB */
  1175. #if defined(SYSCFG_ITLINE22_SR_FDCAN1_IT1)
  1176. /**
  1177. * @brief Check if FDCAN1_IT1 interrupt occurred or not.
  1178. * @rmtoll SYSCFG_ITLINE22 SR_FDCAN1_IT1 LL_SYSCFG_IsActiveFlag_FDCAN1_IT1
  1179. * @retval State of bit (1 or 0).
  1180. */
  1181. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FDCAN1_IT1(void)
  1182. {
  1183. return ((READ_BIT(SYSCFG->IT_LINE_SR[22], SYSCFG_ITLINE22_SR_FDCAN1_IT1) == (SYSCFG_ITLINE22_SR_FDCAN1_IT1)) ? 1UL : 0UL);
  1184. }
  1185. #endif /* SYSCFG_ITLINE22_SR_FDCAN1_IT1 */
  1186. #if defined(SYSCFG_ITLINE22_SR_FDCAN2_IT1)
  1187. /**
  1188. * @brief Check if FDCAN2_IT1 interrupt occurred or not.
  1189. * @rmtoll SYSCFG_ITLINE22 SR_FDCAN2_IT1 LL_SYSCFG_IsActiveFlag_FDCAN2_IT1
  1190. * @retval State of bit (1 or 0).
  1191. */
  1192. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_FDCAN2_IT1(void)
  1193. {
  1194. return ((READ_BIT(SYSCFG->IT_LINE_SR[22], SYSCFG_ITLINE22_SR_FDCAN2_IT1) == (SYSCFG_ITLINE22_SR_FDCAN2_IT1)) ? 1UL : 0UL);
  1195. }
  1196. #endif /* SYSCFG_ITLINE22_SR_FDCAN2_IT1 */
  1197. #if defined(SYSCFG_ITLINE23_SR_I2C1_GLB)
  1198. /**
  1199. * @brief Check if I2C1 interrupt occurred or not, combined with EXTI line 23.
  1200. * @rmtoll SYSCFG_ITLINE23 SR_I2C1_GLB LL_SYSCFG_IsActiveFlag_I2C1
  1201. * @retval State of bit (1 or 0).
  1202. */
  1203. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_I2C1(void)
  1204. {
  1205. return ((READ_BIT(SYSCFG->IT_LINE_SR[23], SYSCFG_ITLINE23_SR_I2C1_GLB) == (SYSCFG_ITLINE23_SR_I2C1_GLB)) ? 1UL : 0UL);
  1206. }
  1207. #endif /* SYSCFG_ITLINE23_SR_I2C1_GLB */
  1208. #if defined(SYSCFG_ITLINE24_SR_I2C2_GLB)
  1209. /**
  1210. * @brief Check if I2C2 interrupt occurred or not.
  1211. * @rmtoll SYSCFG_ITLINE24 SR_I2C2_GLB LL_SYSCFG_IsActiveFlag_I2C2
  1212. * @retval State of bit (1 or 0).
  1213. */
  1214. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_I2C2(void)
  1215. {
  1216. return ((READ_BIT(SYSCFG->IT_LINE_SR[24], SYSCFG_ITLINE24_SR_I2C2_GLB) == (SYSCFG_ITLINE24_SR_I2C2_GLB)) ? 1UL : 0UL);
  1217. }
  1218. #endif /* SYSCFG_ITLINE24_SR_I2C2_GLB */
  1219. #if defined(SYSCFG_ITLINE24_SR_I2C3_GLB)
  1220. /**
  1221. * @brief Check if I2C3 interrupt occurred or not.
  1222. * @rmtoll SYSCFG_ITLINE24 SR_I2C3_GLB LL_SYSCFG_IsActiveFlag_I2C3
  1223. * @retval State of bit (1 or 0).
  1224. */
  1225. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_I2C3(void)
  1226. {
  1227. return ((READ_BIT(SYSCFG->IT_LINE_SR[24], SYSCFG_ITLINE24_SR_I2C3_GLB) == (SYSCFG_ITLINE24_SR_I2C3_GLB)) ? 1UL : 0UL);
  1228. }
  1229. #endif /* SYSCFG_ITLINE24_SR_I2C3_GLB */
  1230. #if defined(SYSCFG_ITLINE25_SR_SPI1)
  1231. /**
  1232. * @brief Check if SPI1 interrupt occurred or not.
  1233. * @rmtoll SYSCFG_ITLINE25 SR_SPI1 LL_SYSCFG_IsActiveFlag_SPI1
  1234. * @retval State of bit (1 or 0).
  1235. */
  1236. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SPI1(void)
  1237. {
  1238. return ((READ_BIT(SYSCFG->IT_LINE_SR[25], SYSCFG_ITLINE25_SR_SPI1) == (SYSCFG_ITLINE25_SR_SPI1)) ? 1UL : 0UL);
  1239. }
  1240. #endif /* SYSCFG_ITLINE25_SR_SPI1 */
  1241. #if defined(SYSCFG_ITLINE26_SR_SPI2)
  1242. /**
  1243. * @brief Check if SPI2 interrupt occurred or not.
  1244. * @rmtoll SYSCFG_ITLINE26 SR_SPI2 LL_SYSCFG_IsActiveFlag_SPI2
  1245. * @retval State of bit (1 or 0).
  1246. */
  1247. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SPI2(void)
  1248. {
  1249. return ((READ_BIT(SYSCFG->IT_LINE_SR[26], SYSCFG_ITLINE26_SR_SPI2) == (SYSCFG_ITLINE26_SR_SPI2)) ? 1UL : 0UL);
  1250. }
  1251. #endif /* SYSCFG_ITLINE26_SR_SPI2 */
  1252. #if defined(SYSCFG_ITLINE26_SR_SPI3)
  1253. /**
  1254. * @brief Check if SPI3 interrupt occurred or not.
  1255. * @rmtoll SYSCFG_ITLINE26 SR_SPI3 LL_SYSCFG_IsActiveFlag_SPI3
  1256. * @retval State of bit (1 or 0).
  1257. */
  1258. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SPI3(void)
  1259. {
  1260. return ((READ_BIT(SYSCFG->IT_LINE_SR[26], SYSCFG_ITLINE26_SR_SPI3) == (SYSCFG_ITLINE26_SR_SPI3)) ? 1UL : 0UL);
  1261. }
  1262. #endif /* SYSCFG_ITLINE26_SR_SPI3 */
  1263. #if defined(SYSCFG_ITLINE27_SR_USART1_GLB)
  1264. /**
  1265. * @brief Check if USART1 interrupt occurred or not, combined with EXTI line 25.
  1266. * @rmtoll SYSCFG_ITLINE27 SR_USART1_GLB LL_SYSCFG_IsActiveFlag_USART1
  1267. * @retval State of bit (1 or 0).
  1268. */
  1269. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART1(void)
  1270. {
  1271. return ((READ_BIT(SYSCFG->IT_LINE_SR[27], SYSCFG_ITLINE27_SR_USART1_GLB) == (SYSCFG_ITLINE27_SR_USART1_GLB)) ? 1UL : 0UL);
  1272. }
  1273. #endif /* SYSCFG_ITLINE27_SR_USART1_GLB */
  1274. #if defined(SYSCFG_ITLINE28_SR_USART2_GLB)
  1275. /**
  1276. * @brief Check if USART2 interrupt occurred or not, combined with EXTI line 26.
  1277. * @rmtoll SYSCFG_ITLINE28 SR_USART2_GLB LL_SYSCFG_IsActiveFlag_USART2
  1278. * @retval State of bit (1 or 0).
  1279. */
  1280. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART2(void)
  1281. {
  1282. return ((READ_BIT(SYSCFG->IT_LINE_SR[28], SYSCFG_ITLINE28_SR_USART2_GLB) == (SYSCFG_ITLINE28_SR_USART2_GLB)) ? 1UL : 0UL);
  1283. }
  1284. #endif /* SYSCFG_ITLINE28_SR_USART2_GLB */
  1285. #if defined(SYSCFG_ITLINE28_SR_LPUART2_GLB)
  1286. /**
  1287. * @brief Check if LPUART2 interrupt occurred or not, combined with EXTI line 26.
  1288. * @rmtoll SYSCFG_ITLINE28 SR_LPUART2_GLB LL_SYSCFG_IsActiveFlag_LPUART2
  1289. * @retval State of bit (1 or 0).
  1290. */
  1291. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_LPUART2(void)
  1292. {
  1293. return ((READ_BIT(SYSCFG->IT_LINE_SR[28], SYSCFG_ITLINE28_SR_LPUART2_GLB) == (SYSCFG_ITLINE28_SR_LPUART2_GLB)) ? 1UL : 0UL);
  1294. }
  1295. #endif /* SYSCFG_ITLINE28_SR_LPUART2_GLB */
  1296. #if defined(SYSCFG_ITLINE29_SR_USART3_GLB)
  1297. /**
  1298. * @brief Check if USART3 interrupt occurred or not, combined with EXTI line 28.
  1299. * @rmtoll SYSCFG_ITLINE29 SR_USART3_GLB LL_SYSCFG_IsActiveFlag_USART3
  1300. * @retval State of bit (1 or 0).
  1301. */
  1302. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART3(void)
  1303. {
  1304. return ((READ_BIT(SYSCFG->IT_LINE_SR[29], SYSCFG_ITLINE29_SR_USART3_GLB) == (SYSCFG_ITLINE29_SR_USART3_GLB)) ? 1UL : 0UL);
  1305. }
  1306. #endif /* SYSCFG_ITLINE29_SR_USART3_GLB */
  1307. #if defined(SYSCFG_ITLINE29_SR_USART4_GLB)
  1308. /**
  1309. * @brief Check if USART4 interrupt occurred or not.
  1310. * @rmtoll SYSCFG_ITLINE29 SR_USART4_GLB LL_SYSCFG_IsActiveFlag_USART4
  1311. * @retval State of bit (1 or 0).
  1312. */
  1313. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART4(void)
  1314. {
  1315. return ((READ_BIT(SYSCFG->IT_LINE_SR[29], SYSCFG_ITLINE29_SR_USART4_GLB) == (SYSCFG_ITLINE29_SR_USART4_GLB)) ? 1UL : 0UL);
  1316. }
  1317. #endif /* SYSCFG_ITLINE29_SR_USART4_GLB */
  1318. #if defined(SYSCFG_ITLINE29_SR_LPUART1_GLB)
  1319. /**
  1320. * @brief Check if LPUART1 interrupt occurred or not.
  1321. * @rmtoll SYSCFG_ITLINE29 SR_LPUART1_GLB LL_SYSCFG_IsActiveFlag_LPUART1
  1322. * @retval State of bit (1 or 0).
  1323. */
  1324. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_LPUART1(void)
  1325. {
  1326. return ((READ_BIT(SYSCFG->IT_LINE_SR[29], SYSCFG_ITLINE29_SR_LPUART1_GLB) == (SYSCFG_ITLINE29_SR_LPUART1_GLB)) ? 1UL : 0UL);
  1327. }
  1328. #endif /* SYSCFG_ITLINE29_SR_LPUART1_GLB */
  1329. #if defined(SYSCFG_ITLINE29_SR_USART5_GLB)
  1330. /**
  1331. * @brief Check if USART5 interrupt occurred or not.
  1332. * @rmtoll SYSCFG_ITLINE29 SR_USART5_GLB LL_SYSCFG_IsActiveFlag_USART5
  1333. * @retval State of bit (1 or 0).
  1334. */
  1335. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART5(void)
  1336. {
  1337. return ((READ_BIT(SYSCFG->IT_LINE_SR[29], SYSCFG_ITLINE29_SR_USART5_GLB) == (SYSCFG_ITLINE29_SR_USART5_GLB)) ? 1UL : 0UL);
  1338. }
  1339. #endif /* SYSCFG_ITLINE29_SR_USART5_GLB */
  1340. #if defined(SYSCFG_ITLINE29_SR_USART6_GLB)
  1341. /**
  1342. * @brief Check if USART6 interrupt occurred or not.
  1343. * @rmtoll SYSCFG_ITLINE29 SR_USART6_GLB LL_SYSCFG_IsActiveFlag_USART6
  1344. * @retval State of bit (1 or 0).
  1345. */
  1346. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_USART6(void)
  1347. {
  1348. return ((READ_BIT(SYSCFG->IT_LINE_SR[29], SYSCFG_ITLINE29_SR_USART6_GLB) == (SYSCFG_ITLINE29_SR_USART6_GLB)) ? 1UL : 0UL);
  1349. }
  1350. #endif /* SYSCFG_ITLINE29_SR_USART6_GLB */
  1351. #if defined(SYSCFG_ITLINE30_SR_CEC)
  1352. /**
  1353. * @brief Check if CEC interrupt occurred or not, combined with EXTI line 27.
  1354. * @rmtoll SYSCFG_ITLINE30 SR_CEC LL_SYSCFG_IsActiveFlag_CEC
  1355. * @retval State of bit (1 or 0).
  1356. */
  1357. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_CEC(void)
  1358. {
  1359. return ((READ_BIT(SYSCFG->IT_LINE_SR[30], SYSCFG_ITLINE30_SR_CEC) == (SYSCFG_ITLINE30_SR_CEC)) ? 1UL : 0UL);
  1360. }
  1361. #endif /* SYSCFG_ITLINE30_SR_CEC */
  1362. #if defined(SYSCFG_ITLINE31_SR_AES)
  1363. /**
  1364. * @brief Check if AES interrupt occurred or not
  1365. * @rmtoll SYSCFG_ITLINE31 SR_AES LL_SYSCFG_IsActiveFlag_AES
  1366. * @retval State of bit (1 or 0).
  1367. */
  1368. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_AES(void)
  1369. {
  1370. return ((READ_BIT(SYSCFG->IT_LINE_SR[31], SYSCFG_ITLINE31_SR_AES) == (SYSCFG_ITLINE31_SR_AES)) ? 1UL : 0UL);
  1371. }
  1372. #endif /* SYSCFG_ITLINE31_SR_AES */
  1373. #if defined(SYSCFG_ITLINE31_SR_RNG)
  1374. /**
  1375. * @brief Check if RNG interrupt occurred or not, combined with EXTI line 31.
  1376. * @rmtoll SYSCFG_ITLINE31 SR_RNG LL_SYSCFG_IsActiveFlag_RNG
  1377. * @retval State of bit (1 or 0).
  1378. */
  1379. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_RNG(void)
  1380. {
  1381. return ((READ_BIT(SYSCFG->IT_LINE_SR[31], SYSCFG_ITLINE31_SR_RNG) == (SYSCFG_ITLINE31_SR_RNG)) ? 1UL : 0UL);
  1382. }
  1383. #endif /* SYSCFG_ITLINE31_SR_RNG */
  1384. /**
  1385. * @brief Set connections to TIM1/15/16/17 Break inputs
  1386. * @rmtoll SYSCFG_CFGR2 CLL LL_SYSCFG_SetTIMBreakInputs\n
  1387. * SYSCFG_CFGR2 SPL LL_SYSCFG_SetTIMBreakInputs\n
  1388. * SYSCFG_CFGR2 PVDL LL_SYSCFG_SetTIMBreakInputs\n
  1389. * SYSCFG_CFGR2 ECCL LL_SYSCFG_GetTIMBreakInputs
  1390. * @param Break This parameter can be a combination of the following values:
  1391. * @ifnot STM32G070xx
  1392. * @arg @ref LL_SYSCFG_TIMBREAK_PVD (*)
  1393. * @endif
  1394. * @arg @ref LL_SYSCFG_TIMBREAK_SRAM_PARITY
  1395. * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
  1396. * @arg @ref LL_SYSCFG_TIMBREAK_ECC
  1397. *
  1398. * (*) value not defined in all devices
  1399. * @retval None
  1400. */
  1401. __STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break)
  1402. {
  1403. #if defined(SYSCFG_CFGR2_PVDL)
  1404. MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL, Break);
  1405. #else
  1406. MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_ECCL, Break);
  1407. #endif /*SYSCFG_CFGR2_PVDL*/
  1408. }
  1409. /**
  1410. * @brief Get connections to TIM1/15/16/17 Break inputs
  1411. * @rmtoll SYSCFG_CFGR2 CLL LL_SYSCFG_GetTIMBreakInputs\n
  1412. * SYSCFG_CFGR2 SPL LL_SYSCFG_GetTIMBreakInputs\n
  1413. * SYSCFG_CFGR2 PVDL LL_SYSCFG_GetTIMBreakInputs\n
  1414. * SYSCFG_CFGR2 ECCL LL_SYSCFG_GetTIMBreakInputs
  1415. * @retval Returned value can be can be a combination of the following values:
  1416. * @ifnot STM32G070xx
  1417. * @arg @ref LL_SYSCFG_TIMBREAK_PVD (*)
  1418. * @endif
  1419. * @arg @ref LL_SYSCFG_TIMBREAK_SRAM_PARITY
  1420. * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP
  1421. * @arg @ref LL_SYSCFG_TIMBREAK_ECC
  1422. *
  1423. * (*) value not defined in all devices
  1424. */
  1425. __STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void)
  1426. {
  1427. #if defined(SYSCFG_CFGR2_PVDL)
  1428. return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL));
  1429. #else
  1430. return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_ECCL));
  1431. #endif /*SYSCFG_CFGR2_PVDL*/
  1432. }
  1433. /**
  1434. * @brief Check if SRAM parity error detected
  1435. * @rmtoll SYSCFG_CFGR2 SPF LL_SYSCFG_IsActiveFlag_SP
  1436. * @retval State of bit (1 or 0).
  1437. */
  1438. __STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SP(void)
  1439. {
  1440. return ((READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF) == (SYSCFG_CFGR2_SPF)) ? 1UL : 0UL);
  1441. }
  1442. /**
  1443. * @brief Clear SRAM parity error flag
  1444. * @rmtoll SYSCFG_CFGR2 SPF LL_SYSCFG_ClearFlag_SP
  1445. * @retval None
  1446. */
  1447. __STATIC_INLINE void LL_SYSCFG_ClearFlag_SP(void)
  1448. {
  1449. SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF);
  1450. }
  1451. #if defined(SYSCFG_CDEN_SUPPORT)
  1452. /**
  1453. * @brief Enable Clamping Diode on specific pin
  1454. * @rmtoll SYSCFG_CFGR2 PA1_CDEN LL_SYSCFG_EnableClampingDiode\n
  1455. * SYSCFG_CFGR2 PA3_CDEN LL_SYSCFG_EnableClampingDiode\n
  1456. * SYSCFG_CFGR2 PA5_CDEN LL_SYSCFG_EnableClampingDiode\n
  1457. * SYSCFG_CFGR2 PA6_CDEN LL_SYSCFG_EnableClampingDiode\n
  1458. * SYSCFG_CFGR2 PA13_CDEN LL_SYSCFG_EnableClampingDiode\n
  1459. * SYSCFG_CFGR2 PB0_CDEN LL_SYSCFG_EnableClampingDiode\n
  1460. * SYSCFG_CFGR2 PB1_CDEN LL_SYSCFG_EnableClampingDiode\n
  1461. * SYSCFG_CFGR1 PB2_CDEN LL_SYSCFG_EnableClampingDiode
  1462. * @param ConfigClampingDiode This parameter can be a combination of the following values:
  1463. * @arg @ref LL_SYSCFG_CFGR2_PA1_CDEN
  1464. * @arg @ref LL_SYSCFG_CFGR2_PA3_CDEN
  1465. * @arg @ref LL_SYSCFG_CFGR2_PA5_CDEN
  1466. * @arg @ref LL_SYSCFG_CFGR2_PA6_CDEN
  1467. * @arg @ref LL_SYSCFG_CFGR2_PA13_CDEN
  1468. * @arg @ref LL_SYSCFG_CFGR2_PB0_CDEN
  1469. * @arg @ref LL_SYSCFG_CFGR2_PB1_CDEN
  1470. * @arg @ref LL_SYSCFG_CFGR2_PB2_CDEN
  1471. * @retval None
  1472. */
  1473. __STATIC_INLINE void LL_SYSCFG_EnableClampingDiode(uint32_t ConfigClampingDiode)
  1474. {
  1475. SET_BIT(SYSCFG->CFGR2, ConfigClampingDiode);
  1476. }
  1477. /**
  1478. * @brief Disable Clamping Diode on specific pin
  1479. * @rmtoll SYSCFG_CFGR2 PA1_CDEN LL_SYSCFG_DisableClampingDiode\n
  1480. * SYSCFG_CFGR2 PA3_CDEN LL_SYSCFG_DisableClampingDiode\n
  1481. * SYSCFG_CFGR2 PA5_CDEN LL_SYSCFG_DisableClampingDiode\n
  1482. * SYSCFG_CFGR2 PA6_CDEN LL_SYSCFG_DisableClampingDiode\n
  1483. * SYSCFG_CFGR2 PA13_CDEN LL_SYSCFG_DisableClampingDiode\n
  1484. * SYSCFG_CFGR2 PB0_CDEN LL_SYSCFG_DisableClampingDiode\n
  1485. * SYSCFG_CFGR2 PB1_CDEN LL_SYSCFG_DisableClampingDiode\n
  1486. * SYSCFG_CFGR1 PB2_CDEN LL_SYSCFG_DisableClampingDiode
  1487. * @param ConfigClampingDiode This parameter can be a combination of the following values:
  1488. * @arg @ref LL_SYSCFG_CFGR2_PA1_CDEN
  1489. * @arg @ref LL_SYSCFG_CFGR2_PA3_CDEN
  1490. * @arg @ref LL_SYSCFG_CFGR2_PA5_CDEN
  1491. * @arg @ref LL_SYSCFG_CFGR2_PA6_CDEN
  1492. * @arg @ref LL_SYSCFG_CFGR2_PA13_CDEN
  1493. * @arg @ref LL_SYSCFG_CFGR2_PB0_CDEN
  1494. * @arg @ref LL_SYSCFG_CFGR2_PB1_CDEN
  1495. * @arg @ref LL_SYSCFG_CFGR2_PB2_CDEN
  1496. * @retval None
  1497. */
  1498. __STATIC_INLINE void LL_SYSCFG_DisableClampingDiode(uint32_t ConfigClampingDiode)
  1499. {
  1500. CLEAR_BIT(SYSCFG->CFGR2, ConfigClampingDiode);
  1501. }
  1502. /**
  1503. * @brief Indicates whether clamping diode(s) is(are) enabled.
  1504. * @rmtoll SYSCFG_CFGR2 PA1_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1505. * SYSCFG_CFGR2 PA3_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1506. * SYSCFG_CFGR2 PA5_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1507. * SYSCFG_CFGR2 PA6_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1508. * SYSCFG_CFGR2 PA13_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1509. * SYSCFG_CFGR2 PB0_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1510. * SYSCFG_CFGR2 PB1_CDEN LL_SYSCFG_IsEnabledClampingDiode\n
  1511. * SYSCFG_CFGR1 PB2_CDEN LL_SYSCFG_IsEnabledClampingDiode
  1512. * @param ConfigClampingDiode This parameter can be a combination of the following values:
  1513. * @arg @ref LL_SYSCFG_CFGR2_PA1_CDEN
  1514. * @arg @ref LL_SYSCFG_CFGR2_PA3_CDEN
  1515. * @arg @ref LL_SYSCFG_CFGR2_PA5_CDEN
  1516. * @arg @ref LL_SYSCFG_CFGR2_PA6_CDEN
  1517. * @arg @ref LL_SYSCFG_CFGR2_PA13_CDEN
  1518. * @arg @ref LL_SYSCFG_CFGR2_PB0_CDEN
  1519. * @arg @ref LL_SYSCFG_CFGR2_PB1_CDEN
  1520. * @arg @ref LL_SYSCFG_CFGR2_PB2_CDEN
  1521. * @retval None
  1522. */
  1523. __STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledClampingDiode(uint32_t ConfigClampingDiode)
  1524. {
  1525. return ((READ_BIT(SYSCFG->CFGR2, ConfigClampingDiode) == (ConfigClampingDiode)) ? 1UL : 0UL);
  1526. }
  1527. #endif /* SYSCFG_CDEN_SUPPORT */
  1528. /**
  1529. * @}
  1530. */
  1531. /** @defgroup SYSTEM_LL_EF_DBGMCU DBGMCU
  1532. * @{
  1533. */
  1534. /**
  1535. * @brief Return the device identifier
  1536. * @note For STM32G081xx devices, the device ID is 0x460
  1537. * @rmtoll DBG_IDCODE DEV_ID LL_DBGMCU_GetDeviceID
  1538. * @retval Values between Min_Data=0x00 and Max_Data=0xFFF
  1539. */
  1540. __STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void)
  1541. {
  1542. return (uint32_t)(READ_BIT(DBG->IDCODE, DBG_IDCODE_DEV_ID));
  1543. }
  1544. /**
  1545. * @brief Return the device revision identifier
  1546. * @note This field indicates the revision of the device.
  1547. * @rmtoll DBG_IDCODE REV_ID LL_DBGMCU_GetRevisionID
  1548. * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF
  1549. */
  1550. __STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void)
  1551. {
  1552. return (uint32_t)(READ_BIT(DBG->IDCODE, DBG_IDCODE_REV_ID) >> DBG_IDCODE_REV_ID_Pos);
  1553. }
  1554. /**
  1555. * @brief Enable the Debug Module during STOP mode
  1556. * @rmtoll DBG_CR DBG_STOP LL_DBGMCU_EnableDBGStopMode
  1557. * @retval None
  1558. */
  1559. __STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode(void)
  1560. {
  1561. SET_BIT(DBG->CR, DBG_CR_DBG_STOP);
  1562. }
  1563. /**
  1564. * @brief Disable the Debug Module during STOP mode
  1565. * @rmtoll DBG_CR DBG_STOP LL_DBGMCU_DisableDBGStopMode
  1566. * @retval None
  1567. */
  1568. __STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode(void)
  1569. {
  1570. CLEAR_BIT(DBG->CR, DBG_CR_DBG_STOP);
  1571. }
  1572. /**
  1573. * @brief Enable the Debug Module during STANDBY mode
  1574. * @rmtoll DBG_CR DBG_STANDBY LL_DBGMCU_EnableDBGStandbyMode
  1575. * @retval None
  1576. */
  1577. __STATIC_INLINE void LL_DBGMCU_EnableDBGStandbyMode(void)
  1578. {
  1579. SET_BIT(DBG->CR, DBG_CR_DBG_STANDBY);
  1580. }
  1581. /**
  1582. * @brief Disable the Debug Module during STANDBY mode
  1583. * @rmtoll DBG_CR DBG_STANDBY LL_DBGMCU_DisableDBGStandbyMode
  1584. * @retval None
  1585. */
  1586. __STATIC_INLINE void LL_DBGMCU_DisableDBGStandbyMode(void)
  1587. {
  1588. CLEAR_BIT(DBG->CR, DBG_CR_DBG_STANDBY);
  1589. }
  1590. /**
  1591. * @brief Freeze APB1 peripherals (group1 peripherals)
  1592. * @rmtoll DBG_APB_FZ1 DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1593. * DBG_APB_FZ1 DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1594. * DBG_APB_FZ1 DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1595. * DBG_APB_FZ1 DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1596. * DBG_APB_FZ1 DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1597. * DBG_APB_FZ1 DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1598. * DBG_APB_FZ1 DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1599. * DBG_APB_FZ1 DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1600. * DBG_APB_FZ1 DBG_I2C1_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1601. * DBG_APB_FZ1 DBG_I2C2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1602. * DBG_APB_FZ1 DBG_LPTIM2_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph\n
  1603. * DBG_APB_FZ1 DBG_LPTIM1_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph
  1604. * @param Periphs This parameter can be a combination of the following values:
  1605. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
  1606. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP
  1607. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
  1608. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
  1609. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
  1610. * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
  1611. * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
  1612. * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
  1613. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
  1614. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP (*)
  1615. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM2_STOP (*)
  1616. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP (*)
  1617. *
  1618. * (*) value not defined in all devices
  1619. * @retval None
  1620. */
  1621. __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs)
  1622. {
  1623. SET_BIT(DBG->APBFZ1, Periphs);
  1624. }
  1625. /**
  1626. * @brief Unfreeze APB1 peripherals (group1 peripherals)
  1627. * @rmtoll DBG_APB_FZ1 DBG_TIM2_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1628. * DBG_APB_FZ1 DBG_TIM3_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1629. * DBG_APB_FZ1 DBG_TIM4_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1630. * DBG_APB_FZ1 DBG_TIM6_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1631. * DBG_APB_FZ1 DBG_TIM7_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1632. * DBG_APB_FZ1 DBG_RTC_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1633. * DBG_APB_FZ1 DBG_WWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1634. * DBG_APB_FZ1 DBG_IWDG_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1635. * DBG_APB_FZ1 DBG_I2C1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1636. * DBG_APB_FZ1 DBG_I2C2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1637. * DBG_APB_FZ1 DBG_LPTIM2_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph\n
  1638. * DBG_APB_FZ1 DBG_LPTIM1_SMBUS_TIMEOUT LL_DBGMCU_APB1_GRP1_UnFreezePeriph
  1639. * @param Periphs This parameter can be a combination of the following values:
  1640. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP (*)
  1641. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM3_STOP
  1642. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM4_STOP (*)
  1643. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM6_STOP (*)
  1644. * @arg @ref LL_DBGMCU_APB1_GRP1_TIM7_STOP (*)
  1645. * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP
  1646. * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP
  1647. * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP
  1648. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP
  1649. * @arg @ref LL_DBGMCU_APB1_GRP1_I2C2_STOP (*)
  1650. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM2_STOP (*)
  1651. * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP (*)
  1652. *
  1653. * (*) value not defined in all devices
  1654. * @retval None
  1655. */
  1656. __STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs)
  1657. {
  1658. CLEAR_BIT(DBG->APBFZ1, Periphs);
  1659. }
  1660. /**
  1661. * @brief Freeze APB2 peripherals
  1662. * @rmtoll DBG_APB_FZ2 DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1663. * DBG_APB_FZ2 DBG_TIM14_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1664. * DBG_APB_FZ2 DBG_TIM15_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1665. * DBG_APB_FZ2 DBG_TIM16_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph\n
  1666. * DBG_APB_FZ2 DBG_TIM17_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph
  1667. * @param Periphs This parameter can be a combination of the following values:
  1668. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
  1669. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM14_STOP
  1670. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP (*)
  1671. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP
  1672. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP
  1673. *
  1674. * (*) value not defined in all devices
  1675. * @retval None
  1676. */
  1677. __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs)
  1678. {
  1679. SET_BIT(DBG->APBFZ2, Periphs);
  1680. }
  1681. /**
  1682. * @brief Unfreeze APB2 peripherals
  1683. * @rmtoll DBG_APB_FZ2 DBG_TIM1_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1684. * DBG_APB_FZ2 DBG_TIM14_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1685. * DBG_APB_FZ2 DBG_TIM15_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1686. * DBG_APB_FZ2 DBG_TIM16_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph\n
  1687. * DBG_APB_FZ2 DBG_TIM17_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph
  1688. * @param Periphs This parameter can be a combination of the following values:
  1689. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP
  1690. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM14_STOP
  1691. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM15_STOP (*)
  1692. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP
  1693. * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP
  1694. *
  1695. * (*) value not defined in all devices
  1696. * @retval None
  1697. */
  1698. __STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs)
  1699. {
  1700. CLEAR_BIT(DBG->APBFZ2, Periphs);
  1701. }
  1702. /**
  1703. * @}
  1704. */
  1705. #if defined(VREFBUF)
  1706. /** @defgroup SYSTEM_LL_EF_VREFBUF VREFBUF
  1707. * @{
  1708. */
  1709. /**
  1710. * @brief Enable Internal voltage reference
  1711. * @rmtoll VREFBUF_CSR VREFBUF_CSR_ENVR LL_VREFBUF_Enable
  1712. * @retval None
  1713. */
  1714. __STATIC_INLINE void LL_VREFBUF_Enable(void)
  1715. {
  1716. SET_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
  1717. }
  1718. /**
  1719. * @brief Disable Internal voltage reference
  1720. * @rmtoll VREFBUF_CSR VREFBUF_CSR_ENVR LL_VREFBUF_Disable
  1721. * @retval None
  1722. */
  1723. __STATIC_INLINE void LL_VREFBUF_Disable(void)
  1724. {
  1725. CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
  1726. }
  1727. /**
  1728. * @brief Enable high impedance (VREF+pin is high impedance)
  1729. * @rmtoll VREFBUF_CSR VREFBUF_CSR_HIZ LL_VREFBUF_EnableHIZ
  1730. * @retval None
  1731. */
  1732. __STATIC_INLINE void LL_VREFBUF_EnableHIZ(void)
  1733. {
  1734. SET_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ);
  1735. }
  1736. /**
  1737. * @brief Disable high impedance (VREF+pin is internally connected to the voltage reference buffer output)
  1738. * @rmtoll VREFBUF_CSR VREFBUF_CSR_HIZ LL_VREFBUF_DisableHIZ
  1739. * @retval None
  1740. */
  1741. __STATIC_INLINE void LL_VREFBUF_DisableHIZ(void)
  1742. {
  1743. CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ);
  1744. }
  1745. /**
  1746. * @brief Set the Voltage reference scale
  1747. * @rmtoll VREFBUF_CSR VREFBUF_CSR_VRS LL_VREFBUF_SetVoltageScaling
  1748. * @param Scale This parameter can be one of the following values:
  1749. * @arg @ref LL_VREFBUF_VOLTAGE_SCALE0
  1750. * @arg @ref LL_VREFBUF_VOLTAGE_SCALE1
  1751. * @retval None
  1752. */
  1753. __STATIC_INLINE void LL_VREFBUF_SetVoltageScaling(uint32_t Scale)
  1754. {
  1755. MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_VRS, Scale);
  1756. }
  1757. /**
  1758. * @brief Get the Voltage reference scale
  1759. * @rmtoll VREFBUF_CSR VREFBUF_CSR_VRS LL_VREFBUF_GetVoltageScaling
  1760. * @retval Returned value can be one of the following values:
  1761. * @arg @ref LL_VREFBUF_VOLTAGE_SCALE0
  1762. * @arg @ref LL_VREFBUF_VOLTAGE_SCALE1
  1763. */
  1764. __STATIC_INLINE uint32_t LL_VREFBUF_GetVoltageScaling(void)
  1765. {
  1766. return (uint32_t)(READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRS));
  1767. }
  1768. /**
  1769. * @brief Check if Voltage reference buffer is ready
  1770. * @rmtoll VREFBUF_CSR VREFBUF_CSR_VRS LL_VREFBUF_IsVREFReady
  1771. * @retval State of bit (1 or 0).
  1772. */
  1773. __STATIC_INLINE uint32_t LL_VREFBUF_IsVREFReady(void)
  1774. {
  1775. return ((READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == (VREFBUF_CSR_VRR)) ? 1UL : 0UL);
  1776. }
  1777. /**
  1778. * @brief Get the trimming code for VREFBUF calibration
  1779. * @rmtoll VREFBUF_CCR VREFBUF_CCR_TRIM LL_VREFBUF_GetTrimming
  1780. * @retval Between 0 and 0x3F
  1781. */
  1782. __STATIC_INLINE uint32_t LL_VREFBUF_GetTrimming(void)
  1783. {
  1784. return (uint32_t)(READ_BIT(VREFBUF->CCR, VREFBUF_CCR_TRIM));
  1785. }
  1786. /**
  1787. * @brief Set the trimming code for VREFBUF calibration (Tune the internal reference buffer voltage)
  1788. * @note VrefBuf voltage scale is calibrated in production for each device,
  1789. * using voltage scale 1. This calibration value is loaded
  1790. * as default trimming value at device power up.
  1791. * This trimming value can be fine tuned for voltage scales 0 and 1
  1792. * using this function.
  1793. * @rmtoll VREFBUF_CCR VREFBUF_CCR_TRIM LL_VREFBUF_SetTrimming
  1794. * @param Value Between 0 and 0x3F
  1795. * @retval None
  1796. */
  1797. __STATIC_INLINE void LL_VREFBUF_SetTrimming(uint32_t Value)
  1798. {
  1799. WRITE_REG(VREFBUF->CCR, Value);
  1800. }
  1801. /**
  1802. * @}
  1803. */
  1804. #endif /* VREFBUF */
  1805. /** @defgroup SYSTEM_LL_EF_FLASH FLASH
  1806. * @{
  1807. */
  1808. /**
  1809. * @brief Set FLASH Latency
  1810. * @rmtoll FLASH_ACR FLASH_ACR_LATENCY LL_FLASH_SetLatency
  1811. * @param Latency This parameter can be one of the following values:
  1812. * @arg @ref LL_FLASH_LATENCY_0
  1813. * @arg @ref LL_FLASH_LATENCY_1
  1814. * @arg @ref LL_FLASH_LATENCY_2
  1815. * @retval None
  1816. */
  1817. __STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency)
  1818. {
  1819. MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency);
  1820. }
  1821. /**
  1822. * @brief Get FLASH Latency
  1823. * @rmtoll FLASH_ACR FLASH_ACR_LATENCY LL_FLASH_GetLatency
  1824. * @retval Returned value can be one of the following values:
  1825. * @arg @ref LL_FLASH_LATENCY_0
  1826. * @arg @ref LL_FLASH_LATENCY_1
  1827. * @arg @ref LL_FLASH_LATENCY_2
  1828. */
  1829. __STATIC_INLINE uint32_t LL_FLASH_GetLatency(void)
  1830. {
  1831. return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY));
  1832. }
  1833. /**
  1834. * @brief Enable Prefetch
  1835. * @rmtoll FLASH_ACR FLASH_ACR_PRFTEN LL_FLASH_EnablePrefetch
  1836. * @retval None
  1837. */
  1838. __STATIC_INLINE void LL_FLASH_EnablePrefetch(void)
  1839. {
  1840. SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
  1841. }
  1842. /**
  1843. * @brief Disable Prefetch
  1844. * @rmtoll FLASH_ACR FLASH_ACR_PRFTEN LL_FLASH_DisablePrefetch
  1845. * @retval None
  1846. */
  1847. __STATIC_INLINE void LL_FLASH_DisablePrefetch(void)
  1848. {
  1849. CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN);
  1850. }
  1851. /**
  1852. * @brief Check if Prefetch buffer is enabled
  1853. * @rmtoll FLASH_ACR FLASH_ACR_PRFTEN LL_FLASH_IsPrefetchEnabled
  1854. * @retval State of bit (1 or 0).
  1855. */
  1856. __STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled(void)
  1857. {
  1858. return ((READ_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) == (FLASH_ACR_PRFTEN)) ? 1UL : 0UL);
  1859. }
  1860. /**
  1861. * @brief Enable Instruction cache
  1862. * @rmtoll FLASH_ACR FLASH_ACR_ICEN LL_FLASH_EnableInstCache
  1863. * @retval None
  1864. */
  1865. __STATIC_INLINE void LL_FLASH_EnableInstCache(void)
  1866. {
  1867. SET_BIT(FLASH->ACR, FLASH_ACR_ICEN);
  1868. }
  1869. /**
  1870. * @brief Disable Instruction cache
  1871. * @rmtoll FLASH_ACR FLASH_ACR_ICEN LL_FLASH_DisableInstCache
  1872. * @retval None
  1873. */
  1874. __STATIC_INLINE void LL_FLASH_DisableInstCache(void)
  1875. {
  1876. CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN);
  1877. }
  1878. /**
  1879. * @brief Enable Instruction cache reset
  1880. * @note bit can be written only when the instruction cache is disabled
  1881. * @rmtoll FLASH_ACR FLASH_ACR_ICRST LL_FLASH_EnableInstCacheReset
  1882. * @retval None
  1883. */
  1884. __STATIC_INLINE void LL_FLASH_EnableInstCacheReset(void)
  1885. {
  1886. SET_BIT(FLASH->ACR, FLASH_ACR_ICRST);
  1887. }
  1888. /**
  1889. * @brief Disable Instruction cache reset
  1890. * @rmtoll FLASH_ACR FLASH_ACR_ICRST LL_FLASH_DisableInstCacheReset
  1891. * @retval None
  1892. */
  1893. __STATIC_INLINE void LL_FLASH_DisableInstCacheReset(void)
  1894. {
  1895. CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST);
  1896. }
  1897. /**
  1898. * @}
  1899. */
  1900. /**
  1901. * @}
  1902. */
  1903. /**
  1904. * @}
  1905. */
  1906. #endif /* defined (FLASH) || defined (SYSCFG) || defined (DBG) */
  1907. /**
  1908. * @}
  1909. */
  1910. #ifdef __cplusplus
  1911. }
  1912. #endif
  1913. #endif /* STM32G0xx_LL_SYSTEM_H */
  1914. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/