Stm32Dma.rar

  • 了解作者
  • C/C++
    开发工具
  • 671KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 1
    下载次数
  • 2021-01-28 13:38
    上传日期
学习STM32的基础例程,对初学者很有帮助,主要是对DMA的基本操作
Stm32Dma.rar
  • Stm32Dma
  • list
  • stm32f10x_vector.lst
    36.6KB
  • Stm32Dma.map
    68.5KB
  • cortexm3_macro.lst
    25.5KB
  • boot
  • cortexm3_macro.s
    10.1KB
  • stm32f10x_vector.s
    12.6KB
  • obj
  • stm32f10x_dma.d
    492B
  • Stm32Dma.tra
    1.8KB
  • stm32f10x_usart.o
    52.9KB
  • stm32f10x_lib.d
    1.7KB
  • stm32f10x_gpio.d
    502B
  • cortexm3_macro.o
    2.4KB
  • stm32f10x_it.crf
    146.7KB
  • stm32f10x_gpio.crf
    41.6KB
  • stm32f10x_systick.o
    30.9KB
  • stm32f10x_flash.d
    456B
  • main.crf
    151.6KB
  • Stm32Dma.plg
    1.3KB
  • stm32f10x_dma.o
    49.3KB
  • Stm32Dma_sct.Bak
    479B
  • stm32f10x_systick.crf
    26.5KB
  • stm32f10x_flash.crf
    37.5KB
  • Stm32Dma.htm
    58.6KB
  • stm32f10x_dma.crf
    41.8KB
  • stm32f10x_usart.crf
    44.8KB
  • Stm32Dma.lnp
    569B
  • stm32f10x_flash.o
    43.3KB
  • stm32f10x_systick.d
    474B
  • main.d
    1.5KB
  • stm32f10x_usart.d
    512B
  • stm32f10x_nvic.crf
    35.7KB
  • stm32f10x_rcc.d
    438B
  • stm32f10x_nvic.d
    447B
  • stm32f10x_nvic.o
    46KB
  • stm32f10x_it.d
    1.7KB
  • Stm32Dma.sct
    479B
  • stm32f10x_rcc.o
    47.6KB
  • main.o
    173.4KB
  • stm32f10x_gpio.o
    49.3KB
  • stm32f10x_rcc.crf
    40.2KB
  • stm32f10x_lib.o
    163.8KB
  • Stm32Dma.axf
    131.2KB
  • stm32f10x_lib.crf
    143.6KB
  • stm32f10x_vector.o
    5.4KB
  • stm32f10x_it.o
    178.4KB
  • library
  • inc
  • stm32f10x_spi.h
    13.2KB
  • stm32f10x_crc.h
    1.8KB
  • stm32f10x_tim.h
    46.1KB
  • stm32f10x_usart.h
    13.8KB
  • stm32f10x_dma.h
    17.6KB
  • stm32f10x_fsmc.h
    18.6KB
  • stm32f10x_type.h
    3.3KB
  • stm32f10x_i2c.h
    15.1KB
  • stm32f10x_dac.h
    9.4KB
  • stm32f10x_iwdg.h
    3.3KB
  • stm32f10x_nvic.h
    18.7KB
  • stm32f10x_systick.h
    3.1KB
  • stm32f10x_map.h
    27.6KB
  • stm32f10x_bkp.h
    6.7KB
  • stm32f10x_pwr.h
    3.8KB
  • stm32f10x_dbgmcu.h
    2.8KB
  • stm32f10x_exti.h
    5.6KB
  • stm32f10x_can.h
    12KB
  • stm32f10x_adc.h
    18.4KB
  • cortexm3_macro.h
    2.2KB
  • stm32f10x_rcc.h
    14.4KB
  • stm32f10x_rtc.h
    3.5KB
  • stm32f10x_flash.h
    13.7KB
  • stm32f10x_sdio.h
    17.9KB
  • stm32f10x_lib.h
    3.1KB
  • stm32f10x_wwdg.h
    2.6KB
  • stm32f10x_gpio.h
    14.5KB
  • src
  • stm32f10x_adc.c
    57.2KB
  • stm32f10x_fsmc.c
    40.6KB
  • stm32f10x_flash.c
    31.9KB
  • stm32f10x_rcc.c
    42.8KB
  • stm32f10x_wwdg.c
    7.3KB
  • stm32f10x_tim.c
    128KB
  • stm32f10x_iwdg.c
    6.3KB
  • stm32f10x_gpio.c
    22KB
  • stm32f10x_dbgmcu.c
    5.1KB
  • stm32f10x_pwr.c
    10.9KB
  • stm32f10x_crc.c
    4.5KB
  • stm32f10x_lib.c
    8.9KB
  • stm32f10x_dac.c
    16.8KB
  • stm32f10x_sdio.c
    38.4KB
  • stm32f10x_can.c
    31.3KB
  • stm32f10x_bkp.c
    10.9KB
  • stm32f10x_rtc.c
    11.9KB
  • stm32f10x_systick.c
    6.8KB
  • stm32f10x_usart.c
    43.2KB
  • stm32f10x_i2c.c
    46.7KB
  • stm32f10x_spi.c
    34.1KB
  • stm32f10x_nvic.c
    28.1KB
