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

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

[复制链接]
STMCU小助手 发布时间:2022-6-16 18:00
01. SPI简介
' [0 `. F# e. {3 ]% U5 m- _SPI 是英语 Serial Peripheral interface 的缩写,顾名思义就是串行外围设备接口。是 Motorola首先在其 MC68HCXX 系列处理器上定义的。SPI 接口主要应用在 EEPROM,FLASH,实时时钟,AD 转换器,还有数字信号处理器和数字信号解码器之间。SPI,是一种高速的,全双工,同步的通信总线,并且在芯片的管脚上只占用四根线,节约了芯片的管脚,同时为 PCB 的布局上节省空间,提供方便,正是出于这种简单易用的特性,现在越来越多的芯片集成了这种通信协议,STM32F4 也有 SPI 接口。$ [3 D  y! s" l
3 d# U  T* y! x1 ]; ?  z: `
02. 相关类型* C. b2 F# s, H) ^0 v
SPI Init structure definition
* W* k- C, u6 _+ X( v+ `. l
8 ^- ~  E- W: ?7 R* T% W" c+ M+ i# I
  1. /** 7 F; Y9 e2 o+ S9 s4 C8 e2 d
  2.   * @brief  SPI Init structure definition  
    , Q; t% ?# P& z0 f
  3.   */
      N+ u: G) l3 u1 D

  4. . W, F1 U7 L" i7 s( H; G5 ^$ h
  5. typedef struct( h( \8 |" W7 Q9 S) O$ [
  6. {
    ) q9 G9 B- p3 t# o
  7.   uint16_t SPI_Direction;           /*!< Specifies the SPI unidirectional or bidirectional data mode." ^  R% U! D( u' J; h7 N; `
  8.                                          This parameter can be a value of @ref SPI_data_direction */! d" [6 M- z( A
  9. 7 D- n: W4 r( ~3 o
  10.   uint16_t SPI_Mode;                /*!< Specifies the SPI operating mode.- ^* z$ Y4 ?* f2 T
  11.                                          This parameter can be a value of @ref SPI_mode */5 V1 X+ T+ ?' R& h# G, \
  12. ' L$ K, |( s& |& \; X( E
  13.   uint16_t SPI_DataSize;            /*!< Specifies the SPI data size.
    ' i% f6 N% ?" Y- t" E# k
  14.                                          This parameter can be a value of @ref SPI_data_size */
    * m/ m& D4 Y" _4 D2 ^

  15. ) v+ R( c& D+ h
  16.   uint16_t SPI_CPOL;                /*!< Specifies the serial clock steady state.
    # C6 m6 I. U! R+ P+ q
  17.                                          This parameter can be a value of @ref SPI_Clock_Polarity */) u) T& S  E7 p- |' q; w
  18. - |8 ]% M5 {' w' M
  19.   uint16_t SPI_CPHA;                /*!< Specifies the clock active edge for the bit capture., O# R: h' }$ X2 \4 J1 J2 }
  20.                                          This parameter can be a value of @ref SPI_Clock_Phase *// }+ H# S% U3 t# \1 n3 h% J
  21. 3 c7 Y1 t+ \& L" w% q
  22.   uint16_t SPI_NSS;                 /*!< Specifies whether the NSS signal is managed by
    1 l# g, g$ j8 _" ^- [& F
  23.                                          hardware (NSS pin) or by software using the SSI bit., J  b! G' Q2 n' I# A, f+ |' t
  24.                                          This parameter can be a value of @ref SPI_Slave_Select_management */
    9 ^5 b; g& w9 G3 ?- b
  25. ' b. q, G/ F/ E+ f5 S
  26.   uint16_t SPI_BaudRatePrescaler;   /*!< Specifies the Baud Rate prescaler value which will be
    * p9 d" b; m6 v" `$ a
  27.                                          used to configure the transmit and receive SCK clock.! v! f9 |# F: X
  28.                                          This parameter can be a value of @ref SPI_BaudRate_Prescaler% a) K4 _2 Y: q* ^0 A" e
  29.                                          @note The communication clock is derived from the master% q! j8 C: t2 ?
  30.                                                clock. The slave clock does not need to be set. */8 f$ j, I: ?5 C6 ?) m& J: @: J
  31. " x+ U: R8 ?# Y+ L- s4 n, t0 y
  32.   uint16_t SPI_FirstBit;            /*!< Specifies whether data transfers start from MSB or LSB bit.6 t7 b, `2 @* X8 ?- i: a1 ?$ J
  33.                                          This parameter can be a value of @ref SPI_MSB_LSB_transmission */2 }9 k9 P7 m+ N

  34. % q2 p1 E; U; I& ~! i1 s
  35.   uint16_t SPI_CRCPolynomial;       /*!< Specifies the polynomial used for the CRC calculation. */1 C8 j0 z9 C3 D6 {6 @  _
  36. }SPI_InitTypeDef;
复制代码

