stm32 风洞 pid算法程序

  • Y9_567682
    了解作者
  • 6.1MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-13 04:33
    上传日期
stm32 风洞控制程序 PID
5.风洞(位置式PID).rar
  • 5.风洞(位置式PID)
  • PRO
  • Listings
  • pro.map
    181.9KB
  • startup_stm32f10x_hd.lst
    50KB
  • pro.uvprojx
    22.5KB
  • pro.uvoptx
    22KB
  • pro.uvguix.temp
    134.4KB
  • HARDWARE
  • KEY
  • key.h
    1.9KB
  • key.c
    2.6KB
  • LCD
  • lcd.c
    83.5KB
  • font.h
    34.2KB
  • lcd.h
    7.3KB
  • ULTRASONIC
  • ultrasonic.h
    1000B
  • ultrasonic.c
    4.1KB
  • MOTOR
  • motor.c
    1.9KB
  • motor.h
    362B
  • CONTROL
  • control.h
    1.9KB
  • control.c
    6KB
  • LED
  • led.h
    364B
  • led.c
    965B
  • CORE
  • core_cm3.h
    83.7KB
  • startup_stm32f10x_hd.s
    15.1KB
  • core_cm3.c
    16.9KB
  • SYSTEM
  • sys
  • sys.c
    855B
  • sys.h
    2.7KB
  • delay
  • delay.c
    7.8KB
  • delay.h
    1.9KB
  • usart
  • usart.c
    4.6KB
  • usart.h
    1.2KB
  • STM_SYS
  • stm32f10x_conf.h
    3.2KB
  • stm32f10x.h
    619.1KB
  • stm32f10x_it.c
    2.4KB
  • system_stm32f10x.c
    35.7KB
  • system_stm32f10x.h
    2KB
  • stm32f10x_it.h
    1.9KB
  • OBJ
  • main.d
    2.1KB
  • usart.crf
    346.3KB
  • stm32f10x_iwdg.crf
    340.4KB
  • stm32f10x_gpio.o
    397.4KB
  • control.d
    1.9KB
  • stm32f10x_i2c.o
    418.3KB
  • stm32f10x_wwdg.d
    1.9KB
  • stm32f10x_tim.crf
    362.3KB
  • misc.o
    377.3KB
  • stm32f10x_bkp.crf
    341.7KB
  • malloc.o
    383.9KB
  • stm32f10x_exti.crf
    341.3KB
  • stm32f10x_rcc.o
    417.1KB
  • pro.build_log.htm
    2.4KB
  • malloc.crf
    342.3KB
  • ultrasonic.d
    2KB
  • main.o
    390.3KB
  • stm32f10x_it.d
    1.8KB
  • pro_pro.dep
    80.3KB
  • stm32f10x_it.o
    381.9KB
  • stm32f10x_cec.crf
    342.2KB
  • adc.o
    391.6KB
  • stm32f10x_spi.crf
    344.6KB
  • ultrasonic.o
    386.4KB
  • stm32f10x_spi.o
    403.9KB
  • stm32f10x_sdio.o
    412.1KB
  • motor.o
    375KB
  • pro.sct
    479B
  • main.crf
    356.4KB
  • stm32f10x_spi.d
    1.9KB
  • stm32f10x_rcc.d
    1.9KB
  • adc.crf
    356.9KB
  • stm32f10x_bkp.o
    387.1KB
  • stm32f10x_gpio.d
    1.9KB
  • startup_stm32f10x_hd.o
    6.7KB
  • stm32f10x_adc.crf
    347.8KB
  • stm32f10x_usart.d
    2KB
  • dac.o
    386KB
  • stm32f10x_pwr.o
    382.9KB
  • lcd.o
    478.3KB
  • malloc.d
    1.7KB
  • stm32f10x_flash.d
    2KB
  • pro_sct.Bak
    479B
  • stm32f10x_dac.d
    1.9KB
  • stm32f10x_fsmc.crf
    346.1KB
  • stm32f10x_tim.o
    502.5KB
  • pwm.crf
    352.4KB
  • stm32f10x_i2c.d
    1.9KB
  • stm32f10x_crc.crf
    340.3KB
  • core_cm3.o
    11.2KB
