UARTT.0509.rar

  • PUDN用户
    了解作者
  • C/C++
    开发工具
  • 4.4MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 5
    下载次数
  • 2015-06-19 13:39
    上传日期
390M无线雷达的解码程序,基于stm8s开发,测试OK
UARTT.0509.rar
  • UARTT
  • settings
  • demo.cspy.bat
    1.4KB
  • demo.wsdt
    4.2KB
  • demo.wspos
    52B
  • demo.dni
    757B
  • demo.dbgdt
    5.4KB
  • Debug
  • Obj
  • stm8s_uart1.pbi
    318.1KB
  • SendDrive.o
    8.4KB
  • main.pbi.cout
    10KB
  • SendDrive.pbi.cout
    10KB
  • main.pbi
    306KB
  • stm8s_it.pbi.cout
    10KB
  • stm8s_clk.pbi
    317.6KB
  • stm8s_it.pbi
    300KB
  • SendDrive.pbi
    298.4KB
  • stm8s_it.o
    28.9KB
  • stm8s_clk.o
    53.1KB
  • stm8s_clk.pbi.cout
    10KB
  • stm8s_uart1.o
    53.4KB
  • demo.pbd
    355.2KB
  • stm8s_uart1.pbi.cout
    10KB
  • main.o
    34.7KB
  • demo.pbd.browse
    355.2KB
  • List
  • Exe
  • demo.out
    66.3KB
  • STM8S_StdPeriph_Driver
  • inc
  • stm8s_beep.h
    3.4KB
  • stm8s_itc.h
    6.6KB
  • stm8s_tim4.h
    5.2KB
  • stm8s_tim2.h
    13.8KB
  • stm8s_wwdg.h
    2.4KB
  • stm8s_exti.h
    4.5KB
  • stm8s_gpio.h
    6.1KB
  • stm8s_i2c.h
    27.1KB
  • stm8s_iwdg.h
    4.2KB
  • stm8s.h
    113.1KB
  • stm8s_adc1.h
    14.7KB
  • stm8s_flash.h
    13.5KB
  • stm8s_tim5.h
    19.4KB
  • stm8s_tim1.h
    26.1KB
  • stm8s_tim6.h
    9.3KB
  • stm8s_tim3.h
    12.6KB
  • stm8s_adc2.h
    11.2KB
  • stm8s_rst.h
    2.8KB
  • stm8s_clk.h
    16.6KB
  • stm8s_awu.h
    4.8KB
  • stm8s_spi.h
    12.8KB
  • stm8s_uart2.h
    18.6KB
  • stm8s_uart1.h
    16.1KB
  • stm8s_can.h
    25KB
  • stm8s_uart3.h
    15KB
  • src
  • stm8s_can.c
    48.4KB
  • stm8s_adc1.c
    23KB
  • stm8s_uart2.c
    28.7KB
  • stm8s_tim6.c
    14.8KB
  • stm8s_tim3.c
    36.6KB
  • stm8s_beep.c
    4.7KB
  • stm8s_clk.c
    21.7KB
  • stm8s_rst.c
    2.7KB
  • stm8s_flash.c
    25.3KB
  • stm8s_tim1.c
    84.4KB
  • stm8s_i2c.c
    31.8KB
  • stm8s_tim4.c
    12KB
  • stm8s_tim2.c
    45.9KB
  • stm8s_wwdg.c
    3.9KB
  • stm8s_adc2.c
    13.4KB
  • stm8s_tim5.c
    49.5KB
  • stm8s_gpio.c
    8.2KB
  • stm8s_itc.c
    9.8KB
  • stm8s_uart3.c
    23.7KB
  • stm8s_exti.c
    5.8KB
  • stm8s_uart1.c
    26.1KB
  • stm8s_spi.c
    13.8KB
  • stm8s_awu.c
    6.2KB
  • stm8s_iwdg.c
    3.3KB
  • stm8s-a_stdperiph_drivers_um.chm
    3.6MB
  • Release_Notes.html
    68.2KB
  • demo.ewd
    11.9KB
  • Backup of demo.ewd
    10.7KB
  • main.c
    10.5KB
  • cspycomm.log
    39B
  • stm8s_it.h
    5.2KB
  • demo.eww
    158B
  • stm8s_conf.h
    4.4KB
  • stm8s_it.c
    13.1KB
  • demo.ewp
    42.9KB
  • SendDrive.c
    1.4KB
  • Backup of demo.ewp
    41.5KB
  • demo.dep
    6.3KB