内容介绍
/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** * File Name : stm32f10x_tim.c * Author : MCD Application Team * Version : V2.0.2 * Date : 07/11/2008 * Description : This file provides all the TIM firmware functions. ******************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. *******************************************************************************/ /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_tim.h" #include "stm32f10x_rcc.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* ---------------------- TIM registers bit mask ------------------------ */ #define CR1_CEN_Set ((u16)0x0001) #define CR1_CEN_Reset ((u16)0x03FE) #define CR1_UDIS_Set ((u16)0x0002) #define CR1_UDIS_Reset ((u16)0x03FD) #define CR1_URS_Set ((u16)0x0004) #define CR1_URS_Reset ((u16)0x03FB) #define CR1_OPM_Reset ((u16)0x03F7) #define CR1_CounterMode_Mask ((u16)0x038F) #define CR1_ARPE_Set ((u16)0x0080) #define CR1_ARPE_Reset ((u16)0x037F) #define CR1_CKD_Mask ((u16)0x00FF) #define CR2_CCPC_Set ((u16)0x0001) #define CR2_CCPC_Reset ((u16)0xFFFE) #define CR2_CCUS_Set ((u16)0x0004) #define CR2_CCUS_Reset ((u16)0xFFFB) #define CR2_CCDS_Set ((u16)0x0008) #define CR2_CCDS_Reset ((u16)0xFFF7) #define CR2_MMS_Mask ((u16)0xFF8F) #define CR2_TI1S_Set ((u16)0x0080) #define CR2_TI1S_Reset ((u16)0xFF7F) #define CR2_OIS1_Reset ((u16)0x7EFF) #define CR2_OIS1N_Reset ((u16)0x7DFF) #define CR2_OIS2_Reset ((u16)0x7BFF) #define CR2_OIS2N_Reset ((u16)0x77FF) #define CR2_OIS3_Reset ((u16)0x6FFF) #define CR2_OIS3N_Reset ((u16)0x5FFF) #define CR2_OIS4_Reset ((u16)0x3FFF) #define SMCR_SMS_Mask ((u16)0xFFF8) #define SMCR_ETR_Mask ((u16)0x00FF) #define SMCR_TS_Mask ((u16)0xFF8F) #define SMCR_MSM_Reset ((u16)0xFF7F) #define SMCR_ECE_Set ((u16)0x4000) #define CCMR_CC13S_Mask ((u16)0xFFFC) #define CCMR_CC24S_Mask ((u16)0xFCFF) #define CCMR_TI13Direct_Set ((u16)0x0001) #define CCMR_TI24Direct_Set ((u16)0x0100) #define CCMR_OC13FE_Reset ((u16)0xFFFB) #define CCMR_OC24FE_Reset ((u16)0xFBFF) #define CCMR_OC13PE_Reset ((u16)0xFFF7) #define CCMR_OC24PE_Reset ((u16)0xF7FF) #define CCMR_OC13M_Mask ((u16)0xFF8F) #define CCMR_OC24M_Mask ((u16)0x8FFF) #define CCMR_OC13CE_Reset ((u16)0xFF7F) #define CCMR_OC24CE_Reset ((u16)0x7FFF) #define CCMR_IC13PSC_Mask ((u16)0xFFF3) #define CCMR_IC24PSC_Mask ((u16)0xF3FF) #define CCMR_IC13F_Mask ((u16)0xFF0F) #define CCMR_IC24F_Mask ((u16)0x0FFF) #define CCMR_Offset ((u16)0x0018) #define CCER_CCE_Set ((u16)0x0001) #define CCER_CCNE_Set ((u16)0x0004) #define CCER_CC1P_Reset ((u16)0xFFFD) #define CCER_CC2P_Reset ((u16)0xFFDF) #define CCER_CC3P_Reset ((u16)0xFDFF) #define CCER_CC4P_Reset ((u16)0xDFFF) #define CCER_CC1NP_Reset ((u16)0xFFF7) #define CCER_CC2NP_Reset ((u16)0xFF7F) #define CCER_CC3NP_Reset ((u16)0xF7FF) #define CCER_CC1E_Set ((u16)0x0001) #define CCER_CC1E_Reset ((u16)0xFFFE) #define CCER_CC1NE_Reset ((u16)0xFFFB) #define CCER_CC2E_Set ((u16)0x0010) #define CCER_CC2E_Reset ((u16)0xFFEF) #define CCER_CC2NE_Reset ((u16)0xFFBF) #define CCER_CC3E_Set ((u16)0x0100) #define CCER_CC3E_Reset ((u16)0xFEFF) #define CCER_CC3NE_Reset ((u16)0xFBFF) #define CCER_CC4E_Set ((u16)0x1000) #define CCER_CC4E_Reset ((u16)0xEFFF) #define BDTR_MOE_Set ((u16)0x8000) #define BDTR_MOE_Reset ((u16)0x7FFF) /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ static void TI1_Config(TIM_TypeDef* TIMx, u16 TIM_ICPolarity, u16 TIM_ICSelection, u16 TIM_ICFilter); static void TI2_Config(TIM_TypeDef* TIMx, u16 TIM_ICPolarity, u16 TIM_ICSelection, u16 TIM_ICFilter); static void TI3_Config(TIM_TypeDef* TIMx, u16 TIM_ICPolarity, u16 TIM_ICSelection, u16 TIM_ICFilter); static void TI4_Config(TIM_TypeDef* TIMx, u16 TIM_ICPolarity, u16 TIM_ICSelection, u16 TIM_ICFilter); /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ /******************************************************************************* * Function Name : TIM_DeInit * Description : Deinitializes the TIMx peripheral registers to their default * reset values. * Input : - TIMx: where x can be 1 to 8 to select the TIM peripheral. * Output : None * Return : None *******************************************************************************/ void TIM_DeInit(TIM_TypeDef* TIMx) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); switch (*(u32*)&TIMx) { case TIM1_BASE: RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE); break; case TIM2_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE); break; case TIM3_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE); break; case TIM4_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE); break; case TIM5_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE); break; case TIM6_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE); break; case TIM7_BASE: RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE); break; case TIM8_BASE: RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, DISABLE); break; default: break; } } /*************
评论
    相关推荐
    • stm32 ADC,DMA
      stm32 ADC,DMA使用,献给初学者
    • 金牛STM32F107DMA
      金牛开发板 STM32F107 ADC DMA keil uV3 v3.7 固件库 v3.3.0
    • stm32 DMA.zip
      STM32f103串口DMA驱动。本代码是基于KEIL4的完整工程,可以直接运行。代码中实现了UART1/UART2的自动收发。去掉了其它不必要的程序代码
    • stm32 uart DMA
      绝对可以运行的。放心用,我也是开始用这STM32,方便大家学习!
    • STM32串口DMA通信
      可用于STM32串口DMA通信方式,程序可以使用
    • USART_DMA STM32F4
      DMA 方式的 USART 收发,释放cpu资源,让数据传输更快捷。STM32F407上验证通过。
    • STM32 DMA 的使用
      代码中有stm32DMA的配置和使用,十分详细
    • STM32 DMA源码
      1、适用于STM32RCT6最小系统板 2、通过按键(KEY0)实现内存向外设(USART1)传输 3、DMA发送具有查询和中断两种方式 4、若使用串口助手sscom33应先用HEX接收,再切换为字符接收,否则格式会出错;XCOM、Putty、Access...
    • DAC+TIM+DMA STM32 CUBEMX
      DAC+TIM+DMA STM32 CUBEMX
    • STM32F103-DMA
      设置STM32DMA,利用它来实现串口数据传送,并在TFT-LCD模块上显示当前的传送进度,打开串口调试工具,按住轻触开关则可看到界面的信息