/ S% _9 }5 A7 N2 yI2S Init structure definition# O. V% n9 L% V- B" C0 R" Y
& Q7 c  p) m: W/ M0 Y* z4 g
  1. /**
    ( k) T8 Z( w0 U' h
  2.   * @brief  I2S Init structure definition  
    " ~+ v% R& B$ S3 k
  3.   */
    - r$ F: K/ _' b7 P0 R

  4. ! \: l3 ~1 s6 I! w, l0 {
  5. typedef struct/ _3 o  d. Q, w7 F- `! F* D6 e5 Z
  6. {3 ^$ h7 ]3 X) t7 i. N% h
  7. % d9 i7 @7 K3 B8 n
  8.   uint16_t I2S_Mode;         /*!< Specifies the I2S operating mode.4 U1 J" @4 ~8 q1 [/ s/ X
  9.                                   This parameter can be a value of @ref I2S_Mode */
    # X: H: m/ f+ i! N: U2 M' t1 t

  10. . J9 O$ J* h9 J& ^) K) F7 V: I
  11.   uint16_t I2S_Standard;     /*!< Specifies the standard used for the I2S communication.6 F/ Z, S1 h4 |- ]! a& \' `# J# {7 k
  12.                                   This parameter can be a value of @ref I2S_Standard */
    ; t5 L: ?5 ?7 R' B
  13. 3 R  _5 g6 b/ m; n. p3 I% V) H; V
  14.   uint16_t I2S_DataFormat;   /*!< Specifies the data format for the I2S communication.
    & H9 b" j9 ^; Z2 W  M2 p* v
  15.                                   This parameter can be a value of @ref I2S_Data_Format */
    ' g# r# \4 X2 ~& l  R

  16. 4 U0 _% D7 l- R! a3 V" i
  17.   uint16_t I2S_MCLKOutput;   /*!< Specifies whether the I2S MCLK output is enabled or not.9 q# |; \3 W" |! ]' q
  18.                                   This parameter can be a value of @ref I2S_MCLK_Output */0 A) Z. }! f6 U: j! I

  19. 1 b8 c. Y1 b2 z& x, d4 E, W  W* d
  20.   uint32_t I2S_AudioFreq;    /*!< Specifies the frequency selected for the I2S communication.- E, B. L6 M) K7 `4 r9 g8 E
  21.                                   This parameter can be a value of @ref I2S_Audio_Frequency */+ V. y$ K% n; z6 A
  22. 2 m( f) i% i9 k: Z2 T
  23.   uint16_t I2S_CPOL;         /*!< Specifies the idle state of the I2S clock.
    ( M/ b5 {) o4 R' T. i* k" a
  24.                                   This parameter can be a value of @ref I2S_Clock_Polarity */
    & e8 Z- K3 B% ~0 U
  25. }I2S_InitTypeDef;
复制代码
. S- c8 }  @! W& x) Q( s. P: M9 @
SPI_Exported_Constants
! C. R2 G$ j& M3 }
. {0 a/ g+ U9 J5 W
  1. /** @defgroup SPI_Exported_Constants! g' i4 a3 ?, k! n$ E
  2.   * @{2 \. z3 Q2 s+ H% N0 G6 l0 k
  3.   */
    * z' o. i' \" h0 I0 h
  4. : v/ w9 \! v" i% |' o- S2 J
  5. #define IS_SPI_ALL_PERIPH(PERIPH) (((PERIPH) == SPI1) || \9 X4 m! n) ^) ]1 Q9 [$ t3 g6 \
  6.                                    ((PERIPH) == SPI2) || \+ P7 m% C6 y$ g) E  E
  7.                                    ((PERIPH) == SPI3) || \) F) e9 @+ C2 h$ s/ o! `6 l
  8.                                    ((PERIPH) == SPI4) || \
    6 V$ _9 `$ J1 @4 u8 O) L3 c: r
  9.                                    ((PERIPH) == SPI5) || \( A. o% I4 a4 |# l; s  p
  10.                                    ((PERIPH) == SPI6))9 ~4 I5 z4 D! |' `  Z

  11. % {3 c) L, i0 O1 v# x. P# {% |+ K
  12. #define IS_SPI_ALL_PERIPH_EXT(PERIPH) (((PERIPH) == SPI1)    || \1 U( }* S& _, }& H0 S  s
  13.                                        ((PERIPH) == SPI2)    || \
    , K! j! |2 h1 @% ?: s! K
  14.                                        ((PERIPH) == SPI3)    || \% j3 y  W+ e% u
  15.                                        ((PERIPH) == SPI4)    || \% d# I' T6 z& |* j
  16.                                        ((PERIPH) == SPI5)    || \9 C1 ^& t( J1 }4 e: ]  d* X
  17.                                        ((PERIPH) == SPI6)    || \
    ) _+ R0 u/ U4 p6 m1 h
  18.                                        ((PERIPH) == I2S2ext) || \; q% u5 R; ]# P* t4 ~
  19.                                        ((PERIPH) == I2S3ext)). i, v* N: R; n7 h7 k; V9 ]6 C8 Z

  20. ; T2 \; @1 q& ]" E* y' ~
  21. #define IS_SPI_23_PERIPH(PERIPH)  (((PERIPH) == SPI2) || \: t  [) Y% N1 c3 b2 q" {5 g8 W. t
  22.                                    ((PERIPH) == SPI3))# r0 z& _' t- H9 v! q7 s7 n

  23. 5 w; G; a: H' ]0 N3 J: v, P
  24. #define IS_SPI_23_PERIPH_EXT(PERIPH)  (((PERIPH) == SPI2)    || \
    0 V. h" M( `, e& `
  25.                                        ((PERIPH) == SPI3)    || \: I* K0 A0 |( K: }  ^+ A( E- _
  26.                                        ((PERIPH) == I2S2ext) || \  ?$ `- l0 c8 j) S
  27.                                        ((PERIPH) == I2S3ext))
    % E2 E. o, h, Q/ ~
  28. 4 p( c5 g% a0 w, n; E4 d. O
  29. #define IS_I2S_EXT_PERIPH(PERIPH)  (((PERIPH) == I2S2ext) || \
    $ T$ r  Y. D( Z
  30.                                     ((PERIPH) == I2S3ext))
复制代码

5 ^( e# d1 K, v6 ^5 FSPI_data_direction( ^4 `* a; J0 n7 R* G/ S3 P

! r( r: U7 {) K
  1. /** @defgroup SPI_data_direction 3 q* d5 b( ]2 i5 R- y; t
  2.   * @{
    ( D; I, U% M" ~  ~) _5 y4 v- `5 N
  3.   */
    " A: ?" `: ^, L2 s9 u$ E" B
  4. % m7 N3 X% B4 F  ?1 G& V4 m5 Z- k
  5. #define SPI_Direction_2Lines_FullDuplex ((uint16_t)0x0000)' R* l3 `# P2 Q% T# m7 T
  6. #define SPI_Direction_2Lines_RxOnly     ((uint16_t)0x0400)
    1 Y' ?- K' m" e3 ~0 ?
  7. #define SPI_Direction_1Line_Rx          ((uint16_t)0x8000)7 ?9 u' G5 M- c& f$ T
  8. #define SPI_Direction_1Line_Tx          ((uint16_t)0xC000)5 \$ [% C  u: l% x2 Z; ^( d; P; G
  9. #define IS_SPI_DIRECTION_MODE(MODE) (((MODE) == SPI_Direction_2Lines_FullDuplex) || \
    # p  @7 ^& D" g
  10.                                      ((MODE) == SPI_Direction_2Lines_RxOnly) || \, ~% p6 a* b, W7 G
  11.                                      ((MODE) == SPI_Direction_1Line_Rx) || \
    , _( x7 k6 t; C
  12.                                      ((MODE) == SPI_Direction_1Line_Tx))
复制代码
" r) M0 d2 S% D) ~4 g' Y
SPI_mode9 ~7 Q8 m' h+ |  y& K; R% u7 d
' p' \0 l% X+ b6 {3 i  q
  1. /** @defgroup SPI_mode
    2 Z8 O3 d- W+ G/ r( z- m  q; l' Z
  2.   * @{
    * u/ t- z( x  W! D
  3.   */7 W0 j  R1 X4 u' T  M: z

  4. : R# r% {5 h* U5 t; D9 U2 k
  5. #define SPI_Mode_Master                 ((uint16_t)0x0104)
    9 ~5 N2 t4 {, z
  6. #define SPI_Mode_Slave                  ((uint16_t)0x0000)1 b, y" {6 k* ^8 u, t# M, R3 I8 T% y
  7. #define IS_SPI_MODE(MODE) (((MODE) == SPI_Mode_Master) || \4 E. k$ `7 v' z4 V/ ?3 d
  8.                            ((MODE) == SPI_Mode_Slave))
复制代码

" {, n# Q* w! o5 p& ?* vSPI_data_size- o8 {0 ]+ q; q0 ?

8 ~5 a6 j6 `  a7 k, ?" u
  1. /** @defgroup SPI_data_size , c7 d- n7 W* z' @+ P
  2.   * @{
    - X$ B% i4 m5 {0 h+ }! X
  3.   */
    5 Y$ y4 f- m3 s# w1 S
  4. # X  y8 i# }  H: X! F5 J7 Y
  5. #define SPI_DataSize_16b                ((uint16_t)0x0800)
    4 j4 B& W5 ^0 X$ P) l$ g% T
  6. #define SPI_DataSize_8b                 ((uint16_t)0x0000)+ X6 C, H7 t1 o3 Y9 d5 g) y
  7. #define IS_SPI_DATASIZE(DATASIZE) (((DATASIZE) == SPI_DataSize_16b) || \
    8 r! ]$ m' Y' y. `3 O3 m
  8.                                    ((DATASIZE) == SPI_DataSize_8b))
复制代码

! e. U' H5 J8 U5 D, p% \SPI_Clock_Polarity0 s& j; M4 O5 ], m, Y
) _& T( Z% x6 F- j
  1. /** @defgroup SPI_Clock_Polarity 4 E8 G, D" X( I
  2.   * @{
    % A3 ~+ Q1 q$ A- W5 f+ L8 X+ W
  3.   */
    # {7 u) ~' h0 m! ^" W

  4. - r9 r- I6 I, i! A  W) X- O
  5. #define SPI_CPOL_Low                    ((uint16_t)0x0000)$ @( F! w+ {5 t/ s, \- E3 l$ }1 A
  6. #define SPI_CPOL_High                   ((uint16_t)0x0002)
    , x; @0 C" n0 E1 H
  7. #define IS_SPI_CPOL(CPOL) (((CPOL) == SPI_CPOL_Low) || \6 o, |3 b- ?+ \' x
  8.                            ((CPOL) == SPI_CPOL_High))
