FLY1_3_1-pid2
所属分类:单片机开发
开发工具:Visual C++
文件大小:489KB
下载次数:4
上传日期:2015-03-14 16:44:25
上 传 者:
ljcq6994
说明: 该程序是MPU6050三轴加速度传感器模块与STM32连接的调试程序。
(The program is a debugger MPU6050 triaxial acceleration sensor module and STM32 connection.)
文件列表:
FLY1_3_1-pid2\AHRS\MadgwickAHRS.c (9189, 2012-02-19)
FLY1_3_1-pid2\AHRS\MadgwickAHRS.h (1519, 2011-10-02)
FLY1_3_1-pid2\AHRS\MahonyAHRS.c (8361, 2011-10-02)
FLY1_3_1-pid2\AHRS\MahonyAHRS.h (1573, 2011-10-02)
FLY1_3_1-pid2\Hardware\ANO_Tech_STM32F10x_I2C.h (1611, 2013-07-26)
FLY1_3_1-pid2\Hardware\ANO_Tech_STM32F10x_I2C.lib (307486, 2013-07-21)
FLY1_3_1-pid2\Hardware\control.c (4532, 2014-07-25)
FLY1_3_1-pid2\Hardware\control.h (323, 2014-07-07)
FLY1_3_1-pid2\Hardware\delay.c (1052, 2014-06-20)
FLY1_3_1-pid2\Hardware\delay.h (172, 2014-06-20)
FLY1_3_1-pid2\Hardware\IMU.c (5250, 2014-07-23)
FLY1_3_1-pid2\Hardware\IMU.h (472, 2014-07-04)
FLY1_3_1-pid2\Hardware\Moto.c (3933, 2014-07-15)
FLY1_3_1-pid2\Hardware\Moto.h (223, 2014-07-15)
FLY1_3_1-pid2\Hardware\MPU6050.c (13960, 2014-07-22)
FLY1_3_1-pid2\Hardware\MPU6050.h (14605, 2014-06-26)
FLY1_3_1-pid2\Hardware\STM32_I2C.c (5669, 2014-06-27)
FLY1_3_1-pid2\Hardware\STM32_I2C.h (1241, 2014-06-26)
FLY1_3_1-pid2\Hardware\TIM.c (1138, 2014-06-20)
FLY1_3_1-pid2\Hardware\TIM.h (157, 2014-06-20)
FLY1_3_1-pid2\Hardware\USART.c (7945, 2014-07-16)
FLY1_3_1-pid2\Hardware\USART.h (581, 2014-06-30)
FLY1_3_1-pid2\keilkilll.bat (399, 2011-04-23)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c (17273, 2010-06-07)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h (85714, 2011-02-09)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html (26297, 2011-03-14)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s (15766, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s (15503, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s (15692, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s (12376, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s (13656, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s (12765, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s (14073, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s (15955, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s (13072, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s (13160, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd_vl.s (12482, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s (9814, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s (10562, 2011-03-10)
FLY1_3_1-pid2\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s (10269, 2011-03-10)
... ...
/**
@page TIM_PWM_Output TIM PWM Output example
@verbatim
******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
* @file TIM/PWM_Output/readme.txt
* @author MCD Application Team
* @version V3.5.0
* @date 08-April-2011
* @brief Description of the TIM PWM Output example.
******************************************************************************
* 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.
******************************************************************************
@endverbatim
@par Example Description
This example shows how to configure the TIM peripheral in PWM (Pulse Width Modulation)
mode.
The TIM3CLK frequency is set to SystemCoreClock / 2 (Hz), to get TIM3 counter
clock at 24 MHz the Prescaler is computed as following:
- Prescaler = (TIM3CLK / TIM3 counter clock) - 1
SystemCoreClock is set to 72 MHz for Low-density, Medium-density, High-density
and Connectivity line devices and to 24 MHz for Value line devices.
The TIM3 is running at 36 KHz: TIM3 Frequency = TIM3 counter clock/(ARR + 1)
= 24 MHz / 666 = 36 KHz
The TIM3 CCR1 register value is equal to 500, so the TIM3 Channel 1 generates a
PWM signal with a frequency equal to 36 KHz and a duty cycle equal to 50%:
TIM3 Channel1 duty cycle = (TIM3_CCR1/ TIM3_ARR + 1)* 100 = 50%
The TIM3 CCR2 register value is equal to 375, so the TIM3 Channel 2 generates a
PWM signal with a frequency equal to 36 KHz and a duty cycle equal to 37.5%:
TIM3 Channel2 duty cycle = (TIM3_CCR2/ TIM3_ARR + 1)* 100 = 37.5%
The TIM3 CCR3 register value is equal to 250, so the TIM3 Channel 3 generates a
PWM signal with a frequency equal to 36 KHz and a duty cycle equal to 25%:
TIM3 Channel3 duty cycle = (TIM3_CCR3/ TIM3_ARR + 1)* 100 = 25%
The TIM3 CCR4 register value is equal to 125, so the TIM3 Channel 4 generates a
PWM signal with a frequency equal to 36 KHz and a duty cycle equal to 12.5%:
TIM3 Channel4 duty cycle = (TIM3_CCR4/ TIM3_ARR + 1)* 100 = 12.5%
The PWM waveform can be displayed using an oscilloscope.
@par Directory contents
- TIM/PWM_Output/stm32f10x_conf.h Library Configuration file
- TIM/PWM_Output/stm32f10x_it.c Interrupt handlers
- TIM/PWM_Output/stm32f10x_it.h Interrupt handlers header file
- TIM/PWM_Output/main.c Main program
- TIM/PWM_Output/system_stm32f10x.c STM32F10x system source file
@par Hardware and Software environment
- This example runs on STM32F10x Connectivity line, High-Density, High-Density
Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density
and Low-Density Value line Devices.
- This example has been tested with STMicroelectronics STM32100E-EVAL (High-Density
Value line), STM32100B-EVAL (Medium-Density Value line), STM3210C-EVAL (Connectivity line),
STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density)
evaluation boards and can be easily tailored to any other supported device
and development board.
- STM3210C-EVAL Set-up
- Connect the following pins(TIM3 full remapping pins) to an oscilloscope to monitor the different
waveforms:
- PC.06: (TIM3_CH1)
- PC.07: (TIM3_CH2)
- PC.08: (TIM3_CH3)
- PC.09: (TIM3_CH4)
- STM32100B-EVAL, STM3210E-EVAL, STM32100E-EVAL and STM3210B-EVAL Set-up
- Connect the following pins to an oscilloscope to monitor the different
waveforms:
- PA.06: (TIM3_CH1)
- PA.07: (TIM3_CH2)
- PB.00: (TIM3_CH3)
- PB.01: (TIM3_CH4)
@par How to use it ?
In order to make the program work, you must do the following :
- Copy all source files from this example folder to the template folder under
Project\STM32F10x_StdPeriph_Template
- Open your preferred toolchain
- Rebuild all files and load your image into target memory
- Run the example
@note
- Low-density Value line devices are STM32F100xx microcontrollers where the
Flash memory density ranges between 16 and 32 Kbytes.
- Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
- Medium-density Value line devices are STM32F100xx microcontrollers where
the Flash memory density ranges between *** and 128 Kbytes.
- Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between *** and 128 Kbytes.
- High-density Value line devices are STM32F100xx microcontrollers where
the Flash memory density ranges between 256 and 512 Kbytes.
- High-density devices are STM32F101xx and STM32F103xx microcontrollers where
the Flash memory density ranges between 256 and 512 Kbytes.
- XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
the Flash memory density ranges between 512 and 1024 Kbytes.
- Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
*
© COPYRIGHT 2011 STMicroelectronics
*/
近期下载者:
相关文件:
收藏者: