你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

【经验分享】STM32 RTC相关函数和类型

[复制链接]
STMCU小助手 发布时间:2022-3-29 09:37
01. 概述
: g' d  q. }( B" m* FRTC相关函数和类型主要在stm32f4xx_rtc.h和stm32f4xx_rtc.c文件中。  y3 M) e2 j1 b" C6 i5 ]7 `

3 d$ s" V' Z# b; P, @$ y02. 相关类型0 y, U" x" a" ^+ j' O4 `0 b" i8 I& X
  1. /** 7 H# Z* k* B3 Q& e5 B" r) o
  2.   * @brief  RTC Init structures definition  
    6 C" P, [1 z8 r% V
  3.   */ & C" C3 F/ v) A$ D6 Q
  4. typedef struct/ @- o. L# w4 [, v4 }
  5. {9 X1 o9 B' F# x2 Z* E0 h  F
  6.   uint32_t RTC_HourFormat;   /*!< Specifies the RTC Hour Format.
    : Y4 G) }7 u. [" h4 Z: c
  7.                              This parameter can be a value of @ref RTC_Hour_Formats */
    ' a* {* C' u/ f# U+ d* Q/ C4 c

  8. : N, S9 @; q# k6 T* f* L8 q
  9.   uint32_t RTC_AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value.
    9 U& P5 F& T1 k! u% `5 N
  10.                              This parameter must be set to a value lower than 0x7F */
    ( q$ G6 B5 {& a7 ~! K# b& d

  11.   F& ?6 A# y' U2 D* o: L- B
  12.   uint32_t RTC_SynchPrediv;  /*!< Specifies the RTC Synchronous Predivider value.
    ( w) m$ H) L7 t- p4 T
  13.                              This parameter must be set to a value lower than 0x7FFF */
    $ J" p8 @; `5 ]. ^" C
  14. }RTC_InitTypeDef;1 d) X, m8 r3 \2 D
  15. + f, d( M9 V3 {3 K! ?
  16. /**
    * t' _% C9 d* f6 m  @1 ?
  17.   * @brief  RTC Time structure definition  5 U2 M2 n. E  U/ _/ `' h; W
  18.   */
    4 i! r' f: v9 ~& e) j6 `# j) h) Z# @
  19. typedef struct
    , b6 t, O5 o. s# L& p; D2 i
  20. {: {& L5 R$ }$ h3 v4 K7 A
  21.   uint8_t RTC_Hours;    /*!< Specifies the RTC Time Hour.) d( H- P2 Y# j, h! s5 r2 [9 ]8 s
  22.                         This parameter must be set to a value in the 0-12 range
    % F* A# ]6 R. M3 L6 |/ ]. x
  23.                         if the RTC_HourFormat_12 is selected or 0-23 range if
    * l2 N4 K2 _* u& \& H, y
  24.                         the RTC_HourFormat_24 is selected. */
    1 Z& \& P9 X8 y$ `: z) A5 A
  25. % ~, f; X+ V6 [: ]
  26.   uint8_t RTC_Minutes;  /*!< Specifies the RTC Time Minutes.
    ! ?8 z& _; r" f  E9 o
  27.                         This parameter must be set to a value in the 0-59 range. */0 Z- k* x! y) \1 K5 w. [" O9 M8 g
  28. ) y/ M$ Y" O9 c8 d# S& a5 G5 l
  29.   uint8_t RTC_Seconds;  /*!< Specifies the RTC Time Seconds.* v8 s% p7 M( W7 p0 G. u8 l
  30.                         This parameter must be set to a value in the 0-59 range. */6 u; y9 Y& v- [$ l  ^
  31. ' N6 U& S& Z) S: \( w* e. V
  32.   uint8_t RTC_H12;      /*!< Specifies the RTC AM/PM Time.
    4 Q4 L( u* F  p& {/ J3 j: U
  33.                         This parameter can be a value of @ref RTC_AM_PM_Definitions */- H6 B9 I8 l  E! U0 y/ E
  34. }RTC_TimeTypeDef; ' r9 L8 ?% h/ B3 c1 b! i

  35. 6 m! {' l4 q* q8 I3 s- c' N
  36. /**
    6 P: k  i5 Q" d. h
  37.   * @brief  RTC Date structure definition  $ i; C7 ^/ o2 |% P" b9 f7 K" D
  38.   */
    ) B$ t$ u( O9 j6 d! M7 y$ t8 \" B
  39. typedef struct$ N! O9 w( k/ }0 W4 W  d
  40. {
    6 M4 K5 p7 g! o. j1 |6 c
  41.   uint8_t RTC_WeekDay; /*!< Specifies the RTC Date WeekDay.
    / s( {- d6 p& M7 [3 e, p% j
  42.                         This parameter can be a value of @ref RTC_WeekDay_Definitions */( ?5 {- Q6 D& W1 n3 l8 S. D9 w( O
  43. 5 |# T6 f+ }6 k( i  n
  44.   uint8_t RTC_Month;   /*!< Specifies the RTC Date Month (in BCD format).2 B4 K0 H$ H& e- E6 Z
  45.                         This parameter can be a value of @ref RTC_Month_Date_Definitions */
    , y1 g. J' X0 K" e4 _; F% r! o

  46. 1 D/ e. m: V" t/ \0 L
  47.   uint8_t RTC_Date;     /*!< Specifies the RTC Date.
    % Q! M5 e4 ~" S) C
  48.                         This parameter must be set to a value in the 1-31 range. */) M1 L& v2 s, f  {

  49. # O) @! ?! ?* K2 `
  50.   uint8_t RTC_Year;     /*!< Specifies the RTC Date Year.
    - e. k. U+ \* s$ J/ [6 Q9 g
  51.                         This parameter must be set to a value in the 0-99 range. */! w/ z9 ^( l# I. a* S
  52. }RTC_DateTypeDef;
    0 }/ f# ~) z8 E7 H/ s

  53. ; V4 t6 l2 G, B, d6 h
  54. /** 7 M, V7 v; C, s+ z
  55.   * @brief  RTC Alarm structure definition  
    2 t' r* J7 p2 h
  56.   */
    , O6 L6 O+ O* L9 d9 P: Q2 \0 w
  57. typedef struct# A% J: y2 ?$ z' B5 ]
  58. {# P  w5 ~. g4 F) ?6 ^% s* B2 U# i
  59.   RTC_TimeTypeDef RTC_AlarmTime;     /*!< Specifies the RTC Alarm Time members. */# E7 e9 g% T6 R$ r8 P, P, h5 g
  60. % ]$ O- n3 U; F7 a" W
  61.   uint32_t RTC_AlarmMask;            /*!< Specifies the RTC Alarm Masks.
    6 B7 j* C. ~: D$ Z7 J
  62.                                      This parameter can be a value of @ref RTC_AlarmMask_Definitions */
    % L4 n9 W/ G2 m( V; f" w/ j% @$ i4 y
  63. 2 w; |. Y0 y0 g( ^' i# d
  64.   uint32_t RTC_AlarmDateWeekDaySel;  /*!< Specifies the RTC Alarm is on Date or WeekDay.2 `6 T0 b" Z4 O  t. H8 ]# |; m- U
  65.                                      This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */' N) F1 ~" t/ e" C( I
  66. % O* Q+ z% ?9 g4 Q$ {4 A! c
  67.   uint8_t RTC_AlarmDateWeekDay;      /*!< Specifies the RTC Alarm Date/WeekDay.
    9 {; Z) k, |2 q0 J. V6 I0 A: d
  68.                                      If the Alarm Date is selected, this parameter! c, l' ~. q# [* u8 @9 S
  69.                                      must be set to a value in the 1-31 range.  Y# F! a( H. F& z
  70.                                      If the Alarm WeekDay is selected, this
    $ T2 U, O. N3 T# a% v1 b
  71.                                      parameter can be a value of @ref RTC_WeekDay_Definitions */! J) a8 i0 e+ T- G( U3 V! Y: C3 x
  72. }RTC_AlarmTypeDef;
    3 q6 e& x8 m; y: t5 w7 E& g

  73. ( J6 ^& s3 S) v: @
  74. /* Exported constants --------------------------------------------------------*/- j2 t0 ^% V3 ~% h
  75.   h# t  k5 P& H6 P( u  e' u2 w4 _
  76. /** @defgroup RTC_Exported_Constants/ e$ N" E) t1 u7 B2 a2 L" v8 ^
  77.   * @{6 R! _5 T& w, J9 F, a
  78.   */ ) [% N2 ~# O/ D

  79. % x) R9 t7 z' D3 g7 i+ X
  80. : P" m+ O" r/ O. ~4 Y9 R
  81. /** @defgroup RTC_Hour_Formats
      h+ m, F0 q, }: y- z/ Y( r) F
  82.   * @{
    3 t) e3 L5 J5 E" O* v
  83.   */ 5 }! G; e6 n4 |% _$ U% f7 t4 }
  84. #define RTC_HourFormat_24              ((uint32_t)0x00000000)4 K% O. A) [( }& y* t2 u
  85. #define RTC_HourFormat_12              ((uint32_t)0x00000040)
    $ ?$ n$ ?+ v! S6 G9 q9 K
  86. #define IS_RTC_HOUR_FORMAT(FORMAT)     (((FORMAT) == RTC_HourFormat_12) || \
    0 F1 K5 P5 ?. x" C5 T. \
  87.                                         ((FORMAT) == RTC_HourFormat_24))" T& [" y6 N) l7 e0 E# N
  88. /**+ B: I$ E) @8 a4 l* q) M% }$ J
  89.   * @}, t! y! }& D0 C2 ~
  90.   */ 8 n6 ]' h7 @( t2 W0 @5 v/ B' \
  91. $ t. c9 p4 l& Q" B
  92. /** @defgroup RTC_Asynchronous_Predivider
      U- l& f& Y2 `$ k  ?1 N( V
  93.   * @{5 j" x9 l" l  g! s# o
  94.   */ ( H4 N8 V. \" l$ b- x& b
  95. #define IS_RTC_ASYNCH_PREDIV(PREDIV)   ((PREDIV) <= 0x7F)
    ( F5 r2 Q7 ^# k+ V( V
  96. 6 ^; N" Q3 t; i) H3 [8 ~2 Z
  97. /**
    ; h3 G# y; R/ B9 l. v
  98.   * @}' `: _6 g" K  G- y/ w- Z
  99.   */
    ( \+ E# r+ z' W9 H% l$ O

  100. 9 W( p% L$ a* ]
  101. + O+ y0 b& L, P  q" F
  102. /** @defgroup RTC_Synchronous_Predivider
    . u1 _6 S& ~/ X6 m: j+ ]3 I
  103.   * @{* k: g  }; H+ u" S2 z& l
  104.   */
    ) [" v$ t$ f7 r9 }$ ?0 b2 y8 h
  105. #define IS_RTC_SYNCH_PREDIV(PREDIV)    ((PREDIV) <= 0x7FFF), M& f$ e5 W9 I1 J) w4 [

  106. " t" ?0 {3 f7 r/ a. }4 ]* }2 l; |
  107. /**
    & B, }* d8 w4 w- ]5 `& e5 w5 f
  108.   * @}' u, i" a/ V; H; p9 [# l
  109.   */
    1 H0 f( v4 k8 K2 U
  110. ! t. b! Y; r: w
  111. /** @defgroup RTC_Time_Definitions : }3 z' e# g3 a' o2 {
  112.   * @{
    , w2 s+ G5 h4 a: x2 A3 U# q5 E
  113.   */
    $ a! m" t! J* ~7 @- U9 v/ X
  114. #define IS_RTC_HOUR12(HOUR)            (((HOUR) > 0) && ((HOUR) <= 12))% D0 Z  ^  E0 y* Z& ]. U
  115. #define IS_RTC_HOUR24(HOUR)            ((HOUR) <= 23)6 A2 l8 m4 G  F5 y/ e# J
  116. #define IS_RTC_MINUTES(MINUTES)        ((MINUTES) <= 59)( L& f1 D0 |" a% `1 X! S
  117. #define IS_RTC_SECONDS(SECONDS)        ((SECONDS) <= 59)
    , c$ Q5 a9 P; {5 u. g: C, q- }' O6 _

  118. 1 F! @& Q0 m; ~2 ?
  119. /**
    0 |  D% l- J( v$ q
  120.   * @}; W' A$ T3 b+ V' [! g
  121.   */ % q9 X( n, X' k, ?+ h( Z! S$ x, u
  122. " t8 ]$ Q7 M4 g7 h# C, B) h9 ^7 I
  123. /** @defgroup RTC_AM_PM_Definitions , e0 X3 \2 J8 J7 d: U( X& ~* I
  124.   * @{0 [  @' z; j  y" n
  125.   */
    5 ~* |+ d. A( d9 Z2 s3 w
  126. #define RTC_H12_AM                     ((uint8_t)0x00)8 k2 v  _+ a3 O: X3 |9 h
  127. #define RTC_H12_PM                     ((uint8_t)0x40)
    3 _0 k# S# u' q+ `: Z
  128. #define IS_RTC_H12(PM) (((PM) == RTC_H12_AM) || ((PM) == RTC_H12_PM))
    2 O) p$ u" n+ ^
  129. / c  t8 ]* ~# k) K3 s, G, B' ]
  130. /**
    & @4 G' _- x* z
  131.   * @}' k. s- Y9 g. `, D3 w( |; l
  132.   */ - O3 k$ {+ F6 J

  133. & H9 p; ]4 e: I9 d- E9 q) u4 y0 ~
  134. /** @defgroup RTC_Year_Date_Definitions 2 w) ?( B4 {  C$ |7 p# U
  135.   * @{/ W/ P( o$ n5 ~7 _
  136.   */
    + r4 |+ w- K0 A8 j
  137. #define IS_RTC_YEAR(YEAR)              ((YEAR) <= 99)1 z9 l8 Q7 q) T" |! ?4 K' _' ^

  138. + v0 g+ l; h* S" B/ ^9 }* E6 i
  139. /**9 V* y3 D8 I4 q- C2 O
  140.   * @}0 u5 e: J& E9 `" K0 N/ B- R. i4 i  V
  141.   */
      v# M. N. k9 y' z9 H! K7 z* K

  142. 6 p6 Q2 X& a& J! M# B
  143. /** @defgroup RTC_Month_Date_Definitions
    6 J# b* N8 Y* _' T' @+ w
  144.   * @{
    # a1 I* g8 v5 d  x
  145.   */ 7 @$ |2 d- G5 n4 z
  146. # X/ q# @: z: |7 ~" I
  147. /* Coded in BCD format */4 o$ v7 M# ?+ M$ Q, M
  148. #define RTC_Month_January              ((uint8_t)0x01)2 Y/ Z4 C4 O) S7 z4 L
  149. #define RTC_Month_February             ((uint8_t)0x02)
    6 ~. e5 k+ s  j0 s2 m3 t3 D
  150. #define RTC_Month_March                ((uint8_t)0x03)
    8 B% }) i% h; J; T
  151. #define RTC_Month_April                ((uint8_t)0x04)
    5 Z9 I' \) v3 U# d
  152. #define RTC_Month_May                  ((uint8_t)0x05)
    / S2 O8 `/ e- S# d3 Q* U
  153. #define RTC_Month_June                 ((uint8_t)0x06)  J$ x) Q3 [9 W& j4 ^9 O
  154. #define RTC_Month_July                 ((uint8_t)0x07)
    # @/ \' b+ V' y, O" T* S2 F' z+ b
  155. #define RTC_Month_August               ((uint8_t)0x08)( D( D; c" H3 V$ E* h& I
  156. #define RTC_Month_September            ((uint8_t)0x09)
    4 p0 |% M' [! k  |3 g% {
  157. #define RTC_Month_October              ((uint8_t)0x10)5 U% s* w/ M( |1 ]1 K8 Y; v) p
  158. #define RTC_Month_November             ((uint8_t)0x11)1 h8 S' m5 q* c$ ]# G+ R
  159. #define RTC_Month_December             ((uint8_t)0x12)3 k2 S" f. g+ l. }: \; d
  160. #define IS_RTC_MONTH(MONTH)            (((MONTH) >= 1) && ((MONTH) <= 12))
      h* l) D' w# t9 R! F' `
  161. #define IS_RTC_DATE(DATE)              (((DATE) >= 1) && ((DATE) <= 31))) o% @& {: Y, G4 `! `- m

  162. 1 @5 x: \5 c: M  d+ G
  163. /**0 U! d% ~' Z) N) F, ]
  164.   * @}
    ) I. k/ f9 M4 m6 A9 `2 U# p$ L
  165.   */ 1 A, V# V6 b/ J3 y6 M

  166. % p( Z' h% `) F
  167. /** @defgroup RTC_WeekDay_Definitions
    6 s- \5 N, K- U1 w+ P5 X& [
  168.   * @{
    6 t6 B) @* d8 n' `& q
  169.   */
    , R, p- S6 R6 R" b5 G0 d

  170. # N3 F" s* U* O' F" R2 N2 P  N
  171. #define RTC_Weekday_Monday             ((uint8_t)0x01)2 H- y# R" e  k; o2 M
  172. #define RTC_Weekday_Tuesday            ((uint8_t)0x02)
    + U- r  |" J3 t# L$ a1 E6 O
  173. #define RTC_Weekday_Wednesday          ((uint8_t)0x03)
    6 H, H2 A& E5 O, \; P  I
  174. #define RTC_Weekday_Thursday           ((uint8_t)0x04)
    % E1 j& @7 g3 w2 m
  175. #define RTC_Weekday_Friday             ((uint8_t)0x05)
    ! U) G: M& p" K4 S
  176. #define RTC_Weekday_Saturday           ((uint8_t)0x06)
    ! V: q0 ~$ }- Q( m# l* P
  177. #define RTC_Weekday_Sunday             ((uint8_t)0x07); K( p7 |  b+ g" \+ b
  178. #define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_Weekday_Monday) || \5 [/ E  z0 y. u% _" ^4 K* l
  179.                                  ((WEEKDAY) == RTC_Weekday_Tuesday) || \+ g; D+ \) V& s5 a6 @( y
  180.                                  ((WEEKDAY) == RTC_Weekday_Wednesday) || \
    9 |* Z# I4 X. n8 Q2 r
  181.                                  ((WEEKDAY) == RTC_Weekday_Thursday) || \
    & r% Y6 a) f0 }% z) ^6 s3 T  g
  182.                                  ((WEEKDAY) == RTC_Weekday_Friday) || \/ J4 Q2 O  S4 k8 s; d
  183.                                  ((WEEKDAY) == RTC_Weekday_Saturday) || \1 t8 r( ?4 u$ @, M9 _
  184.                                  ((WEEKDAY) == RTC_Weekday_Sunday))
    3 ^7 a: T4 Q  Q3 c
  185. /*** Q; R" ~. _6 A' s" v/ O
  186.   * @}
    0 A0 M) A; K5 ]
  187.   */
    $ F, G3 H! c" o+ j  Z3 \

  188. 3 Y. y. p; y9 A' I8 |; u
  189.   h2 v7 `4 o" G& @. ?' m" A, }
  190. /** @defgroup RTC_Alarm_Definitions* B; j# F; [: @
  191.   * @{
    " ], E: O9 e) i3 _! p9 [/ e+ {; B8 I
  192.   */ - ~( Q1 n- ~0 A2 ]: d* f
  193. #define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) > 0) && ((DATE) <= 31))
    . e0 G' m- S$ U( V. Z3 J/ ?
  194. #define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_Weekday_Monday) || \
    0 C) J" n7 x, z8 G- U( H
  195.                                                     ((WEEKDAY) == RTC_Weekday_Tuesday) || \
    2 a" x, p& K/ U7 G2 v0 ?: H) A0 [* m7 k
  196.                                                     ((WEEKDAY) == RTC_Weekday_Wednesday) || \
    / K7 Y9 V# p, L
  197.                                                     ((WEEKDAY) == RTC_Weekday_Thursday) || \
    $ j( E+ Z8 D2 e" N! Y8 @3 H
  198.                                                     ((WEEKDAY) == RTC_Weekday_Friday) || \
    6 i: ]) I! T+ v# k/ U) T  O
  199.                                                     ((WEEKDAY) == RTC_Weekday_Saturday) || \
    * b: d4 A7 {- }# s, E7 t% o
  200.                                                     ((WEEKDAY) == RTC_Weekday_Sunday))
    8 M4 ?/ d/ o$ \
  201. 3 b5 ^8 Y2 G6 R
  202. /**$ I" Y; r3 ^! Y, `: c2 @2 [
  203.   * @}
    / _/ L- z: F# I$ Y3 s
  204.   */ 7 [' K. e+ H0 g/ f! V8 _1 c

  205. # X( Y2 o0 ~' B) _

  206. 2 U3 m/ `% a6 h( _
  207. /** @defgroup RTC_AlarmDateWeekDay_Definitions
    0 h  u" x6 }( a) j% T$ J
  208.   * @{) V2 r, Y- k% ~$ {
  209.   */ . |  W0 G- n0 z- F
  210. #define RTC_AlarmDateWeekDaySel_Date      ((uint32_t)0x00000000)8 q1 h- I1 T% _: r7 o: J' L% p
  211. #define RTC_AlarmDateWeekDaySel_WeekDay   ((uint32_t)0x40000000)
    + R( V! @  t: V7 e5 K' i# k8 C

  212. + x2 @9 g( d& r0 p5 {7 u& l
  213. #define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_AlarmDateWeekDaySel_Date) || \
    % `% R; A3 v1 E7 s6 ~
  214.                                             ((SEL) == RTC_AlarmDateWeekDaySel_WeekDay))
    8 l' N, x) U/ R; @# l2 U2 {' m* T

  215. # o1 @7 {8 \! T( J7 M6 x
  216. /**
    5 l) J0 H+ z/ k/ J
  217.   * @}
    ; q$ E+ q2 x9 k  i+ u8 R8 m+ W
  218.   */
    ' Z6 M( m! m) y6 N" y; m
  219. 4 h$ v3 L/ Y2 j6 N+ [) L

  220. 2 K8 n( l  |* U* y
  221. /** @defgroup RTC_AlarmMask_Definitions + z% K3 ~/ K7 V$ q, j
  222.   * @{
    7 F0 p4 v5 Y% M" M
  223.   */   c8 s4 ]0 b& n5 x% s( A2 \& h4 r( K
  224. #define RTC_AlarmMask_None                ((uint32_t)0x00000000)" F# `8 Q0 M9 E% K6 O  r* i
  225. #define RTC_AlarmMask_DateWeekDay         ((uint32_t)0x80000000)( `& X; O. r' f' S# t
  226. #define RTC_AlarmMask_Hours               ((uint32_t)0x00800000)
    9 L/ X* A9 M% @* F4 ?, z* |
  227. #define RTC_AlarmMask_Minutes             ((uint32_t)0x00008000)
    7 f0 w; W- N" y+ o; s
  228. #define RTC_AlarmMask_Seconds             ((uint32_t)0x00000080)# o' Y5 z. ~$ x$ g/ M. f. x! h
  229. #define RTC_AlarmMask_All                 ((uint32_t)0x80808080)
    ) J+ a0 ^( C, J" J
  230. #define IS_ALARM_MASK(MASK)  (((MASK) & 0x7F7F7F7F) == (uint32_t)RESET)/ |& p5 a- F8 `$ V

  231. , a' Q. T7 W4 n3 x) w* n2 R
  232. /**2 e% T$ V8 P. T7 G( C4 [
  233.   * @}+ e  b8 K& E3 k* Y, W$ x7 S
  234.   */
    ; ]: M) n* d6 @/ ^- k4 J9 O

  235. # b8 c4 \; {- N% p- d4 w, n
  236. /** @defgroup RTC_Alarms_Definitions
    : t9 x+ H7 d+ t( h" D7 y
  237.   * @{
    4 D) o' U. s# x$ ^* o/ B
  238.   */
    2 ]- d6 g$ d; ~8 O0 N1 s1 ^( P
  239. #define RTC_Alarm_A                       ((uint32_t)0x00000100)
    5 ^6 D; a' M# n8 D' c
  240. #define RTC_Alarm_B                       ((uint32_t)0x00000200); B; x$ a/ E( e, O# t4 m
  241. #define IS_RTC_ALARM(ALARM)     (((ALARM) == RTC_Alarm_A) || ((ALARM) == RTC_Alarm_B))
    " g3 I7 x! n4 f# i2 o' [5 }8 h/ h
  242. #define IS_RTC_CMD_ALARM(ALARM) (((ALARM) & (RTC_Alarm_A | RTC_Alarm_B)) != (uint32_t)RESET)+ {% V9 D' p+ i" h+ U" R
  243. 4 T7 i# c( D+ }5 Z% j
  244. /**7 r% ^+ B  H; E2 k
  245.   * @}& O7 \! e8 L9 i* \, ?1 I
  246.   */ # p. h  u1 j: A7 R

  247. 2 d, d9 G9 X: P0 k6 w* e
  248.   /** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions
    # v& y$ V& n- a) R# o! D
  249.   * @{
    9 e+ y  b9 S" [! M; l9 G: C
  250.   */ ; v8 ?2 z4 ^) h/ F6 I
  251. #define RTC_AlarmSubSecondMask_All         ((uint32_t)0x00000000) /*!< All Alarm SS fields are masked. * Q4 T4 j8 }1 X% t' ]3 q+ x
  252.                                                                        There is no comparison on sub seconds
    7 N/ j+ N: A3 t% X" z) D
  253.                                                                        for Alarm */
    7 l5 b) ^: m9 [+ o6 J1 V3 j
  254. #define RTC_AlarmSubSecondMask_SS14_1      ((uint32_t)0x01000000) /*!< SS[14:1] are don't care in Alarm
    0 S8 Y) I9 R  R# |0 h6 O* X
  255.                                                                        comparison. Only SS[0] is compared. */
    # d2 q- a- g7 o! J2 B( W
  256. #define RTC_AlarmSubSecondMask_SS14_2      ((uint32_t)0x02000000) /*!< SS[14:2] are don't care in Alarm 3 I! P; l9 Z/ H. G0 i
  257.                                                                        comparison. Only SS[1:0] are compared */% \* F1 i2 K7 ]" {2 D- |
  258. #define RTC_AlarmSubSecondMask_SS14_3      ((uint32_t)0x03000000) /*!< SS[14:3] are don't care in Alarm 0 M9 s+ c1 [% X$ M8 [" Y% c
  259.                                                                        comparison. Only SS[2:0] are compared */8 N4 |" \& g: Q6 b8 a3 {
  260. #define RTC_AlarmSubSecondMask_SS14_4      ((uint32_t)0x04000000) /*!< SS[14:4] are don't care in Alarm $ `8 @, Q- V& |3 d7 T) x6 V
  261.                                                                        comparison. Only SS[3:0] are compared */7 p* {3 s0 R5 O" h3 j- C) g
  262. #define RTC_AlarmSubSecondMask_SS14_5      ((uint32_t)0x05000000) /*!< SS[14:5] are don't care in Alarm
    ( Y: m/ n- h3 T, H3 `) S; X
  263.                                                                        comparison. Only SS[4:0] are compared */) k, s5 v8 @3 ]! b% U& Y. R
  264. #define RTC_AlarmSubSecondMask_SS14_6      ((uint32_t)0x06000000) /*!< SS[14:6] are don't care in Alarm
    & |9 A3 t! }6 c# Q+ ?  q
  265.                                                                        comparison. Only SS[5:0] are compared */
    - s' k* d, C5 r: A) A
  266. #define RTC_AlarmSubSecondMask_SS14_7      ((uint32_t)0x07000000) /*!< SS[14:7] are don't care in Alarm 3 u3 l$ d0 O' j1 g3 `
  267.                                                                        comparison. Only SS[6:0] are compared */
    & {$ K2 _% P, U
  268. #define RTC_AlarmSubSecondMask_SS14_8      ((uint32_t)0x08000000) /*!< SS[14:8] are don't care in Alarm
    , s! i) n/ a& C: w$ d
  269.                                                                        comparison. Only SS[7:0] are compared */- m# L4 C0 I. Q6 k9 T
  270. #define RTC_AlarmSubSecondMask_SS14_9      ((uint32_t)0x09000000) /*!< SS[14:9] are don't care in Alarm
    1 a3 L- T& x& I$ B# S, {5 t1 r' V" X
  271.                                                                        comparison. Only SS[8:0] are compared */5 N: q9 i* k. u6 j8 F) ^3 ^
  272. #define RTC_AlarmSubSecondMask_SS14_10     ((uint32_t)0x0A000000) /*!< SS[14:10] are don't care in Alarm
    ' `- a+ L; P! U- o( V3 C- e" M  m
  273.                                                                        comparison. Only SS[9:0] are compared */
    , ~  K" }. V" ^: C/ E* w" U) s* @
  274. #define RTC_AlarmSubSecondMask_SS14_11     ((uint32_t)0x0B000000) /*!< SS[14:11] are don't care in Alarm 3 d2 J. k  h8 n
  275.                                                                        comparison. Only SS[10:0] are compared */' j& g, H+ U& e6 D9 K2 h2 o& v
  276. #define RTC_AlarmSubSecondMask_SS14_12     ((uint32_t)0x0C000000) /*!< SS[14:12] are don't care in Alarm
    $ Z/ j$ g! j! N$ b/ R
  277.                                                                        comparison.Only SS[11:0] are compared */8 X( U" Z2 L8 B4 x5 L
  278. #define RTC_AlarmSubSecondMask_SS14_13     ((uint32_t)0x0D000000) /*!< SS[14:13] are don't care in Alarm
    ( ^. O; h% Z3 G- W4 H4 z
  279.                                                                        comparison. Only SS[12:0] are compared */
    & c7 O, L  w2 ~8 w7 V3 y
  280. #define RTC_AlarmSubSecondMask_SS14        ((uint32_t)0x0E000000) /*!< SS[14] is don't care in Alarm % n2 H' Q9 L4 T4 X* X  w$ G6 A+ `
  281.                                                                        comparison.Only SS[13:0] are compared */
    & l) L# o5 ^9 I0 B- H$ y$ v- Q
  282. #define RTC_AlarmSubSecondMask_None        ((uint32_t)0x0F000000) /*!< SS[14:0] are compared and must match
    % A, a5 s5 A8 _, l4 M: P$ H
  283.                                                                        to activate alarm. */
    , p% w* d7 a7 U. b& ]. w7 ?
  284. #define IS_RTC_ALARM_SUB_SECOND_MASK(MASK)   (((MASK) == RTC_AlarmSubSecondMask_All) || \7 I6 J1 b4 A0 A# q
  285.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_1) || \/ s7 w, i  S6 p: s$ g
  286.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_2) || \/ v/ S; S7 _2 |3 t7 W, E' L
  287.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_3) || \
    ; t9 q) b1 O0 c$ F* ~6 }! J+ L& K
  288.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_4) || \
    - B8 u) N& t9 M) O5 t+ x
  289.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_5) || \9 k3 S, w# u8 ?
  290.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_6) || \
    + K) N6 x, J- F5 I# [
  291.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_7) || \
    ; E0 g! V2 J  r  j
  292.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_8) || \
    . r6 ~' @' s: H# V5 R
  293.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_9) || \
    7 v$ f5 }5 m0 Y3 s8 @4 B( z
  294.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_10) || \
    ; q8 q, c3 W0 \9 E9 M' k
  295.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_11) || \
    7 v4 k$ k, h* ?- P5 T- o
  296.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_12) || \5 v. T( a$ t2 h: D% ]' O6 s! x
  297.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14_13) || \: @7 q1 l7 L/ L& C0 O, M7 t
  298.                                               ((MASK) == RTC_AlarmSubSecondMask_SS14) || \; S; Q6 h1 T5 c  o7 b2 N6 O
  299.                                               ((MASK) == RTC_AlarmSubSecondMask_None))+ Z5 T6 y- X$ Y! q$ t
  300. /**
    9 Z$ ?8 _2 ^0 z, T, S
  301.   * @}
    2 W3 R- J' V# ?" _2 }# S" w3 q
  302.   */
    $ p+ n5 ~8 y, m# U( H, \- G

  303.   Q2 ^' b: X4 ]/ g9 A
  304. /** @defgroup RTC_Alarm_Sub_Seconds_Value
    # |( g4 i' |$ I2 H$ X
  305.   * @{/ r$ _( s( M& R6 ?1 x/ r
  306.   */ & O$ h6 C, `( m9 z: y
  307. ! P" g! Q4 m+ W. j3 U7 b: S
  308. #define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= 0x00007FFF)* J2 m  A' E3 V) v' O

  309. . ?) t* d4 p3 K8 I% r& A
  310. /**# j2 [) h4 a, S! t, A  @
  311.   * @}
    % q1 E- W* m" t) J( `" c
  312.   */
      j4 |# |: M  J0 a& @
  313. 8 B. A3 A* G# H- ^, B
  314. /** @defgroup RTC_Wakeup_Timer_Definitions 5 {. ^/ U5 i3 z' f( d, A- X: }
  315.   * @{
    , [8 o; D; h; t. ]3 {% k& U2 q
  316.   */ 3 z* X+ Y/ j( r
  317. #define RTC_WakeUpClock_RTCCLK_Div16        ((uint32_t)0x00000000)0 [" q: E. k/ p9 ~: ^% M! Q
  318. #define RTC_WakeUpClock_RTCCLK_Div8         ((uint32_t)0x00000001)1 E# b9 w" h+ t
  319. #define RTC_WakeUpClock_RTCCLK_Div4         ((uint32_t)0x00000002)* O& s5 O/ C, ~! c1 g) U& D- k6 J5 T
  320. #define RTC_WakeUpClock_RTCCLK_Div2         ((uint32_t)0x00000003)
    $ w$ n+ R- |0 `0 y5 t0 R! u
  321. #define RTC_WakeUpClock_CK_SPRE_16bits      ((uint32_t)0x00000004). Y- Z1 ?8 w2 X( N9 \
  322. #define RTC_WakeUpClock_CK_SPRE_17bits      ((uint32_t)0x00000006)+ H- z. m6 ^% F' R; w2 ]3 L' I
  323. #define IS_RTC_WAKEUP_CLOCK(CLOCK) (((CLOCK) == RTC_WakeUpClock_RTCCLK_Div16) || \
    & }! Z5 y1 u* ~% m4 Y, A
  324.                                     ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div8) || \) i0 b% P0 R0 S6 \# Q( b
  325.                                     ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div4) || \# \) |' V) k" A% Z2 R: r- H
  326.                                     ((CLOCK) == RTC_WakeUpClock_RTCCLK_Div2) || \
    ' }3 e9 P( Q: G7 }8 L' Q
  327.                                     ((CLOCK) == RTC_WakeUpClock_CK_SPRE_16bits) || \
    . e- O* F8 K! |4 Z8 ]
  328.                                     ((CLOCK) == RTC_WakeUpClock_CK_SPRE_17bits))
    * B. j- w  g5 v2 X# B7 {
  329. #define IS_RTC_WAKEUP_COUNTER(COUNTER)  ((COUNTER) <= 0xFFFF)
    ) B7 m9 O( j5 [* n; v5 c' c  n; \3 O
  330. /**% ]- [' u5 S+ I9 x! s  k
  331.   * @}% w8 p( p% R1 ]+ l0 P0 O" i  A. b; J
  332.   */ * `' S# j" V6 l- R/ N" ], R5 e

  333. 5 l; b& F1 P# A) U; ^* V; l
  334. /** @defgroup RTC_Time_Stamp_Edges_definitions
    0 |/ i/ e' v' Y7 Q& g
  335.   * @{
    7 v# B; [8 h$ t% T' A) m4 m
  336.   */
    ! X0 P, \! {* d5 P; g9 D
  337. #define RTC_TimeStampEdge_Rising          ((uint32_t)0x00000000)
    & `6 E1 r+ y; o7 L
  338. #define RTC_TimeStampEdge_Falling         ((uint32_t)0x00000008)1 l! `  P& h. P# O4 i) O( Z
  339. #define IS_RTC_TIMESTAMP_EDGE(EDGE) (((EDGE) == RTC_TimeStampEdge_Rising) || \
    ) e* P$ K4 y8 f: M# ?
  340.                                      ((EDGE) == RTC_TimeStampEdge_Falling))- D- K8 n+ _! X8 J( Z- Y' ]' x- [
  341. /**  F+ \( G" G% f4 k. F% |
  342.   * @}
    & [% R! y0 T1 H" x9 m/ g
  343.   */ $ V5 C) q2 U# Y9 h9 h9 Q) ]4 v

  344. 6 V: Q- k7 I. N' d
  345. /** @defgroup RTC_Output_selection_Definitions
    ! I8 w4 h4 |/ P5 M
  346.   * @{+ ~2 Q( @8 v) o6 n! @& m" G
  347.   */ . `% X4 F1 R% J0 w" b% o
  348. #define RTC_Output_Disable             ((uint32_t)0x00000000), |  Y; v- ]1 E! f6 U
  349. #define RTC_Output_AlarmA              ((uint32_t)0x00200000)( y, n4 W' h& L+ F6 S( t8 f" l
  350. #define RTC_Output_AlarmB              ((uint32_t)0x00400000)" _+ p( D0 a( ?5 k. i1 I
  351. #define RTC_Output_WakeUp              ((uint32_t)0x00600000)
    % t* L2 T. J4 G; _5 h

  352. * F& Z4 X! o) c/ E
  353. #define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_Output_Disable) || \
    7 A) @" T4 a" m! K1 n
  354.                                ((OUTPUT) == RTC_Output_AlarmA) || \' ]7 |5 S9 H4 V. k9 p
  355.                                ((OUTPUT) == RTC_Output_AlarmB) || \
    1 ~; v& m' P* {% f! ^7 A
  356.                                ((OUTPUT) == RTC_Output_WakeUp))
    * P0 e- b0 i, Y* r

  357. 8 R9 I+ T5 \" m6 c4 @) u
  358. /**
    , a' U; y; ?$ f' h  y
  359.   * @}
    ) u# U! e4 B4 _! e( d3 M& _/ A
  360.   */
    , R2 A7 n, X$ @) ]
  361. . j( i% t6 Y2 d" `8 f# a
  362. /** @defgroup RTC_Output_Polarity_Definitions / Q$ }2 `5 u$ C6 c2 b9 `
  363.   * @{
    9 A& x" \) k7 R1 J% G1 D$ ~
  364.   */ 6 e, V' J0 T4 w2 c% T) r  r0 o' i1 [
  365. #define RTC_OutputPolarity_High           ((uint32_t)0x00000000)
    ! S+ u+ b- b0 g. ]- w0 [
  366. #define RTC_OutputPolarity_Low            ((uint32_t)0x00100000)
    ; K  ^9 v( ]; O
  367. #define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OutputPolarity_High) || \
    5 p7 Z+ P9 J) K, q/ b5 N" n
  368.                                 ((POL) == RTC_OutputPolarity_Low)); a- g; l5 B9 }8 O. [
  369. /**
    * L7 b! ^6 N  O
  370.   * @}) I' z- O! q$ H- c
  371.   */ # h1 |" d: ?( B+ k' _
  372. ) _  Z, m+ m( T3 ^6 s( c+ I

  373. 6 D* c, P3 x4 L
  374. /** @defgroup RTC_Digital_Calibration_Definitions
    7 m* X$ A1 s9 H2 Y( m3 Y
  375.   * @{# x% K- i$ P' n
  376.   */ / j# i: ^" D9 c- V' s8 M( o. A
  377. #define RTC_CalibSign_Positive            ((uint32_t)0x00000000) ; t# f& a$ L. ~8 R, _
  378. #define RTC_CalibSign_Negative            ((uint32_t)0x00000080)
    / j; l7 g6 ^. D
  379. #define IS_RTC_CALIB_SIGN(SIGN) (((SIGN) == RTC_CalibSign_Positive) || \
    - ~: U) f0 a: U) J3 U
  380.                                  ((SIGN) == RTC_CalibSign_Negative))& h& P* }7 L; K  v2 Y
  381. #define IS_RTC_CALIB_VALUE(VALUE) ((VALUE) < 0x20)2 V) y& P" r$ J, \0 K

  382. ' R1 X$ L9 p0 L* H
  383. /**
    ; W: c% m% u6 S: Z# B) w& {8 O! X
  384.   * @}) q4 J; S) z( N% P5 y4 [% N( D
  385.   */ + P0 H) W0 B5 F& s, B
  386. 4 ^3 V3 x( @+ [. j2 E
  387. /** @defgroup RTC_Calib_Output_selection_Definitions
    * j7 y) i' r0 |. n& `/ E5 z, C2 y
  388.   * @{
    4 i6 \2 q! p! W# Y7 Y' V* w
  389.   */ % w7 C5 Y: h( l) X/ `
  390. #define RTC_CalibOutput_512Hz            ((uint32_t)0x00000000) ) }6 @6 i: s- l# s7 c; _( H
  391. #define RTC_CalibOutput_1Hz              ((uint32_t)0x00080000)) Y5 Z9 {0 e: F  N
  392. #define IS_RTC_CALIB_OUTPUT(OUTPUT)  (((OUTPUT) == RTC_CalibOutput_512Hz) || \
    ! Q8 K0 w' ?3 [/ H" z
  393.                                       ((OUTPUT) == RTC_CalibOutput_1Hz))
    1 Q; ~0 g0 q  E; c) B- S
  394. /**
    . i7 _; K/ D( E7 c0 P- ?: x
  395.   * @}
    ; V* o8 g, |. d& z* ]: O
  396.   */
    8 ~; E9 t* F2 [3 z, Y6 N, [" u

  397. 0 c& ?. m, [- g" I1 W
  398. /** @defgroup RTC_Smooth_calib_period_Definitions 8 P) q% X4 d! d! t/ s
  399.   * @{: [; ?. w1 V# O8 U
  400.   */ 1 _  n, H  d0 \* `$ T( H
  401. #define RTC_SmoothCalibPeriod_32sec   ((uint32_t)0x00000000) /*!<  if RTCCLK = 32768 Hz, Smooth calibation' M/ V; d' W2 C8 I6 r9 |9 }
  402.                                                              period is 32s,  else 2exp20 RTCCLK seconds */
    3 I# s: b, ^0 {/ O8 j. B% N
  403. #define RTC_SmoothCalibPeriod_16sec   ((uint32_t)0x00002000) /*!<  if RTCCLK = 32768 Hz, Smooth calibation
    " {" u6 p, E0 w4 k
  404.                                                              period is 16s, else 2exp19 RTCCLK seconds */
    7 n6 ?- \/ Y# s* b4 S2 }. J
  405. #define RTC_SmoothCalibPeriod_8sec    ((uint32_t)0x00004000) /*!<  if RTCCLK = 32768 Hz, Smooth calibation . h: s- Z- N1 S8 l# }! ?: R
  406.                                                              period is 8s, else 2exp18 RTCCLK seconds */3 p) M! Y' Y) @9 W' q# U" d8 z
  407. #define IS_RTC_SMOOTH_CALIB_PERIOD(PERIOD) (((PERIOD) == RTC_SmoothCalibPeriod_32sec) || \
    $ v& e4 F0 H3 w4 b7 M  H
  408.                                              ((PERIOD) == RTC_SmoothCalibPeriod_16sec) || \
    ( e; u% c; a1 S2 K
  409.                                              ((PERIOD) == RTC_SmoothCalibPeriod_8sec))  ]$ r' G" }+ }- \, y: ~3 k! m/ @
  410. 4 B$ }9 w8 o) o4 Q
  411. /**
    7 A  m8 f; i/ l4 ~8 ]- D
  412.   * @}
    & e& s  ?/ H9 L2 f
  413.   */
    % K: ?; f) t' @' Y, b
  414. , P' C8 H0 X8 e, A+ G) O
  415. /** @defgroup RTC_Smooth_calib_Plus_pulses_Definitions
    1 S  q1 F* J# a; ]# r0 J( p1 r/ t
  416.   * @{4 x* \: P) y& E+ H2 T
  417.   */ 8 _) @/ d5 f2 Z! C# j
  418. #define RTC_SmoothCalibPlusPulses_Set    ((uint32_t)0x00008000) /*!<  The number of RTCCLK pulses added  
    / J6 b# y0 S/ W: a" t
  419.                                                                 during a X -second window = Y - CALM[8:0]. & J- p0 H& i$ a
  420.                                                                  with Y = 512, 256, 128 when X = 32, 16, 8 */
    ; p& e% q& }6 g# E
  421. #define RTC_SmoothCalibPlusPulses_Reset  ((uint32_t)0x00000000) /*!<  The number of RTCCLK pulses subbstited$ p% e" m0 D! M6 a# I. v
  422.                                                                  during a 32-second window =   CALM[8:0]. */7 |# [% A1 ~' @# w8 h7 b
  423. #define IS_RTC_SMOOTH_CALIB_PLUS(PLUS) (((PLUS) == RTC_SmoothCalibPlusPulses_Set) || \
    " [" T. X. S: |1 `  h2 g* y* X. Y
  424.                                          ((PLUS) == RTC_SmoothCalibPlusPulses_Reset))5 [3 W& m. U+ ^% S% H8 U
  425. 5 u' U; [( T; N8 R6 T
  426. /**
    + V7 X  ~, q; o/ l3 o
  427.   * @}
    8 O6 T& a' r2 _. p6 E
  428.   */ + s( e9 t# `1 F& N

  429. $ V/ L% r, H$ e# u- x
  430. /** @defgroup RTC_Smooth_calib_Minus_pulses_Definitions ( S2 n% |; g, Y! Q; C
  431.   * @{6 ?  O& Y, x2 ^/ t  F! b3 P
  432.   */
    % F) x( l+ r  w8 K
  433. #define  IS_RTC_SMOOTH_CALIB_MINUS(VALUE) ((VALUE) <= 0x000001FF)
    . z7 ^3 X+ d8 h5 _! p
  434. , z) P$ e. g5 {" y3 ?
  435. /**
    6 j0 s  y! d4 R, q& w" ^
  436.   * @}
    $ K3 ^1 i5 r9 |( x* x1 k( R# k
  437.   */
    0 S( A  |, n$ S) u' o- W/ v( l" _
  438. 5 n+ m, ]! _/ u9 v' k2 R) j
  439. /** @defgroup RTC_DayLightSaving_Definitions
    6 @+ f0 M. h/ y$ q
  440.   * @{6 C; J! m2 F/ m+ B+ C. w  L
  441.   */ 0 O! l1 M. Q, Z2 |. l  Z3 l3 r
  442. #define RTC_DayLightSaving_SUB1H   ((uint32_t)0x00020000)8 M. h4 k3 `, |
  443. #define RTC_DayLightSaving_ADD1H   ((uint32_t)0x00010000)( l5 @! e6 P: ]; }
  444. #define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DayLightSaving_SUB1H) || \$ ~; s2 J; D3 V; M/ x2 N7 P$ `
  445.                                       ((SAVE) == RTC_DayLightSaving_ADD1H))
    , K& O% o) c" d' s
  446. , R& ~* z4 d* G, O
  447. #define RTC_StoreOperation_Reset        ((uint32_t)0x00000000). E* \. H3 q0 M& u
  448. #define RTC_StoreOperation_Set          ((uint32_t)0x00040000)8 ]" O7 ~' o/ z4 h2 W7 P
  449. #define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_StoreOperation_Reset) || \( v8 t* a1 Q5 M5 ]( B
  450.                                            ((OPERATION) == RTC_StoreOperation_Set))5 ~( E$ P/ B4 q) K
  451. /**
    & |% z: @& s) H" Z
  452.   * @}
    5 R: ?& \4 o+ k; }
  453.   */ ; l, [7 h2 e& v0 J: x
  454. & Q! R* c" \$ `
  455. /** @defgroup RTC_Tamper_Trigger_Definitions ) Q, `5 {; R2 P
  456.   * @{9 `4 r% G) Q# X7 L
  457.   */
    ( R# k1 R8 Z' H7 [3 H$ `% Z
  458. #define RTC_TamperTrigger_RisingEdge            ((uint32_t)0x00000000)
    * {- ?% @9 }5 `! x+ C5 `
  459. #define RTC_TamperTrigger_FallingEdge           ((uint32_t)0x00000001)' j: Z1 Z6 y3 E( a5 ]
  460. #define RTC_TamperTrigger_LowLevel              ((uint32_t)0x00000000)
    5 T$ j: `# J1 Q, R% m2 |
  461. #define RTC_TamperTrigger_HighLevel             ((uint32_t)0x00000001): O1 W$ T# J1 `' c% k9 ~
  462. #define IS_RTC_TAMPER_TRIGGER(TRIGGER) (((TRIGGER) == RTC_TamperTrigger_RisingEdge) || \
    3 P$ A, ]2 {3 T+ ^" i/ \/ c; z
  463.                                         ((TRIGGER) == RTC_TamperTrigger_FallingEdge) || \7 j8 X. w  D! P% Z0 a% ~
  464.                                         ((TRIGGER) == RTC_TamperTrigger_LowLevel) || \
    ) Q9 p* m$ a0 h9 w
  465.                                         ((TRIGGER) == RTC_TamperTrigger_HighLevel))
    & R# k  H* ^& s4 P, P7 k
  466. # Y/ X- A3 P6 E5 V
  467. /**
    9 d9 x& J, x2 \! G. u5 n3 y2 R
  468.   * @}
      f6 ~! Y" K- i4 _  z
  469.   */ 7 j2 ?- f, Y! a/ m* C- Y' A9 ~" Y0 w
  470. ; ?% ?- c& X/ h( ]
  471. /** @defgroup RTC_Tamper_Filter_Definitions 3 X  b5 @" q" n  G1 o5 X; Q
  472.   * @{
    : B8 j, I7 }' Y) Y1 W
  473.   */ & k" v  R, s% Z$ ^
  474. #define RTC_TamperFilter_Disable   ((uint32_t)0x00000000) /*!< Tamper filter is disabled */
    7 \; n4 P* U- ]- N

  475. ( ^; U' S5 B7 p
  476. #define RTC_TamperFilter_2Sample   ((uint32_t)0x00000800) /*!< Tamper is activated after 2
    ( Z" u, g, U- a' W/ @
  477.                                                           consecutive samples at the active level */8 S, ]+ p9 f, n$ }
  478. #define RTC_TamperFilter_4Sample   ((uint32_t)0x00001000) /*!< Tamper is activated after 4
    . c! n, ^6 @# U
  479.                                                           consecutive samples at the active level */; N" A% |) q5 a& v4 ?$ }
  480. #define RTC_TamperFilter_8Sample   ((uint32_t)0x00001800) /*!< Tamper is activated after 8
    ! \* I9 j1 a/ g, C0 W3 ^  ~
  481.                                                           consecutive samples at the active leve. */1 d) j  ~+ \- ?* l5 f$ s% k5 \% }
  482. #define IS_RTC_TAMPER_FILTER(FILTER) (((FILTER) == RTC_TamperFilter_Disable) || \
    5 Q- q* t: m+ l0 s3 t' e& j1 O0 [
  483.                                       ((FILTER) == RTC_TamperFilter_2Sample) || \9 R) ?- }7 ^3 E2 V' w, A/ g
  484.                                       ((FILTER) == RTC_TamperFilter_4Sample) || \8 f; |/ F+ ^' u
  485.                                       ((FILTER) == RTC_TamperFilter_8Sample))
    + Z; i1 g8 s' J1 q; F; C
  486. /**
      s( ^2 a: W$ K6 q8 h
  487.   * @}! \0 ~( W2 b5 C. P1 s) x
  488.   */ : U' G, \6 w" P3 o: |
  489. 0 [4 h. P% t9 p" @  J: |3 a
  490. /** @defgroup RTC_Tamper_Sampling_Frequencies_Definitions
    7 R# \( U) j. v, @9 L
  491.   * @{& P$ ]( U% h# h
  492.   */ , B; n" y8 K& d9 Q* X# Y3 h' X
  493. #define RTC_TamperSamplingFreq_RTCCLK_Div32768  ((uint32_t)0x00000000) /*!< Each of the tamper inputs are sampled
    , r+ E- r- W- f
  494.                                                                            with a frequency =  RTCCLK / 32768 */7 [& W0 Q) y. |% q: j
  495. #define RTC_TamperSamplingFreq_RTCCLK_Div16384  ((uint32_t)0x000000100) /*!< Each of the tamper inputs are sampled) p2 g% ]8 x- v+ U6 f
  496.                                                                             with a frequency =  RTCCLK / 16384 */* Z9 i7 Y" U! Z( k! @6 h
  497. #define RTC_TamperSamplingFreq_RTCCLK_Div8192   ((uint32_t)0x00000200) /*!< Each of the tamper inputs are sampled
    4 \$ j7 t, b5 C# j8 D( G/ Y
  498.                                                                            with a frequency =  RTCCLK / 8192  */2 D- R; \* Z. U; E  n+ R/ M
  499. #define RTC_TamperSamplingFreq_RTCCLK_Div4096   ((uint32_t)0x00000300) /*!< Each of the tamper inputs are sampled
    0 Q2 C1 y5 ^0 d6 P6 P7 I+ s
  500.                                                                            with a frequency =  RTCCLK / 4096  */* C0 z5 v$ S: g: h& k- \
  501. #define RTC_TamperSamplingFreq_RTCCLK_Div2048   ((uint32_t)0x00000400) /*!< Each of the tamper inputs are sampled
    0 O1 t3 z  v% g0 o% _9 z
  502.                                                                            with a frequency =  RTCCLK / 2048  */
    ; z# l- I7 D! \; x) S
  503. #define RTC_TamperSamplingFreq_RTCCLK_Div1024   ((uint32_t)0x00000500) /*!< Each of the tamper inputs are sampled
    : t" h# v6 F* a# X3 D
  504.                                                                            with a frequency =  RTCCLK / 1024  */
      z% J; T. n2 N) d- S7 m  ~) x4 P
  505. #define RTC_TamperSamplingFreq_RTCCLK_Div512    ((uint32_t)0x00000600) /*!< Each of the tamper inputs are sampled
    / A! d/ v1 F+ v
  506.                                                                            with a frequency =  RTCCLK / 512   */7 _6 z$ O, G- Z$ ]+ {
  507. #define RTC_TamperSamplingFreq_RTCCLK_Div256    ((uint32_t)0x00000700) /*!< Each of the tamper inputs are sampled6 ^' p* F" ?" O- b: ]
  508.                                                                            with a frequency =  RTCCLK / 256   */
    ) x3 J. i/ D3 O( F" |$ o: j& ~: S9 M
  509. #define IS_RTC_TAMPER_SAMPLING_FREQ(FREQ) (((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div32768) || \! x$ D8 }5 w+ ~! a% S6 Z5 G
  510.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div16384) || \7 h$ `% c3 |' }$ n* i5 \5 d/ e( u
  511.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div8192) || \4 T% s8 P* z" i: ^) v
  512.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div4096) || \; U7 Y3 q" l7 z2 D
  513.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div2048) || \
    " x9 i  o& z6 p0 s9 a. q+ G/ t$ }+ U
  514.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div1024) || \
    1 _) i8 w+ }# @& r, B( c. H
  515.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div512) || \
    ) U; I( q: X: _
  516.                                            ((FREQ) ==RTC_TamperSamplingFreq_RTCCLK_Div256))
    # Q9 @9 Q# i/ Q9 x- Y* ]) o! |
  517.   U$ r6 K7 |" B' |& V# \9 F
  518. /**# I+ L, s) p5 [7 w
  519.   * @}, a& D$ d& W" c0 x) J5 d  n
  520.   */
    3 P$ g8 o0 k/ U( k

  521. ' h  R! \. b. ]% x
  522.   /** @defgroup RTC_Tamper_Pin_Precharge_Duration_Definitions 4 p+ E* a% X  ?* X* P! n, b
  523.   * @{
    , G& }8 A$ s# Y
  524.   */ " c( z7 {1 a  @1 p" r
  525. #define RTC_TamperPrechargeDuration_1RTCCLK ((uint32_t)0x00000000)  /*!< Tamper pins are pre-charged before
    " T; L& B, r7 i2 t- {/ m6 Y/ ?
  526.                                                                          sampling during 1 RTCCLK cycle */
    5 \3 z: l  {$ J
  527. #define RTC_TamperPrechargeDuration_2RTCCLK ((uint32_t)0x00002000)  /*!< Tamper pins are pre-charged before
      f8 E) V7 B, M% u: L& t3 V, C  O" I
  528.                                                                          sampling during 2 RTCCLK cycles */
    5 g6 c8 y! z7 X% u* m1 D
  529. #define RTC_TamperPrechargeDuration_4RTCCLK ((uint32_t)0x00004000)  /*!< Tamper pins are pre-charged before
    ; L9 Y- i3 {! S3 O
  530.                                                                          sampling during 4 RTCCLK cycles */
    2 y0 b5 D8 q5 a1 i, q7 h
  531. #define RTC_TamperPrechargeDuration_8RTCCLK ((uint32_t)0x00006000)  /*!< Tamper pins are pre-charged before 5 f' s& r7 K8 F. V3 L
  532.                                                                          sampling during 8 RTCCLK cycles */9 J( [# g9 V/ Q9 V* ~! S: d" L7 q

  533. $ x- X9 L7 J0 V6 K$ [2 Y7 `
  534. #define IS_RTC_TAMPER_PRECHARGE_DURATION(DURATION) (((DURATION) == RTC_TamperPrechargeDuration_1RTCCLK) || \
    , b5 a0 s( ]8 {
  535.                                                     ((DURATION) == RTC_TamperPrechargeDuration_2RTCCLK) || \
    ! ?2 u/ _) n6 y- N* L
  536.                                                     ((DURATION) == RTC_TamperPrechargeDuration_4RTCCLK) || \6 Q% Z8 I  g- x# }6 o
  537.                                                     ((DURATION) == RTC_TamperPrechargeDuration_8RTCCLK))8 j+ A. X8 ]! `( U6 H4 n; K( y
  538. /**
    * I* W, d% `3 C+ x5 D5 `
  539.   * @}8 K1 G7 P% V% R) M7 A
  540.   */; }+ [7 w( Z6 e( b/ D5 D# V) W2 T' C

  541. & T5 w9 }% b0 f4 x
  542. /** @defgroup RTC_Tamper_Pins_Definitions ' O8 F5 P8 u4 s7 b
  543.   * @{
    6 v5 U4 `, U7 t
  544.   */ - H+ H) v4 \8 t- \. V  y" X
  545. #define RTC_Tamper_1                    RTC_TAFCR_TAMP1E1 K+ s- i/ Y/ u
  546. #define IS_RTC_TAMPER(TAMPER) (((TAMPER) == RTC_Tamper_1))2 l! G6 {) v4 S6 w4 _, ]" x" K

  547. 9 Q7 `0 J9 F% y, h2 y8 Q
  548. /**& r5 |  {6 ]' C9 w7 p$ v
  549.   * @}- V1 w/ Y2 T! l! t8 b" V
  550.   */
    " r1 o# s6 _) H( P

  551. # t: z1 S1 \0 A5 I
  552. /** @defgroup RTC_Tamper_Pin_Selection : @; v; T) ^9 j) w7 A6 H' h
  553.   * @{
    6 s' k5 F3 W# C7 n/ x  Z
  554.   */ $ M5 ?% }" B# S3 y3 U4 n' ^7 P
  555. #define RTC_TamperPin_PC13                 ((uint32_t)0x00000000), @& A: \$ D+ L# e' C+ L3 d. w
  556. #define RTC_TamperPin_PI8                  ((uint32_t)0x00010000)7 |8 Z/ I) Y& a% ~& s
  557. #define IS_RTC_TAMPER_PIN(PIN) (((PIN) == RTC_TamperPin_PC13) || \; s) |$ l. A2 n1 ~# o# F1 j
  558.                                 ((PIN) == RTC_TamperPin_PI8))
    . M  r% X: o: r  e+ w
  559. /**
    0 _: R6 j2 b& x
  560.   * @}
    % V; X+ B) x" ?. R, ?
  561.   */
    7 W6 m0 x, b" Z% \
  562. * E3 f4 U' [6 |3 ]& O
  563. /** @defgroup RTC_TimeStamp_Pin_Selection " D+ D2 d- {( S6 a8 n& v& C: R
  564.   * @{% @- z5 A* \$ f7 i* U9 ]
  565.   */ 7 D. s6 {9 n1 Q) h% p+ N1 w. R
  566. #define RTC_TimeStampPin_PC13              ((uint32_t)0x00000000)
    ; Y+ X2 {, T7 T  _! n) e3 g$ K/ ~
  567. #define RTC_TimeStampPin_PI8               ((uint32_t)0x00020000); y. @. q) S1 U- M# @. i( _
  568. #define IS_RTC_TIMESTAMP_PIN(PIN) (((PIN) == RTC_TimeStampPin_PC13) || \: _9 h1 j% s3 R& K8 b, z
  569.                                    ((PIN) == RTC_TimeStampPin_PI8))
    7 C+ k4 a# t* \6 f. T3 K2 i9 L
  570. /**
    & w; }. l0 ?4 z5 L
  571.   * @}9 j) B& F! V6 ?& u% u1 d- m
  572.   */
    7 ]! r; d7 E. k

  573. # D- K! \" T& z
  574. /** @defgroup RTC_Output_Type_ALARM_OUT
    # w; @8 `+ e1 n7 o- i4 Z" N
  575.   * @{
    0 Y; J! s- D0 X$ T7 m
  576.   */ 2 [) ]# B3 w" a! L$ s
  577. #define RTC_OutputType_OpenDrain           ((uint32_t)0x00000000)
    2 ^; ?8 D) K* X7 v
  578. #define RTC_OutputType_PushPull            ((uint32_t)0x00040000)
    # w+ {: k( T, j' u) L& E
  579. #define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OutputType_OpenDrain) || \8 g3 B3 L6 {4 ?
  580.                                   ((TYPE) == RTC_OutputType_PushPull))* s- s% T* U4 B. z9 r" O) W

  581. 4 v; S; w* ]" e8 f
  582. /**
    & `  J4 {5 y3 h  G0 a2 g+ }+ ]
  583.   * @}
    3 x  p( U' O0 U0 Z& k
  584.   */
    9 |. |4 }2 o& U- e& j0 X4 X' B* X4 ^
  585.   r' ~' I1 I% ?4 U4 p2 `
  586. /** @defgroup RTC_Add_1_Second_Parameter_Definitions$ Q" D% R# B0 z1 h, x8 ]4 x' j
  587.   * @{
    * [8 v( \9 s0 ~
  588.   */
    - c* L7 @! h0 Q+ n
  589. #define RTC_ShiftAdd1S_Reset      ((uint32_t)0x00000000)& ^9 k- a. I. h3 W+ ?4 h
  590. #define RTC_ShiftAdd1S_Set        ((uint32_t)0x80000000)
    4 C" G. J( Z3 B" f$ \" w  h
  591. #define IS_RTC_SHIFT_ADD1S(SEL) (((SEL) == RTC_ShiftAdd1S_Reset) || \: L5 R% q7 G9 d- d/ |7 v  k
  592.                                  ((SEL) == RTC_ShiftAdd1S_Set))
    . V5 ?3 {5 O. V$ B" {/ }$ _
  593. /**
    ' B8 U  o1 ]0 F+ T
  594.   * @}
    8 V& B" q% ?% J: Q' i  j, O. M
  595.   */
    9 _. r! m2 h7 k! v( K4 W

  596.   a: N: o2 P6 G: ^2 Q
  597. /** @defgroup RTC_Substract_Fraction_Of_Second_Value- K/ }+ z. s- w7 S  A6 v, G
  598.   * @{# X' F( c4 [/ |! t4 q
  599.   */
    4 }5 W& e- D; f2 d0 ]( Y! K2 X# E. x
  600. #define IS_RTC_SHIFT_SUBFS(FS) ((FS) <= 0x00007FFF)
    4 S# E: W3 H- P6 N- f

  601. 5 U  p( ~) A3 f" g( w( X
  602. /**
    ( O# q8 r9 P/ C5 Z: v8 w! q5 f
  603.   * @}
    - C0 p. x) x, k: J4 }1 @
  604.   */
    2 p) e" Q& z" K  @, E$ q

  605. 7 y6 U& v5 y  R
  606. /** @defgroup RTC_Backup_Registers_Definitions
      z; c$ k2 ?4 |; q# f. @
  607.   * @{
    / I/ X4 V& }8 p
  608.   */
    ( p* n  g' M+ D7 ]* t6 R' d
  609. 5 M* e5 n5 g) V: Z, @& ^' q# t
  610. #define RTC_BKP_DR0                       ((uint32_t)0x00000000)
    " `# ?  O; T3 g1 G. p3 L/ y
  611. #define RTC_BKP_DR1                       ((uint32_t)0x00000001)+ ^6 Q! f: I1 h# c
  612. #define RTC_BKP_DR2                       ((uint32_t)0x00000002). e/ W) y# C$ F+ z! }- i% v. s
  613. #define RTC_BKP_DR3                       ((uint32_t)0x00000003); ?4 _+ ~0 Q" {7 V4 V" D/ f# h
  614. #define RTC_BKP_DR4                       ((uint32_t)0x00000004)2 X; G. s( ], L! B0 m
  615. #define RTC_BKP_DR5                       ((uint32_t)0x00000005)/ k+ r$ ?0 l5 z3 L. v8 S1 p
  616. #define RTC_BKP_DR6                       ((uint32_t)0x00000006)3 j* e3 J' i/ [
  617. #define RTC_BKP_DR7                       ((uint32_t)0x00000007)2 o# O* V* l/ L/ X7 w( B2 }. F
  618. #define RTC_BKP_DR8                       ((uint32_t)0x00000008)0 ^0 k! ]. T- H8 N7 y0 }
  619. #define RTC_BKP_DR9                       ((uint32_t)0x00000009)
    2 i# x4 Y% n+ n1 A
  620. #define RTC_BKP_DR10                      ((uint32_t)0x0000000A); _0 M; z0 P7 A# r+ a
  621. #define RTC_BKP_DR11                      ((uint32_t)0x0000000B)
    3 P" H! S' u$ j5 ^
  622. #define RTC_BKP_DR12                      ((uint32_t)0x0000000C)2 W8 X7 W, U4 k4 N
  623. #define RTC_BKP_DR13                      ((uint32_t)0x0000000D). ~: u; |/ @% y. |
  624. #define RTC_BKP_DR14                      ((uint32_t)0x0000000E)' K% I; V/ R3 t* B  Q- x/ f
  625. #define RTC_BKP_DR15                      ((uint32_t)0x0000000F)
    1 [8 L! t* j3 U6 y( @  T; E$ A
  626. #define RTC_BKP_DR16                      ((uint32_t)0x00000010)
    4 ]. X0 Y8 o. {7 s% b+ w
  627. #define RTC_BKP_DR17                      ((uint32_t)0x00000011)
    - }" C. A, \, e- |
  628. #define RTC_BKP_DR18                      ((uint32_t)0x00000012)6 L# P: @( Y& z
  629. #define RTC_BKP_DR19                      ((uint32_t)0x00000013)
      h: }/ T; F# @* A
  630. #define IS_RTC_BKP(BKP)                   (((BKP) == RTC_BKP_DR0) || \
    $ P4 y0 K' t8 g  i0 D! y
  631.                                            ((BKP) == RTC_BKP_DR1) || \
    ! n/ R4 P' V% N4 q
  632.                                            ((BKP) == RTC_BKP_DR2) || \6 ~# i8 y# \  {, l& S" F+ m7 |
  633.                                            ((BKP) == RTC_BKP_DR3) || \' x8 e- D4 c' C' C7 }
  634.                                            ((BKP) == RTC_BKP_DR4) || \1 q6 }1 R) i* t" L( L
  635.                                            ((BKP) == RTC_BKP_DR5) || \
    - L$ J) z3 f+ u5 P. P: `( {2 y
  636.                                            ((BKP) == RTC_BKP_DR6) || \
    # t" _+ X) g( z4 Z% v) U; {
  637.                                            ((BKP) == RTC_BKP_DR7) || \6 a/ X: B: O; C  Z- z
  638.                                            ((BKP) == RTC_BKP_DR8) || \3 x# I, W7 N) F$ ^2 u- J
  639.                                            ((BKP) == RTC_BKP_DR9) || \
    & u* J7 t1 W  {" ^
  640.                                            ((BKP) == RTC_BKP_DR10) || \2 F$ l8 ?+ Y7 T3 ?
  641.                                            ((BKP) == RTC_BKP_DR11) || \0 H; a8 C$ V' Q. \5 Q& e
  642.                                            ((BKP) == RTC_BKP_DR12) || \
    7 N! ^1 y: C0 a
  643.                                            ((BKP) == RTC_BKP_DR13) || \3 R+ U+ P$ r& z3 P) W0 Y$ g, a, y
  644.                                            ((BKP) == RTC_BKP_DR14) || \
    . k" |0 j) @) P4 K# L
  645.                                            ((BKP) == RTC_BKP_DR15) || \
    : R1 i) o) E9 Z0 ~
  646.                                            ((BKP) == RTC_BKP_DR16) || \9 ~: R2 w9 R" |; q- |$ ^
  647.                                            ((BKP) == RTC_BKP_DR17) || \9 m" T' Y: g! ?# `8 U0 s
  648.                                            ((BKP) == RTC_BKP_DR18) || \
    + T' x) r7 U- z
  649.                                            ((BKP) == RTC_BKP_DR19))! b. I; R/ ]: Z+ U8 t- d
  650. /**- U5 N. f% e1 f/ Q2 F  ^3 K- x/ F
  651.   * @}
    * G1 h5 ]1 Z8 s5 Q
  652.   */ 8 o) y; x" B/ r: L1 y

  653. 0 w2 M4 B4 S8 T- B
  654. /** @defgroup RTC_Input_parameter_format_definitions 4 ~) s" L  n; ]$ q
  655.   * @{. @, F* G" L, _9 m3 b  H5 p) }0 a; R
  656.   */ $ ?& }" v9 x  ^% I, n. O
  657. #define RTC_Format_BIN                    ((uint32_t)0x000000000)5 W# b7 g" b0 y( D  C
  658. #define RTC_Format_BCD                    ((uint32_t)0x000000001)
    8 h6 D4 S5 m9 `8 {6 k# H7 F
  659. #define IS_RTC_FORMAT(FORMAT) (((FORMAT) == RTC_Format_BIN) || ((FORMAT) == RTC_Format_BCD))8 `8 N6 r2 p( }7 ~3 I

  660. 7 k# R, P& w5 i& N. X
  661. /**
    7 _  _! a0 H: p
  662.   * @}
    ; c2 m2 m% K9 y& d* d
  663.   */ ( d( X  e- a' }' k
  664. 3 M; y3 N  _1 k$ c0 n! r5 u
  665. /** @defgroup RTC_Flags_Definitions
    1 V2 [) V6 d. K% ^" e9 M
  666.   * @{8 z6 P, M3 {. f* X8 o- i, g5 ^; P
  667.   */
    8 k% t) v4 S, J
  668. #define RTC_FLAG_RECALPF                  ((uint32_t)0x00010000)
    2 b# ^/ _1 G$ o1 E4 {8 ^' m& i( Q4 Z/ ?
  669. #define RTC_FLAG_TAMP1F                   ((uint32_t)0x00002000): R( |+ r  h" C# X
  670. #define RTC_FLAG_TSOVF                    ((uint32_t)0x00001000)
    9 m$ e+ b* N) D5 X7 X3 B6 ?6 a
  671. #define RTC_FLAG_TSF                      ((uint32_t)0x00000800)
    / l3 P% x' E# y+ Y! i4 M1 k
  672. #define RTC_FLAG_WUTF                     ((uint32_t)0x00000400)
    0 ?- s+ _0 k5 W0 s& R" _+ ~
  673. #define RTC_FLAG_ALRBF                    ((uint32_t)0x00000200)
    5 M4 ]# U: D8 g# S1 X
  674. #define RTC_FLAG_ALRAF                    ((uint32_t)0x00000100)
    + Z" w: R% L) t  ^- p
  675. #define RTC_FLAG_INITF                    ((uint32_t)0x00000040)) Q8 _7 z: P, p0 l. X
  676. #define RTC_FLAG_RSF                      ((uint32_t)0x00000020)9 J* Q8 q) `: A. z) v% S; i$ Y
  677. #define RTC_FLAG_INITS                    ((uint32_t)0x00000010)5 x% g; O# G% I& w
  678. #define RTC_FLAG_SHPF                     ((uint32_t)0x00000008)
    % L4 v: z0 K7 I2 N
  679. #define RTC_FLAG_WUTWF                    ((uint32_t)0x00000004)
    % l1 C7 Z9 m: S' H% _: P4 i' A
  680. #define RTC_FLAG_ALRBWF                   ((uint32_t)0x00000002)
    5 |. o' Z9 p, Q- Y* B4 m
  681. #define RTC_FLAG_ALRAWF                   ((uint32_t)0x00000001)  N* g" \1 p! Q$ x% b% v) ^9 U
  682. #define IS_RTC_GET_FLAG(FLAG) (((FLAG) == RTC_FLAG_TSOVF) || ((FLAG) == RTC_FLAG_TSF) || \
    8 M# Q# {5 r0 k; [6 g$ ^  M; M" r
  683.                                ((FLAG) == RTC_FLAG_WUTF) || ((FLAG) == RTC_FLAG_ALRBF) || \  J/ U( c. @% H- s. G
  684.                                ((FLAG) == RTC_FLAG_ALRAF) || ((FLAG) == RTC_FLAG_INITF) || \1 A% Y9 t! C( b; U: y
  685.                                ((FLAG) == RTC_FLAG_RSF) || ((FLAG) == RTC_FLAG_WUTWF) || \
    ' h: O2 S/ H$ E; a0 N% Y# ^; o, r
  686.                                ((FLAG) == RTC_FLAG_ALRBWF) || ((FLAG) == RTC_FLAG_ALRAWF) || \6 B$ E5 i  u% E9 M7 n- I
  687.                                ((FLAG) == RTC_FLAG_TAMP1F) || ((FLAG) == RTC_FLAG_RECALPF) || \* K4 @8 ~8 F0 V  ~, |% }0 b, h
  688.                                 ((FLAG) == RTC_FLAG_SHPF))
    , x- m- f/ X( m
  689. #define IS_RTC_CLEAR_FLAG(FLAG) (((FLAG) != (uint32_t)RESET) && (((FLAG) & 0xFFFF00DF) == (uint32_t)RESET))) U; L3 I& ]* \$ ^6 f; C6 J0 v7 t
  690. /**
    2 n7 x# K; X4 P5 P9 K/ r
  691.   * @}
    % \7 u6 \, [" _/ q% A: H' T
  692.   */
    2 F, U/ z0 y+ R1 r( ]& N, g

  693. # Z, b& [8 ^* a  O
  694. /** @defgroup RTC_Interrupts_Definitions 3 I: y0 F/ U* K% \1 r6 x
  695.   * @{
    ' s, h* w' i/ ?" s
  696.   */ 2 _" ?/ h; u; [. X9 K- f
  697. #define RTC_IT_TS                         ((uint32_t)0x00008000)3 _# w. B3 s+ c, v" Z" n% b
  698. #define RTC_IT_WUT                        ((uint32_t)0x00004000)
    ! c" s7 ^( d- v, p
  699. #define RTC_IT_ALRB                       ((uint32_t)0x00002000)1 C9 r6 t8 n1 [0 V6 T7 |
  700. #define RTC_IT_ALRA                       ((uint32_t)0x00001000)6 b' G( }" C7 Q
  701. #define RTC_IT_TAMP                       ((uint32_t)0x00000004) /* Used only to Enable the Tamper Interrupt */
    & p, K6 i+ h1 G& u6 [$ F: v  |
  702. #define RTC_IT_TAMP1                      ((uint32_t)0x00020000)' s6 |1 n7 @- N' T+ B! k# [

  703. " t4 {) o6 _6 Q# Y' w/ r( D5 Z
  704. #define IS_RTC_CONFIG_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFF0FFB) == (uint32_t)RESET))8 k0 w5 W+ `/ k" \3 W* c
  705. #define IS_RTC_GET_IT(IT) (((IT) == RTC_IT_TS) || ((IT) == RTC_IT_WUT) || \# p! Z) p  Y) D& @& f8 b5 q
  706.                            ((IT) == RTC_IT_ALRB) || ((IT) == RTC_IT_ALRA) || \( b" C- \2 d7 C; B* o5 c! g* o
  707.                            ((IT) == RTC_IT_TAMP1))8 p0 k( i& v7 g* q5 n5 t. ^/ Z0 n+ r
  708. #define IS_RTC_CLEAR_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFD0FFF) == (uint32_t)RESET))  ]# n; \: ~" n( Z

  709. ( Z0 K$ n( B0 u, S7 M
  710. /**9 d, a4 V! V5 o
  711.   * @}3 b/ Q6 x5 D* E# b/ W9 i6 z+ j
  712.   */
    % l' a& q, H( r; `
  713. ) c, V; P, n/ `% e) ^% \# V3 L% B
  714. /** @defgroup RTC_Legacy - d; R% [* T: D6 p) m+ |7 N9 H' t
  715.   * @{# q2 l& u7 \3 F
  716.   */
    : a- ?, ~+ H3 k! x3 U7 Q0 \9 F
  717. #define RTC_DigitalCalibConfig  RTC_CoarseCalibConfig
    " T! C* u0 F; t% H% S
  718. #define RTC_DigitalCalibCmd     RTC_CoarseCalibCmd
    0 g9 P& U5 V/ f+ V8 ^$ c
复制代码
" J, W' o5 i9 t" f( G% T) @( b7 l7 \' A
03. 相关函数3 v4 I0 K+ f6 G9 f- F7 l: D
  1. /*  Function used to set the RTC configuration to the default reset state *****/
      `$ L& p; u  N* j( y3 `: j
  2. ErrorStatus RTC_DeInit(void);' N: s/ {( Q6 F  e
  3. $ A% z5 `2 d1 e; R- D: k
  4. /* Initialization and Configuration functions *********************************/
    7 i, j' e6 Y0 i4 r
  5. ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct);
    5 f2 q8 F" u) t, N  k' j. S
  6. void RTC_StructInit(RTC_InitTypeDef* RTC_InitStruct);) {# p! I/ B/ e1 I5 |# k9 V% x
  7. void RTC_WriteProtectionCmd(FunctionalState NewState);- D+ Y. M. Y- N, z0 m8 i* `
  8. ErrorStatus RTC_EnterInitMode(void);
    0 ~9 }& c+ O; u% O+ N3 t
  9. void RTC_ExitInitMode(void);
    8 f# m0 U3 K' u4 n# n
  10. ErrorStatus RTC_WaitForSynchro(void);
    0 G. G5 o7 |  g8 \# t3 e
  11. ErrorStatus RTC_RefClockCmd(FunctionalState NewState);9 F" n- N5 T3 M$ z* |: G
  12. void RTC_BypassShadowCmd(FunctionalState NewState);
    & Z4 F1 G9 ?* c6 x4 I9 t0 f. _

  13. # N- z$ S% q8 c8 F# p8 z9 V5 T) P
  14. /* Time and Date configuration functions **************************************/( K# O: y6 v& d' p! z
  15. ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct);
    * y+ h, n+ [: W0 A1 r8 U- a
  16. void RTC_TimeStructInit(RTC_TimeTypeDef* RTC_TimeStruct);
    + {8 X; N$ \9 t4 k0 `
  17. void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct);* s9 Q* Q) U& J
  18. uint32_t RTC_GetSubSecond(void);+ M) p' I* D8 {: e' E
  19. ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct);
    7 W9 t2 q# f' @4 @( L5 ~6 A/ Y
  20. void RTC_DateStructInit(RTC_DateTypeDef* RTC_DateStruct);
    - S1 L: F3 @5 z9 f! m: s
  21. void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct);9 k6 N2 Q7 P) x6 f
  22. ) Y* F7 s/ I$ m0 A7 b" c; p
  23. /* Alarms (Alarm A and Alarm B) configuration functions  **********************/
    : [! U- A$ t7 K; K7 l4 E
  24. void RTC_SetAlarm(uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef* RTC_AlarmStruct);
    4 B, d, z2 N+ C% S2 R
  25. void RTC_AlarmStructInit(RTC_AlarmTypeDef* RTC_AlarmStruct);9 v2 s# s' x; E& m& O
  26. void RTC_GetAlarm(uint32_t RTC_Format, uint32_t RTC_Alarm, RTC_AlarmTypeDef* RTC_AlarmStruct);' }$ b; K9 |  f3 L* ^4 D
  27. ErrorStatus RTC_AlarmCmd(uint32_t RTC_Alarm, FunctionalState NewState);7 F' K* @0 [! Z
  28. void RTC_AlarmSubSecondConfig(uint32_t RTC_Alarm, uint32_t RTC_AlarmSubSecondValue, uint32_t RTC_AlarmSubSecondMask);$ k- a; W; r: F/ ^7 |
  29. uint32_t RTC_GetAlarmSubSecond(uint32_t RTC_Alarm);
    2 Y; J& W$ d7 W5 ]8 T6 D- g
  30. 2 c8 z' C" X5 L, y
  31. /* WakeUp Timer configuration functions ***************************************/
    # s9 n$ Z9 f4 v/ c( p" w
  32. void RTC_WakeUpClockConfig(uint32_t RTC_WakeUpClock);
    % W) J7 k, h3 R
  33. void RTC_SetWakeUpCounter(uint32_t RTC_WakeUpCounter);! g0 u0 \% \9 V: r, s3 r  B
  34. uint32_t RTC_GetWakeUpCounter(void);
    4 h! @3 d4 S6 X; B; n1 R- ^  {
  35. ErrorStatus RTC_WakeUpCmd(FunctionalState NewState);
    1 Y2 k9 v- ^$ G5 d) k
  36. 7 z5 g( w# v! n- D% x: ^7 V
  37. /* Daylight Saving configuration functions ************************************/7 ~# ?& B' `) U
  38. void RTC_DayLightSavingConfig(uint32_t RTC_DayLightSaving, uint32_t RTC_StoreOperation);1 g1 f7 R- k2 y$ e; n& z
  39. uint32_t RTC_GetStoreOperation(void);
      m; q( p. ?: l

  40. * F, I0 w! X  ]" h% q# d( {
  41. /* Output pin Configuration function ******************************************/4 ]7 I  V# e9 S/ W1 i5 [. t* ^
  42. void RTC_OutputConfig(uint32_t RTC_Output, uint32_t RTC_OutputPolarity);
    2 |3 C( a1 n0 @
  43. , U  }4 z$ r! N
  44. /* Digital Calibration configuration functions *********************************/
    & Y. w+ ?: a: W  V) R# J
  45. ErrorStatus RTC_CoarseCalibConfig(uint32_t RTC_CalibSign, uint32_t Value);
    ! n! [- `1 C3 @; F/ v3 ^! A
  46. ErrorStatus RTC_CoarseCalibCmd(FunctionalState NewState);
    ( j, t9 q" I0 J) J1 k; N2 s: e
  47. void RTC_CalibOutputCmd(FunctionalState NewState);
    / b# T4 y4 H. D, J
  48. void RTC_CalibOutputConfig(uint32_t RTC_CalibOutput);
    / [4 s  ^# f2 J" Y* B9 V
  49. ErrorStatus RTC_SmoothCalibConfig(uint32_t RTC_SmoothCalibPeriod,
    * ]! i7 o: P. A6 A  @& Q6 F
  50.                                   uint32_t RTC_SmoothCalibPlusPulses,
    4 P0 ^& G0 y3 C; e: H! I
  51.                                   uint32_t RTC_SmouthCalibMinusPulsesValue);1 v8 Y% A1 V, p% F/ F; s, U# J4 O; D

  52. 6 Z* q- m9 ^5 F7 @
  53. /* TimeStamp configuration functions ******************************************/- y5 r- V( h5 J
  54. void RTC_TimeStampCmd(uint32_t RTC_TimeStampEdge, FunctionalState NewState);  o  g( O7 T7 T7 d" R! v+ S% Q
  55. void RTC_GetTimeStamp(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_StampTimeStruct,
    " n6 S4 Y& F8 H. V. _+ c% H
  56.                                       RTC_DateTypeDef* RTC_StampDateStruct);
    $ x) z3 ^- \+ D& Y+ s# w
  57. uint32_t RTC_GetTimeStampSubSecond(void);8 |( h2 s5 x* z8 Z8 I9 s
  58. $ F4 U, G- M  c8 V8 `+ c! v2 V* M2 T$ {
  59. /* Tampers configuration functions ********************************************/
      w1 s" a" o  _0 Q
  60. void RTC_TamperTriggerConfig(uint32_t RTC_Tamper, uint32_t RTC_TamperTrigger);9 Y; i5 w: `" p
  61. void RTC_TamperCmd(uint32_t RTC_Tamper, FunctionalState NewState);6 W& [- D5 S9 T) d" Z) M' R/ ^$ `& O
  62. void RTC_TamperFilterConfig(uint32_t RTC_TamperFilter);
    * J& V6 Z6 l/ I* r: m
  63. void RTC_TamperSamplingFreqConfig(uint32_t RTC_TamperSamplingFreq);4 F9 g2 F3 D. Y  k: k6 g3 y' j
  64. void RTC_TamperPinsPrechargeDuration(uint32_t RTC_TamperPrechargeDuration);+ E/ H6 H" @! R: w8 {; c5 ]
  65. void RTC_TimeStampOnTamperDetectionCmd(FunctionalState NewState);, f( t' {7 u. l3 {% l% R) q) p
  66. void RTC_TamperPullUpCmd(FunctionalState NewState);
    8 }5 c! r: d# h' A
  67. # q; ?# o0 g, c8 A# ~
  68. /* Backup Data Registers configuration functions ******************************/
    6 Y' U# x2 p, [  F
  69. void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data);3 d' i1 g! Y2 E, @
  70. uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR);
    7 g! t+ y+ D5 Z1 V0 E! m( `
  71. $ X$ q% c2 ~- o& S  j
  72. /* RTC Tamper and TimeStamp Pins Selection and Output Type Config configuration
    2 Q8 Y1 C. a8 k& N# ]
  73.    functions ******************************************************************/
    % i" T2 r( P8 I6 }3 n
  74. void RTC_TamperPinSelection(uint32_t RTC_TamperPin);4 a: W6 C, d' a% ]/ P$ u& M
  75. void RTC_TimeStampPinSelection(uint32_t RTC_TimeStampPin);/ s7 S% d( M5 W; R" N
  76. void RTC_OutputTypeConfig(uint32_t RTC_OutputType);
    ; `1 ]9 @4 q  Z

  77. + f1 W) K4 w0 H
  78. /* RTC_Shift_control_synchonisation_functions *********************************/0 w9 J3 ^  }  ]. @
  79. ErrorStatus RTC_SynchroShiftConfig(uint32_t RTC_ShiftAdd1S, uint32_t RTC_ShiftSubFS);" _% {% V* i$ l8 Q, h
  80. ( g' v5 x; D7 t- V6 ~& |/ s$ v, c
  81. /* Interrupts and flags management functions **********************************/$ e3 p; ~' b" Y# d1 |7 Q
  82. void RTC_ITConfig(uint32_t RTC_IT, FunctionalState NewState);7 N2 @# j& M4 @  ^" s
  83. FlagStatus RTC_GetFlagStatus(uint32_t RTC_FLAG);, e% O8 b# g, L6 L; i  i9 M* e
  84. void RTC_ClearFlag(uint32_t RTC_FLAG);, B0 i' j% ]: `- |1 N* D
  85. ITStatus RTC_GetITStatus(uint32_t RTC_IT);
    7 Y4 P+ r/ Z9 u7 U) ?' P- U# G
  86. void RTC_ClearITPendingBit(uint32_t RTC_IT);% U/ I5 H, M$ f  D
