资源简介
spi主机程序
STM32CubeMx生成
Hal库
DMA发送接收
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART1_UART_Init();
MX_SPI5_Init();
/* USER CODE BEGIN 2 */
// HAL_UART_Receive_DMA(&huart1,rxBuffer,BUFFER_SIZE);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_WritePin(GPIOF, GPIO_PIN_6, GPIO_PIN_RESET);
spi_tx[0] =6;
spi_tx[1] = 7;
spi_tx[2] = 8;
spi_tx[3] = 9;
memset(spi_rx,0,BUFFER_SIZE);
HAL_SPI_TransmitReceive_DMA(&hspi5,spi_tx,spi_rx,BUFFER_SIZE);
HAL_GPIO_WritePin(GPIOF, GPIO_PIN_6, GPIO_PIN_SET);
HAL_Delay(1000);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
代码片段和文件信息
/**
******************************************************************************
* @file system_stm32f4xx.c
* @author MCD Application Team
* @brief CMSIS Cortex-M4 Device Peripheral Access layer System Source File.
*
* This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the “startup_stm32f4xx.s“ file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK) it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
*
******************************************************************************
* @attention
*
* © COPYRIGHT 2017 STMicroelectronics
*
* Redistribution and use in source and binary forms with or without modification
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL
* DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32f4xx_s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-04-28 08:57 spi master\
文件 6296 2020-03-23 15:57 spi master\.mxproject
目录 0 2020-04-28 08:57 spi master\Drivers\
目录 0 2020-04-28 08:57 spi master\Drivers\CMSIS\
目录 0 2020-04-28 08:57 spi master\Drivers\CMSIS\Device\
目录 0 2020-04-28 08:57 spi master\Drivers\CMSIS\Device\ST\
目录 0 2020-04-28 08:57 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\
目录 0 2020-04-28 08:57 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\
文件 719923 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xc.h
文件 719923 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xe.h
文件 1228777 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f405xx.h
文件 1344524 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h
文件 606160 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410cx.h
文件 606469 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410rx.h
文件 601407 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f410tx.h
文件 723418 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f411xe.h
文件 1167059 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f412cx.h
文件 1253447 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f412rx.h
文件 1253447 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f412vx.h
文件 1253519 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f412zx.h
文件 1307927 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f413xx.h
文件 1252263 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f415xx.h
文件 1367610 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f417xx.h
文件 1319090 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f423xx.h
文件 1446739 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f427xx.h
文件 1475167 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f429xx.h
文件 1470799 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f437xx.h
文件 1498451 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f439xx.h
文件 1375827 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f446xx.h
文件 1748494 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f469xx.h
文件 1772039 2019-05-28 18:30 spi master\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f479xx.h
............此处省略723个文件信息
相关资源
- 3DMAXDAE模型查看器
- 狂神docker笔记超详细.zip
- HAL库 STM32 USART1和USART2 DMA模式透传。
- CDMA系统工程手册(英文版)高清晰
- Cesium中将3DMax模型转换为3DTIles格式工
- PCIe DMA部分文件及重要模块代码不是工
- Xilinx zynq PS 透过bram和dma和PL进行数据
- MindMaster_专业激活版.rar
- MindManager2018破解版18.0.284.zip
- Unity3D模型-各种石头、蘑菇、小草、树
- STM32F4系列例程大全,包含各个模块(
- zw_PatternRecognitionAndMachineLearning.zip
- MindMaster Linux 专业版(无水印)
- Landmark人脸68个关键点检测dat模型库(
- 实验3:CubeMx+Proteus+STM32 IO口模拟SPI协
- ZCU104_DMA_test.rar
- Zynq学习之使用AXI_DMA (Direct Register
- inspinia 2.9.3官方原版.zip
- mindmasterPro7.11直装破解版.zip
- 戴尔DELL灵越Inspiron N4120蓝牙驱动程序
- 3dmax8破解版
- Spring+Cloud微服务实战_PDF1-200高清完整
- 各版本.NET的Spire组件dll.zip
- 3D Map Generator PS插件汉化版
- STM32F407 使用增量式速度 PI控制4路直流
- 无刷电机控制
- axi_dma.rar
- mindmaster6.3破解版
- 3dmax 豪华客厅模型,可直接出渲染图
- 辽宁舰.zip
评论
共有 条评论