内容介绍
/** ****************************************************************************** * @file stm32f10x_tim.c * @author MCD Application Team * @version V3.5.0 * @date 11-March-2011 * @brief This file provides all the TIM firmware functions. ****************************************************************************** * @attention * * 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. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_tim.h" #include "stm32f10x_rcc.h" /** @addtogroup STM32F10x_StdPeriph_Driver * @{ */ /** @defgroup TIM * @brief TIM driver modules * @{ */ /** @defgroup TIM_Private_TypesDefinitions * @{ */ /** * @} */ /** @defgroup TIM_Private_Defines * @{ */ /* ---------------------- TIM registers bit mask ------------------------ */ #define SMCR_ETR_Mask ((uint16_t)0x00FF) #define CCMR_Offset ((uint16_t)0x0018) #define CCER_CCE_Set ((uint16_t)0x0001) #define CCER_CCNE_Set ((uint16_t)0x0004) /** * @} */ /** @defgroup TIM_Private_Macros * @{ */ /** * @} */ /** @defgroup TIM_Private_Variables * @{ */ /** * @} */ /** @defgroup TIM_Private_FunctionPrototypes * @{ */ static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter); /** * @} */ /** @defgroup TIM_Private_Macros * @{ */ /** * @} */ /** @defgroup TIM_Private_Variables * @{ */ /** * @} */ /** @defgroup TIM_Private_FunctionPrototypes * @{ */ /** * @} */ /** @defgroup TIM_Private_Functions * @{ */ /** * @brief Deinitializes the TIMx peripheral registers to their default reset values. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @retval None */ void TIM_DeInit(TIM_TypeDef* TIMx) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); if (TIMx == TIM1) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE); } else if (TIMx == TIM2) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE); } else if (TIMx == TIM3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE); } else if (TIMx == TIM4) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE); } else if (TIMx == TIM5) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE); } else if (TIMx == TIM6) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE); } else if (TIMx == TIM7) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE); } else if (TIMx == TIM8) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, DISABLE); } else if (TIMx == TIM9) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, DISABLE); } else if (TIMx == TIM10) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, DISABLE); } else if (TIMx == TIM11) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, DISABLE); } else if (TIMx == TIM12) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, DISABLE); } else if (TIMx == TIM13) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, DISABLE); } else if (TIMx == TIM14) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, DISABLE); } else if (TIMx == TIM15) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, DISABLE); } else if (TIMx == TIM16) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, DISABLE); } else { if (TIMx == TIM17) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, DISABLE); } } } /** * @brief Initializes the TIMx Time Base Unit peripheral according to * the specified parameters in the TIM_TimeBaseInitStruct. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @param TIM_TimeBaseInitStruct: pointer to a TIM_TimeBaseInitTypeDef * structure that contains the configuration information for the * specified TIM peripheral. * @retval None */ void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct) { uint16_t tmpcr1 = 0; /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { /* Select the Counter Mode */ tmpcr1 &= (uint16_t)(~((uint16_t)(TIM_CR1_DIR | TIM_CR1_CMS))); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; } if((TIMx != TIM6) && (TIMx != TIM7)) { /* Set the clock division */ tmpcr1 &= (uint16_t)(~((uint16_t)TIM_CR1_CKD)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; } TIMx->CR1 = tmpcr1; /* Set the Autoreload value */ TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; /* Set the Prescaler value */ TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; if ((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM15)|| (TIMx == TIM16) || (TIMx == TIM17)) { /* Set the Repetition Counter value */ TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; } /* Generate an update event to reload the Prescaler and the Repetition counter values immediately */ TIMx->EGR = TIM_PSCReloadMode_Immediate; } /** * @brief Initializes the TIMx Channel1 according to the specified * parameters in the TIM_OCInitStruct. * @param TIMx: where x can be 1 to 17 except 6 and 7 to select the TIM peripheral. * @param TIM_OCInitStru
评论
    相关推荐
    • PID算法STM32实现
      PID算法STM32实现,包括纯C实现和PID参数的调节方法和图示等
    • STM32_PID算法源码
      基于STM32F103R8的PID算法例程,完整工程源码,PWM输出控制信号,ADC输入反馈信号,形成闭环控制。
    • 基于STM32的PID算法
      该资源为经典工业控制PID算法STM32源码及思想,详细的解释了PID算法思想及实现,非常适合新手学习,资源整理不易,同学务必珍惜。
    • STM32 PID算法
      PID算法
    • C语言MD5算法STM32单片机亲测可用
      lwip协议栈源码提取 链接:https://pan.baidu.com/s/1Lcwap2cC0fNd7FhY44JhPQ 提取码:w74p
    • STM32 FFT算法实现
      在原子哥的开发板上实现的FFT算法和UCOS。全部资料均来自网络,谢谢原子哥,谢谢网络上无私的朋友
    • stm32加密算法.rar
      STM32加密算法库,包含常见的加密算法,AES、ARC4、ECC、HASH、RAND、RSA、TDES_DES等加密算法
    • stm32 定时器中断算法
      stm32 定时器中断算法,s曲线七段法,可以根据自己应用实例进行更改
    • 基于stm32的血压算法
      基于stm32的血压算法,精度还可以,需要的话可以直接移植使用,方便大家。
    • SIM800C_MQTT.rar
      使用SIM800C模块,使用MQTT协议,连接中国移动onenet平台,能实现数据的订阅、发布、存储等