01. 概述6 S4 p, Q: Q7 ?) M9 K! Y' \
在 STM32F4 标准固件库里,时钟源的选择以及时钟使能等函数都是在 RCC 相关固件库文件 stm32f4xx_rcc.h 和 stm32f4xx_rcc.c 中声明和定义的。大家打开 stm32f4xx_rcc.h 文件可以看到文件开头有很多宏定义标识符,然后是一系列时钟配置和时钟使能函数申明。这些函数大致可以归结为三类,一类是外设时钟使能函数,一类是时钟源和分频因子配置函数,还有一类是外设复位函数。当然还有几个获取时钟源配置的函数。* M5 v4 Y0 Q/ C U# {8 e- g$ {3 U C
M9 S0 i0 g# s1 w' r. c( e9 [- b02. 相关类型
! @, B0 `! E# v- i( pRCC_ClocksTypeDef1 o" ^4 o8 f7 J* y, q
9 s f1 Z# ?/ V& s% P' U; c- /* Exported types ------------------------------------------------------------*/
; w+ L) Y) c" ]) g$ h* k - typedef struct, l0 E, W: s! U% `
- {
+ s0 t+ u* d6 F7 @ - uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency expressed in Hz */" B6 c9 g+ y: G, N+ k G' p
- uint32_t HCLK_Frequency; /*!< HCLK clock frequency expressed in Hz */
7 d5 P0 X2 U' q8 v* _ - uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency expressed in Hz */, k- ^7 R2 k* \
- uint32_t PCLK2_Frequency; /*!< PCLK2 clock frequency expressed in Hz */
4 a6 y2 j3 M, i3 o0 ?$ L0 m - }RCC_ClocksTypeDef;
复制代码 / q, i, K( u$ |0 T: \5 e
RCC_HSE_configuration* z# l% a% e( b1 `7 d- C! f
2 h* r) h- u3 }$ J: q9 ^/ B7 b- /** @defgroup RCC_HSE_configuration
" s1 H5 P6 Z P0 B5 w - * @{
5 N7 E( g& [; @) y! @* m% X- A6 \. l - */# l3 {2 y+ {6 d6 z% r1 \
- #define RCC_HSE_OFF ((uint8_t)0x00)
% t: t+ _1 I1 C Z; Q- N - #define RCC_HSE_ON ((uint8_t)0x01)
+ V7 k6 f; \# D1 A+ Z" K - #define RCC_HSE_Bypass ((uint8_t)0x05)2 P" J9 ~, b' |$ U+ m' D9 D
- #define IS_RCC_HSE(HSE) (((HSE) == RCC_HSE_OFF) || ((HSE) == RCC_HSE_ON) || \1 ^# M w* W+ \* p+ ]/ o: b
- ((HSE) == RCC_HSE_Bypass))
复制代码 6 v0 @( S; ^9 w5 z
RCC_LSE_Dual_Mode_Selection; Q0 S, z( ~2 y
2 l9 F+ p3 x; X- /** @defgroup RCC_LSE_Dual_Mode_Selection# Z7 u9 D+ C8 t, \3 w# o
- * @{
; T/ u2 e, E9 j$ Q" }) x - */
- V; ]5 V" B- A5 k - #define RCC_LSE_LOWPOWER_MODE ((uint8_t)0x00): R* S8 F( M* Z7 |6 h: L8 ]1 N7 D
- #define RCC_LSE_HIGHDRIVE_MODE ((uint8_t)0x01)
; ?2 G+ b( D/ _- A - #define IS_RCC_LSE_MODE(MODE) (((MODE) == RCC_LSE_LOWPOWER_MODE) || \. P4 Y7 d% L* w$ w
- ((MODE) == RCC_LSE_HIGHDRIVE_MODE))
复制代码
1 P( x* o' l7 @( V5 o9 c) fRCC_PLLSAIDivR_Factor
& b, K9 y8 [& x4 \1 y& p( j4 C* m5 x$ O k4 F2 l
- /** @defgroup RCC_PLLSAIDivR_Factor
C7 s, n6 z4 J6 s. @1 s - * @{
) L" L/ B' [( Z# N - */4 ^2 |. g& ^( v+ J! p) I) u
- #define RCC_PLLSAIDivR_Div2 ((uint32_t)0x00000000) _0 K6 {8 `, H. o
- #define RCC_PLLSAIDivR_Div4 ((uint32_t)0x00010000)3 y# z+ t6 D8 r, f0 a/ ?0 w4 l
- #define RCC_PLLSAIDivR_Div8 ((uint32_t)0x00020000)+ H4 H' Q* s3 t2 F
- #define RCC_PLLSAIDivR_Div16 ((uint32_t)0x00030000)4 m9 W) ^% H: z) a
- #define IS_RCC_PLLSAI_DIVR_VALUE(VALUE) (((VALUE) == RCC_PLLSAIDivR_Div2) ||\
" i# p0 W4 b. B. y7 P - ((VALUE) == RCC_PLLSAIDivR_Div4) ||\
3 _1 c* w8 a9 }$ E4 Z# O# x - ((VALUE) == RCC_PLLSAIDivR_Div8) ||\
" Q8 P5 a, X! R0 a& {+ M6 G# W: P - ((VALUE) == RCC_PLLSAIDivR_Div16))
复制代码 9 F$ A4 `& |- d% [( f
RCC_PLL_Clock_Source
& Z' f0 e) E! l0 s# y/ `" Q$ I" G9 E) ^7 e, ], G6 x& f, _8 x
- /** @defgroup RCC_PLL_Clock_Source
) F4 I8 q) ?- }: {2 q: | - * @{
1 d1 p& b' Q9 [ - */
) @7 x+ T. }7 L: N. @! V - #define RCC_PLLSource_HSI ((uint32_t)0x00000000)3 k9 B/ @& c$ n3 Y x7 r" l5 y. ~
- #define RCC_PLLSource_HSE ((uint32_t)0x00400000); t& U* ?3 [* x4 m( Y0 r0 r
- #define IS_RCC_PLL_SOURCE(SOURCE) (((SOURCE) == RCC_PLLSource_HSI) || \' z, g; d) Z( y0 D7 s4 k5 c" ?
- ((SOURCE) == RCC_PLLSource_HSE))
9 m X- ~' y- H6 y" q% H. h - #define IS_RCC_PLLM_VALUE(VALUE) ((VALUE) <= 63)
2 W8 L. w4 ^( d, n( S4 c - #define IS_RCC_PLLN_VALUE(VALUE) ((50 <= (VALUE)) && ((VALUE) <= 432))
& O$ r1 P0 b; y6 m- ^ - #define IS_RCC_PLLP_VALUE(VALUE) (((VALUE) == 2) || ((VALUE) == 4) || / f. S0 M I4 G1 g6 F% H& S& u
- ((VALUE) == 6) || ((VALUE) == 8))# {$ j) a! J! x- g: a
- #define IS_RCC_PLLQ_VALUE(VALUE) ((4 <= (VALUE)) && ((VALUE) <= 15))
9 K2 F0 v" X# B - #if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F413_423xx) + Q, ]! _5 V" W- k( C& x
- || defined(STM32F446xx) || defined(STM32F469_479xx)8 ]1 \& Q4 [- f4 D: ^, J" T
- #define IS_RCC_PLLR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))6 J6 E/ k4 H- r9 {# g
- #endif /* STM32F410xx || STM32F412xG || STM32F413_423xx || STM32F446xx
7 q! X S: t0 F% J3 P% S2 X' @$ j" P4 x - || STM32F469_479xx */
3 V8 x0 Z. G2 Y( O" Y# E3 n - $ v' C' U4 S. a0 o
- #define IS_RCC_PLLI2SN_VALUE(VALUE) ((50 <= (VALUE)) && ((VALUE) <= 432))
' g- k4 L2 a: W$ J - #define IS_RCC_PLLI2SR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
+ r7 z% M- y0 O' X. y - #define IS_RCC_PLLI2SM_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 63)). G3 m7 B6 X7 A
- #define IS_RCC_PLLI2SQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
, G0 Q- W! r5 r3 V& ~" R* b - #if defined(STM32F446xx)
9 i& [* q3 t1 ] - #define IS_RCC_PLLI2SP_VALUE(VALUE) (((VALUE) == 2) || ((VALUE) == 4) 4 J, w& h* l8 g' V& F7 f- `
- || ((VALUE) == 6) || ((VALUE) == 8))+ _% O! N$ r" n4 k
- #define IS_RCC_PLLSAIM_VALUE(VALUE) ((VALUE) <= 63)
1 o6 N: L7 F% l# y! f- s) F* z - #elif defined(STM32F412xG) || defined(STM32F413_423xx)/ J1 o( ~! m# N0 Y, I1 y
- #define IS_RCC_PLLI2SP_VALUE(VALUE) (((VALUE) == 2) || ((VALUE) == 4)
! b* z/ Y$ k" h; g; x7 u - || ((VALUE) == 6) || ((VALUE) == 8))
! v$ x8 A Q; N z# k - #else
* ?4 f3 @0 T9 ^% n6 `2 q, H7 Y2 U# g - #endif /* STM32F446xx */
! U, {: h7 f+ S/ r% S o - #define IS_RCC_PLLSAIN_VALUE(VALUE) ((50 <= (VALUE)) && ((VALUE) <= 432))& z; p( m0 X0 `5 G9 o, ]; ~
- #if defined(STM32F446xx) || defined(STM32F469_479xx)
& m( w9 O( S8 ?* Q - #define IS_RCC_PLLSAIP_VALUE(VALUE) (((VALUE) == 2) || ((VALUE) == 4) 3 o( s0 J/ s. ^6 Q
- || ((VALUE) == 6) || ((VALUE) == 8)), [& z9 ~4 \8 X4 Y' D& g
- #endif /* STM32F446xx || STM32F469_479xx */
, }% v w, E5 n- Q( c% ] - #define IS_RCC_PLLSAIQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))
& X) O! n: r$ {$ H9 U q) e - #define IS_RCC_PLLSAIR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))
J1 i4 ~$ Y# y
1 P4 Y1 j6 N5 K8 e- #define IS_RCC_PLLSAI_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))
0 T5 w+ x- _0 w - #define IS_RCC_PLLI2S_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))7 M% z9 v/ ]5 g: W
- & i9 \4 p, p6 w6 D' A* z
- #if defined(STM32F413_423xx)
9 I5 X2 W& e9 H& Q7 K - #define IS_RCC_PLLI2S_DIVR_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))) K* P( G1 _+ h
- #define IS_RCC_PLL_DIVR_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))- h6 F4 t# K7 V) P) e% r S
- #endif /* STM32F413_423xx */
复制代码
; Z7 a4 K3 b! F: B# b5 |# cRCC_System_Clock_Source
6 m5 O$ {. v! o* f1 B4 G6 E/ r9 k2 a, V" c
- /** @defgroup RCC_System_Clock_Source
- V! s& |, A, s - * @{# k+ h6 P, o; Z& C4 ?
- */
' j/ W. v2 U1 f& u - U- S. |1 U. j2 H- B
- #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)
9 _8 [1 ?; ~" |" o, ?, v5 N( [/ b - #define RCC_SYSCLKSource_HSI ((uint32_t)0x00000000)) v8 ?) p% N7 o% w' v7 r3 a
- #define RCC_SYSCLKSource_HSE ((uint32_t)0x00000001)
: Y1 M- k- `* D - #define RCC_SYSCLKSource_PLLPCLK ((uint32_t)0x00000002)
# [/ a' ? A. p( O) Q& |$ H - #define RCC_SYSCLKSource_PLLRCLK ((uint32_t)0x00000003)2 q2 Z+ W) _$ x3 R h! ^: Q
- #define IS_RCC_SYSCLK_SOURCE(SOURCE) (((SOURCE) == RCC_SYSCLKSource_HSI) || \
8 V- l# ]% [# W0 N* T) G - ((SOURCE) == RCC_SYSCLKSource_HSE) || \
% f* t: U% }5 O2 X$ U* T% R7 K5 t - ((SOURCE) == RCC_SYSCLKSource_PLLPCLK) || \" u; g5 u- E" t
- ((SOURCE) == RCC_SYSCLKSource_PLLRCLK))
6 S# Q; K" f1 b Y: k' p) N - /* Add legacy definition */# U2 [# ~* M, \5 {. Q7 X. r: G
- #define RCC_SYSCLKSource_PLLCLK RCC_SYSCLKSource_PLLPCLK , T1 K3 P. U ]* v- h
- #endif /* STM32F446xx */# G- g- X1 W0 h. E! |( R/ s* V
- - \3 w1 Y) O$ e3 k+ c$ L
- #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) 3 N8 `/ x6 J' Y5 n# j( _2 d! f
- || defined(STM32F401xx) || defined(STM32F410xx) || defined(STM32F411xE) ) v, \( n( T0 {& I3 u* s) |
- || defined(STM32F469_479xx)
$ G8 s+ p1 K7 e2 P r) S0 Y - #define RCC_SYSCLKSource_HSI ((uint32_t)0x00000000)
5 Z- T" J/ P# S U2 S1 e! | - #define RCC_SYSCLKSource_HSE ((uint32_t)0x00000001)& w2 u# C: X! p% t- C
- #define RCC_SYSCLKSource_PLLCLK ((uint32_t)0x00000002)
4 u! F: ^% B( [5 `& h! \3 b1 }4 @ - #define IS_RCC_SYSCLK_SOURCE(SOURCE) (((SOURCE) == RCC_SYSCLKSource_HSI) || \
( Y6 y& G8 Q3 ~3 \& p9 f" [( { - ((SOURCE) == RCC_SYSCLKSource_HSE) || \
+ ?! k0 m2 G3 o- c7 @ - ((SOURCE) == RCC_SYSCLKSource_PLLCLK))
% ~( X% w- J4 h+ m2 E8 p - #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx & r* }# L& M2 w9 r- s
- || STM32F410xx || STM32F411xE || STM32F469_479xx */
) x& ]# y. L' I# G a3 k* U
复制代码
# i- N5 K- m( C, ^, F' IRCC_AHB_Clock_Source
# L3 d1 i8 S s0 k1 e {+ K/ k0 N6 D- F5 ]% H8 P. C0 x
- /** @defgroup RCC_AHB_Clock_Source8 W J' o4 Z+ Q/ ^* }1 E% M
- * @{3 x! T! G! |4 ^; e9 o0 ^
- */+ k9 ]! e5 Y# d/ s
- #define RCC_SYSCLK_Div1 ((uint32_t)0x00000000)- A) ~8 ~$ @4 C* I8 h3 f9 K+ z$ p. s
- #define RCC_SYSCLK_Div2 ((uint32_t)0x00000080): H0 v, L2 n' h( P3 j. C
- #define RCC_SYSCLK_Div4 ((uint32_t)0x00000090)/ e: I2 Q% p. v9 o4 k: u5 u/ Z
- #define RCC_SYSCLK_Div8 ((uint32_t)0x000000A0)
0 y6 D: r: b5 Z# ]7 V% f - #define RCC_SYSCLK_Div16 ((uint32_t)0x000000B0)- y/ i# g2 x* r) V! B5 Q
- #define RCC_SYSCLK_Div64 ((uint32_t)0x000000C0)
1 e! L; e# `* j: @& z' D - #define RCC_SYSCLK_Div128 ((uint32_t)0x000000D0)
6 J4 E) a9 n0 e+ R/ F3 G - #define RCC_SYSCLK_Div256 ((uint32_t)0x000000E0)! H b$ p: z# K' j: ~" K* t
- #define RCC_SYSCLK_Div512 ((uint32_t)0x000000F0)
4 F+ D0 c& k6 Q) }& N - #define IS_RCC_HCLK(HCLK) (((HCLK) == RCC_SYSCLK_Div1) || ((HCLK) == RCC_SYSCLK_Div2) || \4 v' G% F( O, ?0 n0 K4 F; Q
- ((HCLK) == RCC_SYSCLK_Div4) || ((HCLK) == RCC_SYSCLK_Div8) || \
7 l- o j$ m" D# w" E3 k9 c* ~! A - ((HCLK) == RCC_SYSCLK_Div16) || ((HCLK) == RCC_SYSCLK_Div64) || \: _% ?0 U" O' [+ k2 h
- ((HCLK) == RCC_SYSCLK_Div128) || ((HCLK) == RCC_SYSCLK_Div256) || \4 x0 L4 L2 H; _
- ((HCLK) == RCC_SYSCLK_Div512))
复制代码 : @. a$ ~6 P* y. ^" E; S: U2 ~
RCC_APB1_APB2_Clock_Source( t. O4 {4 o2 X6 `4 {/ z7 X# j8 f" ?5 \
) T7 C1 C* |4 b! {9 V4 g- /** @defgroup RCC_APB1_APB2_Clock_Source
4 W7 ^3 T) V$ D8 } - * @{
8 Y. m) i! Q) ~. r8 V - */
' t+ M! O" l6 o - #define RCC_HCLK_Div1 ((uint32_t)0x00000000)( U w, }7 K; a7 {1 Z( c2 \/ K
- #define RCC_HCLK_Div2 ((uint32_t)0x00001000)5 ^9 M# D7 ~0 X
- #define RCC_HCLK_Div4 ((uint32_t)0x00001400)6 I2 K7 L& E8 k% V- T7 F; T
- #define RCC_HCLK_Div8 ((uint32_t)0x00001800)
' [, V& ^9 z4 Z" E, K' {( q - #define RCC_HCLK_Div16 ((uint32_t)0x00001C00)
, G! |( Z: G% S - #define IS_RCC_PCLK(PCLK) (((PCLK) == RCC_HCLK_Div1) || ((PCLK) == RCC_HCLK_Div2) || \0 i- f+ d1 L% v" L6 B" O8 v" e0 W0 h
- ((PCLK) == RCC_HCLK_Div4) || ((PCLK) == RCC_HCLK_Div8) || \
' C3 f) y' y8 E - ((PCLK) == RCC_HCLK_Div16))
3 |3 {( R; z1 N6 l. ^8 O
复制代码
3 x: z9 E1 q; K, fRCC_Interrupt_Source p: B: ^2 s3 d
. r% v% Y+ x' b/ K5 U4 h& g: j
- /** @defgroup RCC_Interrupt_Source
" [8 J- P! \7 p. { - * @{. k D/ Y- j' Y; X4 ^( ?4 Y4 n1 p4 r9 P
- */, F. z/ q2 j7 @3 k! G5 A9 g
- #define RCC_IT_LSIRDY ((uint8_t)0x01): [7 _. P8 s5 \: y
- #define RCC_IT_LSERDY ((uint8_t)0x02)
, l5 r- U% Z% I; }* S - #define RCC_IT_HSIRDY ((uint8_t)0x04)7 c, i7 p1 N3 m; A
- #define RCC_IT_HSERDY ((uint8_t)0x08)8 i3 e4 U8 z6 C0 r: T# E! [/ _+ F
- #define RCC_IT_PLLRDY ((uint8_t)0x10)
" ^: ^; i: f2 G: T" B - #define RCC_IT_PLLI2SRDY ((uint8_t)0x20)
) z! d8 i( m$ e0 p - #define RCC_IT_PLLSAIRDY ((uint8_t)0x40)% D5 }3 Y! W: x
- #define RCC_IT_CSS ((uint8_t)0x80)( {7 v( T* t0 |; {9 j6 h
- * `( _: N r, L
- #define IS_RCC_IT(IT) ((((IT) & (uint8_t)0x80) == 0x00) && ((IT) != 0x00))
! G& Q1 j0 H$ ^. s - #define IS_RCC_GET_IT(IT) (((IT) == RCC_IT_LSIRDY) || ((IT) == RCC_IT_LSERDY) || \; |0 Q. S) X) e
- ((IT) == RCC_IT_HSIRDY) || ((IT) == RCC_IT_HSERDY) || \9 z3 k8 L5 }$ k- O
- ((IT) == RCC_IT_PLLRDY) || ((IT) == RCC_IT_CSS) || \
" h: d" H8 \. b6 G6 O+ G! z - ((IT) == RCC_IT_PLLSAIRDY) || ((IT) == RCC_IT_PLLI2SRDY))
* Y4 J _" c( S+ R/ ? - #define IS_RCC_CLEAR_IT(IT)((IT) != 0x00)
复制代码 % M* E: }. H% e+ e- a z! n
RCC_LSE_Configuration
* @0 H6 N U2 J2 k
% n- e$ J3 v! M8 B) N$ `- /** @defgroup RCC_LSE_Configuration . {* L. _9 T- L/ m9 Y {. ~
- * @{& J: f; s! V `, P" S! M% q
- */
# F0 j7 M) V9 H' K# p1 j# ~ - #define RCC_LSE_OFF ((uint8_t)0x00)8 o, X+ u5 I; Z( V! Q* A1 x
- #define RCC_LSE_ON ((uint8_t)0x01)
" k3 {. i+ j3 b- y' G - #define RCC_LSE_Bypass ((uint8_t)0x04)+ T2 f" H7 {' r! Y" z# z2 b
- #define IS_RCC_LSE(LSE) (((LSE) == RCC_LSE_OFF) || ((LSE) == RCC_LSE_ON) || \+ \+ {5 i9 a; ~( f( c1 e. U
- ((LSE) == RCC_LSE_Bypass))
复制代码
2 d" n* S, I8 Q4 }; qRCC_RTC_Clock_Source3 D/ W" Y& ~7 x
3 W" u: d- v. }8 a" [- /** @defgroup RCC_RTC_Clock_Source
/ q h, S4 A( y% R - * @{( x" B+ a8 q7 [% z/ {% z, e
- */+ B3 a* H B3 B& G. t& D$ [4 s( M3 Q
- #define RCC_RTCCLKSource_LSE ((uint32_t)0x00000100)" j: p R. z2 J$ t$ ~2 t
- #define RCC_RTCCLKSource_LSI ((uint32_t)0x00000200); A0 B" c8 t$ K+ {
- #define RCC_RTCCLKSource_HSE_Div2 ((uint32_t)0x00020300)/ G. n+ _! T, n1 L/ o
- #define RCC_RTCCLKSource_HSE_Div3 ((uint32_t)0x00030300)* Q1 m1 a& K* }9 ~& U
- #define RCC_RTCCLKSource_HSE_Div4 ((uint32_t)0x00040300)" Y8 P; @$ i, x6 |1 L
- #define RCC_RTCCLKSource_HSE_Div5 ((uint32_t)0x00050300)1 w' g' z" z$ d" C2 ~% D1 m4 _
- #define RCC_RTCCLKSource_HSE_Div6 ((uint32_t)0x00060300)
/ h. l" t9 a6 T) @1 L$ l% b( y$ J" ^ - #define RCC_RTCCLKSource_HSE_Div7 ((uint32_t)0x00070300)
7 P9 E4 f5 F- G7 {' }: I" P3 L - #define RCC_RTCCLKSource_HSE_Div8 ((uint32_t)0x00080300)
' j- \, A" T: b }& F# a - #define RCC_RTCCLKSource_HSE_Div9 ((uint32_t)0x00090300)
; D: N" y3 M q$ k - #define RCC_RTCCLKSource_HSE_Div10 ((uint32_t)0x000A0300)
, l# M; l/ |6 y7 w) G* C3 \ - #define RCC_RTCCLKSource_HSE_Div11 ((uint32_t)0x000B0300)- R* ]: y" ]( x8 W! l* v
- #define RCC_RTCCLKSource_HSE_Div12 ((uint32_t)0x000C0300)
" j9 T% a# G2 [) S - #define RCC_RTCCLKSource_HSE_Div13 ((uint32_t)0x000D0300), r0 X0 A! V Q! U6 [1 M4 ^0 i) I
- #define RCC_RTCCLKSource_HSE_Div14 ((uint32_t)0x000E0300)6 H& V) n* K% L+ N3 r+ @
- #define RCC_RTCCLKSource_HSE_Div15 ((uint32_t)0x000F0300)/ q) L: K1 [3 S
- #define RCC_RTCCLKSource_HSE_Div16 ((uint32_t)0x00100300)
) J" S# K$ g6 ^3 p- q* j0 O2 W+ j - #define RCC_RTCCLKSource_HSE_Div17 ((uint32_t)0x00110300)
$ H" @2 m, E( s8 N x/ n - #define RCC_RTCCLKSource_HSE_Div18 ((uint32_t)0x00120300)
7 v& m' V+ n5 }' R; R) u - #define RCC_RTCCLKSource_HSE_Div19 ((uint32_t)0x00130300)
$ g" L3 C5 b7 [8 ]# K; Z. J - #define RCC_RTCCLKSource_HSE_Div20 ((uint32_t)0x00140300)5 _" z% a3 G+ ~, n" l; W
- #define RCC_RTCCLKSource_HSE_Div21 ((uint32_t)0x00150300)6 h+ e1 {3 p; h& h3 ?; ?- x
- #define RCC_RTCCLKSource_HSE_Div22 ((uint32_t)0x00160300)
4 @3 l/ L. q4 E: w7 U0 s - #define RCC_RTCCLKSource_HSE_Div23 ((uint32_t)0x00170300)
# q d* K1 O) N6 G' x- n - #define RCC_RTCCLKSource_HSE_Div24 ((uint32_t)0x00180300); I/ M7 G$ J2 Y
- #define RCC_RTCCLKSource_HSE_Div25 ((uint32_t)0x00190300)# |: y9 w: c0 P$ ~0 l
- #define RCC_RTCCLKSource_HSE_Div26 ((uint32_t)0x001A0300)
% L! w2 L8 I8 ^1 D; y - #define RCC_RTCCLKSource_HSE_Div27 ((uint32_t)0x001B0300)
$ ?8 e7 }7 \+ d! v& z+ _* P - #define RCC_RTCCLKSource_HSE_Div28 ((uint32_t)0x001C0300)1 ]% |4 ^$ C, u) d4 g/ H
- #define RCC_RTCCLKSource_HSE_Div29 ((uint32_t)0x001D0300)
% N, N/ [: J% R. I; v# q z% R0 L1 Y5 R# G - #define RCC_RTCCLKSource_HSE_Div30 ((uint32_t)0x001E0300)1 _7 d$ s% e/ f) g8 z# P$ i" @
- #define RCC_RTCCLKSource_HSE_Div31 ((uint32_t)0x001F0300)" b: G8 `8 z. z2 y1 y5 c" Y! q
- #define IS_RCC_RTCCLK_SOURCE(SOURCE) (((SOURCE) == RCC_RTCCLKSource_LSE) || \# t* c0 S" ]! A& j
- ((SOURCE) == RCC_RTCCLKSource_LSI) || \
# z$ N" s- z- t - ((SOURCE) == RCC_RTCCLKSource_HSE_Div2) || \
9 \1 f* X1 j/ S' S+ o8 ]! \7 r - ((SOURCE) == RCC_RTCCLKSource_HSE_Div3) || \& F6 S2 ~& |, S3 X, K
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div4) || \
- N0 I r8 G) M! u4 w7 L& c - ((SOURCE) == RCC_RTCCLKSource_HSE_Div5) || \
! D* n# J3 G+ ]! T; I4 D" n - ((SOURCE) == RCC_RTCCLKSource_HSE_Div6) || \+ w: B' W& J. v4 l: V3 Y
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div7) || \- M7 i6 ?8 }! q8 {
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div8) || \
5 {" p9 i7 [1 K$ g% K - ((SOURCE) == RCC_RTCCLKSource_HSE_Div9) || \7 H5 r$ E! l6 N& z& j" d# N% S( |: o
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div10) || \
, H# |3 {) d1 d& M - ((SOURCE) == RCC_RTCCLKSource_HSE_Div11) || \
( L; j4 A- o5 N8 \5 v2 a - ((SOURCE) == RCC_RTCCLKSource_HSE_Div12) || \; W" F6 Y& A1 a9 B
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div13) || \
/ _/ t+ \% u0 H2 W. p/ ?1 N6 s* I7 s - ((SOURCE) == RCC_RTCCLKSource_HSE_Div14) || \
3 |- l3 i7 x6 {# s! c5 @% p; ` - ((SOURCE) == RCC_RTCCLKSource_HSE_Div15) || \- X1 d& c: X3 ]7 h6 B# ^
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div16) || \
* P: F# ]( v- j: v - ((SOURCE) == RCC_RTCCLKSource_HSE_Div17) || \! {8 G# j W' j" l$ M; q
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div18) || \1 e: _# B% _6 b x
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div19) || \7 M, C2 _0 `) p3 z4 r% O
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div20) || \
6 R$ [: X2 C% u+ i5 Q/ u+ h - ((SOURCE) == RCC_RTCCLKSource_HSE_Div21) || \9 x8 C( p* F! H
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div22) || \
1 n* h$ M* e; O' Z+ G - ((SOURCE) == RCC_RTCCLKSource_HSE_Div23) || \
7 Y7 d. a4 M- T7 Y - ((SOURCE) == RCC_RTCCLKSource_HSE_Div24) || \
# n7 N9 l3 [1 u- @ - ((SOURCE) == RCC_RTCCLKSource_HSE_Div25) || \; [( S M- m& t- u, @
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div26) || \( ^. @& D8 @3 f9 l* E, L
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div27) || \' m# [& J, J1 D3 h9 r
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div28) || \
8 V7 `8 @6 q% y7 H, V1 e2 j - ((SOURCE) == RCC_RTCCLKSource_HSE_Div29) || \7 Y. ^" ]8 z# o
- ((SOURCE) == RCC_RTCCLKSource_HSE_Div30) || \
4 X5 e4 R3 R, A; I - ((SOURCE) == RCC_RTCCLKSource_HSE_Div31))
复制代码
, G; O2 f- I, n2 s' QRCC_SAI_BlockA_Clock_Source6 r) N, I# i1 }! L. _6 c/ f
1 Y7 j1 d9 H# }) a: o8 e$ U
- /** @defgroup RCC_SAI_BlockA_Clock_Source
4 J( ~9 Y. i- R3 R% ?- ^4 V4 i - * @{8 w; a6 Y: I! M, b5 a6 I
- */! x0 _1 Z) O D7 a
- #define RCC_SAIACLKSource_PLLSAI ((uint32_t)0x00000000)
0 s1 K& F; d( {, j: ~0 [ - #define RCC_SAIACLKSource_PLLI2S ((uint32_t)0x00100000)
9 l7 D: G1 a1 e' U' {, _0 Q - #define RCC_SAIACLKSource_Ext ((uint32_t)0x00200000)
- i1 q# W, p5 ?2 a& s0 Z
0 m" F0 N# H# ~( R- #define IS_RCC_SAIACLK_SOURCE(SOURCE) (((SOURCE) == RCC_SAIACLKSource_PLLI2S) ||\2 C& \; B1 I' _7 x7 r* b
- ((SOURCE) == RCC_SAIACLKSource_PLLSAI) ||\
4 S1 N& O {7 F/ _& k3 q8 I - ((SOURCE) == RCC_SAIACLKSource_Ext))
复制代码
! z( f; g& ~ o6 Q! c/ NRCC_SAI_BlockB_Clock_Source7 d: M9 ~/ Q( C' j- i4 n4 U$ N+ f
# f* {, e% }! X: i6 k- /** @defgroup RCC_SAI_BlockB_Clock_Source
6 P, Q, p! {/ s' D2 g - * @{
+ l. P6 l Z" L7 k, G( z - */8 Z2 V4 M1 z$ P+ v+ \1 K* d
- #define RCC_SAIBCLKSource_PLLSAI ((uint32_t)0x00000000)
% D: i2 D; m( E) Y5 G K+ l - #define RCC_SAIBCLKSource_PLLI2S ((uint32_t)0x00400000)4 x% E7 K$ N) ~0 `( k+ Q
- #define RCC_SAIBCLKSource_Ext ((uint32_t)0x00800000)
5 q. M" s5 x! a" c9 N' A2 a - + d% a, W; U, ?" c! E9 b" ]
- #define IS_RCC_SAIBCLK_SOURCE(SOURCE) (((SOURCE) == RCC_SAIBCLKSource_PLLI2S) ||\
2 H6 d) d& G; m5 h' k. L8 I - ((SOURCE) == RCC_SAIBCLKSource_PLLSAI) ||\
6 }5 O# D$ r. V9 W - ((SOURCE) == RCC_SAIBCLKSource_Ext))
复制代码 ' G1 H3 ]% n8 C# r. N
RCC_TIM_PRescaler_Selection* K# f9 q3 [: ?1 T- z0 K o* S
" [. s. }% E9 P7 L2 l2 X
- /** @defgroup RCC_TIM_PRescaler_Selection) U, v9 i; s3 D6 J1 l* g
- * @{
0 @( v9 f& H5 d4 V* l8 x3 u; \/ ? - */6 h" p5 n) U9 Z4 `7 o
- #define RCC_TIMPrescDesactivated ((uint8_t)0x00)
3 M7 b% j: B' ]: b& x - #define RCC_TIMPrescActivated ((uint8_t)0x01)
2 { Y9 d+ L! Y7 b1 i. }, e7 y6 J) O
% \, h1 Y- Y( y& d' B% z& \0 [- #define IS_RCC_TIMCLK_PRESCALER(VALUE) (((VALUE) == RCC_TIMPrescDesactivated) 2 ^0 D8 Z+ x3 ~! t
- || ((VALUE) == RCC_TIMPrescActivated))
复制代码
) {/ } C/ @. ^/ N& HRCC_AHB1_Peripherals# |( }. |' r4 t' o5 x$ V+ Q& \
) M7 J0 m5 m0 }( m: q4 o- /** @defgroup RCC_AHB1_Peripherals
' s) P& b! x$ a+ [% a/ T7 i( `; ]' e - * @{
; u# f/ E" L6 W3 a. U - */
3 ~# W' h1 F) E6 D4 Y W - #define RCC_AHB1Periph_GPIOA ((uint32_t)0x00000001)+ g( w. d, I) J- m# }
- #define RCC_AHB1Periph_GPIOB ((uint32_t)0x00000002)7 o# o& H, H8 ]+ T
- #define RCC_AHB1Periph_GPIOC ((uint32_t)0x00000004)4 h5 a( K; a) F
- #define RCC_AHB1Periph_GPIOD ((uint32_t)0x00000008)% ^7 N. p/ A& k- A: ]
- #define RCC_AHB1Periph_GPIOE ((uint32_t)0x00000010)7 }( n! o: t2 s; u' C
- #define RCC_AHB1Periph_GPIOF ((uint32_t)0x00000020)
: n2 q! P, D, R1 t. j, |) } - #define RCC_AHB1Periph_GPIOG ((uint32_t)0x00000040)
7 t w; p2 x1 @ - #define RCC_AHB1Periph_GPIOH ((uint32_t)0x00000080)" d( Z" G' |" V* F
- #define RCC_AHB1Periph_GPIOI ((uint32_t)0x00000100) ( e: C4 I7 X5 \# M( @ L7 ~8 }
- #define RCC_AHB1Periph_GPIOJ ((uint32_t)0x00000200)
: r% b7 a( O5 B$ c( u - #define RCC_AHB1Periph_GPIOK ((uint32_t)0x00000400)$ s) Y; S( @5 e) ^4 h
- #define RCC_AHB1Periph_CRC ((uint32_t)0x00001000)
" [1 a8 R$ B' x' H) ~0 x- _/ L* Q - #define RCC_AHB1Periph_FLITF ((uint32_t)0x00008000)- P) _& b1 {. K {
- #define RCC_AHB1Periph_SRAM1 ((uint32_t)0x00010000)3 }$ P( r% q' s; r; | ?1 {, k* }
- #define RCC_AHB1Periph_SRAM2 ((uint32_t)0x00020000)
% w6 e+ A* h7 q/ D% ` - #define RCC_AHB1Periph_BKPSRAM ((uint32_t)0x00040000)9 c c% d; z' s) ^4 x5 H4 Q( D% \
- #define RCC_AHB1Periph_SRAM3 ((uint32_t)0x00080000)
+ ^4 S. \" f5 o5 `3 o0 k4 s - #define RCC_AHB1Periph_CCMDATARAMEN ((uint32_t)0x00100000)
; A2 ?: B n! I6 c6 ` - #define RCC_AHB1Periph_DMA1 ((uint32_t)0x00200000)
. @( g& ^* b" g8 w - #define RCC_AHB1Periph_DMA2 ((uint32_t)0x00400000)
' f7 G0 w4 o- w) O; K9 p - #define RCC_AHB1Periph_DMA2D ((uint32_t)0x00800000)! j- |7 T. `( Q. `6 I; X/ _. e6 q# i
- #define RCC_AHB1Periph_ETH_MAC ((uint32_t)0x02000000)
2 \, ?& C) W: l - #define RCC_AHB1Periph_ETH_MAC_Tx ((uint32_t)0x04000000)8 ~+ T" T$ r3 b! Z# D: e
- #define RCC_AHB1Periph_ETH_MAC_Rx ((uint32_t)0x08000000)
/ |% c% I: t+ l. B& X - #define RCC_AHB1Periph_ETH_MAC_PTP ((uint32_t)0x10000000)/ i1 F7 z8 C: Z+ u; d) b4 G$ n5 Q: j
- #define RCC_AHB1Periph_OTG_HS ((uint32_t)0x20000000)9 e5 z% N6 H0 r1 w$ w6 {
- #define RCC_AHB1Periph_OTG_HS_ULPI ((uint32_t)0x40000000)
0 H0 k2 }% O+ v" D, u% r
+ h2 e$ f, b; t9 l& L' r- #define IS_RCC_AHB1_CLOCK_PERIPH(PERIPH)
) T, v6 q* L1 y5 y/ r; q - ((((PERIPH) & 0x010BE800) == 0x00) && ((PERIPH) != 0x00))% `; {4 w2 x9 d
- #define IS_RCC_AHB1_RESET_PERIPH(PERIPH)
) T+ \% L9 G Y - ((((PERIPH) & 0x51FE800) == 0x00) && ((PERIPH) != 0x00))
+ w3 z6 w/ X# |5 S, U- U8 i: d0 M - #define IS_RCC_AHB1_LPMODE_PERIPH(PERIPH) ' R8 Q( f! i+ u- k9 F1 y
- ((((PERIPH) & 0x01106800) == 0x00) && ((PERIPH) != 0x00))2 k8 w, Y; Q" Q4 s# c
复制代码
& k- ^) M( f9 @9 C! zRCC_APB1_Peripherals
3 u3 i" ?) n2 w' f& F2 r
) ^! t* P' v! \& @$ \- /** @defgroup RCC_APB1_Peripherals 8 d4 G) K$ v" K* U$ S
- * @{
! L5 |7 |# g+ A; {( m - */ 2 G6 L7 S7 ^* p, [9 ~9 @
- #define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001)+ {& w4 U9 a4 f- M
- #define RCC_APB1Periph_TIM3 ((uint32_t)0x00000002)
8 Y/ {" h0 D; C1 M4 Q - #define RCC_APB1Periph_TIM4 ((uint32_t)0x00000004)
; n8 O- D5 |/ g! o; I+ l$ W% T! _ - #define RCC_APB1Periph_TIM5 ((uint32_t)0x00000008)
0 O% a2 j4 n7 d" B2 a - #define RCC_APB1Periph_TIM6 ((uint32_t)0x00000010)
- W9 C. ]& l9 y5 l% f& {! O - #define RCC_APB1Periph_TIM7 ((uint32_t)0x00000020); J% m: @1 F3 k, {$ E9 p
- #define RCC_APB1Periph_TIM12 ((uint32_t)0x00000040)8 _1 o N! l' i
- #define RCC_APB1Periph_TIM13 ((uint32_t)0x00000080)3 F. Q8 W, I0 h6 V% N w# I
- #define RCC_APB1Periph_TIM14 ((uint32_t)0x00000100) g% d3 j- ~7 G u- F. N2 E! T
- #if defined(STM32F410xx) || defined(STM32F413_423xx)
0 }8 p& {* r$ V - #define RCC_APB1Periph_LPTIM1 ((uint32_t)0x00000200)
) X" M) \5 E& z/ I7 L* s0 B - #endif /* STM32F410xx || STM32F413_423xx */' U. w4 N2 l2 p3 z3 p9 D
- #define RCC_APB1Periph_WWDG ((uint32_t)0x00000800): c. |* s7 \4 V
- #define RCC_APB1Periph_SPI2 ((uint32_t)0x00004000)
- Z& n2 B; M% I- V! `4 y8 c( v - #define RCC_APB1Periph_SPI3 ((uint32_t)0x00008000)
/ [6 z5 \" Q! P- h - #if defined(STM32F446xx)# X/ @2 x( x3 N% X* m- u J: l! I0 A
- #define RCC_APB1Periph_SPDIFRX ((uint32_t)0x00010000)
2 c* J( ~9 ~+ ]3 ~ - #endif /* STM32F446xx */
h, Z9 H6 k {* |. M, X - #define RCC_APB1Periph_USART2 ((uint32_t)0x00020000)9 |/ H+ @. }$ F( f* n# \: w
- #define RCC_APB1Periph_USART3 ((uint32_t)0x00040000)+ v' X+ x, B6 O
- #define RCC_APB1Periph_UART4 ((uint32_t)0x00080000)9 G) ?& `) e# Q1 _
- #define RCC_APB1Periph_UART5 ((uint32_t)0x00100000)" ]0 v+ h2 H( k% v, R1 ~+ A& I
- #define RCC_APB1Periph_I2C1 ((uint32_t)0x00200000)4 z. _1 _. T. J
- #define RCC_APB1Periph_I2C2 ((uint32_t)0x00400000)
/ m0 s$ a- ]* W/ A* e& V2 n; N - #define RCC_APB1Periph_I2C3 ((uint32_t)0x00800000); U, I p7 y6 g. C$ o/ h; F
- #if defined(STM32F410xx) || defined(STM32F412xG) 1 G8 N2 ?& N4 }% Z4 k. j
- || defined(STM32F413_423xx) || defined(STM32F446xx)$ U6 j& P0 k+ J8 h- c
- #define RCC_APB1Periph_FMPI2C1 ((uint32_t)0x01000000)
# h0 w6 M, @( _, A$ g4 u, b - #endif /* STM32F410xx || STM32F446xx || STM32F413_423xx*/ . j' y2 s- j6 T1 N
- #define RCC_APB1Periph_CAN1 ((uint32_t)0x02000000)2 k! q1 q, f$ X" O2 r
- #define RCC_APB1Periph_CAN2 ((uint32_t)0x04000000)% o2 x7 ]( s" _: j
- #if defined(STM32F413_423xx)
1 c1 G3 V& F/ ~; w. g, h% V, ^ - #define RCC_APB1Periph_CAN3 ((uint32_t)0x08000000)
4 V e/ n% M& ]& U - #endif /* STM32F413_423xx */
X# A8 }! t$ b - #if defined(STM32F446xx)7 q9 S9 X# W/ ?/ z& N
- #define RCC_APB1Periph_CEC ((uint32_t)0x08000000)
% Q/ s5 i7 s( b2 p& J3 L - #endif /* STM32F446xx */
; r& |, i$ D- R& `+ | - #define RCC_APB1Periph_PWR ((uint32_t)0x10000000)
( T5 a$ A: p& |/ R5 C! x8 P1 ~ - #define RCC_APB1Periph_DAC ((uint32_t)0x20000000)$ u5 O7 H) H$ m& n9 z+ O' p
- #define RCC_APB1Periph_UART7 ((uint32_t)0x40000000)8 R" n w: ^$ L- F7 |; u
- #define RCC_APB1Periph_UART8 ((uint32_t)0x80000000)
0 K6 K* U& W) A0 z$ A2 N: o - #define IS_RCC_APB1_PERIPH(PERIPH)
5 G* n! r. c% H - ((((PERIPH) & 0x00003600) == 0x00) && ((PERIPH) != 0x00))
复制代码 # E3 \+ a$ p, L( K0 ^3 y' W
RCC_APB2_Peripherals
6 l) O6 |; C' ~2 i6 N3 Q7 a0 R4 A: P, `2 @1 p1 Y- |9 i
- /** @defgroup RCC_APB2_Peripherals & y3 J2 r7 \. u* F8 m" p+ N1 f, u
- * @{% Z6 Z' b, r1 G3 }6 Q
- */
, H; F- c" x* o: e# J - #define RCC_APB2Periph_TIM1 ((uint32_t)0x00000001)0 I. D" ^/ V, ?" M( L& Z( t/ B
- #define RCC_APB2Periph_TIM8 ((uint32_t)0x00000002)
/ w+ q) b$ g: n - #define RCC_APB2Periph_USART1 ((uint32_t)0x00000010)
% d' c, c0 s! f, U7 N2 A, D- c- y - #define RCC_APB2Periph_USART6 ((uint32_t)0x00000020)6 N' V5 J# g3 g5 t* L2 ]
- #define RCC_APB2Periph_ADC ((uint32_t)0x00000100)4 V% B/ j% ]& ? F; P
- #define RCC_APB2Periph_ADC1 ((uint32_t)0x00000100)
0 D% a# K0 O, M5 q6 w - #define RCC_APB2Periph_ADC2 ((uint32_t)0x00000200)
9 y, G y8 a* |, V# j1 t& o - #define RCC_APB2Periph_ADC3 ((uint32_t)0x00000400)) u/ q7 |/ o$ t# N7 X& m- ?+ G; ~
- #define RCC_APB2Periph_SDIO ((uint32_t)0x00000800)+ Y2 k h! s6 K9 c) c. W
- #define RCC_APB2Periph_SPI1 ((uint32_t)0x00001000)
3 A1 k0 \- ^0 r+ ^ - #define RCC_APB2Periph_SPI4 ((uint32_t)0x00002000)% A1 s3 F2 }) P
- #define RCC_APB2Periph_SYSCFG ((uint32_t)0x00004000)
% O6 r8 x, X+ \ O0 V u2 m - #define RCC_APB2Periph_EXTIT ((uint32_t)0x00008000): K8 a: t: A3 p3 t( A! v, b* c! U# {
- #define RCC_APB2Periph_TIM9 ((uint32_t)0x00010000)
% Y$ P% D& c! E5 b/ |$ a, ~" n7 H - #define RCC_APB2Periph_TIM10 ((uint32_t)0x00020000)
3 v: `# t$ F: G- m$ E% j - #define RCC_APB2Periph_TIM11 ((uint32_t)0x00040000)
0 C/ A0 C6 f" l' a" K, q, y* M - #define RCC_APB2Periph_SPI5 ((uint32_t)0x00100000)7 a- o: h# i- m) d6 {
- #define RCC_APB2Periph_SPI6 ((uint32_t)0x00200000)" B- H( d5 Q$ u1 [1 }
- #define RCC_APB2Periph_SAI1 ((uint32_t)0x00400000)
% S! t# y4 o% e {) j- l, n% H* F - #if defined(STM32F446xx) || defined(STM32F469_479xx)1 T- G+ Z7 z, E3 r9 R( O
- #define RCC_APB2Periph_SAI2 ((uint32_t)0x00800000)
; }! H/ t( Y$ H. s: J8 w) W: }& ^ - #endif /* STM32F446xx || STM32F469_479xx */
R7 ]* P! Z% ^ Y - #define RCC_APB2Periph_LTDC ((uint32_t)0x04000000)9 L: r: k/ L' j1 o5 H' q- c; u+ Z
- #if defined(STM32F469_479xx)+ A1 h3 y$ j% s( e
- #define RCC_APB2Periph_DSI ((uint32_t)0x08000000)7 M, t0 K5 v- r
- #endif /* STM32F469_479xx */
4 o8 O0 b+ E1 S/ {2 q - #if defined(STM32F412xG) || defined(STM32F413_423xx); |- C# F9 r" D7 x
- #define RCC_APB2Periph_DFSDM1 ((uint32_t)0x01000000)$ ~, x; ^8 b; Q U0 i
- #endif /* STM32F412xG || STM32F413_423xx */. z0 [, g% e t6 `9 [/ C
- #if defined(STM32F413_423xx)
0 j Q2 ^ y. S8 J; J, _ - #define RCC_APB2Periph_DFSDM2 ((uint32_t)0x02000000)
1 t' d+ H! M3 _( q& b/ D - #define RCC_APB2Periph_UART9 ((uint32_t)0x02000040)' v2 y+ }( G. v3 k; ^
- #define RCC_APB2Periph_UART10 ((uint32_t)0x00000080)
) `1 \3 r' n$ h% R: H, ~9 ~1 r - #endif /* STM32F413_423xx */
; C) z2 U4 \4 `7 D% q8 u" ~+ M+ U. ~ - 3 a5 c @6 W3 U1 e7 u; Y& m& e% O
- /* Legacy Defines */
: l9 D$ m' p5 C/ ` - #define RCC_APB2Periph_DFSDM RCC_APB2Periph_DFSDM13 O. f: w0 `; V! ?- Q/ v& N
+ S/ u0 |5 ]" n+ T6 x- #define IS_RCC_APB2_PERIPH(PERIPH)
+ H5 f6 S) d" m* l! y; a - ((((PERIPH) & 0xF008000C) == 0x00) && ((PERIPH) != 0x00))
( {+ T/ R/ w8 V9 h. s - #define IS_RCC_APB2_RESET_PERIPH(PERIPH) ; Q! U+ g# G$ L: r1 o
- ((((PERIPH) & 0xF208860C) == 0x00) && ((PERIPH) != 0x00))
复制代码 % A* w4 Q1 v2 l& c
RCC_MCO1_Clock_Source_Prescaler* w( @/ }! {# n% K, ^
6 c9 S. Z8 a; o3 U! y# j+ {* q9 M- /** @defgroup RCC_MCO1_Clock_Source_Prescaler8 \' n2 n9 ^# g" ?7 F1 P7 `+ ^
- * @{! y2 L0 Z$ @1 G2 F5 z9 A9 L5 T
- */
& k4 ^6 _- H3 z! o. W( j% O m) a - #define RCC_MCO1Source_HSI ((uint32_t)0x00000000)
2 f3 ]& D; z4 [: K4 I# \ - #define RCC_MCO1Source_LSE ((uint32_t)0x00200000)6 p( D, h8 ]) q4 l0 P3 ]
- #define RCC_MCO1Source_HSE ((uint32_t)0x00400000). k) c% I3 M+ i' r& k! ?
- #define RCC_MCO1Source_PLLCLK ((uint32_t)0x00600000)
; k/ H- M4 Y+ [7 D - #define RCC_MCO1Div_1 ((uint32_t)0x00000000)/ p0 K! d- i" {' }
- #define RCC_MCO1Div_2 ((uint32_t)0x04000000)* @4 g8 z# I( [1 \# ^
- #define RCC_MCO1Div_3 ((uint32_t)0x05000000)# u' O6 \% l+ q" @+ o1 {- d
- #define RCC_MCO1Div_4 ((uint32_t)0x06000000)4 i% S( n/ P. I4 A
- #define RCC_MCO1Div_5 ((uint32_t)0x07000000)
% w: |+ N( {2 V/ \9 |% L - #define IS_RCC_MCO1SOURCE(SOURCE) (((SOURCE) == RCC_MCO1Source_HSI) , E! E8 c) E$ }
- || ((SOURCE) == RCC_MCO1Source_LSE) || \
) _) p4 h7 y0 t - ((SOURCE) == RCC_MCO1Source_HSE) || ((SOURCE) == RCC_MCO1Source_PLLCLK))
+ k g( d$ ]/ V J" M
( L6 A8 _. U# |# W- #define IS_RCC_MCO1DIV(DIV) (((DIV) == RCC_MCO1Div_1) || ((DIV) == RCC_MCO1Div_2) || \
- O( |/ L0 H; p/ h1 f - ((DIV) == RCC_MCO1Div_3) || ((DIV) == RCC_MCO1Div_4) || \
/ m% f& w. O0 u - ((DIV) == RCC_MCO1Div_5))
复制代码 # m' _$ ?1 p% K2 t
RCC_MCO2_Clock_Source_Prescaler+ q, Z% _1 A6 ~0 b
; C6 `* I. ?& M% W* \# E( W& a$ L
- /** @defgroup RCC_MCO2_Clock_Source_Prescaler
0 _4 M6 k. {4 F' H$ | Y8 H' P: G - * @{( T) f5 `/ ~6 ~" e% {8 Y- @; \" [
- */
% m# l: r- P" @! e. g! q& [. @ - #define RCC_MCO2Source_SYSCLK ((uint32_t)0x00000000)
( O9 B' m( ?% c8 q. p6 _ - #define RCC_MCO2Source_PLLI2SCLK ((uint32_t)0x40000000)7 M1 a: t. H' u6 m8 I+ H
- #define RCC_MCO2Source_HSE ((uint32_t)0x80000000)
5 c b/ v8 r/ r' P; A - #define RCC_MCO2Source_PLLCLK ((uint32_t)0xC0000000); {4 Y! C; _9 O0 s
- #define RCC_MCO2Div_1 ((uint32_t)0x00000000)
+ J5 W4 k, o4 r# f - #define RCC_MCO2Div_2 ((uint32_t)0x20000000)
% I" s& C% u9 y& z - #define RCC_MCO2Div_3 ((uint32_t)0x28000000)/ f0 N9 A( k$ k7 E+ z W* Y4 }
- #define RCC_MCO2Div_4 ((uint32_t)0x30000000)
; R* s2 N) v. F+ `: }5 }3 U+ ^7 e - #define RCC_MCO2Div_5 ((uint32_t)0x38000000)1 t" z$ O, e0 ^: t6 g
- #define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2Source_SYSCLK) 6 n+ o. W V1 a$ |
- || ((SOURCE) == RCC_MCO2Source_PLLI2SCLK)|| \5 l3 O* {; \ w0 X+ u" `; R% F
- ((SOURCE) == RCC_MCO2Source_HSE) 0 H$ z5 W# p' C V; E
- || ((SOURCE) == RCC_MCO2Source_PLLCLK)); E/ t* x0 U- \& `' L
- C$ x m$ Q( ~- #define IS_RCC_MCO2DIV(DIV) (((DIV) == RCC_MCO2Div_1) || ((DIV) == RCC_MCO2Div_2) || \+ ~. j$ R) P5 K6 p+ w
- ((DIV) == RCC_MCO2Div_3) || ((DIV) == RCC_MCO2Div_4) || \
% }: f/ I' y, E - ((DIV) == RCC_MCO2Div_5))
复制代码
+ d* `/ Y( \% s: G% v& {' {RCC_Flag Z* h# J& V; p+ [9 c; ]- c
, |; y* f0 \* A4 s P5 o, D9 D
- /** @defgroup RCC_Flag
. C5 }8 y8 u# t* S* t - * @{0 u9 G0 T* n: |& |
- */2 u2 |6 f. z) G' |$ {9 ~1 l1 r- m
- #define RCC_FLAG_HSIRDY ((uint8_t)0x21)) K. o! s% |% @- _6 T% z# o+ U
- #define RCC_FLAG_HSERDY ((uint8_t)0x31)
& w* C" K5 W9 o3 m9 E) w - #define RCC_FLAG_PLLRDY ((uint8_t)0x39)
+ U# C- B/ t, e - #define RCC_FLAG_PLLI2SRDY ((uint8_t)0x3B)
* |" ]2 M) ^7 T, z7 h( G - #define RCC_FLAG_PLLSAIRDY ((uint8_t)0x3D)3 o6 P- s! N' z4 z: U) I
- #define RCC_FLAG_LSERDY ((uint8_t)0x41)
: w. `/ N* X9 ^* {) j; a* q - #define RCC_FLAG_LSIRDY ((uint8_t)0x61), Q+ z7 T8 P) Z/ U5 W
- #define RCC_FLAG_BORRST ((uint8_t)0x79); T/ G! n, k( h3 P4 d; I( p; k
- #define RCC_FLAG_PINRST ((uint8_t)0x7A)
* H3 t% G p% Z1 ]. ~ - #define RCC_FLAG_PORRST ((uint8_t)0x7B)' s( D+ I$ M$ z/ K1 I
- #define RCC_FLAG_SFTRST ((uint8_t)0x7C)
9 p) a9 {) D& W5 N! U8 q - #define RCC_FLAG_IWDGRST ((uint8_t)0x7D)3 q: b4 n- J* l: A
- #define RCC_FLAG_WWDGRST ((uint8_t)0x7E)% s4 q$ W+ e) ~6 X8 j; U
- #define RCC_FLAG_LPWRRST ((uint8_t)0x7F)
4 U. E. J+ C) `
- O' W, s# z# |" b: y5 ]$ c- #define IS_RCC_FLAG(FLAG) (((FLAG) == RCC_FLAG_HSIRDY) || ((FLAG) == RCC_FLAG_HSERDY) || \ e/ z& t o9 f0 _
- ((FLAG) == RCC_FLAG_PLLRDY) || ((FLAG) == RCC_FLAG_LSERDY) || \
% l( o N. z3 z) o( @* ~ - ((FLAG) == RCC_FLAG_LSIRDY) || ((FLAG) == RCC_FLAG_BORRST) || \
; z' G8 ?! P) k+ I' _0 O5 L - ((FLAG) == RCC_FLAG_PINRST) || ((FLAG) == RCC_FLAG_PORRST) || \
5 e6 M& Y* J: [) V! K - ((FLAG) == RCC_FLAG_SFTRST) || ((FLAG) == RCC_FLAG_IWDGRST)|| \3 z5 g! B% b. h, n2 a& M3 B: l
- ((FLAG) == RCC_FLAG_WWDGRST) || ((FLAG) == RCC_FLAG_LPWRRST)|| \
3 P1 A) m7 {; \" r - ((FLAG) == RCC_FLAG_PLLI2SRDY)|| ((FLAG) == RCC_FLAG_PLLSAIRDY))6 f2 V, Z/ i& t, E
- + J4 y8 a: s6 P& C3 q6 \
- #define IS_RCC_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x1F)
复制代码 % L2 t8 w# ] y" N" P0 b
03. 相关函数5 Y& B ^( n7 j
- /* Function used to set the RCC clock configuration to the default reset state */( j$ A! _. C% z+ N# Z6 m
- void RCC_DeInit(void);
+ [9 t5 y" ]0 R - 5 ^: l8 R9 U/ K+ e
- /* Internal/external clocks, PLL, CSS and MCO configuration functions *********/4 r0 l7 y8 S+ C8 c/ T, [. x
- void RCC_HSEConfig(uint8_t RCC_HSE);4 E2 Z* D; U+ k- h. c! @
- ErrorStatus RCC_WaitForHSEStartUp(void);6 M7 t( k6 A4 F; \: _- c
- void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue);3 c3 ], a" I$ j$ @. s+ q. T
- void RCC_HSICmd(FunctionalState NewState);# A+ L, e; P; A$ ~0 J3 ^
- void RCC_LSEConfig(uint8_t RCC_LSE);
+ s- s4 L% c3 D0 } F - void RCC_LSICmd(FunctionalState NewState);
* D6 A% g! }! [6 R
4 n+ _ b$ `) V0 U' J- void RCC_PLLCmd(FunctionalState NewState);
8 R2 E9 S+ y: R" j' D% ~ - 1 k1 O6 ` r) ^; x5 ?; Y e$ \
- void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t PLLM, uint32_t PLLN, ) [8 Y: r* g4 K% K7 ? n% h
- uint32_t PLLP, uint32_t PLLQ);
$ K! g7 ^4 }* a - v! u4 p* B2 W* Z: B
- void RCC_PLLI2SCmd(FunctionalState NewState);
3 L, I8 v5 a2 V8 ^' E
+ D* c" F% k9 ^/ e5 R5 T& |- void RCC_PLLI2SConfig(uint32_t PLLI2SN, uint32_t PLLI2SR);2 R4 Q- x4 D; U7 H& {: C
- * n+ ^3 M8 B5 z+ |! [$ V
- : q# v1 E- c! B2 e6 ` X9 O0 J
- void RCC_PLLSAICmd(FunctionalState NewState);
. b N/ f. u- K$ O - 4 Y9 t! P& q4 S3 G6 J! I# u2 H
- void RCC_PLLSAIConfig(uint32_t PLLSAIN, uint32_t PLLSAIQ, uint32_t PLLSAIR);# l a: s) c/ N7 A3 O. r. S4 K4 ^
- void RCC_ClockSecuritySystemCmd(FunctionalState NewState);
( \' s# A9 m# p0 f/ ~ - void RCC_MCO1Config(uint32_t RCC_MCO1Source, uint32_t RCC_MCO1Div);
6 `; I/ ^/ q& z+ k9 Y - void RCC_MCO2Config(uint32_t RCC_MCO2Source, uint32_t RCC_MCO2Div);
+ Q: }/ ? Y8 j6 o5 U - # f! X2 s! h; S) q S8 \6 H" B
/ S6 a" K5 b' l& F$ N5 L- /* System, AHB and APB busses clocks configuration functions ******************/
# H, l" E2 g& |' O - void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource);% c$ P0 ~' w; t0 p$ Y8 d& T, r, S
- uint8_t RCC_GetSYSCLKSource(void);$ _, H: S& G2 p
- void RCC_HCLKConfig(uint32_t RCC_SYSCLK);; ?: M; m7 K- i' M7 L+ J) T
- void RCC_PCLK1Config(uint32_t RCC_HCLK);; C4 w' i4 Z0 @7 l3 H) M
- void RCC_PCLK2Config(uint32_t RCC_HCLK);
# e6 S1 k6 E- Z! F+ _" v - void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks);
. n. l: _; ~% F$ G/ K. l3 m+ y - ) d4 Y9 O! W) X4 D: I! {
- /* Peripheral clocks configuration functions **********************************/
5 d3 S$ E S- Y( e, M5 h - void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource);$ T, q6 I9 V$ ^3 _+ @
- void RCC_RTCCLKCmd(FunctionalState NewState);9 P* \* O1 ^0 k! _2 u
- void RCC_BackupResetCmd(FunctionalState NewState);) ~- N4 E. k: F
* T5 i# _; Y/ O# y- U1 ^! E
4 G9 f3 g! B x5 I- void RCC_I2SCLKConfig(uint32_t RCC_I2SCLKSource);9 l& H. ^2 r6 b4 K
9 j# Y9 F& J, a, Y; ]3 u4 y' s) D- J ~- ) k3 b5 a: ^& ?% }2 F
- void RCC_SAIBlockACLKConfig(uint32_t RCC_SAIBlockACLKSource);' H% @8 n1 q9 G. d/ c' k0 z
- void RCC_SAIBlockBCLKConfig(uint32_t RCC_SAIBlockBCLKSource);
5 q ^# d" D1 H4 X3 m# L& V# }; Y - ! A1 p1 a P$ M- d* n6 ~
1 ?/ Q2 T0 N P5 _6 r- void RCC_SAIPLLI2SClkDivConfig(uint32_t RCC_PLLI2SDivQ);4 V- q8 `% T# x3 v, ?$ p5 N
- void RCC_SAIPLLSAIClkDivConfig(uint32_t RCC_PLLSAIDivQ);
1 u1 |( I) i0 m4 G- {: h% y
9 ^( B% N. S; c. Q0 `+ x0 v
9 U- u9 N8 Q+ |- void RCC_LTDCCLKDivConfig(uint32_t RCC_PLLSAIDivR);# ]; r+ I* ^9 v% k/ O2 W
- void RCC_TIMCLKPresConfig(uint32_t RCC_TIMCLKPrescaler);
5 h0 d: g9 e6 Y: F- _
/ T( H# C- e+ y5 t$ c1 l: o- void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState);
. p- Z' ?/ j) B6 ]" I! C. p$ G - void RCC_AHB2PeriphClockCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState);# \. Z; h v# z+ S- p5 e5 \
- void RCC_AHB3PeriphClockCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState);" J( I& M9 l: D, u5 U0 x8 m Q
- void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);
& }0 R9 o& ~9 ]' {# }4 Q% V% X- E - void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);3 R F* @7 q4 o* }
0 Q* L5 n+ X! f* T7 z2 G* o) q" z- void RCC_AHB1PeriphResetCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState);
4 n3 [: ^: I6 I* }% |& y - void RCC_AHB2PeriphResetCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState);. L) c# z0 ~( \7 k, g9 i& K; c
- void RCC_AHB3PeriphResetCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState);
6 G5 e, V( X1 V6 V - void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);
% J0 w2 n6 X3 f - void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);5 P3 Y! p/ K( M# ? I7 S
) X1 P3 R* e+ N+ Z6 e& c- void RCC_AHB1PeriphClockLPModeCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState);
' q: l# U d# o/ Z7 ` - void RCC_AHB2PeriphClockLPModeCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState);/ M5 T# @6 O; `- Y5 y' D" K
- void RCC_AHB3PeriphClockLPModeCmd(uint32_t RCC_AHB3Periph, FunctionalState NewState);% K, j8 b( J0 l; }
- void RCC_APB1PeriphClockLPModeCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);% e* x. y- U3 q3 m. H/ W
- void RCC_APB2PeriphClockLPModeCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);$ x! `+ E' h* w6 f5 |- Y- P3 ~* A
0 n* l+ N5 }+ Q) T' W- q: E+ f- 6 X# Q# _% I6 H; U! D1 r
- /* Interrupts and flags management functions **********************************/6 j' \4 T4 }+ ] P
- void RCC_ITConfig(uint8_t RCC_IT, FunctionalState NewState);0 V2 l$ ~8 T7 E; Q S
- FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG);
0 m4 a1 B2 q6 W( k# m - void RCC_ClearFlag(void);3 c: P! a8 D- H5 Z( C! ?# l$ u
- ITStatus RCC_GetITStatus(uint8_t RCC_IT);! F% T8 }" ]$ I9 A) w9 e% u
- void RCC_ClearITPendingBit(uint8_t RCC_IT);
复制代码
) R3 A4 _/ J$ G# \) j( x9 d1 E04. 结构体封装
6 |9 ]+ a9 b6 G1 s" [3 K) t- /**
3 S. b& z9 F1 Q$ }/ T - * @brief Reset and Clock Control' {& _# V$ {2 z# X
- */
, u3 C+ B ^( }$ r
4 R$ N$ E& V9 k- typedef struct" b J" P6 @2 W* W
- {% Y f0 y+ ^, g/ u0 ]
- __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */
$ a: [1 v5 F" V' i - __IO uint32_t PLLCFGR; /*!< RCC PLL configuration register, Address offset: 0x04 */5 M' }/ Y& {! E" O1 Q
- __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x08 */" p# `5 D- U' n) M
- __IO uint32_t CIR; /*!< RCC clock interrupt register, Address offset: 0x0C */- _ V; X- r! f( N2 _6 S
- __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x10 */: ~1 d# F% s D. }# x0 u9 y
- __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x14 */1 _9 \2 @+ h9 `( g2 U
- __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x18 */
: H( T O6 v: ^" M2 @/ W' A - uint32_t RESERVED0; /*!< Reserved, 0x1C */, m9 ]7 a1 H6 @" |
- __IO uint32_t APB1RSTR; /*!< RCC APB1 peripheral reset register, Address offset: 0x20 */$ v5 ?% R" g0 R
- __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x24 */
) v5 S Z, Z, w: a - uint32_t RESERVED1[2]; /*!< Reserved, 0x28-0x2C */& T, L& S6 e* ]4 G; b/ Q
- __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0x30 */: u$ o# E8 H* h9 O, L3 S2 ]5 ^
- __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0x34 */
8 k+ p* {7 ~7 p9 a - __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0x38 */8 V; H" J l* d4 J6 \# v7 A+ E
- uint32_t RESERVED2; /*!< Reserved, 0x3C */
0 f6 P" A7 H. g - __IO uint32_t APB1ENR; /*!< RCC APB1 peripheral clock enable register, Address offset: 0x40 */" O4 l# J2 }+ i$ O# D+ P
- __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock enable register, Address offset: 0x44 *// Y" O3 o; M4 S7 d
- uint32_t RESERVED3[2]; /*!< Reserved, 0x48-0x4C */; A' D: k/ i6 \2 }
- __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral clock enable in low power mode register, Address offset: 0x50 */7 T/ Q- ?. Y5 q* T
- __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral clock enable in low power mode register, Address offset: 0x54 */
4 X$ r8 z& z$ Y; x8 H2 U M. m - __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral clock enable in low power mode register, Address offset: 0x58 */
$ N) X# c9 W, @% t) n9 _% o - uint32_t RESERVED4; /*!< Reserved, 0x5C */. l( m* W7 G. e* l
- __IO uint32_t APB1LPENR; /*!< RCC APB1 peripheral clock enable in low power mode register, Address offset: 0x60 */( V6 p( K, F1 J: \3 a- ]; f
- __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral clock enable in low power mode register, Address offset: 0x64 */$ }% J% a: Y. ]4 P9 U8 c7 H
- uint32_t RESERVED5[2]; /*!< Reserved, 0x68-0x6C */
. Q( |$ h9 K A" M0 A& G/ V - __IO uint32_t BDCR; /*!< RCC Backup domain control register, Address offset: 0x70 */; T3 t" p6 N7 Y8 X6 A4 l# O2 h ~
- __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */
8 `. L& s3 {8 h6 I8 A - uint32_t RESERVED6[2]; /*!< Reserved, 0x78-0x7C */# X' \& v* {% i+ w3 T. ?& L( A
- __IO uint32_t SSCGR; /*!< RCC spread spectrum clock generation register, Address offset: 0x80 */0 ^ ~4 z9 n" c* ?1 `, c
- __IO uint32_t PLLI2SCFGR; /*!< RCC PLLI2S configuration register, Address offset: 0x84 */# O: Z4 z( V5 a% Z- p7 V% H$ t
- __IO uint32_t PLLSAICFGR; /*!< RCC PLLSAI configuration register, Address offset: 0x88 */
% D, u& C1 W# H4 Y: P% S r - __IO uint32_t DCKCFGR; /*!< RCC Dedicated Clocks configuration register, Address offset: 0x8C */$ W4 l9 B8 |) x" T3 i
- __IO uint32_t CKGATENR; /*!< RCC Clocks Gated Enable Register, Address offset: 0x90 */ /* Only for STM32F412xG, STM32413_423xx and STM32F446xx devices */
7 g/ M7 s* Q7 w1 ], `# x - __IO uint32_t DCKCFGR2; /*!< RCC Dedicated Clocks configuration register 2, Address offset: 0x94 */ /* Only for STM32F410xx, STM32F412xG, STM32413_423xx and STM32F446xx devices */
9 W. N3 p3 o& Z" s - 8 k, ?- R9 _/ h ^, p1 Y8 [9 r
- } RCC_TypeDef;
! d9 V3 l1 m5 X" C i3 M4 w
复制代码
. F- T8 ^) p5 v/ n$ Z# J$ K) d05. 其它
! t4 g" X3 X: U- /******************************************************************************/
3 u6 R% Q( `$ q - /* */
6 E$ L$ Z8 ?8 p1 _4 X/ I - /* Reset and Clock Control */
! I6 T& c5 w% o4 @ R# l - /* *// H9 i; \& G# G2 ~1 W
- /******************************************************************************/
9 v/ k* Q+ H+ M: c - /******************** Bit definition for RCC_CR register ********************/. c) h2 K$ ~# |. S; v
- #define RCC_CR_HSION ((uint32_t)0x00000001)0 m: v7 z+ H/ S+ D8 X
- #define RCC_CR_HSIRDY ((uint32_t)0x00000002)8 a3 y: j9 ]6 a" Y' c4 o
- * n5 n J$ o" z' P
- #define RCC_CR_HSITRIM ((uint32_t)0x000000F8)7 [& q" W& C, B/ k. ?7 f5 a
- #define RCC_CR_HSITRIM_0 ((uint32_t)0x00000008)/*!<Bit 0 */
. k2 @. y( f% H! J - #define RCC_CR_HSITRIM_1 ((uint32_t)0x00000010)/*!<Bit 1 */; d* \6 s2 a; s" A9 F# J
- #define RCC_CR_HSITRIM_2 ((uint32_t)0x00000020)/*!<Bit 2 */
1 z3 p: s& {# U0 `# E% k7 K3 c& C - #define RCC_CR_HSITRIM_3 ((uint32_t)0x00000040)/*!<Bit 3 */7 q9 l. i( Q! f4 `) y2 ^3 T
- #define RCC_CR_HSITRIM_4 ((uint32_t)0x00000080)/*!<Bit 4 */3 p) K+ [6 H0 D% q0 P$ K" X
2 n- p! E$ W+ c5 n+ r/ N- #define RCC_CR_HSICAL ((uint32_t)0x0000FF00)
+ p3 e+ V s! w: K - #define RCC_CR_HSICAL_0 ((uint32_t)0x00000100)/*!<Bit 0 */( v- m i3 b' V* {2 H% ?, p8 ]; H/ l
- #define RCC_CR_HSICAL_1 ((uint32_t)0x00000200)/*!<Bit 1 */
% K# J4 e+ n$ L9 P2 @ - #define RCC_CR_HSICAL_2 ((uint32_t)0x00000400)/*!<Bit 2 */
) R1 g8 y. |2 a, m, t( w* I; r4 B/ @2 s - #define RCC_CR_HSICAL_3 ((uint32_t)0x00000800)/*!<Bit 3 */* h1 w/ \' W) a0 L
- #define RCC_CR_HSICAL_4 ((uint32_t)0x00001000)/*!<Bit 4 *// s8 G9 {" V5 i" R! a
- #define RCC_CR_HSICAL_5 ((uint32_t)0x00002000)/*!<Bit 5 */
6 E- p& L! L& {6 D - #define RCC_CR_HSICAL_6 ((uint32_t)0x00004000)/*!<Bit 6 */
! c, H3 g, H2 `* n+ E6 r - #define RCC_CR_HSICAL_7 ((uint32_t)0x00008000)/*!<Bit 7 */
* l+ S G, y- r' N4 A/ J+ r - - f* r& z1 y4 Q& Q5 p( [6 K
- #define RCC_CR_HSEON ((uint32_t)0x00010000)& G# \5 H: `! y1 v& j
- #define RCC_CR_HSERDY ((uint32_t)0x00020000)
; l$ ^# n: z l$ `4 V, Q$ N - #define RCC_CR_HSEBYP ((uint32_t)0x00040000)
2 T: ]$ H: J2 `5 T* V - #define RCC_CR_CSSON ((uint32_t)0x00080000). @6 w: V0 Z D) u' C, K/ Y
- #define RCC_CR_PLLON ((uint32_t)0x01000000)) i& k5 H* w; H) ~
- #define RCC_CR_PLLRDY ((uint32_t)0x02000000)
5 C+ x5 v8 `; K2 [9 n - #define RCC_CR_PLLI2SON ((uint32_t)0x04000000)
$ R0 P( H+ C; P - #define RCC_CR_PLLI2SRDY ((uint32_t)0x08000000)
: N4 R, y' n5 S, ?0 t - #define RCC_CR_PLLSAION ((uint32_t)0x10000000)
& h% f! k# k) T9 G - #define RCC_CR_PLLSAIRDY ((uint32_t)0x20000000)
$ G" f0 P% x$ O p5 |4 C) ?) R - 3 V$ n+ Q! m. Z
- /******************** Bit definition for RCC_PLLCFGR register ***************/
8 o* e4 n; G/ c( N( ]0 N# j# V% M" s - #define RCC_PLLCFGR_PLLM ((uint32_t)0x0000003F)
m9 E% T- @. y7 h& F$ l, T% F4 B - #define RCC_PLLCFGR_PLLM_0 ((uint32_t)0x00000001)/ @/ L+ }2 f" X
- #define RCC_PLLCFGR_PLLM_1 ((uint32_t)0x00000002)6 |# L6 Z4 k5 R9 F1 z
- #define RCC_PLLCFGR_PLLM_2 ((uint32_t)0x00000004)
4 s6 C* U' Y) q - #define RCC_PLLCFGR_PLLM_3 ((uint32_t)0x00000008)2 Z* T* O) F4 K( G$ h. @
- #define RCC_PLLCFGR_PLLM_4 ((uint32_t)0x00000010)
- ]8 k) F. w$ g: E- m \# r" H! d+ c - #define RCC_PLLCFGR_PLLM_5 ((uint32_t)0x00000020). O& c/ l, A( K5 x- ^6 C
- 8 ~, X/ V' {; c, G
- #define RCC_PLLCFGR_PLLN ((uint32_t)0x00007FC0)
! z# t0 { P$ p) I - #define RCC_PLLCFGR_PLLN_0 ((uint32_t)0x00000040)
1 T: s2 V( w& |$ x: c - #define RCC_PLLCFGR_PLLN_1 ((uint32_t)0x00000080)
3 x! c7 `# M: k* K% w& _0 P - #define RCC_PLLCFGR_PLLN_2 ((uint32_t)0x00000100)5 C! l+ {/ I; F4 ?0 E
- #define RCC_PLLCFGR_PLLN_3 ((uint32_t)0x00000200)
0 C' i4 C ?4 s - #define RCC_PLLCFGR_PLLN_4 ((uint32_t)0x00000400)
9 |0 N' k% e1 k! j7 G" \3 H& g - #define RCC_PLLCFGR_PLLN_5 ((uint32_t)0x00000800)
0 _3 O4 x4 @8 K, d - #define RCC_PLLCFGR_PLLN_6 ((uint32_t)0x00001000)
9 f9 n8 z/ O) K1 X: \. j - #define RCC_PLLCFGR_PLLN_7 ((uint32_t)0x00002000)
# F8 G/ G4 L4 h+ N4 b - #define RCC_PLLCFGR_PLLN_8 ((uint32_t)0x00004000)
% y2 b4 E: ]$ u6 h; T% Q& T - ! a% ^9 e. ?5 M! w4 G/ |, f2 P
- #define RCC_PLLCFGR_PLLP ((uint32_t)0x00030000)
9 }! U; J: t1 D: z$ G - #define RCC_PLLCFGR_PLLP_0 ((uint32_t)0x00010000)" Q9 I. q0 I6 P2 }3 d) z: X
- #define RCC_PLLCFGR_PLLP_1 ((uint32_t)0x00020000)
" t# s! V' x: z. z7 N - 3 f) p) q: v @; t9 U# L
- #define RCC_PLLCFGR_PLLSRC ((uint32_t)0x00400000)+ C r4 o+ k2 j+ Y4 t
- #define RCC_PLLCFGR_PLLSRC_HSE ((uint32_t)0x00400000)) `3 M" b* B5 ^& h
- #define RCC_PLLCFGR_PLLSRC_HSI ((uint32_t)0x00000000)
! J' }3 s6 G2 Y, Z5 `8 Z - : a/ J6 Y0 `6 ~0 a- U9 }- C" h
- #define RCC_PLLCFGR_PLLQ ((uint32_t)0x0F000000)* E- j0 _8 y# M% }$ _ b4 g2 O
- #define RCC_PLLCFGR_PLLQ_0 ((uint32_t)0x01000000), J" T8 H2 H1 V5 I/ x. v' h7 F
- #define RCC_PLLCFGR_PLLQ_1 ((uint32_t)0x02000000)7 h, Y9 G$ V/ n# w
- #define RCC_PLLCFGR_PLLQ_2 ((uint32_t)0x04000000)3 ]. \5 i1 k9 ]/ \! u" Z
- #define RCC_PLLCFGR_PLLQ_3 ((uint32_t)0x08000000)2 S! k. Q; a# c% V9 k
N8 U' A9 {( f- #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx)
2 o! E+ P4 |- ^& F4 H; O" I - #define RCC_PLLCFGR_PLLR ((uint32_t)0x70000000)
4 x ^/ W8 G# S - #define RCC_PLLCFGR_PLLR_0 ((uint32_t)0x10000000)
; G) ~1 [2 j3 Y2 r" i8 D- j - #define RCC_PLLCFGR_PLLR_1 ((uint32_t)0x20000000)# |4 l8 n+ ?4 c
- #define RCC_PLLCFGR_PLLR_2 ((uint32_t)0x40000000). h3 Y! ^7 S- X) m) X
- #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx */
; F! h+ W; ^6 L8 A1 j n: O
" F1 {9 @: Z. z% c0 W- /******************** Bit definition for RCC_CFGR register ******************/2 m( H p/ F/ _
- /*!< SW configuration */' ?8 E& v. X% b; w+ X
- #define RCC_CFGR_SW ((uint32_t)0x00000003) /*!< SW[1:0] bits (System clock Switch) */3 G: J: p5 o3 ~ z9 s' o
- #define RCC_CFGR_SW_0 ((uint32_t)0x00000001) /*!< Bit 0 */& ~2 l6 k( x, y I- Z
- #define RCC_CFGR_SW_1 ((uint32_t)0x00000002) /*!< Bit 1 */' }& R2 v8 A, y0 Q$ d/ ^8 L0 p
+ s7 K* K5 O' J6 V' K- #define RCC_CFGR_SW_HSI ((uint32_t)0x00000000) /*!< HSI selected as system clock */
: n" o# g8 c% p6 k+ B - #define RCC_CFGR_SW_HSE ((uint32_t)0x00000001) /*!< HSE selected as system clock */# `: C4 t6 y+ `# I" _$ L5 C/ W9 }$ }
- #define RCC_CFGR_SW_PLL ((uint32_t)0x00000002) /*!< PLL/PLLP selected as system clock */
5 u# c( x0 Y% Q+ o7 s - #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx)
$ r$ X y8 X0 C# f5 i; H - #define RCC_CFGR_SW_PLLR ((uint32_t)0x00000003) /*!< PLL/PLLR selected as system clock */
+ z& N: Q9 P" A: ]4 |! w - #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx *// U) d4 R, J6 a" D( J Q4 q8 h
- ; o' E- J0 j8 }9 n4 {
- /*!< SWS configuration */
5 n& d f) p+ C. j; `6 e! b - #define RCC_CFGR_SWS ((uint32_t)0x0000000C) /*!< SWS[1:0] bits (System Clock Switch Status) */7 ]( M$ F( H1 [9 }; B$ `. Y4 k
- #define RCC_CFGR_SWS_0 ((uint32_t)0x00000004) /*!< Bit 0 */
: R8 [. `8 }3 E2 R l% y5 {" B - #define RCC_CFGR_SWS_1 ((uint32_t)0x00000008) /*!< Bit 1 */
4 i" u% y/ C4 h4 Z) K* r
+ v6 z0 {! H3 J5 e- #define RCC_CFGR_SWS_HSI ((uint32_t)0x00000000) /*!< HSI oscillator used as system clock */
! r+ w! a% y3 |2 S8 { - #define RCC_CFGR_SWS_HSE ((uint32_t)0x00000004) /*!< HSE oscillator used as system clock */
Y% R7 C+ c) Z% X" ?3 v - #define RCC_CFGR_SWS_PLL ((uint32_t)0x00000008) /*!< PLL/PLLP used as system clock */
3 `. ^3 q: U# w: X - #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F469_479xx) || defined(STM32F446xx)
' t2 P/ D7 v3 t' N7 U, o - #define RCC_CFGR_SWS_PLLR ((uint32_t)0x0000000C) /*!< PLL/PLLR used as system clock */' B5 E( I) `4 j9 I3 J# i
- #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx */* ?9 q# a' \: Z8 M
- 2 D9 w7 z) a$ {/ ]( Q7 L# p# C
- /*!< HPRE configuration */; t$ }3 [ O' H( M1 V, X6 x2 T% d
- #define RCC_CFGR_HPRE ((uint32_t)0x000000F0) /*!< HPRE[3:0] bits (AHB prescaler) */
8 F- w O3 S0 n: x5 |9 T: d - #define RCC_CFGR_HPRE_0 ((uint32_t)0x00000010) /*!< Bit 0 */' X6 V$ C; p/ i1 _
- #define RCC_CFGR_HPRE_1 ((uint32_t)0x00000020) /*!< Bit 1 */6 K5 S0 n5 d" P
- #define RCC_CFGR_HPRE_2 ((uint32_t)0x00000040) /*!< Bit 2 */
% v* y* U0 k. n; W+ f - #define RCC_CFGR_HPRE_3 ((uint32_t)0x00000080) /*!< Bit 3 */ b" E- _6 m( e
2 z7 m, E$ `2 W1 S- o1 J- #define RCC_CFGR_HPRE_DIV1 ((uint32_t)0x00000000) /*!< SYSCLK not divided */9 [2 V- {$ m3 _ b5 F, n
- #define RCC_CFGR_HPRE_DIV2 ((uint32_t)0x00000080) /*!< SYSCLK divided by 2 */
( N; L5 \! Q* n. L& i S - #define RCC_CFGR_HPRE_DIV4 ((uint32_t)0x00000090) /*!< SYSCLK divided by 4 */
! `: f# ]/ O' A* y, z# q - #define RCC_CFGR_HPRE_DIV8 ((uint32_t)0x000000A0) /*!< SYSCLK divided by 8 */! H; h m5 y9 G* E$ j4 n6 r
- #define RCC_CFGR_HPRE_DIV16 ((uint32_t)0x000000B0) /*!< SYSCLK divided by 16 */
& M* D" t5 |/ P' }2 O! g) [* s" F& s4 U - #define RCC_CFGR_HPRE_DIV64 ((uint32_t)0x000000C0) /*!< SYSCLK divided by 64 */
u& U7 m7 q# y3 v - #define RCC_CFGR_HPRE_DIV128 ((uint32_t)0x000000D0) /*!< SYSCLK divided by 128 */
3 ?* b/ o o) x) m; v% d/ ~- ]( M; F - #define RCC_CFGR_HPRE_DIV256 ((uint32_t)0x000000E0) /*!< SYSCLK divided by 256 */! w$ h$ [* |8 T
- #define RCC_CFGR_HPRE_DIV512 ((uint32_t)0x000000F0) /*!< SYSCLK divided by 512 */
( Y: @8 d# f& o - , f- E; A/ }; I2 f/ S
- #if defined(STM32F410xx)6 O! t7 B9 c9 q( Z. }
- /*!< MCO1EN configuration */
; s- G! c( B5 t5 j - #define RCC_CFGR_MCO1EN ((uint32_t)0x00000100) /*!< MCO1EN bit */! E9 g% a7 b6 ~, d6 K8 E: L
- /*!< MCO1EN configuration */
* Q" j+ G, q$ `8 I; V - #define RCC_CFGR_MCO2EN ((uint32_t)0x00000200) /*!< MCO2EN bit */& E$ m8 w! C" }4 \' r
- #endif /* STM32F410xx */
3 I0 c7 q# i1 X4 ^" r - /*!< PPRE1 configuration */
& v; S! {5 B8 W$ D - #define RCC_CFGR_PPRE1 ((uint32_t)0x00001C00) /*!< PRE1[2:0] bits (APB1 prescaler) */" ~9 J. V2 K6 }4 p2 L
- #define RCC_CFGR_PPRE1_0 ((uint32_t)0x00000400) /*!< Bit 0 */4 e" \( D# p: u' ^; z
- #define RCC_CFGR_PPRE1_1 ((uint32_t)0x00000800) /*!< Bit 1 */
" v9 P% M+ c5 i - #define RCC_CFGR_PPRE1_2 ((uint32_t)0x00001000) /*!< Bit 2 */
5 k3 n( ^# x O6 e9 V9 f - $ l. N' p0 j l/ M- r _/ d* U- M+ E
- #define RCC_CFGR_PPRE1_DIV1 ((uint32_t)0x00000000) /*!< HCLK not divided */
, |8 F/ a- Y5 J; [( _( V% r$ ^, p - #define RCC_CFGR_PPRE1_DIV2 ((uint32_t)0x00001000) /*!< HCLK divided by 2 */
' L$ g, r0 N* q+ |# Y5 D - #define RCC_CFGR_PPRE1_DIV4 ((uint32_t)0x00001400) /*!< HCLK divided by 4 */' k+ I% {0 `( m: ~4 a
- #define RCC_CFGR_PPRE1_DIV8 ((uint32_t)0x00001800) /*!< HCLK divided by 8 *// z2 ?4 D: ]9 o" w7 d
- #define RCC_CFGR_PPRE1_DIV16 ((uint32_t)0x00001C00) /*!< HCLK divided by 16 */; i3 K# y& t2 }1 g8 r9 T# n* E
( j' m& U# e ^4 }- /*!< PPRE2 configuration */
' u3 @2 p& |* ]* q9 [+ b0 ^4 h7 D - #define RCC_CFGR_PPRE2 ((uint32_t)0x0000E000) /*!< PRE2[2:0] bits (APB2 prescaler) */
- R' E1 k- U; D9 H - #define RCC_CFGR_PPRE2_0 ((uint32_t)0x00002000) /*!< Bit 0 */
4 H1 ^# k/ \8 @" Y' l - #define RCC_CFGR_PPRE2_1 ((uint32_t)0x00004000) /*!< Bit 1 */# y6 G5 I, D3 M) g1 ` z/ J, Y
- #define RCC_CFGR_PPRE2_2 ((uint32_t)0x00008000) /*!< Bit 2 */
! S; s1 Z, h7 L! p2 w
' z, e/ q! G2 h" ?8 N- #define RCC_CFGR_PPRE2_DIV1 ((uint32_t)0x00000000) /*!< HCLK not divided */
( W( {& k9 B6 _7 R5 ~) I/ Y6 U - #define RCC_CFGR_PPRE2_DIV2 ((uint32_t)0x00008000) /*!< HCLK divided by 2 *// Q* |6 V$ |! B. o1 \
- #define RCC_CFGR_PPRE2_DIV4 ((uint32_t)0x0000A000) /*!< HCLK divided by 4 */
4 D# Y' B# O- W9 j - #define RCC_CFGR_PPRE2_DIV8 ((uint32_t)0x0000C000) /*!< HCLK divided by 8 */6 x/ ]5 ]8 B+ b9 {! o+ ]# W$ z
- #define RCC_CFGR_PPRE2_DIV16 ((uint32_t)0x0000E000) /*!< HCLK divided by 16 */! n, R+ U8 ~5 K% _% ]3 k
( P; z( K7 F5 k4 Z7 E- /*!< RTCPRE configuration */
0 @/ `# _- H3 @9 v' P - #define RCC_CFGR_RTCPRE ((uint32_t)0x001F0000)3 [% k# f. R' [
- #define RCC_CFGR_RTCPRE_0 ((uint32_t)0x00010000)
$ t( d6 O1 `7 l+ \' _ - #define RCC_CFGR_RTCPRE_1 ((uint32_t)0x00020000)
\1 j, k0 W0 W6 p& D; F - #define RCC_CFGR_RTCPRE_2 ((uint32_t)0x00040000)
; W N9 t/ F& k+ F - #define RCC_CFGR_RTCPRE_3 ((uint32_t)0x00080000): s, ~( u7 v9 F0 d- n
- #define RCC_CFGR_RTCPRE_4 ((uint32_t)0x00100000)
. _6 X e" i' r( U: x- f$ ~ - * T& W# M: G$ b. J. D
- /*!< MCO1 configuration */
3 ?+ U8 p; R1 A3 T9 J - #define RCC_CFGR_MCO1 ((uint32_t)0x00600000)
. ~( n# G z: a) Y0 s - #define RCC_CFGR_MCO1_0 ((uint32_t)0x00200000)
. ~4 a1 t. N1 Q - #define RCC_CFGR_MCO1_1 ((uint32_t)0x00400000)% C& a( r i3 o1 r1 {, B: ?
- # g' ~( U( A# I5 g6 p5 O* @1 k1 o
- #define RCC_CFGR_I2SSRC ((uint32_t)0x00800000)
: x% _, ^; ~; u1 u
4 B+ g Y4 ^1 T- #define RCC_CFGR_MCO1PRE ((uint32_t)0x07000000)
* A5 y9 `7 Z, R% j - #define RCC_CFGR_MCO1PRE_0 ((uint32_t)0x01000000)+ T! T; @" x# L" q! y: D& c# A
- #define RCC_CFGR_MCO1PRE_1 ((uint32_t)0x02000000)
5 s. s/ E0 R; A L+ z - #define RCC_CFGR_MCO1PRE_2 ((uint32_t)0x04000000)
8 h! X- p" y& w4 s# X7 t# l# C - , R0 N: ~; ~* a0 |
- #define RCC_CFGR_MCO2PRE ((uint32_t)0x38000000)# ~8 G2 e; L+ x3 {; Y
- #define RCC_CFGR_MCO2PRE_0 ((uint32_t)0x08000000)
2 q0 |7 `1 G6 L- L3 ? - #define RCC_CFGR_MCO2PRE_1 ((uint32_t)0x10000000)
. T+ [1 N: ^9 F4 L g) y' P' x - #define RCC_CFGR_MCO2PRE_2 ((uint32_t)0x20000000)
3 f0 E5 Z ^7 u) ~& G
: Z+ g0 Z! Z/ @% b- #define RCC_CFGR_MCO2 ((uint32_t)0xC0000000)
# u V# M2 w) `$ ] - #define RCC_CFGR_MCO2_0 ((uint32_t)0x40000000) S7 y' G0 @" ~: C/ p# m }
- #define RCC_CFGR_MCO2_1 ((uint32_t)0x80000000)
' x3 j. P- I7 Z4 E6 B' n
1 S5 P9 c' K8 k" u' V0 L. k8 ~- /******************** Bit definition for RCC_CIR register *******************/, L: S; Y- ]$ |* ~7 F
- #define RCC_CIR_LSIRDYF ((uint32_t)0x00000001)
# s2 y' D- L$ D( N2 u4 ^8 f - #define RCC_CIR_LSERDYF ((uint32_t)0x00000002)2 | d/ S6 f' g' r
- #define RCC_CIR_HSIRDYF ((uint32_t)0x00000004)% m$ b, c7 }: b3 M& N
- #define RCC_CIR_HSERDYF ((uint32_t)0x00000008)/ [9 s, i# }5 D% h$ n) S
- #define RCC_CIR_PLLRDYF ((uint32_t)0x00000010)% E# J1 n7 J" T% p7 B) M+ m
- #define RCC_CIR_PLLI2SRDYF ((uint32_t)0x00000020)
& |$ a9 D# U6 [: `; p - #define RCC_CIR_PLLSAIRDYF ((uint32_t)0x00000040) }8 a% C/ O$ Z, T4 A ^
- #define RCC_CIR_CSSF ((uint32_t)0x00000080), P5 X9 h1 c$ j9 x+ {
- #define RCC_CIR_LSIRDYIE ((uint32_t)0x00000100)
: X4 Z8 A1 o7 ]5 F. a' e- N - #define RCC_CIR_LSERDYIE ((uint32_t)0x00000200)
2 [5 M: U- D8 W" B1 z1 d2 a% P - #define RCC_CIR_HSIRDYIE ((uint32_t)0x00000400)
7 M: l! ]: r+ b7 \0 s/ H# Y - #define RCC_CIR_HSERDYIE ((uint32_t)0x00000800)
0 ?' \ X7 a q% V4 u$ [ - #define RCC_CIR_PLLRDYIE ((uint32_t)0x00001000)
; Z- w$ _* o0 i% Z( H) G3 ] f - #define RCC_CIR_PLLI2SRDYIE ((uint32_t)0x00002000). N; Q3 F2 @# v, z( p9 d8 t
- #define RCC_CIR_PLLSAIRDYIE ((uint32_t)0x00004000)) ~: n9 a) u; ~
- #define RCC_CIR_LSIRDYC ((uint32_t)0x00010000)
% _3 q& D/ w( Q. k - #define RCC_CIR_LSERDYC ((uint32_t)0x00020000)
! k; l1 N) m( u, }( w& L, A - #define RCC_CIR_HSIRDYC ((uint32_t)0x00040000)4 o* v: `, a' `* U$ m' o7 M
- #define RCC_CIR_HSERDYC ((uint32_t)0x00080000)5 H' E+ {" h/ o5 H" S
- #define RCC_CIR_PLLRDYC ((uint32_t)0x00100000)* e2 `" h" h _# E2 U# q, o
- #define RCC_CIR_PLLI2SRDYC ((uint32_t)0x00200000). H L. \+ c5 ^. ~; Q, J
- #define RCC_CIR_PLLSAIRDYC ((uint32_t)0x00400000)
' L# b) H9 ~: j8 ]9 h/ H - #define RCC_CIR_CSSC ((uint32_t)0x00800000)) R8 ?9 v1 q9 o- {
- , y9 Y5 n7 @* w' d
- /******************** Bit definition for RCC_AHB1RSTR register **************/$ C" {( E3 k( K& |2 |) o
- #define RCC_AHB1RSTR_GPIOARST ((uint32_t)0x00000001)
+ g/ n+ z) D. ~1 W3 u" T - #define RCC_AHB1RSTR_GPIOBRST ((uint32_t)0x00000002)
6 _- ^& `! F) ^9 m3 N+ l - #define RCC_AHB1RSTR_GPIOCRST ((uint32_t)0x00000004)( M3 f, X7 R# M% j4 v
- #define RCC_AHB1RSTR_GPIODRST ((uint32_t)0x00000008)$ D: U" O. T ?/ @+ J* k+ W$ k! f
- #define RCC_AHB1RSTR_GPIOERST ((uint32_t)0x00000010)
8 N: l5 C, G& ?. b( g - #define RCC_AHB1RSTR_GPIOFRST ((uint32_t)0x00000020)
$ E: L, [8 X! P3 @! [7 z - #define RCC_AHB1RSTR_GPIOGRST ((uint32_t)0x00000040)
7 {( S, i' r1 ^ - #define RCC_AHB1RSTR_GPIOHRST ((uint32_t)0x00000080): z* `* b) A- k
- #define RCC_AHB1RSTR_GPIOIRST ((uint32_t)0x00000100)
7 H/ I% z& F' A' b: \ - #define RCC_AHB1RSTR_GPIOJRST ((uint32_t)0x00000200)
5 M6 z- \9 ?6 R( }; J - #define RCC_AHB1RSTR_GPIOKRST ((uint32_t)0x00000400)1 }& N/ f3 I( C* F: y, N
- #define RCC_AHB1RSTR_CRCRST ((uint32_t)0x00001000)
% p5 C) l# b# T& v8 ~. Q- `- A - #define RCC_AHB1RSTR_DMA1RST ((uint32_t)0x00200000)& a0 u3 a- T" A
- #define RCC_AHB1RSTR_DMA2RST ((uint32_t)0x00400000)" G$ k# v1 S3 i/ X
- #define RCC_AHB1RSTR_DMA2DRST ((uint32_t)0x00800000)
9 L1 S0 |9 N& X$ k; t - #define RCC_AHB1RSTR_ETHMACRST ((uint32_t)0x02000000)5 L1 F* t3 N$ N
- #define RCC_AHB1RSTR_OTGHRST ((uint32_t)0x10000000)6 P' x a% u# H+ H
- 9 j% B: M' y& m" E) g% Z
- /******************** Bit definition for RCC_AHB2RSTR register **************/
7 A. A* Q* w7 e! M) J - #define RCC_AHB2RSTR_DCMIRST ((uint32_t)0x00000001)
( d6 q5 H! Y. [& ? X - #define RCC_AHB2RSTR_CRYPRST ((uint32_t)0x00000010)" u& M3 t- b# g) u+ L
- #define RCC_AHB2RSTR_HASHRST ((uint32_t)0x00000020)
, C1 H! R" d* P; R; |4 P; C - /* maintained for legacy purpose */3 N1 U) ?5 Y+ i. m4 D3 I
- #define RCC_AHB2RSTR_HSAHRST RCC_AHB2RSTR_HASHRST
: ?5 M6 }% v) V# g6 Y - #define RCC_AHB2RSTR_RNGRST ((uint32_t)0x00000040)9 W. B: `( I% @5 q
- #define RCC_AHB2RSTR_OTGFSRST ((uint32_t)0x00000080)
/ P6 s; _' Y( {& O; v
* P. v0 w4 U9 l% `- /******************** Bit definition for RCC_AHB3RSTR register **************/
+ N! K" V: T$ W& G4 Q4 \: O: t0 ] - #if defined(STM32F40_41xxx) || defined(STM32F412xG) || defined(STM32F413_423xx)% `5 s0 v& `, P" G3 |" A
- #define RCC_AHB3RSTR_FSMCRST ((uint32_t)0x00000001)
( E' o$ r/ U9 _7 o7 O+ h) | - #endif /* STM32F40_41xxx || STM32F412xG || STM32F413_423xx */' N- [* ?% o; Q, R
4 C) H0 r5 w! j( z* J- #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx)3 h6 t9 x1 q* u) {/ r
- #define RCC_AHB3RSTR_FMCRST ((uint32_t)0x00000001)
% `9 U! A, V. w0 s/ ~ - #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx || STM32F469_479xx */
' ]% v4 {' i5 ?7 i2 F - #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx)8 w* o. h# M% L" {0 m9 d8 z
- #define RCC_AHB3RSTR_QSPIRST ((uint32_t)0x00000002)
. [4 ]% a* A* I4 e) ~/ D - #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx */
9 U" b. e8 o/ w6 ?: S& G. k8 @ - + A/ P; Y W- Q; _# |8 l9 R3 M
- /******************** Bit definition for RCC_APB1RSTR register **************/5 x( Z! J+ F. ]4 {/ V4 T: x
- #define RCC_APB1RSTR_TIM2RST ((uint32_t)0x00000001)2 k, z" W( C. g4 c0 K
- #define RCC_APB1RSTR_TIM3RST ((uint32_t)0x00000002)& F; v4 g$ z! T5 E3 S
- #define RCC_APB1RSTR_TIM4RST ((uint32_t)0x00000004)
" A! J9 o+ @/ {/ W3 ~ - #define RCC_APB1RSTR_TIM5RST ((uint32_t)0x00000008)
* s) u5 Y4 |+ s5 b' v- n& z" B* ~8 H7 { - #define RCC_APB1RSTR_TIM6RST ((uint32_t)0x00000010)/ _9 h0 x' u$ H# Q( w5 K- e1 S
- #define RCC_APB1RSTR_TIM7RST ((uint32_t)0x00000020)0 n! i: r# p8 L; I4 p5 B# A
- #define RCC_APB1RSTR_TIM12RST ((uint32_t)0x00000040). o. @+ L7 T- ?1 q. M
- #define RCC_APB1RSTR_TIM13RST ((uint32_t)0x00000080); I3 m! f- R+ r3 m$ l4 P5 U
- #define RCC_APB1RSTR_TIM14RST ((uint32_t)0x00000100)5 }( a0 Q0 f9 }& F" z2 M1 }
- #if defined(STM32F410xx) || defined(STM32F413_423xx)
" _: F1 z0 h, q3 j3 P! |% ` - #define RCC_APB1RSTR_LPTIM1RST ((uint32_t)0x00000200)
' n# M9 t M9 F; e0 R8 s - #endif /* STM32F410xx || STM32F413_423xx */( `0 ~' O6 k N" x) u9 G( m& O
- #define RCC_APB1RSTR_WWDGRST ((uint32_t)0x00000800)
8 w! Y) G" P8 {, m7 ?$ C1 S4 v - #define RCC_APB1RSTR_SPI2RST ((uint32_t)0x00004000)
% o+ X+ ]/ Y9 F6 Z/ z - #define RCC_APB1RSTR_SPI3RST ((uint32_t)0x00008000)/ A+ [& C) @4 f- t) y' d: e
- #if defined(STM32F446xx)# N) |! d5 k* ~1 H1 `# i6 ^
- #define RCC_APB1RSTR_SPDIFRXRST ((uint32_t)0x00010000)/ p: F0 v( N! a0 v; z H0 ^
- #endif /* STM32F446xx */. U0 V* X+ }4 w- l
- #define RCC_APB1RSTR_USART2RST ((uint32_t)0x00020000)
. {4 c t! s* m+ E' v - #define RCC_APB1RSTR_USART3RST ((uint32_t)0x00040000): t# A( P; z. L; X3 ]7 y$ y
- #define RCC_APB1RSTR_UART4RST ((uint32_t)0x00080000)0 V% o6 W0 e3 w# B1 z
- #define RCC_APB1RSTR_UART5RST ((uint32_t)0x00100000)
' c- L1 z$ j) O% C4 s1 b0 x - #define RCC_APB1RSTR_I2C1RST ((uint32_t)0x00200000)
4 V# L0 ]9 t. Q5 Q& D - #define RCC_APB1RSTR_I2C2RST ((uint32_t)0x00400000)( Y0 @0 H# ^0 N4 d0 }! |9 R
- #define RCC_APB1RSTR_I2C3RST ((uint32_t)0x00800000)# z: N5 Z/ v: w5 x( O. S
- #if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)
: n! H* c S) q6 h - #define RCC_APB1RSTR_FMPI2C1RST ((uint32_t)0x01000000)
- g) z4 x# I# T3 H, j- G6 J - #endif /* STM32F410xx || STM32F412xG || STM32F413_423xx || STM32F446xx */
8 H( J8 u6 i5 ~2 N; }5 ~8 ^( | - #define RCC_APB1RSTR_CAN1RST ((uint32_t)0x02000000)
g% Q. s# X: o3 D( ^; d4 r - #define RCC_APB1RSTR_CAN2RST ((uint32_t)0x04000000): y; g, c8 g3 J( s, h# O
- #if defined(STM32F446xx)5 Q% U/ O% L; L
- #define RCC_APB1RSTR_CECRST ((uint32_t)0x08000000)
4 Y$ x" [! n0 N) E0 R9 p' c# ? - #endif /* STM32F446xx */
# {4 ?- R2 J9 d; ? - #define RCC_APB1RSTR_PWRRST ((uint32_t)0x10000000)
6 G; p- u2 I/ o: O3 Z* P4 @ - #define RCC_APB1RSTR_DACRST ((uint32_t)0x20000000)( X9 Y0 {" `" O6 d. }8 ~+ q. h
- #define RCC_APB1RSTR_UART7RST ((uint32_t)0x40000000)
+ |9 H$ J2 a" m2 I0 V) J' Q, X0 B - #define RCC_APB1RSTR_UART8RST ((uint32_t)0x80000000)
& S* [. e" n3 A - ) ?% C0 |7 c8 a, k
- /******************** Bit definition for RCC_APB2RSTR register **************/
. V! d3 _0 L) v) d0 `; r - #define RCC_APB2RSTR_TIM1RST ((uint32_t)0x00000001)* K; ]; a% O" W1 x5 q4 h. V' y
- #define RCC_APB2RSTR_TIM8RST ((uint32_t)0x00000002)
- v. }& y1 a: M1 f* Q - #define RCC_APB2RSTR_USART1RST ((uint32_t)0x00000010)( V; k- s3 ` w: h# u3 C+ w2 l
- #define RCC_APB2RSTR_USART6RST ((uint32_t)0x00000020)8 u* y9 @, V+ O* e; d. l7 g9 \
- #define RCC_APB2RSTR_UART9RST ((uint32_t)0x00000040)
- ]9 _3 P& _( I) z$ _# o; K p - #define RCC_APB2RSTR_UART10RST ((uint32_t)0x00000080)
8 M5 f. P# S" {. c8 e - #define RCC_APB2RSTR_ADCRST ((uint32_t)0x00000100): w. j3 p# ]* T$ [
- #define RCC_APB2RSTR_SDIORST ((uint32_t)0x00000800)! L9 R3 ]7 I* o, a1 Q
- #define RCC_APB2RSTR_SPI1RST ((uint32_t)0x00001000)
* h& |9 |8 T5 A" j, P k - #define RCC_APB2RSTR_SPI4RST ((uint32_t)0x00002000)
! m! H% f7 L, U9 y( d - #define RCC_APB2RSTR_SYSCFGRST ((uint32_t)0x00004000)! c! ?+ Z8 R. U7 p) y
- #define RCC_APB2RSTR_TIM9RST ((uint32_t)0x00010000)
6 `9 y! }/ C3 \ I2 o - #define RCC_APB2RSTR_TIM10RST ((uint32_t)0x00020000)
9 e# a& c- N. } - #define RCC_APB2RSTR_TIM11RST ((uint32_t)0x00040000)3 ^+ G1 o' C! y) k6 p
- #define RCC_APB2RSTR_SPI5RST ((uint32_t)0x00100000)) s. S6 h+ l/ u& f& l" s8 m$ a/ C
- #define RCC_APB2RSTR_SPI6RST ((uint32_t)0x00200000)0 r# h. e, g6 @6 ]( C9 O6 {" z
- #define RCC_APB2RSTR_SAI1RST ((uint32_t)0x00400000)* I d: { a# l. R5 m1 `0 L6 f
- #if defined(STM32F446xx)6 W5 |) b. M+ y" p2 c7 K: {) }/ z, A
- #define RCC_APB2RSTR_SAI2RST ((uint32_t)0x00800000)5 J5 E2 c4 x# j. y0 D; m
- #endif /* STM32F446xx */
8 @# n# N' Y' E/ j' ?9 X9 ? - #define RCC_APB2RSTR_LTDCRST ((uint32_t)0x04000000)8 Y5 H/ I; T3 `; F/ s5 W# q
- #if defined(STM32F469_479xx)+ t: P0 Z8 ~" a! L! q
- #define RCC_APB2RSTR_DSIRST ((uint32_t)0x08000000)! q# g, X" U. m7 _6 ?1 P9 M+ \
- #endif /* STM32F469_479xx */
& x# j+ S( Q D( b9 |9 { - #if defined(STM32F412xG) || defined(STM32F413_423xx)
2 k* l% n. \4 l1 |, O - #define RCC_APB2RSTR_DFSDM1RST ((uint32_t)0x01000000)7 D; d0 f8 k: Q4 q5 O: R
- #endif /* STM32F412xG || STM32F413_423xx */
/ P' {& ]- R+ \9 Y - 1 M1 Q+ v( M0 r) h D j: @3 Y
- #if defined(STM32F413_423xx)7 j. Q# I3 D; S) g H
- #define RCC_APB2RSTR_DFSDM2RST ((uint32_t)0x02000000)
8 w7 m/ a5 N( [3 j0 z9 X& f - #endif /* STM32F413_423xx */. C% O9 \$ H. }, Z" Y# O1 o7 c( ~. p
- /* Old definitions, maintained for legacy purpose */: I; O, P1 k' g$ Z
- #define RCC_APB2RSTR_SPI1 RCC_APB2RSTR_SPI1RST$ {8 p1 B' C% g6 u) d
- #define RCC_APB2RSTR_DFSDMRST RCC_APB2RSTR_DFSDM1RST
0 Z% c/ \8 U& n' j7 b - 4 \' u* g; o/ k/ {! X
- /******************** Bit definition for RCC_AHB1ENR register ***************/
$ _ t8 ?- C, Q, G6 y+ j - #define RCC_AHB1ENR_GPIOAEN ((uint32_t)0x00000001)- ?1 q& Z2 }* ?% k* h% L' Q
- #define RCC_AHB1ENR_GPIOBEN ((uint32_t)0x00000002)
$ m) m. L$ C& I1 `0 y - #define RCC_AHB1ENR_GPIOCEN ((uint32_t)0x00000004)4 x. Y1 S9 B* _# Q3 ~
- #define RCC_AHB1ENR_GPIODEN ((uint32_t)0x00000008)
' M( D9 H9 x" k* A3 [* c - #define RCC_AHB1ENR_GPIOEEN ((uint32_t)0x00000010) ^( V1 m. b- v h2 m" o5 O
- #define RCC_AHB1ENR_GPIOFEN ((uint32_t)0x00000020)- v9 q: {: _( J
- #define RCC_AHB1ENR_GPIOGEN ((uint32_t)0x00000040). A* J1 ` \/ f# e, z$ \' N& T
- #define RCC_AHB1ENR_GPIOHEN ((uint32_t)0x00000080), O# C+ P8 A/ F/ ~7 x( X
- #define RCC_AHB1ENR_GPIOIEN ((uint32_t)0x00000100)% f2 g' {. X* `& ]7 S- i
- #define RCC_AHB1ENR_GPIOJEN ((uint32_t)0x00000200)( m" j- I4 {' p7 Q0 }
- #define RCC_AHB1ENR_GPIOKEN ((uint32_t)0x00000400)
3 e0 C. `& |# r7 I' f - #define RCC_AHB1ENR_CRCEN ((uint32_t)0x00001000), X% ^$ h2 b: ?, @+ z
- #define RCC_AHB1ENR_BKPSRAMEN ((uint32_t)0x00040000)
3 p2 p- l* H4 d$ q' Y - #define RCC_AHB1ENR_CCMDATARAMEN ((uint32_t)0x00100000)
1 {7 q8 r8 Z; t) g) S0 \+ `- E - #define RCC_AHB1ENR_DMA1EN ((uint32_t)0x00200000)
3 O% |2 O! ]. S# M6 B - #define RCC_AHB1ENR_DMA2EN ((uint32_t)0x00400000)
6 L! \! E! J7 j - #define RCC_AHB1ENR_DMA2DEN ((uint32_t)0x00800000) |) d8 G! J [4 Q* L. }
- #define RCC_AHB1ENR_ETHMACEN ((uint32_t)0x02000000)
* t) a, m) W% w5 y- | - #define RCC_AHB1ENR_ETHMACTXEN ((uint32_t)0x04000000)/ r% k# Z1 L" q1 ~$ ^, P% H
- #define RCC_AHB1ENR_ETHMACRXEN ((uint32_t)0x08000000)
! e E( m7 S% ?* t" i+ h5 t - #define RCC_AHB1ENR_ETHMACPTPEN ((uint32_t)0x10000000)% |, b! y2 G9 P4 v% z
- #define RCC_AHB1ENR_OTGHSEN ((uint32_t)0x20000000)
7 L; Q5 j/ D s! i - #define RCC_AHB1ENR_OTGHSULPIEN ((uint32_t)0x40000000)
* f2 }- S0 p4 ~: s6 o - 9 H+ S5 I' e8 f. n3 z, G6 J; y
- /******************** Bit definition for RCC_AHB2ENR register ***************/ ^& [& t" |) {6 Z
- #define RCC_AHB2ENR_DCMIEN ((uint32_t)0x00000001)' E( K/ m, z: H
- #define RCC_AHB2ENR_CRYPEN ((uint32_t)0x00000010)
0 W& v! M1 v% K, t4 W; o - #define RCC_AHB2ENR_HASHEN ((uint32_t)0x00000020)
$ o; o+ X) n5 V - #define RCC_AHB2ENR_RNGEN ((uint32_t)0x00000040)8 Z0 k% H4 X! c( R4 v) K5 a
- #define RCC_AHB2ENR_OTGFSEN ((uint32_t)0x00000080)* ?* C+ e) \2 ~- ]# w1 r4 E4 Q
5 M) C2 y: E9 e8 B- /******************** Bit definition for RCC_AHB3ENR register ***************/
" N4 m% f9 ?# e1 v! K - % k# A, W% M/ s% v+ c$ y! M$ f
- #if defined(STM32F40_41xxx) || defined(STM32F412xG) || defined(STM32F413_423xx); ]- B8 u; K) M4 z8 d F( O
- #define RCC_AHB3ENR_FSMCEN ((uint32_t)0x00000001)8 P! e3 F1 P% g" |. s, L7 @( V
- #endif /* STM32F40_41xxx || STM32F412xG || STM32F413_423xx */( B+ W4 z- Q7 ~# p
- ( d% `9 P* [; }; U) W
- #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx), c: A% {( V) H, q M' E/ }
- #define RCC_AHB3ENR_FMCEN ((uint32_t)0x00000001)2 ^, G( A; J% {9 L# u
- #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx || STM32F469_479xx */
3 h- V: e! m" U; j% [
0 m5 O0 n0 v& f- #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx)
* K; d! v! w' ^( ^# ?& |# l: U - #define RCC_AHB3ENR_QSPIEN ((uint32_t)0x00000002)9 E5 h/ _2 h8 [; h
- #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx */
4 J8 U! L+ y6 D' a7 G0 d - 9 \( Z6 ^ x- {% |, r" r' F& v( \
- /******************** Bit definition for RCC_APB1ENR register ***************/
( C: t2 ]) O2 }4 W) J - #define RCC_APB1ENR_TIM2EN ((uint32_t)0x00000001)
) _. D8 H. j1 ~- A7 G. M - #define RCC_APB1ENR_TIM3EN ((uint32_t)0x00000002)
9 ^* t Q' b; W% X - #define RCC_APB1ENR_TIM4EN ((uint32_t)0x00000004)
$ T* D {' B/ k! T9 e; _; u - #define RCC_APB1ENR_TIM5EN ((uint32_t)0x00000008)
* q W. p; d1 l+ ?7 L7 Y$ z - #define RCC_APB1ENR_TIM6EN ((uint32_t)0x00000010)
* l+ ~! _3 \, k9 f2 J5 R* g4 C; }9 Q - #define RCC_APB1ENR_TIM7EN ((uint32_t)0x00000020)/ j9 i) H9 ?) \- ^+ _4 g
- #define RCC_APB1ENR_TIM12EN ((uint32_t)0x00000040)
( _5 z+ }( A, O: d3 I - #define RCC_APB1ENR_TIM13EN ((uint32_t)0x00000080)
! `: [9 {6 Z( Y; h3 o% j - #define RCC_APB1ENR_TIM14EN ((uint32_t)0x00000100)0 u, a) E( a: w1 C
- #if defined(STM32F410xx) || defined(STM32F413_423xx)
" {2 r1 \! Y/ p - #define RCC_APB1ENR_LPTIM1EN ((uint32_t)0x00000200)
( t, y h4 |' K/ d1 G, Y - #endif /* STM32F410xx || STM32F413_423xx */
2 w# @0 p2 k I( J6 ^ - #define RCC_APB1ENR_WWDGEN ((uint32_t)0x00000800)
- E7 H* }+ b4 O0 m W - #define RCC_APB1ENR_SPI2EN ((uint32_t)0x00004000)
; _. K5 p$ o' K9 f! ]# Z* g - #define RCC_APB1ENR_SPI3EN ((uint32_t)0x00008000)
- O B# v! l' m4 j2 J# A1 j7 b2 h' D - #if defined(STM32F446xx)' [ t; O- Z' V# o8 d) {
- #define RCC_APB1ENR_SPDIFRXEN ((uint32_t)0x00010000)) L5 Z9 k; }/ U) W! r& ^3 r5 F
- #endif /* STM32F446xx */
5 T2 E' @ m, _+ w5 @1 A - #define RCC_APB1ENR_USART2EN ((uint32_t)0x00020000)5 ^% M% [0 \& A( V5 H& A) i
- #define RCC_APB1ENR_USART3EN ((uint32_t)0x00040000)
# w/ `. ]. L5 @# `# F1 n - #define RCC_APB1ENR_UART4EN ((uint32_t)0x00080000)
7 c: a5 D* R& C9 `* p: H - #define RCC_APB1ENR_UART5EN ((uint32_t)0x00100000)
3 `9 m! S) C4 f$ E. s+ q0 [# k* p% S - #define RCC_APB1ENR_I2C1EN ((uint32_t)0x00200000) `! \" r" \9 ^* V
- #define RCC_APB1ENR_I2C2EN ((uint32_t)0x00400000)* l# J$ l8 x6 [ x0 K d
- #define RCC_APB1ENR_I2C3EN ((uint32_t)0x00800000); i$ q3 R8 X/ T$ }
- #if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)) t- L+ E9 L- q! F/ R5 A/ N6 L* L9 i) u
- #define RCC_APB1ENR_FMPI2C1EN ((uint32_t)0x01000000). z+ R6 }; @# l
- #endif /* STM32F410xx || STM32F412xG || STM32F413_423xx || STM32F446xx */: R9 L* u/ p+ p- k5 \6 f; O0 D# h
- #define RCC_APB1ENR_CAN1EN ((uint32_t)0x02000000)
: ~( e* S% v$ \ - #define RCC_APB1ENR_CAN2EN ((uint32_t)0x04000000)+ Z8 |& \2 ?, Q1 t6 x7 f4 F9 C/ m5 {; m
- #if defined(STM32F446xx)2 z& E5 X% J y$ `4 g }5 ~
- #define RCC_APB1ENR_CECEN ((uint32_t)0x08000000)
( ~# @) \. y9 D6 Y1 _7 j* U - #endif /* STM32F446xx */
5 R2 n' U( ~$ n! v% ]' A - #define RCC_APB1ENR_PWREN ((uint32_t)0x10000000)% Y" A1 r: s0 M# @. Z7 z6 b+ e0 {( V
- #define RCC_APB1ENR_DACEN ((uint32_t)0x20000000)& O" `" P r- d' n
- #define RCC_APB1ENR_UART7EN ((uint32_t)0x40000000)
! r9 n/ z/ \4 H: V9 s - #define RCC_APB1ENR_UART8EN ((uint32_t)0x80000000)" }8 ^' v" S( n( P8 \6 j1 f
- ( Z# d. f8 l/ v6 L2 V* ] V; N
- /******************** Bit definition for RCC_APB2ENR register ***************/- t* @* F& s2 Z- n( e3 L7 q
- #define RCC_APB2ENR_TIM1EN ((uint32_t)0x00000001)3 H5 Z% C$ d) W [. a% p" e
- #define RCC_APB2ENR_TIM8EN ((uint32_t)0x00000002)
/ l& c: F! k: a3 u% L* x# o - #define RCC_APB2ENR_USART1EN ((uint32_t)0x00000010)* N; Q% B+ p" v9 l8 K
- #define RCC_APB2ENR_USART6EN ((uint32_t)0x00000020)2 ]2 [$ o/ t- i
- #define RCC_APB2ENR_UART9EN ((uint32_t)0x00000040)
D) h7 f' e) h: }" M$ V$ o - #define RCC_APB2ENR_UART10EN ((uint32_t)0x00000080)
# i0 x; J9 R) v2 G6 R - #define RCC_APB2ENR_ADC1EN ((uint32_t)0x00000100)
4 I' Z9 s, D8 ^9 Y' [- `5 i - #define RCC_APB2ENR_ADC2EN ((uint32_t)0x00000200)/ y' l3 e% P' J; x1 B$ ~
- #define RCC_APB2ENR_ADC3EN ((uint32_t)0x00000400)
; x9 m9 H% R/ s/ y+ b8 A( I - #define RCC_APB2ENR_SDIOEN ((uint32_t)0x00000800)
; R- b! k. H+ r: ~ - #define RCC_APB2ENR_SPI1EN ((uint32_t)0x00001000)
: v& T. d' I- o3 ~" g" v - #define RCC_APB2ENR_SPI4EN ((uint32_t)0x00002000)
% I$ s& G: I7 ^7 { - #define RCC_APB2ENR_SYSCFGEN ((uint32_t)0x00004000)( I5 C. H$ I' F: w' j% O, S, f
- #define RCC_APB2ENR_EXTIEN ((uint32_t)0x00008000)
! L+ b& G- p; A( ^2 A: c* b - #define RCC_APB2ENR_TIM9EN ((uint32_t)0x00010000)4 Y* }* s" h3 L
- #define RCC_APB2ENR_TIM10EN ((uint32_t)0x00020000)
, I" u* r+ g: N, |9 f" {9 B - #define RCC_APB2ENR_TIM11EN ((uint32_t)0x00040000)
2 Y8 i8 t) H+ ^9 X - #define RCC_APB2ENR_SPI5EN ((uint32_t)0x00100000)2 x9 k1 W; N5 M% Y
- #define RCC_APB2ENR_SPI6EN ((uint32_t)0x00200000)
( T+ F; K% z8 w1 { - #define RCC_APB2ENR_SAI1EN ((uint32_t)0x00400000)
% f( t0 c' P! |5 `( d - #if defined(STM32F446xx)
* f% O! P9 ^7 [5 E/ ?: Y' D - #define RCC_APB2ENR_SAI2EN ((uint32_t)0x00800000)' I' }- {7 ^* l& i# k
- #endif /* STM32F446xx */! n% m8 u" ?% R1 N b, M; J
- #define RCC_APB2ENR_LTDCEN ((uint32_t)0x04000000)
4 p5 O# Z9 D O2 \ P: J3 e- q - #if defined(STM32F469_479xx)
% j( s# B9 O# W9 i3 c - #define RCC_APB2ENR_DSIEN ((uint32_t)0x08000000)+ S4 Z/ o$ S5 I7 t& f
- #endif /* STM32F469_479xx */
3 ^) b# J. I7 [2 `( f5 z - #if defined(STM32F412xG) || defined(STM32F413_423xx)- S P4 N+ ]% t* W: Z5 K# I
- #define RCC_APB2ENR_DFSDM1EN ((uint32_t)0x01000000)
4 a1 W$ h- P2 d9 k9 @ - #endif /* STM32F412xG || STM32F413_423xx */
2 Z& R2 k8 T( A {& m - #if defined(STM32F413_423xx)
o$ g6 I" `' k3 X9 h/ m7 v - #define RCC_APB2ENR_DFSDM2EN ((uint32_t)0x02000000). _& B+ P, ]( g! y5 h3 C1 a: B" J
- #endif /* STM32F413_423xx */
8 _6 J' s5 z% O( e/ u+ A - /******************** Bit definition for RCC_AHB1LPENR register *************/. J/ n1 h' w- V5 O# O0 x0 A
- #define RCC_AHB1LPENR_GPIOALPEN ((uint32_t)0x00000001)
. s+ v& `+ o# T( p% {. A) {1 Z @3 @8 N - #define RCC_AHB1LPENR_GPIOBLPEN ((uint32_t)0x00000002) }9 M7 y+ {) k& W3 }
- #define RCC_AHB1LPENR_GPIOCLPEN ((uint32_t)0x00000004)
7 g5 @3 Y+ F+ }; i# a* H - #define RCC_AHB1LPENR_GPIODLPEN ((uint32_t)0x00000008)8 G( M4 o: Q1 U6 f+ e6 A
- #define RCC_AHB1LPENR_GPIOELPEN ((uint32_t)0x00000010)* D/ e$ \/ p7 `# y) ^5 B
- #define RCC_AHB1LPENR_GPIOFLPEN ((uint32_t)0x00000020)
9 j) }, _% {* I3 S- r' E - #define RCC_AHB1LPENR_GPIOGLPEN ((uint32_t)0x00000040), }& X$ ^: `4 p; K2 t! o- x
- #define RCC_AHB1LPENR_GPIOHLPEN ((uint32_t)0x00000080)
; b: t" D2 W+ l- n - #define RCC_AHB1LPENR_GPIOILPEN ((uint32_t)0x00000100)& g( v" h# H! T
- #define RCC_AHB1LPENR_GPIOJLPEN ((uint32_t)0x00000200)
) Q% c' B" @1 N6 k# P+ f, q! H" C - #define RCC_AHB1LPENR_GPIOKLPEN ((uint32_t)0x00000400)
9 p/ J' ?5 d1 G0 U4 X4 U - #define RCC_AHB1LPENR_CRCLPEN ((uint32_t)0x00001000)4 }1 c$ v/ M8 ^& `; P' C- }
- #define RCC_AHB1LPENR_FLITFLPEN ((uint32_t)0x00008000)
3 D) Z8 {1 s7 Q4 k - #define RCC_AHB1LPENR_SRAM1LPEN ((uint32_t)0x00010000), C: [# n4 K! ]4 o1 u0 n$ o3 U6 x' @
- #define RCC_AHB1LPENR_SRAM2LPEN ((uint32_t)0x00020000)
2 ^# w( l" }8 H" l7 H% k6 S8 q - #define RCC_AHB1LPENR_BKPSRAMLPEN ((uint32_t)0x00040000)4 E: L) C o N! e( o3 Z
- #define RCC_AHB1LPENR_SRAM3LPEN ((uint32_t)0x00080000)' ?6 U2 c: v/ _- X+ r( O. r9 L, Y
- #define RCC_AHB1LPENR_DMA1LPEN ((uint32_t)0x00200000)
3 z @" x. w; k - #define RCC_AHB1LPENR_DMA2LPEN ((uint32_t)0x00400000) V1 j: g5 k6 U |* C, y! f5 a3 F
- #define RCC_AHB1LPENR_DMA2DLPEN ((uint32_t)0x00800000)2 {$ y. W# A* ]- a3 X# E
- #define RCC_AHB1LPENR_ETHMACLPEN ((uint32_t)0x02000000)
. ^$ e& Z5 I8 _: ~2 d8 _+ K - #define RCC_AHB1LPENR_ETHMACTXLPEN ((uint32_t)0x04000000)
( V5 |( H! B. b) _% S7 ~ - #define RCC_AHB1LPENR_ETHMACRXLPEN ((uint32_t)0x08000000)2 k! K" q# v$ g5 F) X
- #define RCC_AHB1LPENR_ETHMACPTPLPEN ((uint32_t)0x10000000)
& i! [' v K! R O+ ^ - #define RCC_AHB1LPENR_OTGHSLPEN ((uint32_t)0x20000000) u* `& _6 L: z. P1 p8 Z( W
- #define RCC_AHB1LPENR_OTGHSULPILPEN ((uint32_t)0x40000000)
5 s( S. I; d3 J/ ?- a/ p0 e7 Q$ Z - & ~. K2 n: E# d
- /******************** Bit definition for RCC_AHB2LPENR register *************/
l9 r& m" z' K9 f% ^ - #define RCC_AHB2LPENR_DCMILPEN ((uint32_t)0x00000001)
/ ], X* {# w0 w2 s - #define RCC_AHB2LPENR_CRYPLPEN ((uint32_t)0x00000010)
+ S- |6 S1 M# L! \! h/ G- u0 E - #define RCC_AHB2LPENR_HASHLPEN ((uint32_t)0x00000020)
^$ r5 x2 V# ^% B3 K r9 ~4 y - #define RCC_AHB2LPENR_RNGLPEN ((uint32_t)0x00000040)
# h3 ]2 r5 Y' h - #define RCC_AHB2LPENR_OTGFSLPEN ((uint32_t)0x00000080)
c$ n( h4 B- R" E) o. e - . S/ w9 T8 |4 o r! h
- /******************** Bit definition for RCC_AHB3LPENR register *************/: ?( ^9 w6 X# G
- #if defined(STM32F40_41xxx) || defined(STM32F412xG) || defined(STM32F413_423xx)) i5 M* h+ G9 V. c. T
- #define RCC_AHB3LPENR_FSMCLPEN ((uint32_t)0x00000001); x# \2 v! `1 K" u6 _
- #endif /* STM32F40_41xxx || STM32F412xG || STM32F413_423xx */8 f4 |+ X- {1 g5 y% d; b3 |: z, _
i! ?, h) g- T8 Y5 Z- P+ |- #if defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx)& F: Y A2 J3 p! o2 u3 H) g
- #define RCC_AHB3LPENR_FMCLPEN ((uint32_t)0x00000001)
1 i; x, f& w- ~% f% F& d - #endif /* STM32F427_437xx || STM32F429_439xx || STM32F446xx || STM32F469_479xx */
4 l" Z) B4 {7 { - #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx)5 A+ T2 ^9 ^" C& k
- #define RCC_AHB3LPENR_QSPILPEN ((uint32_t)0x00000002), B8 Q) b& S3 x _
- #endif /* STM32F412xG || STM32F413_423xx || STM32F469_479xx || STM32F446xx */
0 B: ]! H& H. s. ^' R
( F/ [/ x$ Q' R! D- /******************** Bit definition for RCC_APB1LPENR register *************/& Z" s# k$ |8 U0 W6 [5 D
- #define RCC_APB1LPENR_TIM2LPEN ((uint32_t)0x00000001)
* v+ E6 J. H5 S1 \ - #define RCC_APB1LPENR_TIM3LPEN ((uint32_t)0x00000002)
/ z4 K5 v" n$ I1 ? - #define RCC_APB1LPENR_TIM4LPEN ((uint32_t)0x00000004)
. B& L I4 u& V, w% F# f - #define RCC_APB1LPENR_TIM5LPEN ((uint32_t)0x00000008)
9 e e0 D# g8 V3 ` - #define RCC_APB1LPENR_TIM6LPEN ((uint32_t)0x00000010)
) m( q) T8 U4 b6 s7 S, z! @* ~ - #define RCC_APB1LPENR_TIM7LPEN ((uint32_t)0x00000020)3 `1 S9 y+ k, b" y4 o% \& ?6 q5 o/ q
- #define RCC_APB1LPENR_TIM12LPEN ((uint32_t)0x00000040)
0 G4 o( y+ D% w) \ - #define RCC_APB1LPENR_TIM13LPEN ((uint32_t)0x00000080)
2 @+ `1 z x7 t7 H2 X2 T - #define RCC_APB1LPENR_TIM14LPEN ((uint32_t)0x00000100)
2 J( x1 \1 O; Q3 N# H/ N - #if defined(STM32F410xx) || defined(STM32F413_423xx)' j8 a- }+ g$ U: e: p$ ?8 S
- #define RCC_APB1LPENR_LPTIM1LPEN ((uint32_t)0x00000200)0 G% J' F4 l6 V, S. t" t
- #endif /* STM32F410xx || STM32F413_423xx */
: d' a7 w5 l. u - #define RCC_APB1LPENR_WWDGLPEN ((uint32_t)0x00000800), [2 x: X9 t( J: Y6 E w
- #define RCC_APB1LPENR_SPI2LPEN ((uint32_t)0x00004000)
$ W! J" O- h. }6 o/ v4 @ - #define RCC_APB1LPENR_SPI3LPEN ((uint32_t)0x00008000)2 ]! C& ]2 s0 j# m. u! h" g
- #if defined(STM32F446xx)
i( n- Q" \* c U% B- E: \ - #define RCC_APB1LPENR_SPDIFRXLPEN ((uint32_t)0x00010000). A$ h( u3 l/ v5 I0 J L$ D, d, [/ E
- #endif /* STM32F446xx */
M) ~7 x% B7 J1 p/ e - #define RCC_APB1LPENR_USART2LPEN ((uint32_t)0x00020000)
- E5 a: B: _( i% d5 ]' B - #define RCC_APB1LPENR_USART3LPEN ((uint32_t)0x00040000)
* C- |' D# m9 _$ x: s+ |2 o - #define RCC_APB1LPENR_UART4LPEN ((uint32_t)0x00080000)0 n6 P" q4 W4 Z( ^
- #define RCC_APB1LPENR_UART5LPEN ((uint32_t)0x00100000). U$ k* B3 [2 R8 _$ F5 K
- #define RCC_APB1LPENR_I2C1LPEN ((uint32_t)0x00200000)
- | U: |" N1 D' a4 g: H - #define RCC_APB1LPENR_I2C2LPEN ((uint32_t)0x00400000)
3 Y% S! e, S& ^ - #define RCC_APB1LPENR_I2C3LPEN ((uint32_t)0x00800000)
! _" g) B9 z$ g - #if defined(STM32F410xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)/ ]1 t3 z- V" j6 v
- #define RCC_APB1LPENR_FMPI2C1LPEN ((uint32_t)0x01000000)
9 d0 Y' o N; F; E5 ] - #endif /* STM32F410xx || STM32F412xG || STM32F413_423xx || STM32F446xx */
& r- U+ {/ A) H) W9 F# ], i - #define RCC_APB1LPENR_CAN1LPEN ((uint32_t)0x02000000)" f/ Y; ~0 q! S2 q
- #define RCC_APB1LPENR_CAN2LPEN ((uint32_t)0x04000000)+ o6 Q% S. c* P7 A: }
- #if defined(STM32F446xx)& \; L$ _/ N5 { A
- #define RCC_APB1LPENR_CECLPEN ((uint32_t)0x08000000)
2 }; ^8 h* C" @( M" } K( k8 B: c3 W - #endif /* STM32F446xx */. w( @* W# t" n7 U* B
- #define RCC_APB1LPENR_PWRLPEN ((uint32_t)0x10000000)
! }6 O5 z5 `+ n1 S - #define RCC_APB1LPENR_DACLPEN ((uint32_t)0x20000000)' C$ @+ A0 _" c$ f
- #define RCC_APB1LPENR_UART7LPEN ((uint32_t)0x40000000)
: _. n! v' d0 A" t! k9 A% N# E - #define RCC_APB1LPENR_UART8LPEN ((uint32_t)0x80000000)
$ o" k; s5 e- z9 I$ g$ t- H. @ - : F6 k+ v8 M# i& y- z
- /******************** Bit definition for RCC_APB2LPENR register *************/
9 {# w5 h) f4 I* s: S! q1 } - #define RCC_APB2LPENR_TIM1LPEN ((uint32_t)0x00000001)
0 i: N# K: W( h! _% L - #define RCC_APB2LPENR_TIM8LPEN ((uint32_t)0x00000002)
4 c5 v8 V: V% e( W - #define RCC_APB2LPENR_USART1LPEN ((uint32_t)0x00000010)
2 W4 \! S- z8 h# }5 w$ y - #define RCC_APB2LPENR_USART6LPEN ((uint32_t)0x00000020)8 o( A7 O) W- Y2 x7 r/ r% m0 p8 \
- #define RCC_APB2LPENR_UART9LPEN ((uint32_t)0x00000040)
; @; l: g6 R8 Q - #define RCC_APB2LPENR_UART10LPEN ((uint32_t)0x00000080)
$ }9 N; _) \! g6 X3 h6 A0 z( M - #define RCC_APB2LPENR_ADC1LPEN ((uint32_t)0x00000100)' N3 X9 N8 B( ^
- #define RCC_APB2LPENR_ADC2PEN ((uint32_t)0x00000200)
7 r/ e/ Q0 v: e4 b - #define RCC_APB2LPENR_ADC3LPEN ((uint32_t)0x00000400)
) L+ @3 w' o n - #define RCC_APB2LPENR_SDIOLPEN ((uint32_t)0x00000800)
3 d( j; u! h3 H% ~6 _# V3 c - #define RCC_APB2LPENR_SPI1LPEN ((uint32_t)0x00001000)$ u* b& a7 L6 |1 A W1 W
- #define RCC_APB2LPENR_SPI4LPEN ((uint32_t)0x00002000)
9 U% D; w4 q2 g }4 b - #define RCC_APB2LPENR_SYSCFGLPEN ((uint32_t)0x00004000)
, h% M8 R# D, ?. V9 m( Y$ _; i - #define RCC_APB2LPENR_TIM9LPEN ((uint32_t)0x00010000)% d W! N; `( H' l3 p
- #define RCC_APB2LPENR_TIM10LPEN ((uint32_t)0x00020000)
- f" I* w/ i- i+ h) V) L! N - #define RCC_APB2LPENR_TIM11LPEN ((uint32_t)0x00040000)% T8 j: N1 G' o( L! O( P0 J& K
- #define RCC_APB2LPENR_SPI5LPEN ((uint32_t)0x00100000)6 M' r, O" h8 Z" Z6 a
- #define RCC_APB2LPENR_SPI6LPEN ((uint32_t)0x00200000)
5 G m; B+ V, g, m- J3 F% a7 ~ - #define RCC_APB2LPENR_SAI1LPEN ((uint32_t)0x00400000)8 d% `8 X: S8 N% z, q" ~4 _- d
- #if defined(STM32F446xx)2 V6 k+ O( F* o9 X
- #define RCC_APB2LPENR_SAI2LPEN ((uint32_t)0x00800000)
4 M( N& t* b3 t# n - #endif /* STM32F446xx */. y; L: s1 i8 U3 i# n
- #define RCC_APB2LPENR_LTDCLPEN ((uint32_t)0x04000000)0 o" D1 n6 ~8 N( C$ l
- #if defined(STM32F469_479xx)' S7 U! s" q: a E/ V. }
- #define RCC_APB2LPENR_DSILPEN ((uint32_t)0x08000000)
9 ~9 P% \1 T$ N5 g1 d$ y- a) d - #endif /* STM32F469_479xx */. N( Z' I4 m' G) D+ X
- #if defined(STM32F412xG) || defined(STM32F413_423xx)
2 o4 b5 b, f7 j& M9 T$ g - #define RCC_APB2LPENR_DFSDM1LPEN ((uint32_t)0x01000000)
h3 ~+ P/ ?7 \. {% D+ A - #endif /* STM32F412xG || STM32F413_423xx */8 C* [' S+ b% G1 \% n
- #if defined(STM32F413_423xx)
) F% \& Y: U; V - #define RCC_APB2LPENR_DFSDM2LPEN ((uint32_t)0x02000000)/ C# i1 `7 G& j" U5 \
- #endif /* STM32F413_423xx */
1 M& B$ V" V; n
1 x4 g4 l7 Z$ f" G( o* y- /******************** Bit definition for RCC_BDCR register ******************/! m" f; n9 ^4 I- y1 Q
- #define RCC_BDCR_LSEON ((uint32_t)0x00000001)& L q: [$ U0 ?* w* \
- #define RCC_BDCR_LSERDY ((uint32_t)0x00000002)9 ?# ^ _' R2 K
- #define RCC_BDCR_LSEBYP ((uint32_t)0x00000004)# j- @. f5 j+ T1 u* \; x# j
- #define RCC_BDCR_LSEMOD ((uint32_t)0x00000008)
' @ b! y+ t' v8 {# c
- i O) @' _* x- #define RCC_BDCR_RTCSEL ((uint32_t)0x00000300)
: A! N' F4 e5 a* `0 ?- M5 g- S! u - #define RCC_BDCR_RTCSEL_0 ((uint32_t)0x00000100)
/ R* \7 o7 B$ n- o - #define RCC_BDCR_RTCSEL_1 ((uint32_t)0x00000200)- l5 ]; d- z( z* N
- & Y; s7 [ X# u5 [
- #define RCC_BDCR_RTCEN ((uint32_t)0x00008000)! r- x! T8 `1 z# N' T/ Q
- #define RCC_BDCR_BDRST ((uint32_t)0x00010000)
3 }, d. x" Y& V9 x" I - , _( W b( y! `6 X3 ?
- /******************** Bit definition for RCC_CSR register *******************/
$ P1 d T3 q# q& O - #define RCC_CSR_LSION ((uint32_t)0x00000001). |" s7 O0 j, l" \7 V b6 f! [$ _! w8 C1 D
- #define RCC_CSR_LSIRDY ((uint32_t)0x00000002)
# c9 L) s# S" ?. K$ T - #define RCC_CSR_RMVF ((uint32_t)0x01000000)
( @2 X0 [: U8 @8 I - #define RCC_CSR_BORRSTF ((uint32_t)0x02000000)
- t B8 R, t( M' A: x - #define RCC_CSR_PADRSTF ((uint32_t)0x04000000)3 r9 O8 t$ \7 R% I8 E ~
- #define RCC_CSR_PORRSTF ((uint32_t)0x08000000)
9 D# t, o+ p# o3 f, L* ^$ Y - #define RCC_CSR_SFTRSTF ((uint32_t)0x10000000)4 m$ A+ t/ _+ {
- #define RCC_CSR_WDGRSTF ((uint32_t)0x20000000)* W( ]) W) L. L% P, \ J W
- #define RCC_CSR_WWDGRSTF ((uint32_t)0x40000000); R6 k7 H8 h: P, c" f
- #define RCC_CSR_LPWRRSTF ((uint32_t)0x80000000)
3 Y5 n) \- }* I/ E5 \+ g6 p$ e - : F; V% x% X, z, l0 k. d2 B
- /******************** Bit definition for RCC_SSCGR register *****************/
' Y5 A, q/ ~: t$ I* g8 t% X& f - #define RCC_SSCGR_MODPER ((uint32_t)0x00001FFF)' n$ L' P" W9 E) k0 u
- #define RCC_SSCGR_INCSTEP ((uint32_t)0x0FFFE000)
# d: D3 ?; T+ o# Y4 }" F& ~ - #define RCC_SSCGR_SPREADSEL ((uint32_t)0x40000000)" y s" U1 C8 B: }
- #define RCC_SSCGR_SSCGEN ((uint32_t)0x80000000)
+ [* |, E+ f7 F3 ^( M+ a, U - 9 J9 m' B7 x# R: c7 ~& {4 L
- /******************** Bit definition for RCC_PLLI2SCFGR register ************/- |$ g1 T" {- \1 @" y3 A3 j% B
- #define RCC_PLLI2SCFGR_PLLI2SM ((uint32_t)0x0000003F): p9 P; p% s8 b6 N+ R0 Y5 \3 D6 w/ _
- #define RCC_PLLI2SCFGR_PLLI2SM_0 ((uint32_t)0x00000001)0 ~* w, P* M( Y% G+ V. c+ A
- #define RCC_PLLI2SCFGR_PLLI2SM_1 ((uint32_t)0x00000002)
% h$ t A4 `4 G - #define RCC_PLLI2SCFGR_PLLI2SM_2 ((uint32_t)0x00000004)/ ^0 G1 @% w, y' g( u! l
- #define RCC_PLLI2SCFGR_PLLI2SM_3 ((uint32_t)0x00000008), A. d3 o w7 p6 ~. D
- #define RCC_PLLI2SCFGR_PLLI2SM_4 ((uint32_t)0x00000010)
3 V, H, Q! B8 M1 u - #define RCC_PLLI2SCFGR_PLLI2SM_5 ((uint32_t)0x00000020)
2 ], i0 ?; \3 j7 \
) B7 b; U: N" ^$ q9 Z* E- #define RCC_PLLI2SCFGR_PLLI2SN ((uint32_t)0x00007FC0)
- K0 _( @" `) m, ]1 m - #define RCC_PLLI2SCFGR_PLLI2SN_0 ((uint32_t)0x00000040)
! I+ C+ @3 S. P, [; R8 _2 m - #define RCC_PLLI2SCFGR_PLLI2SN_1 ((uint32_t)0x00000080)6 G' N1 f8 E9 U& t S
- #define RCC_PLLI2SCFGR_PLLI2SN_2 ((uint32_t)0x00000100)
! j0 ^1 I }+ @9 R5 t - #define RCC_PLLI2SCFGR_PLLI2SN_3 ((uint32_t)0x00000200)" x: i- w9 h: A% q- o& F3 w
- #define RCC_PLLI2SCFGR_PLLI2SN_4 ((uint32_t)0x00000400). Z+ x* }7 T8 c# S
- #define RCC_PLLI2SCFGR_PLLI2SN_5 ((uint32_t)0x00000800)
- C z/ y; \8 s - #define RCC_PLLI2SCFGR_PLLI2SN_6 ((uint32_t)0x00001000)5 ^8 e( ?' E# `# r$ j4 \
- #define RCC_PLLI2SCFGR_PLLI2SN_7 ((uint32_t)0x00002000)
0 v5 k7 T+ A* M. R* n5 P: o - #define RCC_PLLI2SCFGR_PLLI2SN_8 ((uint32_t)0x00004000); x4 W+ O; n3 \# P; |' J
) [% n6 K/ d# u7 {2 r" a- #if defined(STM32F412xG) || defined(STM32F413_423xx)) T- P2 [$ K# R$ F+ C& s$ x
- #define RCC_PLLI2SCFGR_PLLI2SSRC ((uint32_t)0x00400000), L# `: Q) b+ J4 [% Z
- #endif /* STM32F412xG || STM32F413_423xx */
! S7 R% I- w) Y5 ?0 U, @0 X - 2 M+ W- M7 g/ S
- #if defined(STM32F446xx)
' Z# u2 T% G. w* I! n) n - #define RCC_PLLI2SCFGR_PLLI2SP ((uint32_t)0x00030000)
5 v& A8 ^ D9 K8 c9 o# R - #define RCC_PLLI2SCFGR_PLLI2SP_0 ((uint32_t)0x00010000)2 c Q8 _7 `1 Q0 D1 C @
- #define RCC_PLLI2SCFGR_PLLI2SP_1 ((uint32_t)0x00020000)
& n* k" x2 ?* P# |! { ` - #endif /* STM32F446xx */
% [2 y5 f9 n: G# W1 V4 v/ d
, x5 f& `4 `' M9 D) U" |: K- #define RCC_PLLI2SCFGR_PLLI2SQ ((uint32_t)0x0F000000)
. w' E8 k$ J3 [! Z2 @1 B& j% S* L/ V - #define RCC_PLLI2SCFGR_PLLI2SQ_0 ((uint32_t)0x01000000)0 ]3 e& q( b7 B& C' ^
- #define RCC_PLLI2SCFGR_PLLI2SQ_1 ((uint32_t)0x02000000) l9 X2 y! `$ K, U$ e, q
- #define RCC_PLLI2SCFGR_PLLI2SQ_2 ((uint32_t)0x04000000)
& y* j" R8 z6 N- G7 u - #define RCC_PLLI2SCFGR_PLLI2SQ_3 ((uint32_t)0x08000000)* }" z3 |) `1 A' v0 S+ [3 i
- " O C$ L4 _; Z0 X- M8 ~; |
- #define RCC_PLLI2SCFGR_PLLI2SR ((uint32_t)0x70000000)
8 q& `. t. q/ k) K# y - #define RCC_PLLI2SCFGR_PLLI2SR_0 ((uint32_t)0x10000000)
& N8 w& c# E) |. ^5 v1 v - #define RCC_PLLI2SCFGR_PLLI2SR_1 ((uint32_t)0x20000000)" { E: E/ S6 x& q
- #define RCC_PLLI2SCFGR_PLLI2SR_2 ((uint32_t)0x40000000)2 p0 S+ c* p# ~" ^
/ k! ?4 u' \5 L- s- /******************** Bit definition for RCC_PLLSAICFGR register ************/6 b9 X! g: m4 d+ J
- #if defined(STM32F446xx)+ ^7 {/ Y* M5 O8 }5 k. n9 Z/ Y; S
- #define RCC_PLLSAICFGR_PLLSAIM ((uint32_t)0x0000003F)
/ H$ i) n- S$ f6 \' w$ p3 i% R - #define RCC_PLLSAICFGR_PLLSAIM_0 ((uint32_t)0x00000001)" _. d8 e" s! j' X' j
- #define RCC_PLLSAICFGR_PLLSAIM_1 ((uint32_t)0x00000002)
- m0 z5 g, f. L2 k - #define RCC_PLLSAICFGR_PLLSAIM_2 ((uint32_t)0x00000004)* s2 Z6 V/ d P& O( Z9 e$ e" j
- #define RCC_PLLSAICFGR_PLLSAIM_3 ((uint32_t)0x00000008)9 q6 E! l D1 X4 d7 s0 }
- #define RCC_PLLSAICFGR_PLLSAIM_4 ((uint32_t)0x00000010)' m; L/ L. U6 `& y# ]$ E7 y
- #define RCC_PLLSAICFGR_PLLSAIM_5 ((uint32_t)0x00000020)( C% e: |. \ d1 m0 L7 c2 Q
- #endif /* STM32F446xx */0 N; L4 o; i* ~& }0 D" t4 m Z
- % u$ B) @$ f3 X! |8 s6 I3 s
- #define RCC_PLLSAICFGR_PLLSAIN ((uint32_t)0x00007FC0). }# ?8 {+ v' Y5 }7 G: d
- #define RCC_PLLSAICFGR_PLLSAIN_0 ((uint32_t)0x00000040)
7 }* |7 Y) c: p; b# O- L/ I - #define RCC_PLLSAICFGR_PLLSAIN_1 ((uint32_t)0x00000080)
% H2 d* o N; ^& J: t( O% p - #define RCC_PLLSAICFGR_PLLSAIN_2 ((uint32_t)0x00000100)
3 F) J% i6 t# d" x) s8 Y - #define RCC_PLLSAICFGR_PLLSAIN_3 ((uint32_t)0x00000200)
1 L. s* @& @+ \( o0 o - #define RCC_PLLSAICFGR_PLLSAIN_4 ((uint32_t)0x00000400)
/ Q) A' X, `5 g, Q5 p( B; T - #define RCC_PLLSAICFGR_PLLSAIN_5 ((uint32_t)0x00000800)4 E" p2 p: P; ]: Y3 O
- #define RCC_PLLSAICFGR_PLLSAIN_6 ((uint32_t)0x00001000)
* ~/ A! Y: L# Q+ E1 _ - #define RCC_PLLSAICFGR_PLLSAIN_7 ((uint32_t)0x00002000)
9 i* W6 o7 `6 _ - #define RCC_PLLSAICFGR_PLLSAIN_8 ((uint32_t)0x00004000)8 p0 e+ }5 g2 B* e
/ k8 A& H3 A" n' N- #if defined(STM32F446xx) || defined(STM32F469_479xx) * N. `, ~) c' Y8 y% j
- #define RCC_PLLSAICFGR_PLLSAIP ((uint32_t)0x00030000)* G8 B9 ?% q3 i# y7 T6 Q' Z
- #define RCC_PLLSAICFGR_PLLSAIP_0 ((uint32_t)0x00010000): Y# s |* @! U0 l0 A% q/ R
- #define RCC_PLLSAICFGR_PLLSAIP_1 ((uint32_t)0x00020000)& N" |" P% Z5 L% V% y3 n
- #endif /* STM32F446xx || STM32F469_479xx */
) z5 v' [5 l1 _! ?/ @, p1 y0 u - 0 Z) e- N. d0 u$ m& I2 Z" {
- #define RCC_PLLSAICFGR_PLLSAIQ ((uint32_t)0x0F000000)
* E4 ^$ @9 ?$ ?& W5 ` - #define RCC_PLLSAICFGR_PLLSAIQ_0 ((uint32_t)0x01000000)$ ]- f$ N" u7 Q' d& l( d# W; T
- #define RCC_PLLSAICFGR_PLLSAIQ_1 ((uint32_t)0x02000000)
) x( B& H, X, z/ Z- o2 e* t6 j - #define RCC_PLLSAICFGR_PLLSAIQ_2 ((uint32_t)0x04000000)6 F. D* k0 i7 J! b, |
- #define RCC_PLLSAICFGR_PLLSAIQ_3 ((uint32_t)0x08000000)* {* Y! Q! g2 J9 m
' ^: `) J- x" V9 N( L8 r J! k- #define RCC_PLLSAICFGR_PLLSAIR ((uint32_t)0x70000000)
0 \2 {8 [- Q+ t0 S0 G - #define RCC_PLLSAICFGR_PLLSAIR_0 ((uint32_t)0x10000000)
: j7 c* L0 U, K4 b+ [5 Z - #define RCC_PLLSAICFGR_PLLSAIR_1 ((uint32_t)0x20000000): v" L# v: C' i: L9 k7 n. U2 [$ }
- #define RCC_PLLSAICFGR_PLLSAIR_2 ((uint32_t)0x40000000)
$ e8 Z, S3 R1 h/ I5 {& { - 9 I- H. y( _! ^- j
- /******************** Bit definition for RCC_DCKCFGR register ***************/
5 r' X6 u1 l; D - #define RCC_DCKCFGR_PLLI2SDIVQ ((uint32_t)0x0000001F). J% [: u& d. T" I+ W+ W- U) R3 ]
- #define RCC_DCKCFGR_PLLSAIDIVQ ((uint32_t)0x00001F00)- f2 Y2 N4 l. M6 N1 Z7 ?
- #define RCC_DCKCFGR_PLLSAIDIVR ((uint32_t)0x00030000)
- b) d' b4 l$ s% Y
. n9 c8 L! b2 N3 C' t0 G' n' }4 y- #if defined(STM32F412xG) || defined(STM32F413_423xx)( H. g! u4 l& b& L) ^0 y
- #define RCC_DCKCFGR_CKDFSDM1SEL ((uint32_t)0x80000000)
. _$ l5 o, o6 |, v) L o - #define RCC_DCKCFGR_CKDFSDM1ASEL ((uint32_t)0x00008000)
4 f. [: M' z/ ^9 ~" V9 b) \ - #endif /* STM32F412xG || STM32F413_423xx */
. v% a! {6 c4 T. c; |0 ^ - * s& Y- q# ]1 H! \% O! C4 f& Y. b
- #if defined(STM32F413_423xx)
( N2 e2 X5 f# c3 S0 ~1 E - #define RCC_DCKCFGR_PLLI2SDIVR ((uint32_t)0x0000001F)
+ ?. ~9 x% x# ^ - #define RCC_DCKCFGR_PLLI2SDIVR_0 ((uint32_t)0x00000001)
) E. \" A c7 Q - #define RCC_DCKCFGR_PLLI2SDIVR_1 ((uint32_t)0x00000002), {5 P( s8 J" X
- #define RCC_DCKCFGR_PLLI2SDIVR_2 ((uint32_t)0x00000004)
0 N) Q N1 h3 j0 ~& L - #define RCC_DCKCFGR_PLLI2SDIVR_3 ((uint32_t)0x00000008)6 i* K3 J# M' M/ K$ m" U, r
- #define RCC_DCKCFGR_PLLI2SDIVR_4 ((uint32_t)0x00000010)
1 _! K. b/ |6 P0 o - 0 f/ d o4 h6 F2 o R
- #define RCC_DCKCFGR_PLLDIVR ((uint32_t)0x00001F00)" P4 y# w) A. r) [
- #define RCC_DCKCFGR_PLLDIVR_0 ((uint32_t)0x00000100)
, E& a% h# N! ~' \: F( N - #define RCC_DCKCFGR_PLLDIVR_1 ((uint32_t)0x00000200)& @, s- d. q; G! ^. E3 w" X
- #define RCC_DCKCFGR_PLLDIVR_2 ((uint32_t)0x00000400)' k! o1 r8 ~2 m
- #define RCC_DCKCFGR_PLLDIVR_3 ((uint32_t)0x00000800)5 u+ G1 ~5 R- n2 f6 D! s
- #define RCC_DCKCFGR_PLLDIVR_4 ((uint32_t)0x00001000)
1 O0 |. o. i$ J - #define RCC_DCKCFGR_CKDFSDM2ASEL ((uint32_t)0x00004000)
8 W ^% W5 ]6 I$ ~6 E - #endif /* STM32F413_423xx */
# H3 K0 @- I: m( a9 L$ K( X
8 `& } P c3 S$ V A' c: P- #define RCC_DCKCFGR_SAI1ASRC ((uint32_t)0x00300000)5 d* a& i M9 G% X6 ^: D
- #define RCC_DCKCFGR_SAI1ASRC_0 ((uint32_t)0x00100000)$ }7 b2 f0 K# Z, B
- #define RCC_DCKCFGR_SAI1ASRC_1 ((uint32_t)0x00200000)) W' [2 X9 d0 g, f2 w) K* R2 [5 @
- #if defined(STM32F446xx)' Q3 N# W3 R8 l) m" l
- #define RCC_DCKCFGR_SAI1SRC ((uint32_t)0x00300000)
: Q1 {9 P4 _& ` - #define RCC_DCKCFGR_SAI1SRC_0 ((uint32_t)0x00100000), `+ W* T( @; h6 Q0 t0 |
- #define RCC_DCKCFGR_SAI1SRC_1 ((uint32_t)0x00200000)
* F, a' I, y _( A- e7 t& @ - #endif /* STM32F446xx */; @* [! N2 b! j4 U
8 s- N9 Q+ j- f6 {" k9 b- #define RCC_DCKCFGR_SAI1BSRC ((uint32_t)0x00C00000)
: E# ~' @4 [$ p$ S# J% J% ~# ^ - #define RCC_DCKCFGR_SAI1BSRC_0 ((uint32_t)0x00400000); u7 G S5 g: O1 v; R3 K: y
- #define RCC_DCKCFGR_SAI1BSRC_1 ((uint32_t)0x00800000)
0 f; v7 z% m* C) X6 ?+ | - #if defined(STM32F446xx)1 C) n- `8 M, G$ f! \; F8 o! [3 L4 L
- #define RCC_DCKCFGR_SAI2SRC ((uint32_t)0x00C00000)
1 G9 Q. G5 i! N/ G! s - #define RCC_DCKCFGR_SAI2SRC_0 ((uint32_t)0x00400000)
8 a e- I1 x5 }# H) r/ A$ r8 U1 p9 B - #define RCC_DCKCFGR_SAI2SRC_1 ((uint32_t)0x00800000)' ]6 O4 M( p! e' | W1 R2 k
- #endif /* STM32F446xx */
4 {0 n3 C( p+ i1 x# O% u8 d4 M( Y
3 R5 N# C2 v; {7 w( R/ |( a7 z- #define RCC_DCKCFGR_TIMPRE ((uint32_t)0x01000000)
# l8 B7 u0 w6 I - #if defined(STM32F469_479xx)$ o1 ]: u$ S3 [: A7 m1 I
- #define RCC_DCKCFGR_CK48MSEL ((uint32_t)0x08000000)
7 _& u2 X# V7 O0 d6 n2 s - #define RCC_DCKCFGR_SDIOSEL ((uint32_t)0x10000000)( x5 \. T( |! `/ v; C3 W; b: J
- #define RCC_DCKCFGR_DSISEL ((uint32_t)0x20000000)
9 @& Z4 i) C3 k4 q& P - #endif /* STM32F469_479xx */
. R/ W( q9 s) {- j
: `4 U2 W8 ^; l0 s- #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)
6 I8 e" V# f; x s% G. t# n - #define RCC_DCKCFGR_I2S1SRC ((uint32_t)0x06000000)
9 B) e$ C# v7 E9 U" q' p* }( W( x; G( s* S - #define RCC_DCKCFGR_I2S1SRC_0 ((uint32_t)0x02000000)! H& F7 _2 X, Z F
- #define RCC_DCKCFGR_I2S1SRC_1 ((uint32_t)0x04000000)' i3 a! S! q$ M
- #define RCC_DCKCFGR_I2S2SRC ((uint32_t)0x18000000)
% _: M' J1 m# r" G& \ - #define RCC_DCKCFGR_I2S2SRC_0 ((uint32_t)0x08000000). M" [2 f3 L/ B
- #define RCC_DCKCFGR_I2S2SRC_1 ((uint32_t)0x10000000)# d7 ?+ N- H/ p& h
- 3 Y% M# X" x# {4 o
- /******************** Bit definition for RCC_CKGATENR register ***************/
% E, b6 y) d) p7 w( Z - #define RCC_CKGATENR_AHB2APB1_CKEN ((uint32_t)0x00000001)6 _' u9 f! ~" y. T- ~1 }) k; Y
- #define RCC_CKGATENR_AHB2APB2_CKEN ((uint32_t)0x00000002)
+ x8 p! ^- w& l1 V/ O4 o - #define RCC_CKGATENR_CM4DBG_CKEN ((uint32_t)0x00000004)
) V! A& Z3 q+ m; _ - #define RCC_CKGATENR_SPARE_CKEN ((uint32_t)0x00000008)
% {7 q K& n, M. F; Z+ u - #define RCC_CKGATENR_SRAM_CKEN ((uint32_t)0x00000010)
+ | ?) T: \ m6 T( S4 C h4 I0 a: ] - #define RCC_CKGATENR_FLITF_CKEN ((uint32_t)0x00000020)- e! X, c# i! c+ f6 j5 h- `
- #define RCC_CKGATENR_RCC_CKEN ((uint32_t)0x00000040)
* m$ @5 Q3 `0 ~" `1 P1 g. b0 Q7 c- a( ~ - #if defined(STM32F412xG) || defined(STM32F413_423xx)! J' D/ G% E4 F; {" e9 W
- #define RCC_CKGATENR_RCC_EVTCTL ((uint32_t)0x00000080). h' [( @8 U1 ]- }0 G8 i
- #endif /* STM32F412xG || STM32F413_423xx */+ F& f4 H- f7 a% y4 j4 T' n1 ^2 {
+ T+ z( m6 R2 G9 [# K0 `- x) R- /******************** Bit definition for RCC_DCKCFGR2 register ***************/
5 q5 T7 H) r/ D, Q' l' n - #define RCC_DCKCFGR2_FMPI2C1SEL ((uint32_t)0x00C00000)9 m, e# p5 { |; i- F( x
- #define RCC_DCKCFGR2_FMPI2C1SEL_0 ((uint32_t)0x00400000)
' q) f7 Y( b6 L2 y/ c$ H4 c - #define RCC_DCKCFGR2_FMPI2C1SEL_1 ((uint32_t)0x00800000)& P: i8 N. Z& I/ ^' v( k
- #define RCC_DCKCFGR2_CECSEL ((uint32_t)0x04000000)
/ K: p9 h7 @+ Q! b - #define RCC_DCKCFGR2_CK48MSEL ((uint32_t)0x08000000)+ u# T* t) J+ M: n5 l x
- #define RCC_DCKCFGR2_SDIOSEL ((uint32_t)0x10000000)
+ f+ T- ?# E- q! m( _2 [ - #if defined(STM32F446xx) J2 @0 d5 L7 Q% I$ v
- #define RCC_DCKCFGR2_SPDIFRXSEL ((uint32_t)0x20000000)# l* R l& m! h& T
- #endif /* STM32F446xx */
( `, |% M2 m8 q+ Y" {- n - #if defined(STM32F413_423xx)
. a* o' x% x/ K8 l6 Z: Z m( v - #define RCC_DCKCFGR2_LPTIM1SEL ((uint32_t)0xC0000000)
% M7 ^2 o; E! H5 ^ - #define RCC_DCKCFGR2_LPTIM1SEL_0 ((uint32_t)0x40000000)
% `+ Q' a* M$ U% K- ` - #define RCC_DCKCFGR2_LPTIM1SEL_1 ((uint32_t)0x80000000)" V1 M% }- @) D5 t+ I4 F( P& U( S5 U7 U
- #endif /* STM32F413_423xx */
. {6 Z( _2 u7 ?% F) l6 U0 V5 w - #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */
0 O$ [: }7 V4 w% Q: s5 o& q. l - 6 }! b2 P7 s9 M' G
- #if defined(STM32F410xx)$ S6 p( |! _! m6 z7 q, ]
- #define RCC_DCKCFGR_I2SSRC ((uint32_t)0x06000000)
3 @0 ^* {9 o% b1 \: ? - #define RCC_DCKCFGR_I2SSRC_0 ((uint32_t)0x02000000)- `- y/ z9 W. F/ P0 U4 S; w9 n
- #define RCC_DCKCFGR_I2SSRC_1 ((uint32_t)0x04000000)
U. ]7 E0 ~" d, Q. n3 l K - #endif /* STM32F410xx */8 }7 w2 O! m5 a2 [+ a
- + q ~) M& V% A8 R- x4 l; y! G
- #if defined(STM32F410xx)3 ~& f& \5 X0 o$ ?3 o% F2 |
- /******************** Bit definition for RCC_DCKCFGR2 register **************/
2 M% f1 J' @! ]" W6 R2 l - #define RCC_DCKCFGR2_FMPI2C1SEL ((uint32_t)0x00C00000)
! B9 w" K$ \' B0 K P# s! m - #define RCC_DCKCFGR2_FMPI2C1SEL_0 ((uint32_t)0x00400000)# G" N; G* S( [% [7 W
- #define RCC_DCKCFGR2_FMPI2C1SEL_1 ((uint32_t)0x00800000)( ~" X- ?4 k5 g3 ?
- #define RCC_DCKCFGR2_LPTIM1SEL ((uint32_t)0xC0000000)7 \6 O: p: }4 j) I2 D; ?
- #define RCC_DCKCFGR2_LPTIM1SEL_0 ((uint32_t)0x40000000)2 e' X$ W, ?; R3 F) I
- #define RCC_DCKCFGR2_LPTIM1SEL_1 ((uint32_t)0x80000000)9 y; o* i' b$ v q
- #endif /* STM32F410xx */
" q1 G+ J7 B, t( B, f) @1 K
复制代码 ; X2 U Q7 T' }5 B: G p/ N) z
|