内容介绍
/** ****************************************************************************** * @file stm8s_tim1.c * @author MCD Application Team * @version V2.1.0 * @date 18-November-2011 * @brief This file contains all the functions for the TIM1 peripheral. ****************************************************************************** * @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 "stm8s_tim1.h" /** @addtogroup STM8S_StdPeriph_Driver * @{ */ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ static void TI1_Config(uint8_t TIM1_ICPolarity, uint8_t TIM1_ICSelection, uint8_t TIM1_ICFilter); static void TI2_Config(uint8_t TIM1_ICPolarity, uint8_t TIM1_ICSelection, uint8_t TIM1_ICFilter); static void TI3_Config(uint8_t TIM1_ICPolarity, uint8_t TIM1_ICSelection, uint8_t TIM1_ICFilter); static void TI4_Config(uint8_t TIM1_ICPolarity, uint8_t TIM1_ICSelection, uint8_t TIM1_ICFilter); /** * @addtogroup TIM1_Public_Functions * @{ */ /** * @brief Deinitializes the TIM1 peripheral registers to their default reset values. * @param None * @retval None */ void TIM1_DeInit(void) { TIM1->CR1 = TIM1_CR1_RESET_VALUE; TIM1->CR2 = TIM1_CR2_RESET_VALUE; TIM1->SMCR = TIM1_SMCR_RESET_VALUE; TIM1->ETR = TIM1_ETR_RESET_VALUE; TIM1->IER = TIM1_IER_RESET_VALUE; TIM1->SR2 = TIM1_SR2_RESET_VALUE; /* Disable channels */ TIM1->CCER1 = TIM1_CCER1_RESET_VALUE; TIM1->CCER2 = TIM1_CCER2_RESET_VALUE; /* Configure channels as inputs: it is necessary if lock level is equal to 2 or 3 */ TIM1->CCMR1 = 0x01; TIM1->CCMR2 = 0x01; TIM1->CCMR3 = 0x01; TIM1->CCMR4 = 0x01; /* Then reset channel registers: it also works if lock level is equal to 2 or 3 */ TIM1->CCER1 = TIM1_CCER1_RESET_VALUE; TIM1->CCER2 = TIM1_CCER2_RESET_VALUE; TIM1->CCMR1 = TIM1_CCMR1_RESET_VALUE; TIM1->CCMR2 = TIM1_CCMR2_RESET_VALUE; TIM1->CCMR3 = TIM1_CCMR3_RESET_VALUE; TIM1->CCMR4 = TIM1_CCMR4_RESET_VALUE; TIM1->CNTRH = TIM1_CNTRH_RESET_VALUE; TIM1->CNTRL = TIM1_CNTRL_RESET_VALUE; TIM1->PSCRH = TIM1_PSCRH_RESET_VALUE; TIM1->PSCRL = TIM1_PSCRL_RESET_VALUE; TIM1->ARRH = TIM1_ARRH_RESET_VALUE; TIM1->ARRL = TIM1_ARRL_RESET_VALUE; TIM1->CCR1H = TIM1_CCR1H_RESET_VALUE; TIM1->CCR1L = TIM1_CCR1L_RESET_VALUE; TIM1->CCR2H = TIM1_CCR2H_RESET_VALUE; TIM1->CCR2L = TIM1_CCR2L_RESET_VALUE; TIM1->CCR3H = TIM1_CCR3H_RESET_VALUE; TIM1->CCR3L = TIM1_CCR3L_RESET_VALUE; TIM1->CCR4H = TIM1_CCR4H_RESET_VALUE; TIM1->CCR4L = TIM1_CCR4L_RESET_VALUE; TIM1->OISR = TIM1_OISR_RESET_VALUE; TIM1->EGR = 0x01; /* TIM1_EGR_UG */ TIM1->DTR = TIM1_DTR_RESET_VALUE; TIM1->BKR = TIM1_BKR_RESET_VALUE; TIM1->RCR = TIM1_RCR_RESET_VALUE; TIM1->SR1 = TIM1_SR1_RESET_VALUE; } /** * @brief Initializes the TIM1 Time Base Unit according to the specified parameters. * @param TIM1_Prescaler specifies the Prescaler value. * @param TIM1_CounterMode specifies the counter mode from @ref TIM1_CounterMode_TypeDef . * @param TIM1_Period specifies the Period value. * @param TIM1_RepetitionCounter specifies the Repetition counter value * @retval None */ void TIM1_TimeBaseInit(uint16_t TIM1_Prescaler, TIM1_CounterMode_TypeDef TIM1_CounterMode, uint16_t TIM1_Period, uint8_t TIM1_RepetitionCounter) { /* Check parameters */ assert_param(IS_TIM1_COUNTER_MODE_OK(TIM1_CounterMode)); /* Set the Autoreload value */ TIM1->ARRH = (uint8_t)(TIM1_Period >> 8); TIM1->ARRL = (uint8_t)(TIM1_Period); /* Set the Prescaler value */ TIM1->PSCRH = (uint8_t)(TIM1_Prescaler >> 8); TIM1->PSCRL = (uint8_t)(TIM1_Prescaler); /* Select the Counter Mode */ TIM1->CR1 = (uint8_t)((uint8_t)(TIM1->CR1 & (uint8_t)(~(TIM1_CR1_CMS | TIM1_CR1_DIR))) | (uint8_t)(TIM1_CounterMode)); /* Set the Repetition Counter value */ TIM1->RCR = TIM1_RepetitionCounter; } /** * @brief Initializes the TIM1 Channel1 according to the specified parameters. * @param TIM1_OCMode specifies the Output Compare mode from * @ref TIM1_OCMode_TypeDef. * @param TIM1_OutputState specifies the Output State from * @ref TIM1_OutputState_TypeDef. * @param TIM1_OutputNState specifies the Complementary Output State * from @ref TIM1_OutputNState_TypeDef. * @param TIM1_Pulse specifies the Pulse width value. * @param TIM1_OCPolarity specifies the Output Compare Polarity from * @ref TIM1_OCPolarity_TypeDef. * @param TIM1_OCNPolarity specifies the Complementary Output Compare Polarity * from @ref TIM1_OCNPolarity_TypeDef. * @param TIM1_OCIdleState specifies the Output Compare Idle State from * @ref TIM1_OCIdleState_TypeDef. * @param TIM1_OCNIdleState specifies the Complementary Output Compare Idle * State from @ref TIM1_OCIdleState_TypeDef. * @retval None */ void TIM1_OC1Init(TIM1_OCMode_TypeDef TIM1_OCMode, TIM1_OutputState_TypeDef TIM1_OutputState, TIM1_OutputNState_TypeDef TIM1_OutputNState, uint16_t TIM1_Pulse, TIM1_OCPolarity_TypeDef TIM1_OCPolarity, TIM1_OCNPolarity_TypeDef TIM1_OCNPolarity, TIM1_OCIdleState_TypeDef TIM1_OCIdleState, TIM1_OCNIdleState_TypeDef TIM1_OCNIdleState) { /* Check the parameters */ assert_param(IS_TIM1_OC_MODE_OK(TIM1_OCMode)); assert_param(IS_TIM1_OUTPUT_STATE_OK(TIM1_OutputState)); assert_param(IS_TIM1_OUTPUTN_STATE_OK(TIM1_OutputNState)); assert_param(IS_TIM1_OC_POLARITY_OK(TIM1_OCPolarity)); assert_param(IS_TIM1_OCN_POLARITY_OK(TIM1_OCNPolarity)); assert_param(IS_TIM1_OCIDLE_STATE_OK(TIM1_OCIdleState)); assert_param(IS_TIM1_OCNIDLE_STATE_OK(TIM1_OCNIdleState)); /* Disable the Channel 1: Reset the CCE Bit, Set the Output State , the Output N State, the Output Polarity & the Output N Polarity*/ TIM1->CCER1 &= (uint8_t)(~( TIM1_CCER1_CC1E | TIM1_CCER1_CC1NE | TIM1_CCER1_CC1P | TIM1_CCER1_CC1NP)); /* Set the Output State & Set the Output N State & Set the Output Polarity & Set the Output N Polarity */ TIM1->CCER1 |= (uint8_t)((uint8_t)((uint8_t)(TIM1_OutputState & TIM1_CCER1_CC1E) | (uint8_t)(TIM1_OutputNState & TIM1_CCER1_CC1NE)) | (uint8_t)( (uint8_t)(TIM1_OCPolarity & TIM1_CCER1_CC1P) | (uint8_t)(TIM1_OCNPolarity & TIM1_CCER1_CC1NP))
评论
    相关推荐
    • 雷达.zip
      ①利用MATLAB函数“radar_eq.m”实现雷达方程,通过MATLAB编程的方法实现距离的精确表示,并输入给定数据得到需要求解的SNR值。 ②地基防空雷达的设计方法和过程。
    • 雷达.rar
      提高雷达距离分辨率,内部有大量的实验结果,证明算法的可行性。
    • 多普勒雷达
      使用matlab对多普勒雷达进行建模仿真
    • 雷达原理.rar
      基于电磁波的雷达原理,包括三个部分,阿萨德卡嘎的身高速度与
    • swift 雷达
      使用swfit 雷达展示,多组数据对照,一句代码调用,方便快捷。
    • 地质雷达软件radan7
      地质雷达数据分析,RADAN为GSSI公司开发的地质雷达数据后处理软件. 采用模块化设计, 用户根据自身专业需求可选择合适的RADAN处理功能. RADAN基于微软视窗系统,界面熟悉操作方便,适合新老用
    • 超声波雷达
      超声波测距模拟雷达功能,单片机控制步进电机,确定测量角度 方向,确定目标。
    • 矿大雷达分析软件
      矿大雷达分析软件,reflex雷达分析软件,意大利雷达分析软件,GSSI雷达分析软件,GresWin雷达分析软件 前 言 0 1 数据处理分析系统设计 1 1.1 系统功能的介绍 1 1.2 数据处理常规流程 2 2 数据的操作功能 3 2.1 数据...
    • 雷达扫描转换
      这个小程序可以加入雷达数据后绘制回波图,其中的myCos和mySin数组是用来绘制每条线的时候线上的每个点的位置(增量)。 DrawLala函数主要负责绘制一个圆上的3600条射线。在这个函数中加入个switch语句结合雷达回波...
    • RadarMap 雷达
      雷达图 编译环境 VC# 2008 功能: 1. 利用GID+,在PictureBox上画雷达图背景,非加载图片资源 2. 输入框内写入方位俯仰AZ,EL的数值,在雷达图上以红色点显示位置 3. 鼠标在图片区域内移动,动态显示方位俯仰AZ,EL的...