复制代码

3 a# C8 {3 ^1 K- sSPI_Clock_Phase& ~! ~7 ?/ u2 c7 v

' E) }; J( W+ Q" E% P
  1. /** @defgroup SPI_Clock_Phase ) w" L$ M7 F" ]9 C
  2.   * @{
    # y5 G- F3 S5 p: [: s/ V
  3.   */( W2 k9 T, |+ Z. r+ P

  4. : U) S' n+ w4 U4 _6 |( v( N
  5. #define SPI_CPHA_1Edge                  ((uint16_t)0x0000)3 ~) A6 r6 z+ f9 H
  6. #define SPI_CPHA_2Edge                  ((uint16_t)0x0001)6 k& }: V' o5 r: ~
  7. #define IS_SPI_CPHA(CPHA) (((CPHA) == SPI_CPHA_1Edge) || \, w4 q2 Y/ y; Y0 s9 }1 f
  8.                            ((CPHA) == SPI_CPHA_2Edge))
复制代码

; p2 P; d# P1 F$ B6 h% \- T9 JSPI_Slave_Select_management3 ^/ }% c; X" i

) B. |0 Z, k) I: q* R: s$ P1 `
  1. /** @defgroup SPI_Slave_Select_management
    $ k( i; j( j. t3 l/ f2 }+ m( }
  2.   * @{
    ! S5 f+ _+ ~+ w. D6 u
  3.   */
    & M7 \& l/ s# g* A) O: _! V" j, ~& Q
  4. + M) s1 I4 X& G! D: Q5 X
  5. #define SPI_NSS_Soft                    ((uint16_t)0x0200)7 M1 s. B) Y+ b1 Q
  6. #define SPI_NSS_Hard                    ((uint16_t)0x0000)
    " m& V& L( `( ~  s/ y
  7. #define IS_SPI_NSS(NSS) (((NSS) == SPI_NSS_Soft) || \. U# }/ F5 E6 I/ l4 e; P$ T* W  S; ~
  8.                          ((NSS) == SPI_NSS_Hard))
