资源简介
1、能实现无刷电机平稳启动。
2、电机运行流畅,方波PID速度闭环控制稳定可靠。
3、串口能发生调试命令启动电机运行,同时打印速度消息。
4、OLED同步显示电机运行状态和故障信息。
代码片段和文件信息
/**************************************************************************//**
* @file core_cm3.c
* @brief CMSIS Cortex-M3 Core Peripheral Access layer Source File
* @version V1.30
* @date 30. October 2009
*
* @note
* Copyright (C) 2009 ARM Limited. All rights reserved.
*
* @par
* ARM Limited (ARM) is supplying this software for use with Cortex-M
* processor based microcontrollers. This file can be freely distributed
* within development tools that are supporting such ARM based processors.
*
* @par
* THIS SOFTWARE IS PROVIDED “AS IS“. NO WARRANTIES WHETHER EXPRESS IMPLIED
* OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
* ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
* CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
*
******************************************************************************/
#include
/* define compiler specific symbols */
#if defined ( __CC_ARM )
#define __ASM __asm /*!< asm keyword for ARM Compiler */
#define __INLINE __inline /*!< inline keyword for ARM Compiler */
#elif defined ( __ICCARM__ )
#define __ASM __asm /*!< asm keyword for IAR Compiler */
#define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
#elif defined ( __GNUC__ )
#define __ASM __asm /*!< asm keyword for GNU Compiler */
#define __INLINE inline /*!< inline keyword for GNU Compiler */
#elif defined ( __TASKING__ )
#define __ASM __asm /*!< asm keyword for TASKING Compiler */
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
#endif
/* ################### Compiler specific Intrinsics ########################### */
#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
/* ARM armcc specific functions */
/**
* @brief Return the Process Stack Pointer
*
* @return ProcessStackPointer
*
* Return the actual process stack pointer
*/
__ASM uint32_t __get_PSP(void)
{
mrs r0 psp
bx lr
}
/**
* @brief Set the Process Stack Pointer
*
* @param topOfProcStack Process Stack Pointer
*
* Assign the value ProcessStackPointer to the MSP
* (process stack pointer) Cortex processor register
*/
__ASM void __set_PSP(uint32_t topOfProcStack)
{
msr psp r0
bx lr
}
/**
* @brief Return the Main Stack Pointer
*
* @return Main Stack Pointer
*
* Return the curren
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\CORE\
文件 17273 2010-06-07 10:25 BLDC_STM32_PID_Demo\CORE\core_cm3.c
文件 85714 2011-02-09 14:59 BLDC_STM32_PID_Demo\CORE\core_cm3.h
文件 15514 2019-03-18 11:45 BLDC_STM32_PID_Demo\CORE\startup_stm32f10x_hd.s
目录 0 2019-04-02 15:08 BLDC_STM32_PID_Demo\HARDWARE\
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\ADC\
文件 4736 2019-03-28 14:20 BLDC_STM32_PID_Demo\HARDWARE\ADC\adc.c
文件 245 2019-03-28 14:20 BLDC_STM32_PID_Demo\HARDWARE\ADC\adc.h
文件 5340 2019-03-18 15:54 BLDC_STM32_PID_Demo\HARDWARE\can.c
文件 565 2019-03-18 15:39 BLDC_STM32_PID_Demo\HARDWARE\can.h
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\EXIT\
文件 961 2019-04-01 17:06 BLDC_STM32_PID_Demo\HARDWARE\EXIT\exit.c
文件 70 2019-02-26 16:55 BLDC_STM32_PID_Demo\HARDWARE\EXIT\exit.h
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\KEY\
文件 3333 2019-03-01 08:53 BLDC_STM32_PID_Demo\HARDWARE\KEY\key.c
文件 1288 2019-03-01 08:53 BLDC_STM32_PID_Demo\HARDWARE\KEY\key.h
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\OLED\
文件 11890 2014-07-14 23:49 BLDC_STM32_PID_Demo\HARDWARE\OLED\bmp.h
文件 8545 2019-03-27 16:29 BLDC_STM32_PID_Demo\HARDWARE\OLED\oled.c
文件 3113 2019-03-27 16:29 BLDC_STM32_PID_Demo\HARDWARE\OLED\oled.h
文件 20961 2019-03-11 10:09 BLDC_STM32_PID_Demo\HARDWARE\OLED\oledfont.h
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\PID\
文件 1702 2018-11-28 07:23 BLDC_STM32_PID_Demo\HARDWARE\PID\pid.c
文件 207 2019-02-26 16:59 BLDC_STM32_PID_Demo\HARDWARE\PID\pid.h
文件 2153 2019-03-21 16:38 BLDC_STM32_PID_Demo\HARDWARE\queue.c
文件 936 2019-03-21 16:32 BLDC_STM32_PID_Demo\HARDWARE\queue.h
文件 2239 2019-03-22 10:38 BLDC_STM32_PID_Demo\HARDWARE\QueueHandle.c
目录 0 2019-04-02 15:07 BLDC_STM32_PID_Demo\HARDWARE\TIMER\
文件 9908 2019-03-27 16:04 BLDC_STM32_PID_Demo\HARDWARE\TIMER\timer.c
文件 605 2019-03-27 16:05 BLDC_STM32_PID_Demo\HARDWARE\TIMER\timer.h
............此处省略191个文件信息
- 上一篇:一个简单的LED控制卡源码
- 下一篇:Web程序设计第2版
评论
共有 条评论