复制代码

- e( Q8 S+ q2 c04. 结构体封装
8 Z! t1 h% q5 c; W2 Y$ H3 v$ `
  1. /**
    ; I2 r9 N) ^) Y9 d# g, @
  2.   * @brief Real-Time Clock
    / |6 f1 s3 K" e+ J+ L; E% J
  3.   */! l+ o2 V+ U4 _$ Q) r
  4.   r: e% D: @3 }  ^* {. C: V7 R
  5. typedef struct# y% C2 U5 S6 T: b  F: K
  6. {
    # R. s( z5 k9 w: E4 g
  7.   __IO uint32_t TR;      /*!< RTC time register,                                        Address offset: 0x00 */4 f/ D( ~" a" E
  8.   __IO uint32_t DR;      /*!< RTC date register,                                        Address offset: 0x04 */, E& }# S( H0 `
  9.   __IO uint32_t CR;      /*!< RTC control register,                                     Address offset: 0x08 */
    4 O/ T6 E& n" I2 Y- A
  10.   __IO uint32_t ISR;     /*!< RTC initialization and status register,                   Address offset: 0x0C */! q7 U- w" X0 m! V
  11.   __IO uint32_t PRER;    /*!< RTC prescaler register,                                   Address offset: 0x10 */9 i7 F2 O/ R( O2 `$ O5 p, s
  12.   __IO uint32_t WUTR;    /*!< RTC wakeup timer register,                                Address offset: 0x14 */
    & {2 X/ T; t9 N
  13.   __IO uint32_t CALIBR;  /*!< RTC calibration register,                                 Address offset: 0x18 */8 E" K/ x/ ~' J) P3 F0 p0 v8 ~
  14.   __IO uint32_t ALRMAR;  /*!< RTC alarm A register,                                     Address offset: 0x1C *// T* g# \2 Y) {6 T/ g7 K' J
  15.   __IO uint32_t ALRMBR;  /*!< RTC alarm B register,                                     Address offset: 0x20 */
    8 w+ }, b( b) t+ p  E4 Y
  16.   __IO uint32_t WPR;     /*!< RTC write protection register,                            Address offset: 0x24 */5 U( u4 Y* [: X8 }+ u. @
  17.   __IO uint32_t SSR;     /*!< RTC sub second register,                                  Address offset: 0x28 */
    2 c$ h" m- v: q+ O% b9 Z/ @) L
  18.   __IO uint32_t SHIFTR;  /*!< RTC shift control register,                               Address offset: 0x2C */0 [; k0 ]/ o# ^. L, e( C
  19.   __IO uint32_t TSTR;    /*!< RTC time stamp time register,                             Address offset: 0x30 */
    & q2 k8 T5 {" {, D" t& U
  20.   __IO uint32_t TSDR;    /*!< RTC time stamp date register,                             Address offset: 0x34 */% k8 p5 ?: {$ H/ [, y9 N, Z
  21.   __IO uint32_t TSSSR;   /*!< RTC time-stamp sub second register,                       Address offset: 0x38 */
    ' {: a) e( Z# B5 s& Y$ Y, A9 Z: t
  22.   __IO uint32_t CALR;    /*!< RTC calibration register,                                 Address offset: 0x3C */6 j: ]! F2 p: [, ]  ]
  23.   __IO uint32_t TAFCR;   /*!< RTC tamper and alternate function configuration register, Address offset: 0x40 */
    ) U1 ~5 M& [" D8 q9 {2 C
  24.   __IO uint32_t ALRMASSR;/*!< RTC alarm A sub second register,                          Address offset: 0x44 */
    ' |/ R9 c5 o3 _- ?% V% ?  g, d7 L
  25.   __IO uint32_t ALRMBSSR;/*!< RTC alarm B sub second register,                          Address offset: 0x48 */) B8 T8 P0 u" N9 K& D8 X: A  w
  26.   uint32_t RESERVED7;    /*!< Reserved, 0x4C                                                                 */$ \0 E% d( _+ o9 @
  27.   __IO uint32_t BKP0R;   /*!< RTC backup register 1,                                    Address offset: 0x50 */# h3 x) [; g% j2 M* ^8 I& i! y
  28.   __IO uint32_t BKP1R;   /*!< RTC backup register 1,                                    Address offset: 0x54 */* M- x7 L  J/ C; D, I' G+ W1 T- R2 l
  29.   __IO uint32_t BKP2R;   /*!< RTC backup register 2,                                    Address offset: 0x58 */$ a5 A) X4 a3 _3 ~4 G, [3 R
  30.   __IO uint32_t BKP3R;   /*!< RTC backup register 3,                                    Address offset: 0x5C */
    . ^( M) q( \" M$ k9 `
  31.   __IO uint32_t BKP4R;   /*!< RTC backup register 4,                                    Address offset: 0x60 */
    4 e7 q3 V9 T3 |
  32.   __IO uint32_t BKP5R;   /*!< RTC backup register 5,                                    Address offset: 0x64 */
    % m1 I  t9 [( f8 |
  33.   __IO uint32_t BKP6R;   /*!< RTC backup register 6,                                    Address offset: 0x68 */
    7 b" m% v0 E5 A0 W
  34.   __IO uint32_t BKP7R;   /*!< RTC backup register 7,                                    Address offset: 0x6C */
    6 `% S& E+ Y6 I# U% J9 f" u4 e5 j
  35.   __IO uint32_t BKP8R;   /*!< RTC backup register 8,                                    Address offset: 0x70 */9 Z  q8 z9 t# K3 O" Q6 P5 N
  36.   __IO uint32_t BKP9R;   /*!< RTC backup register 9,                                    Address offset: 0x74 */5 b6 y$ b) x, x" m7 v
  37.   __IO uint32_t BKP10R;  /*!< RTC backup register 10,                                   Address offset: 0x78 */
    " m: j0 A; G5 j  k2 r
  38.   __IO uint32_t BKP11R;  /*!< RTC backup register 11,                                   Address offset: 0x7C */: \/ }- V. ]" a# w  `# H6 W
  39.   __IO uint32_t BKP12R;  /*!< RTC backup register 12,                                   Address offset: 0x80 */) |7 z, C7 [9 L- S7 c: O/ u
  40.   __IO uint32_t BKP13R;  /*!< RTC backup register 13,                                   Address offset: 0x84 */4 |# T. c8 l9 ~5 ~! ]
  41.   __IO uint32_t BKP14R;  /*!< RTC backup register 14,                                   Address offset: 0x88 */! c) R' _  z. ]: f
  42.   __IO uint32_t BKP15R;  /*!< RTC backup register 15,                                   Address offset: 0x8C */$ s9 N7 R7 \% P9 _% m
  43.   __IO uint32_t BKP16R;  /*!< RTC backup register 16,                                   Address offset: 0x90 */
    . \: X7 x# E) p
  44.   __IO uint32_t BKP17R;  /*!< RTC backup register 17,                                   Address offset: 0x94 */4 \7 e0 V1 J# A' G
  45.   __IO uint32_t BKP18R;  /*!< RTC backup register 18,                                   Address offset: 0x98 */+ e9 I2 ?" [" ]5 T/ B; R
  46.   __IO uint32_t BKP19R;  /*!< RTC backup register 19,                                   Address offset: 0x9C */: O; r9 y; u$ s; X
  47. } RTC_TypeDef;
复制代码

9 J0 K$ B. h4 n* q* ~6 H
赞 收藏 评论0 发布时间:2022-3-29 09:37

举报

0个回答

所属标签

相似技术帖

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
人形机器人运动控制、感知与智能配电
半导体创新技术与应用方向
EE架构与软件定义汽车
12V/48V 汽车智能配电(SPD)
区域控制单元(ZCU)与分区架构
关注我们
st-img 微信公众号
st-img 手机版