复制代码
7 a3 k- ~. v7 `+ U
SPI_BaudRate_Prescaler6 e" A; G: d# V( D- k

( I$ C: |2 A  y, h5 f
  1. /** @defgroup SPI_BaudRate_Prescaler 7 ~. w- p9 m( r, M6 l/ C. P+ `
  2.   * @{
    1 C3 M1 q/ Q% m9 j4 S
  3.   */6 t( I% `" i& u$ P1 {  P

  4. # ]5 W% Q4 I% e* w7 Y% E8 M1 c) K
  5. #define SPI_BaudRatePrescaler_2         ((uint16_t)0x0000)
    ) R& \. J+ n9 Y  V
  6. #define SPI_BaudRatePrescaler_4         ((uint16_t)0x0008)$ p: l% ?7 J+ |  H
  7. #define SPI_BaudRatePrescaler_8         ((uint16_t)0x0010)8 G' }( [8 v1 P$ i9 ?# ?
  8. #define SPI_BaudRatePrescaler_16        ((uint16_t)0x0018)
    ) U( ]* {" @4 ^2 `6 k" s
  9. #define SPI_BaudRatePrescaler_32        ((uint16_t)0x0020)
    7 O2 ]" ]  s  l) g6 N% Y) b
  10. #define SPI_BaudRatePrescaler_64        ((uint16_t)0x0028), N0 E+ U9 f% r% {5 e3 Q
  11. #define SPI_BaudRatePrescaler_128       ((uint16_t)0x0030)
    / D& _! X; t  q7 B) P/ f) r3 X) \
  12. #define SPI_BaudRatePrescaler_256       ((uint16_t)0x0038)1 l0 }! ~1 E& L7 n1 I7 b' l
  13. #define IS_SPI_BAUDRATE_PRESCALER(PRESCALER) (((PRESCALER) == SPI_BaudRatePrescaler_2) || \# X% B# }  a4 J( T
  14.                                               ((PRESCALER) == SPI_BaudRatePrescaler_4) || \4 J$ Q7 W: r6 L' T
  15.                                               ((PRESCALER) == SPI_BaudRatePrescaler_8) || \2 t  k4 w% z' S6 o. b: B5 a# p. J4 I
  16.                                               ((PRESCALER) == SPI_BaudRatePrescaler_16) || \
    % y* l) @& f7 w* m9 X7 |# D
  17.                                               ((PRESCALER) == SPI_BaudRatePrescaler_32) || \
    ; B8 J& |1 }: U! ]2 v7 f
  18.                                               ((PRESCALER) == SPI_BaudRatePrescaler_64) || \
    ; u& v/ v" z( W0 C
  19.                                               ((PRESCALER) == SPI_BaudRatePrescaler_128) || \! z  d- f/ m7 ^, {* v
  20.                                               ((PRESCALER) == SPI_BaudRatePrescaler_256))3 h) p; Z0 _6 G& Q& [/ y
复制代码
2 |( W- X7 b* [" k) H
SPI_MSB_LSB_transmission$ f$ V+ r8 P5 e; E

" I$ K2 r* M" k1 K% ?
  1. /** @defgroup SPI_MSB_LSB_transmission
    + Q. |, V1 W7 h- d7 t
  2.   * @{
    , x- _) M$ e) i$ |1 B
  3.   */
    7 b& g3 ?: ]5 g5 f8 C$ m, }) r

  4. * F- v1 j9 v3 H! w3 l
  5. #define SPI_FirstBit_MSB                ((uint16_t)0x0000)
    , K) K& t! m. l
  6. #define SPI_FirstBit_LSB                ((uint16_t)0x0080)' g) t9 }7 h. J5 U* ?9 t3 t2 D- }
  7. #define IS_SPI_FIRST_BIT(BIT) (((BIT) == SPI_FirstBit_MSB) || \. ]) S  q1 o& I9 p0 j3 E7 B
  8.                                ((BIT) == SPI_FirstBit_LSB))
