⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm32f10x_mcconf.h

📁 ARM_CORTEX-M3应用实例开发详解光盘
💻 H
字号:
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name          : STM32F10x_MCconf.h
* Author             : IMS Systems Lab 
* Date First Issued  : 21/11/07
* Description        : Motor Control Library configuration file.
********************************************************************************
* History:
* 21/11/07 v1.0
* 29/05/08 v2.0
********************************************************************************
* THE PRESENT SOFTWARE 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 SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* THIS SOURCE CODE IS PROTECTED BY A LICENSE.
* FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED
* IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
*******************************************************************************
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_MCCONF_H
#define __STM32F10x_MCCONF_H


/*  设置使用TFT模块使用哪种数据格式,I/O口模拟还是FSMC方式   */
/*  使用STM32F103ZET6带有FSMC的片子使用LCD_9320_FSMC,使用STM32F103RBT6的,只能使用I/O模拟。 */
/*  同时使用8位模拟方式或者16位模拟方式,在ili932x.h文件里定义  */

#define LCD_ili9320_IO
//#define LCD_9320_FSMC

/*  设置使用IGBT栅极驱动器的类型 ,目前可以选择的驱动器类型为IR2101 = IR2112、IR2103  */
#define IR_2101S      //HIN=HIGH, LIN=HIGH
//#define IR_2103S       //HIN=HIGH , LIN=LOW

/********************   Current sampling technique definition   ***************/
/*   Define here the technique utilized for sampling the three-phase current  */

  /* Current sensing by ICS (Isolated current sensors) */
//#define ICS_SENSORS

  /* Current sensing by Three Shunt resistors */
#define THREE_SHUNT

  /* Current sensing by Single Shunt resistor */
//#define SINGLE_SHUNT

/*******************  Position sensing technique definition  ******************/
/* Define here the type of rotor position sensing utilized for both Field     */
/*                    Oriented Control and speed regulation                   */

  /* Position sensing by quadrature encoder */
//#define ENCODER

  /* Position sensing by Hall sensors */
#define HALL_SENSORS

  /* Sensorless position sensing  */
//#define NO_SPEED_SENSORS
  /* When in sensorless operation define here if you also want to acquire any */
  /* position sensor information                                              */
  // #define VIEW_HALL_FEEDBACK
  // #define VIEW_ENCODER_FEEDBACK
  
  /* When in sensorless operation define here if you want to perform an       */
  /* alignment before the ramp-up                                             */
//#define NO_SPEED_SENSORS_ALIGNMENT

/************************** FOC methods **************************************/
  /* Internal Permanent Magnet Motors Maximum-Torque-per-Ampere strategy */
//#define IPMSM_MTPA	 //程序稳定

  /* Flux weakening operations allowed */
#define FLUX_WEAKENING	// 程序稳定

  /* Feed forward current regulation based on known motor parameters */
//#define FEED_FORWARD_CURRENT_REGULATION		 

/**************************   Brake technique   *******************************/
/*      Define here the if you want to enable brake resistor management       */
/*          MANDATORY in case of operation in flux weakening region           */
  
  /* Uncomment to enable brake resistor management feature */
#define BRAKE_RESISTOR	   // PD15

/********************    PIDs differential terms enabling  ********************/
/*        Define here if you want to enable PIDs differential terms           */

  /* Uncomment to enable differential terms of PIDs */           
//#define DIFFERENTIAL_TERM_ENABLED   
  
/********************  PIDs gains tuning operations enabling  *****************/
/*  Define here if you want to tune currents (Id, Iq) PIDs, Luenberger State  */
/*                             Observer and PLL gains                         */                              

  /* Uncomment to enable the generation of a square-wave shaped reference Iq */
#define FLUX_TORQUE_PIDs_TUNING
  
  /* Uncomment to enable the tuning of Luenberger State Observer and PLL gains*/ 
//#define OBSERVER_GAIN_TUNING

/***********************   DAC functionality enabling  ************************/

  /*Uncomment to enable DAC functionality feature through TIM3 output channels*/
#define DAC_FUNCTIONALITY

/******************************************************************************/
/* Check-up of the configuration validity*/

#if ( (defined(IR_2101S)) && (defined(IR_2103S)) )
#error "Invalid configuration: Two MOSFET DRIVERS you selected"
#endif

#if ( (defined(ICS_SENSORS)) && (defined(THREE_SHUNT)) )
#error "Invalid configuration: Two current sampling techniques selected"
#endif

#if ( (defined(ICS_SENSORS)) && (defined(SINGLE_SHUNT)) )
#error "Invalid configuration: Two current sampling techniques selected"
#endif

#if ( (defined(SINGLE_SHUNT)) && (defined(THREE_SHUNT)) )
#error "Invalid configuration: Two current sampling techniques selected"
#endif

#if ( (!defined(ICS_SENSORS)) && (!defined(THREE_SHUNT)) && (!defined(SINGLE_SHUNT)) )
#error "Invalid setup: No sampling technique selected"
#endif

#if ( (defined(ENCODER)) && (defined (HALL_SENSORS)) || (defined(ENCODER)) &&\
    (defined (NO_SPEED_SENSORS)) || (defined(NO_SPEED_SENSORS)) && (defined\
    (HALL_SENSORS)))
#error "Invalid configuration: Two position sensing techniques selected"
#endif

#if ( (!defined(ENCODER)) && (!defined (HALL_SENSORS)) && (!defined\
                                                            (NO_SPEED_SENSORS)))
#error "Invalid configuration: No position sensing technique selected"
#endif

#if ((defined VIEW_HALL_FEEDBACK) && (!defined NO_SPEED_SENSORS))
#error "Invalid configuration: VIEW_HALL_FEEDBACK supported only in\
                                                           sensorless operation"
#endif

#if ((defined VIEW_ENCODER_FEEDBACK) && (!defined NO_SPEED_SENSORS))
#error "Invalid configuration: VIEW_ENCODER_FEEDBACK supported only in\
                                                           sensorless operation"
#endif

#if ((defined FLUX_TORQUE_PIDs_TUNING) && (defined NO_SPEED_SENSORS))
#error "Invalid configuration: FLUX_TORQUE_PIDs_TUNING not supported in\
                                                           sensorless operation"
#endif

#if ((defined VIEW_HALL_FEEDBACK) && (defined VIEW_ENCODER_FEEDBACK))
#error "Invalid configuration: Two position sensing techniques selected"
#endif

#if ((!defined NO_SPEED_SENSORS) && (defined NO_SPEED_SENSORS_ALIGNMENT))
#warning "No speed sensors alignment has been disabled"
#undef NO_SPEED_SENSORS_ALIGNMENT
#endif

#endif /* __STM32F10x_MCCONF_H */
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -