SPI u SPI stm 32 f 4 xxspi

  • Slides: 26
Download presentation

SPI接口原理 u. SPI相关库函数: stm 32 f 4 xx_spi. c/stm 32 f 4 xx_spi. h

SPI接口原理 u. SPI相关库函数: stm 32 f 4 xx_spi. c/stm 32 f 4 xx_spi. h 淘宝店铺:http: //eboard. taobao. com 技术论坛

SPI接口原理 u. SPI相关库函数: void SPI_I 2 S_De. Init(SPI_Type. Def* SPIx); void SPI_Init(SPI_Type. Def* SPIx,

SPI接口原理 u. SPI相关库函数: void SPI_I 2 S_De. Init(SPI_Type. Def* SPIx); void SPI_Init(SPI_Type. Def* SPIx, SPI_Init. Type. Def* SPI_Init. Struct); void SPI_Cmd(SPI_Type. Def* SPIx, Functional. State New. State); void SPI_I 2 S_ITConfig(SPI_Type. Def* SPIx, uint 8_t SPI_I 2 S_IT, Functional. State New. State); void SPI_I 2 S_DMACmd(SPI_Type. Def* SPIx, uint 16_t SPI_I 2 S_DMAReq, Functional. State New. State); void SPI_I 2 S_Send. Data(SPI_Type. Def* SPIx, uint 16_t Data); uint 16_t SPI_I 2 S_Receive. Data(SPI_Type. Def* SPIx); void SPI_Data. Size. Config(SPI_Type. Def* SPIx, uint 16_t SPI_Data. Size); Flag. Status SPI_I 2 S_Get. Flag. Status(SPI_Type. Def* SPIx, uint 16_t SPI_I 2 S_FLAG); void SPI_I 2 S_Clear. Flag(SPI_Type. Def* SPIx, uint 16_t SPI_I 2 S_FLAG); ITStatus SPI_I 2 S_Get. ITStatus(SPI_Type. Def* SPIx, uint 8_t SPI_I 2 S_IT); void SPI_I 2 S_Clear. ITPending. Bit(SPI_Type. Def* SPIx, uint 8_t SPI_I 2 S_IT); 淘宝店铺:http: //eboard. taobao. com 技术论坛

SPI接口原理 u程序配置过程: ①使能SPIx和IO口时钟 RCC_AHBx. Periph. Clock. Cmd() / RCC_APBx. Periph. Clock. Cmd(); ②初始化IO口为复用功能 void

SPI接口原理 u程序配置过程: ①使能SPIx和IO口时钟 RCC_AHBx. Periph. Clock. Cmd() / RCC_APBx. Periph. Clock. Cmd(); ②初始化IO口为复用功能 void GPIO_Init(GPIO_Type. Def* GPIOx, GPIO_Init. Type. Def* GPIO_Init. Struct); ③设置引脚复用映射: GPIO_Pin. AFConfig(); ②初始化SPIx, 设置SPIx 作模式 void SPI_Init(SPI_Type. Def* SPIx, SPI_Init. Type. Def* SPI_Init. Struct); ③使能SPIx void SPI_Cmd(SPI_Type. Def* SPIx, Functional. State New. State); ④SPI传输数据 void SPI_I 2 S_Send. Data(SPI_Type. Def* SPIx, uint 16_t Data); uint 16_t SPI_I 2 S_Receive. Data(SPI_Type. Def* SPIx) ; ⑤查看SPI传输状态 SPI_I 2 S_Get. Flag. Status(SPI 2, SPI_I 2 S_FLAG_RXNE); 淘宝店铺:http: //eboard. taobao. com 技术论坛

SPI接口原理 W 25 Qxx命令 淘宝店铺:http: //eboard. taobao. com 技术论坛

SPI接口原理 W 25 Qxx命令 淘宝店铺:http: //eboard. taobao. com 技术论坛