复制代码
( n% l( ^+ m. o. {. `7 P3 N0 N, c
SPI_I2S_Mode
+ T3 D" j( h# `( q2 @  n* D' D
4 U, ?2 E' I9 F/ q" B
  1. /** @defgroup SPI_I2S_Mode
    2 r/ G. U" X1 x8 f/ V" Z$ d1 m
  2.   * @{
    * g& T/ A( C& t6 X/ m
  3.   */  Y6 Y% \/ g. B
  4. 7 E- g$ @- p7 h. |2 |, t1 T6 m
  5. #define I2S_Mode_SlaveTx                ((uint16_t)0x0000)
    % ?" h' f1 t6 G2 w% S
  6. #define I2S_Mode_SlaveRx                ((uint16_t)0x0100)
    : ~  ^7 b% o0 v7 c6 B
  7. #define I2S_Mode_MasterTx               ((uint16_t)0x0200)" t! F/ R7 B. Z  R! R% j
  8. #define I2S_Mode_MasterRx               ((uint16_t)0x0300)
      N! E, m7 j$ j3 N; O
  9. #define IS_I2S_MODE(MODE) (((MODE) == I2S_Mode_SlaveTx) || \
    , p/ [  N0 W7 \) X3 c
  10.                            ((MODE) == I2S_Mode_SlaveRx) || \
    ( B; |' v" D1 j! z, }; L
  11.                            ((MODE) == I2S_Mode_MasterTx)|| \2 Y% w. p- ^% P" k6 p0 p, ^! @
  12.                            ((MODE) == I2S_Mode_MasterRx))
复制代码

8 ~6 b3 P5 a' t6 q$ wSPI_I2S_Standard: O. P+ ?; n* l# f+ r

* U- s3 p/ |; `6 p# C, a# A
  1. ; |" C0 a1 }4 D6 a8 O
  2. /** @defgroup SPI_I2S_Standard $ e( _. C( a( H- X/ j1 C
  3.   * @{
    ! k) o  A- ?* R# ~
  4.   */8 x, r& a4 D( Y2 ]% J  e

  5. , P. B1 u! y3 U
  6. #define I2S_Standard_Phillips           ((uint16_t)0x0000)
    . q/ E5 ~/ F" O" x
  7. #define I2S_Standard_MSB                ((uint16_t)0x0010)' m$ ]' E! X- x; _9 d7 i
  8. #define I2S_Standard_LSB                ((uint16_t)0x0020)
    8 P1 V( Y0 \5 j9 T: ^
  9. #define I2S_Standard_PCMShort           ((uint16_t)0x0030)" b; `3 i4 l, j1 I$ x1 q
  10. #define I2S_Standard_PCMLong            ((uint16_t)0x00B0)
      E. ~* D' y$ K1 i3 P* }9 Y7 F7 {, g
  11. #define IS_I2S_STANDARD(STANDARD) (((STANDARD) == I2S_Standard_Phillips) || \
    + j5 ~% |1 @, o8 ~( W4 z+ z
  12.                                    ((STANDARD) == I2S_Standard_MSB) || \
    ( o: U: Z9 \& B  X5 b  S" a0 t
  13.                                    ((STANDARD) == I2S_Standard_LSB) || \: E' A2 @6 z/ P, e2 H6 e9 u. ^
  14.                                    ((STANDARD) == I2S_Standard_PCMShort) || \
    4 s$ S  B. y3 e( q3 Y" n1 j; O
  15.                                    ((STANDARD) == I2S_Standard_PCMLong))
复制代码
, P0 h% [& u: m
SPI_I2S_Data_Format
; q. g1 T2 S6 M8 }+ u0 Z* g1 `, A% V! t: [7 Y% Z4 g$ y. i- Z# M& t/ B
  1. /** @defgroup SPI_I2S_Data_Format - Q) Y# D' @3 [  Y
  2.   * @{' f2 R: f( R) w$ o1 ^- e
  3.   */" e, c$ g5 ]( \" l) ^
  4. # f# x6 m7 T/ R* b( @  C. U
  5. #define I2S_DataFormat_16b              ((uint16_t)0x0000)
    0 U! C, Z( ?$ z0 p6 C# x" }  p
  6. #define I2S_DataFormat_16bextended      ((uint16_t)0x0001)! h2 G% \6 X$ r6 R0 m7 B$ D6 c% ~
  7. #define I2S_DataFormat_24b              ((uint16_t)0x0003)
    9 s$ d* }1 K7 e- @
  8. #define I2S_DataFormat_32b              ((uint16_t)0x0005)( b- v+ V5 {6 E9 A! D
  9. #define IS_I2S_DATA_FORMAT(FORMAT) (((FORMAT) == I2S_DataFormat_16b) || \! l, I1 O6 u; g! s: Y( O
  10.                                     ((FORMAT) == I2S_DataFormat_16bextended) || \
    / A6 c4 ?+ j' _2 j1 ?. d
  11.                                     ((FORMAT) == I2S_DataFormat_24b) || \. p6 Z# H2 Q( k. o' M
  12.                                     ((FORMAT) == I2S_DataFormat_32b))
复制代码

* s0 `1 O& f, `4 H$ N" iSPI_I2S_MCLK_Output
: `5 q, s- @  X9 v; z
% A! e' M7 C0 h/ G+ d2 \
  1. /** @defgroup SPI_I2S_MCLK_Output 1 A% H" G. u/ r2 h+ `/ }& J+ f
  2.   * @{8 B: ?1 Z: `4 c! g# u( @% h' z
  3.   */" E3 g+ c" ~! ^' n1 z  p
  4. 2 |' U% a) X1 U
  5. #define I2S_MCLKOutput_Enable           ((uint16_t)0x0200)
    & V8 l5 r( H) l+ \
  6. #define I2S_MCLKOutput_Disable          ((uint16_t)0x0000)* Q2 a6 [6 w5 {. n* T/ H
  7. #define IS_I2S_MCLK_OUTPUT(OUTPUT) (((OUTPUT) == I2S_MCLKOutput_Enable) || \
      l" n, d2 @5 }0 Q
  8.                                     ((OUTPUT) == I2S_MCLKOutput_Disable))
复制代码
0 X8 V) [: f6 y/ j# g( ]' q* q
SPI_I2S_Audio_Frequency4 C- j2 x  P1 _: g8 N( q
; z2 n) X: s6 K+ P
  1. /** @defgroup SPI_I2S_Audio_Frequency
    9 A, X! q$ r  p2 s% r$ k
  2.   * @{! ^2 ^$ P% b. \0 c
  3.   */
    2 l1 p2 s8 e( d6 @) ]+ W' k
  4. - [! c4 c: S) t8 v) F9 ?* F
  5. #define I2S_AudioFreq_192k               ((uint32_t)192000)$ \' p$ T4 A: W# w
  6. #define I2S_AudioFreq_96k                ((uint32_t)96000)
    - D3 e' y6 \1 m6 G5 K
  7. #define I2S_AudioFreq_48k                ((uint32_t)48000)
    5 X9 l- J9 y( e
  8. #define I2S_AudioFreq_44k                ((uint32_t)44100)3 @7 Y- [/ t% J, r6 U- D
  9. #define I2S_AudioFreq_32k                ((uint32_t)32000): E$ }! h& ~* c2 N
  10. #define I2S_AudioFreq_22k                ((uint32_t)22050)# Y8 a0 Y; W6 g8 }1 O
  11. #define I2S_AudioFreq_16k                ((uint32_t)16000)# k, p2 w# d: @/ M$ H& j
  12. #define I2S_AudioFreq_11k                ((uint32_t)11025)
    5 p$ P+ f: ~- {0 v+ t
  13. #define I2S_AudioFreq_8k                 ((uint32_t)8000)( [/ p, d* O0 F$ |" L! Q
  14. #define I2S_AudioFreq_Default            ((uint32_t)2)
    $ R; z, A" W2 j' ?' I8 }

  15. ) r. d4 b% A4 }5 y5 U
  16. #define IS_I2S_AUDIO_FREQ(FREQ) ((((FREQ) >= I2S_AudioFreq_8k) && \! g/ ?! o; s* U' q* ?: ?% A: B
  17.                                  ((FREQ) <= I2S_AudioFreq_192k)) || \
    % g2 s7 S' ?0 U" B
  18.                                  ((FREQ) == I2S_AudioFreq_Default))
复制代码

1 n$ |, h+ U  e2 l2 C" S' }SPI_I2S_Clock_Polarity
! [" ]" m$ _$ }7 u  F2 T7 j; x. t4 V& v' r- y
  1. /** @defgroup SPI_I2S_Clock_Polarity $ n3 s# @; O, S9 T) e
  2.   * @{" C! B; t. Q2 s/ d- X
  3.   */
    $ m" B& k5 \/ A& F9 ?+ }0 _
  4. 6 P% }2 j1 Y" F7 e2 b
  5. #define I2S_CPOL_Low                    ((uint16_t)0x0000)& ?- p& ~7 K: b3 o2 W. v
  6. #define I2S_CPOL_High                   ((uint16_t)0x0008)
    - x) R5 ~+ t5 A% \
  7. #define IS_I2S_CPOL(CPOL) (((CPOL) == I2S_CPOL_Low) || \  G1 c" ]% u+ I6 \( z1 q! Q
  8.                            ((CPOL) == I2S_CPOL_High))
复制代码

$ e/ l$ ]7 F$ L2 j( v/ S7 m9 \SPI_I2S_DMA_transfer_requests) u9 a: u2 B' S4 n* M5 J
* y" d: x1 V0 @
  1. /** @defgroup SPI_I2S_DMA_transfer_requests
    2 p9 D2 c9 b3 @) }' M+ _2 @
  2.   * @{
    9 i# _$ [8 V7 m7 v# Q
  3.   */
    1 d! i2 @5 L# w+ J9 N2 F3 c7 D1 o5 [

  4. 2 @+ R$ P2 ~* c/ ?
  5. #define SPI_I2S_DMAReq_Tx               ((uint16_t)0x0002)
    4 X* q1 R8 N! ~/ I9 c
  6. #define SPI_I2S_DMAReq_Rx               ((uint16_t)0x0001)+ C+ H+ g5 A% ~; |+ |' e
  7. #define IS_SPI_I2S_DMAREQ(DMAREQ) ((((DMAREQ) & (uint16_t)0xFFFC) == 0x00) && ((DMAREQ) != 0x00))
复制代码
) Q7 k) a, S6 J6 u3 F* U8 b8 a
SPI_NSS_internal_software_management
9 Y$ Q7 Q& u' L  I$ S
0 Q* p, {1 @. \+ y
  1. /** @defgroup SPI_NSS_internal_software_management   l3 v# @. \( W) W6 R
  2.   * @{/ Z  e$ ~" g5 C9 D; ?, }  Z+ \
  3.   */3 e# ~' I- b: h2 z4 G! [( W

  4. - }7 ^; X; }% M
  5. #define SPI_NSSInternalSoft_Set         ((uint16_t)0x0100)
    / ?3 T( `, ]2 d/ c+ O
  6. #define SPI_NSSInternalSoft_Reset       ((uint16_t)0xFEFF)0 ?" P& l5 _! _/ E- h& ]0 ?
  7. #define IS_SPI_NSS_INTERNAL(INTERNAL) (((INTERNAL) == SPI_NSSInternalSoft_Set) || \" t" A9 w8 C& O; s: W) O& q
  8.                                        ((INTERNAL) == SPI_NSSInternalSoft_Reset))
复制代码

2 K) y5 b' r! R: F: Z! ?( NSPI_CRC_Transmit_Receive
: A# p1 L% y3 v, [, V+ I# U# ]
2 {3 @8 h. r( Y/ N% j# P
  1. /** @defgroup SPI_CRC_Transmit_Receive
    $ B4 [/ n" k9 s3 ^+ Q  q: V
  2.   * @{
    + S  e; O$ A3 }( x
  3.   */9 ]  h) O) u6 C) N2 ~. I

  4. ! ~% D% C/ m' l
  5. #define SPI_CRC_Tx                      ((uint8_t)0x00)5 Q. ~# l% m7 G" L/ u
  6. #define SPI_CRC_Rx                      ((uint8_t)0x01)$ M7 G- t) u8 ^7 z  g
  7. #define IS_SPI_CRC(CRC) (((CRC) == SPI_CRC_Tx) || ((CRC) == SPI_CRC_Rx))
复制代码
  |* C% Y1 n* N2 v
SPI_direction_transmit_receive
$ q  z4 u1 N2 C7 W- e% G0 d$ P0 F2 x% o! m
  1. /** @defgroup SPI_direction_transmit_receive
    4 a8 ?# K0 ~. J* G8 ^
  2.   * @{
    ' j; L% A$ E' a* t' A$ }
  3.   */
    ' v- c- `- V5 `( e
  4. 5 Q6 K) F' i/ u+ m1 I* N/ E
  5. #define SPI_Direction_Rx                ((uint16_t)0xBFFF)5 [6 Q; m. z8 e$ I; ]
  6. #define SPI_Direction_Tx                ((uint16_t)0x4000)
    # }6 d! w2 r( l- w5 N
  7. #define IS_SPI_DIRECTION(DIRECTION) (((DIRECTION) == SPI_Direction_Rx) || \
    ; u" ?4 l" o; U& r) ?
  8.                                      ((DIRECTION) == SPI_Direction_Tx))
