/**
******************************************************************************
* @file stm32f0xx.h
* @author MCD Application Team
* @version V1.0.1
* @date 20-April-2012
* @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File.
* This file contains all the peripheral register's definitions, bits
* definitions and memory mapping for STM32F0xx devices.
*
* The file is the unique include file that the application programmer
* is using in the C source code, usually in main.c. This file contains:
* - Configuration section that allows to select:
* - The device used in the target application
* - To use or not the peripheral’s drivers in application code(i.e.
* code will be based on direct access to peripheral’s registers
* rather than drivers API), this option is controlled by
* "#define USE_STDPERIPH_DRIVER"
* - To change few application-specific parameters such as the HSE
* crystal frequency
* - Data structures and the address mapping for all peripherals
* - Peripheral's registers declarations and bits definition
* - Macros to access peripheral’s registers hardware
*
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2012 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/** @addtogroup CMSIS
* @{
*/
/** @addtogroup stm32f0xx
* @{
*/
#ifndef __STM32F0XX_H
#define __STM32F0XX_H
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup Library_configuration_section
* @{
*/
/* Uncomment the line below according to the target STM32F0 device used in your
application
*/
#if !defined (STM32F0XX)
#define STM32F0XX /*!< STM32F0XX: STM32F0xx devices */
#endif
/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
STM32F0xx devices are:
- STM32F050xx microcontrollers where the Flash memory density can go up to 32 Kbytes.
- STM32F051xx microcontrollers where the Flash memory density can go up to 64 Kbytes.
*/
#if !defined (STM32F0XX)
#error "Please select first the target STM32F0xx device used in your application (in stm32f0xx.h file)"
#endif /* STM32F0XX */
#if !defined USE_STDPERIPH_DRIVER
/**
* @brief Comment the line below if you will not use the peripherals drivers.
In this case, these drivers will not be included and the application code will
be based on direct access to peripherals registers
*/
/*#define USE_STDPERIPH_DRIVER*/
#endif /* USE_STDPERIPH_DRIVER */
/**
* @brief In the following line adjust the value of External High Speed oscillator (HSE)
used in your application
Tip: To avoid modifying this file each time you need to use different HSE, you
can define the HSE value in your toolchain compiler preprocessor.
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz*/
#endif /* HSE_VALUE */
/**
* @brief In the following line adjust the External High Speed oscillator (HSE) Startup
Timeout value
*/
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint16_t)0x5000) /*!< Time out for HSE start up */
#endif /* HSE_STARTUP_TIMEOUT */
/**
* @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup
Timeout value
*/
#if !defined (HSI_STARTUP_TIMEOUT)
#define HSI_STARTUP_TIMEOUT ((uint16_t)0x0500) /*!< Time out for HSI start up */
#endif /* HSI_STARTUP_TIMEOUT */
#if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)8000000) /*!< Value of the Internal High Speed oscillator in Hz.
The real value may vary depending on the variations
in voltage and temperature. */
#endif /* HSI_VALUE */
#if !defined (HSI14_VALUE)
#define HSI14_VALUE ((uint32_t)14000000) /*!< Value of the Internal High Speed oscillator for ADC in Hz.
The real value may vary depending on the variations
in voltage and temperature. */
#endif /* HSI14_VALUE */
#if !defined (LSI_VALUE)
#define LSI_VALUE ((uint32_t)40000) /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature. */
#endif /* LSI_VALUE */
#if !defined (LSE_VALUE)
#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */
#endif /* LSE_VALUE */
/**
* @brief STM32F0xx Standard Peripheral Library version number V1.0.1
*/
#define __STM32F0XX_STDPERIPH_VERSION_MAIN (0x01) /*!< [31:24] main version */
#define __STM32F0XX_STDPERIPH_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
#define __STM32F0XX_STDPERIPH_VERSION_SUB2 (0x01) /*!< [15:8] sub2 version */
#define __STM32F0XX_STDPERIPH_VERSION_RC (0x00) /*!< [7:0] release candidate */
#define __STM32F0XX_STDPERIPH_VERSION ((__STM32F0XX_STDPERIPH_VERSION_MAIN << 24)\
|(__STM32F0XX_STDPERIPH_VERSION_SUB1 << 16)\
|(__STM32F0XX_STDPERIPH_VERSION_SUB2 << 8)\
|(__STM32F0XX_STDPERIPH_VERSION_RC))
/**
* @}
*/
/** @addtogroup Configuration_section_for_CMSIS
* @{
*/
/**
* @brief STM32F0xx Interrupt Number Definition, according to the selected device
* in @ref Library_configuration_section
*/
//#define __CM0_REV 0 /*!< Core Revision r0p0 */
//#define __MPU_PRESENT 0 /*!< STM32F0xx do not provide MPU */
//#define __NVIC_PRIO_BITS 2 /*!< STM32F0xx uses 2 Bits for the Priority Levels */
//#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
#define __CM23_REV 0x0100U /*!< Core revision r1p0 */
#define __SAUREGION_PRESENT 0U /*!< SAU regions are not present */
#define __MPU_PRESENT 0U /*!< MPU is present */
#define __VTOR_PRESENT 1U /*!< VTOR is present */
#define __NVIC_PRIO_BITS 2U /*!< Number of Bits used for Priority Levels */
#define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */
/*!< Interrupt Number Definition */
typedef enum IRQn
{
/****** Cortex-M3 Processor Exceptions Numbers ***************************************************/
NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于STM32的串口总线数字舵机方案,内置高速串行总线控制,PWM电机控制, ADC电位器检测,高级PID电机调速,可适应0至270度的角度控制,并且采用软件防堵转, 软件使用记录等高级功能,延长保护舵机寿命,总体成本低廉,性能可靠。 总线伺服舵机通过单线半双工异步串行通信(TTL电平)工作,相比传统PWM舵机有以下显著优势: 硬件资源占用少:控制多个舵机仅需占用单片机的两个GPIO管脚(接收端和发送端),最多可控制254个舵机,大幅减少I/O资源占用。 PC直接控制:通过舵机转接板,PC可以直接发送控制指令,不需要额外的单片机,简化了产品开发和算法验证。 布线简洁:串联方式使接线更为简洁,减少了接线复杂度,提高了系统可靠性和美观度。 高精度控制:舵机通过串口通信协议传递角度数据,传输更可靠准确。例如,RP8-U45舵机的控制精度可达0.066°。 数据反馈与保护:可以实时反馈舵机的角度、电压、电流和温度等参数,通过这些数据,系统可以实现闭环控制,提高精度,并在过载时自动卸力,保护舵机不被烧毁。 内置轨迹规划,动作平滑:内置轨迹规划算法,只需设定起始和终止位置及时间间隔,舵
资源推荐
资源详情
资源评论




























收起资源包目录





































































































共 123 条
- 1
- 2
资源评论


麦德泽特
- 粉丝: 70
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- MCS—51单片机时序.ppt
- 大渡河造林局信息化建设的思考.ppt
- OTT前端解决方案样本.doc
- 毕业论文中小企业网络构建综合布线方向.doc
- 北京邮电大学信息与通信工程学院的概况.docx
- 大学物理网络辅助教学应用与效果获奖科研报告论文.docx
- ASP期末考试试题.doc
- 安装配置和故障排除网络策略服务器角色服务.pptx
- ENVI遥感图像处理实习指导手册.doc
- 第6章--群智能算法课件.ppt
- 2023年金仓数据库应用技术实验手册.doc
- 第1章操作系统引论(2.1719).ppt
- SWIFT-报文知识简介.ppt
- LTE网络工程优化DT测试指导书.docx
- 2023年数据库工程师全国计算机四级考试.doc
- DB21_T_3238_2020_软枣猕猴桃储存保鲜技术规程.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