复制代码
# q- f+ [# F, K2 A0 ]
SPI_I2S_interrupts_definition6 ?# b. w: ?% @! ~

; l* G! s8 G! }* h4 c9 j: R
  1. /** @defgroup SPI_I2S_interrupts_definition " V0 y. ?1 Y, C; F
  2.   * @{' S! h# \& l/ `" S* |/ F" e
  3.   */
    0 r" q! m0 v% P* q1 d

  4. & L4 L% f- |& {2 h6 \9 p
  5. #define SPI_I2S_IT_TXE                  ((uint8_t)0x71)2 R6 i7 @( r' ~* n/ W; u& V
  6. #define SPI_I2S_IT_RXNE                 ((uint8_t)0x60)
    4 k9 K, {4 I* U  y# B0 I
  7. #define SPI_I2S_IT_ERR                  ((uint8_t)0x50)0 p4 C; B. ^& w' Q1 a% i% ~9 H
  8. #define I2S_IT_UDR                      ((uint8_t)0x53)* j0 R/ L4 L  \$ q) Q
  9. #define SPI_I2S_IT_TIFRFE               ((uint8_t)0x58)
    & p/ W! t& \$ B& ]# b
  10. 7 h. b! N) t. F& v1 v; n  p
  11. #define IS_SPI_I2S_CONFIG_IT(IT) (((IT) == SPI_I2S_IT_TXE) || \$ _5 E# F$ V( ]
  12.                                   ((IT) == SPI_I2S_IT_RXNE) || \
    - ]$ {1 m8 g4 B' {7 J
  13.                                   ((IT) == SPI_I2S_IT_ERR))( u" {1 i( s5 ^$ @) h) G

  14. 0 D8 G. E; Z4 Z; ~
  15. #define SPI_I2S_IT_OVR                  ((uint8_t)0x56)7 `! ~6 O0 i: J4 r, J1 h7 {9 Y
  16. #define SPI_IT_MODF                     ((uint8_t)0x55)5 m8 E5 l. D' a
  17. #define SPI_IT_CRCERR                   ((uint8_t)0x54)- h: E8 j  d, ]6 |5 c$ J

  18. + W0 a/ D% M8 ~$ I% {1 o
  19. #define IS_SPI_I2S_CLEAR_IT(IT) (((IT) == SPI_IT_CRCERR))
    & N% m& d% o% o: i  S, l" l/ A
  20. ) y- @: F$ c* F) `- _. k
  21. #define IS_SPI_I2S_GET_IT(IT) (((IT) == SPI_I2S_IT_RXNE)|| ((IT) == SPI_I2S_IT_TXE) || \
    7 K/ e* r: ]) x& e* ~! P
  22.                                ((IT) == SPI_IT_CRCERR)  || ((IT) == SPI_IT_MODF) || \
    - s! c7 |% ]& z" ]3 C
  23.                                ((IT) == SPI_I2S_IT_OVR) || ((IT) == I2S_IT_UDR) ||\9 M4 Z& k: b+ M- ]- }9 m& Q) U
  24.                                ((IT) == SPI_I2S_IT_TIFRFE))
复制代码

& i6 E8 O& _( O3 E3 b, n$ X5 SSPI_I2S_flags_definition
: h$ r0 K) P# E4 Q& u& D% l" _8 A. Q% \0 p, O0 i: p
  1. /** @defgroup SPI_I2S_flags_definition
    ' h8 e+ p: O  c7 v
  2.   * @{: {0 t! g5 q1 S3 s
  3.   */
    ! G8 X+ j* ^: }. H4 a( g5 D. m5 y

  4. 4 g- q+ E5 J, ]4 ?9 O  N, g- Z
  5. #define SPI_I2S_FLAG_RXNE               ((uint16_t)0x0001)
    7 x" ^. X8 H7 o' G. p2 w
  6. #define SPI_I2S_FLAG_TXE                ((uint16_t)0x0002)/ |$ }# @5 ?7 i) o: u0 K% {* i
  7. #define I2S_FLAG_CHSIDE                 ((uint16_t)0x0004)2 P1 p; G" s+ ]' P9 R5 S
  8. #define I2S_FLAG_UDR                    ((uint16_t)0x0008)
    2 Z7 d% c8 F* t9 \! D6 X; X
  9. #define SPI_FLAG_CRCERR                 ((uint16_t)0x0010)
    ' _" B5 ]3 W# L! |! S) n$ N3 G% {  x
  10. #define SPI_FLAG_MODF                   ((uint16_t)0x0020)
    . {; E: J8 W$ Z2 c4 y# u8 K
  11. #define SPI_I2S_FLAG_OVR                ((uint16_t)0x0040)
    ! a+ q1 P; V5 I4 }- Q+ k9 g! a
  12. #define SPI_I2S_FLAG_BSY                ((uint16_t)0x0080)
    . w4 }; F# S& s
  13. #define SPI_I2S_FLAG_TIFRFE             ((uint16_t)0x0100)
    ! d! w7 z* [, C

  14. 7 c. M6 A3 }6 l( q2 U: Z# f
  15. #define IS_SPI_I2S_CLEAR_FLAG(FLAG) (((FLAG) == SPI_FLAG_CRCERR))
    6 L) j$ R) c" a7 z+ ]- q9 N
  16. #define IS_SPI_I2S_GET_FLAG(FLAG) (((FLAG) == SPI_I2S_FLAG_BSY) || ((FLAG) == SPI_I2S_FLAG_OVR) || \
    9 f/ G2 x: A! V8 x% ]7 m
  17.                                    ((FLAG) == SPI_FLAG_MODF) || ((FLAG) == SPI_FLAG_CRCERR) || \6 v4 l3 r+ u" V! ]& n6 r+ i+ u5 g
  18.                                    ((FLAG) == I2S_FLAG_UDR) || ((FLAG) == I2S_FLAG_CHSIDE) || \
    & o$ r4 R9 K: l6 }# m8 x
  19.                                    ((FLAG) == SPI_I2S_FLAG_TXE) || ((FLAG) == SPI_I2S_FLAG_RXNE)|| \
    * p2 X" i! e) A
  20.                                    ((FLAG) == SPI_I2S_FLAG_TIFRFE))
复制代码
3 u# `! E- d2 ~$ S- Q
03. 相关函数
, V; U7 q" b8 G$ R; u
  1. /* Exported macro ------------------------------------------------------------*/7 u& [7 B! Z1 T" t
  2. /* Exported functions --------------------------------------------------------*/   |- ?$ N+ K; ]7 ]' m+ v% p

  3. / }! }/ Y9 v' n/ z% i
  4. /*  Function used to set the SPI configuration to the default reset state *****/ , P6 a! |& j0 s7 E% V$ [
  5. void SPI_I2S_DeInit(SPI_TypeDef* SPIx);
    3 n9 M' u5 B9 H4 K( C; s
  6. 6 y+ B4 H# _7 z7 ]! A( Q5 k
  7. /* Initialization and Configuration functions *********************************/
    " {- G8 A. e" }$ _6 F+ c( p; Z
  8. void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct);
    7 q9 ^8 o) F. V3 U: l5 ]- }/ r
  9. void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct);
    & m6 D, {( E- j7 K' H
  10. void SPI_StructInit(SPI_InitTypeDef* SPI_InitStruct);. x8 M3 d; C: I8 S9 w7 [
  11. void I2S_StructInit(I2S_InitTypeDef* I2S_InitStruct);
    9 Q2 Y- c' n$ k. |+ C- D" m
  12. void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState);
    3 Z+ Z7 \( U+ G: y! E
  13. void I2S_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState);
    ) U& ]& s+ ?+ r& r  a
  14. void SPI_DataSizeConfig(SPI_TypeDef* SPIx, uint16_t SPI_DataSize);* _! c6 O9 i$ d9 w9 u" B( |, _6 l
  15. void SPI_BiDirectionalLineConfig(SPI_TypeDef* SPIx, uint16_t SPI_Direction);, q( t" v7 B( L& p" y8 X
  16. void SPI_NSSInternalSoftwareConfig(SPI_TypeDef* SPIx, uint16_t SPI_NSSInternalSoft);/ L' J+ a) d! r- Y1 ]
  17. void SPI_SSOutputCmd(SPI_TypeDef* SPIx, FunctionalState NewState);; z1 E! s# p( q
  18. void SPI_TIModeCmd(SPI_TypeDef* SPIx, FunctionalState NewState);
    $ \9 n' P# t' \8 C( z
  19. . C% H2 l* Q  E: B- l- n
  20. void I2S_FullDuplexConfig(SPI_TypeDef* I2Sxext, I2S_InitTypeDef* I2S_InitStruct);
    7 ]' k* j) l1 ^$ A; g

  21. % ]7 P, J% {5 i' T
  22. /* Data transfers functions ***************************************************/ / T% v9 I) a9 i2 k7 ?0 d$ P* k
  23. void SPI_I2S_SendData(SPI_TypeDef* SPIx, uint16_t Data);
    1 W0 J3 W& M/ R6 F
  24. uint16_t SPI_I2S_ReceiveData(SPI_TypeDef* SPIx);+ a. b% @5 E1 T3 ]" }

  25. 1 {: V- p. L, V$ X) u7 x
  26. /* Hardware CRC Calculation functions *****************************************/
    4 k1 j( A4 ?! ~( L% u
  27. void SPI_CalculateCRC(SPI_TypeDef* SPIx, FunctionalState NewState);" J1 {" U; i9 T" Y6 ^& O* H
  28. void SPI_TransmitCRC(SPI_TypeDef* SPIx);
    . Q/ r7 @5 q* L  y
  29. uint16_t SPI_GetCRC(SPI_TypeDef* SPIx, uint8_t SPI_CRC);* r, b- w7 Y  O9 I- ]
  30. uint16_t SPI_GetCRCPolynomial(SPI_TypeDef* SPIx);
    : Z1 s' F$ z" I, Y. ?: F
  31. , {: P$ Z; |1 N
  32. /* DMA transfers management functions *****************************************/. j& G& _  b( V: A
  33. void SPI_I2S_DMACmd(SPI_TypeDef* SPIx, uint16_t SPI_I2S_DMAReq, FunctionalState NewState);4 E) n; v4 }; g/ A

  34. . Y( u4 F! a6 p# ?. W& J$ a
  35. /* Interrupts and flags management functions **********************************/
    4 ?( x2 G/ {% C) a
  36. void SPI_I2S_ITConfig(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT, FunctionalState NewState);
    5 N* O- x: L7 t% i% a3 _
  37. FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG);/ Y8 a& R2 i7 H) _8 ~
  38. void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG);! p' {0 H! }. X; k( A/ r
  39. ITStatus SPI_I2S_GetITStatus(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT);1 F5 M8 s, T8 U5 ~  N
  40. void SPI_I2S_ClearITPendingBit(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT);
复制代码

5 @8 Z! c0 p& B) V04. 结构体封装% I# \$ f4 v5 r0 M
  1. /** 4 r; X. k. @4 a# ^  E( D9 r4 d* X' y
  2.   * @brief Serial Peripheral Interface
    - ~/ ?* X" J! @7 ^5 Y
  3.   */
      x$ |% e/ E1 _

  4. # t, M4 O3 M4 v& L
  5. typedef struct7 b3 h7 a* k  o4 Q
  6. {; Y1 ^* i* B" A5 J  y
  7.   __IO uint16_t CR1;        /*!< SPI control register 1 (not used in I2S mode),      Address offset: 0x00 */; x) C6 F, p! y  K3 [* h
  8.   uint16_t      RESERVED0;  /*!< Reserved, 0x02                                                           */# |5 D( Q4 t6 ?: d$ W; }: ?+ Z8 N
  9.   __IO uint16_t CR2;        /*!< SPI control register 2,                             Address offset: 0x04 */
    + y  H3 u8 ]$ h9 A5 X
  10.   uint16_t      RESERVED1;  /*!< Reserved, 0x06                                                           */
    ' I# _: z7 n4 y4 G3 [7 }  r
  11.   __IO uint16_t SR;         /*!< SPI status register,                                Address offset: 0x08 */
    # Q6 o4 P) o6 a
  12.   uint16_t      RESERVED2;  /*!< Reserved, 0x0A                                                           */
    5 M; n9 O0 W) Z6 A& p1 ^8 B! Z
  13.   __IO uint16_t DR;         /*!< SPI data register,                                  Address offset: 0x0C */1 F& b! M* V+ R, M" `9 h  [( ^
  14.   uint16_t      RESERVED3;  /*!< Reserved, 0x0E                                                           */
    + f* s9 R" T( r* ]; K" u
  15.   __IO uint16_t CRCPR;      /*!< SPI CRC polynomial register (not used in I2S mode), Address offset: 0x10 */
    6 ?* L! e- R0 w+ Y( C" n
  16.   uint16_t      RESERVED4;  /*!< Reserved, 0x12                                                           */" N' u- p. j  z% }$ R
  17.   __IO uint16_t RXCRCR;     /*!< SPI RX CRC register (not used in I2S mode),         Address offset: 0x14 */) l0 o; y  g2 n- B
  18.   uint16_t      RESERVED5;  /*!< Reserved, 0x16                                                           */
    ) H; h, E/ h, q5 K0 @
  19.   __IO uint16_t TXCRCR;     /*!< SPI TX CRC register (not used in I2S mode),         Address offset: 0x18 */
    8 o( |8 c/ W/ @+ C6 E4 a
  20.   uint16_t      RESERVED6;  /*!< Reserved, 0x1A                                                           */7 g# k1 N9 q* |4 d; ~. X
  21.   __IO uint16_t I2SCFGR;    /*!< SPI_I2S configuration register,                     Address offset: 0x1C */
      F; V9 @( E0 l9 Q, ^
  22.   uint16_t      RESERVED7;  /*!< Reserved, 0x1E                                                           */
    0 w/ r( }+ X  h; d( a- Z/ j
  23.   __IO uint16_t I2SPR;      /*!< SPI_I2S prescaler register,                         Address offset: 0x20 */! s- F, Z* y# @! J1 O) ]! I% _, n
  24.   uint16_t      RESERVED8;  /*!< Reserved, 0x22                                                           */
    $ o+ Z2 g# f, n* @6 g% N- S
  25. } SPI_TypeDef;
复制代码
1 p5 S  [* N+ M. h2 a) f# P/ T) }

! Y; p( r' v, _& v7 l; ^  ^; n0 Y& J0 h3 g9 h" i; |
收藏 评论0 发布时间:2022-6-16 18:00

举报

0个回答
关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版