📄 pmsm31.h
字号:
/* ==============================================================================
System Name: PMSM3_1 (QEP version)
File Name: PMSM31.H
Description: Peripheral independent object for the implementation
of Sensored Field Orientation Control for a Three Phase
Permanent-Magnet Synchronous Motor using measured rotor angle.
Originator: Digital control systems Group - Texas Instruments
Target dependency: x240/1/2/3/07
To Select the target device see target.h file.
Note that the PWM/sampling frequency in C system is running at 15 kHz, which
is different from the PWM/samping frequency in ASM system (i.e., 20 kHz) as
indicated in the PMSM3-1 system documentation. Also, this PWM/samping frequency
in both ASM and C systems are based on x2407 with 30 MHz clock. If the x243 with
20 MHz clock is used, then the PWM/samping frequency may be decreased accordingly.
=====================================================================================
History:
-------------------------------------------------------------------------------------
03-01-2001 Release Rev 1.0
================================================================================= */
#include <regs240x.h>
/*-------------------------------------------------------------------------------
Get buildlevel information.
-------------------------------------------------------------------------------*/
#include <build.h>
/*------------------------------------------------------------------------------
Include file containing the system vectors.
These must be set up correctly for the interrupt mechanisms to work
------------------------------------------------------------------------------*/
#include <sysvecs.h>
/*-------------------------------------------------------------------------------
Next, Include project specific include files.
-------------------------------------------------------------------------------*/
#include <EVMDAC.h> /* Get Constants etc for the EVMDAC */
#include <PWMGEN.h> /* Get Constants etc for the PWM Generators */
#include <WATCHDOG.H> /* Get the watchdog driver interface */
#include <QEP.h> /* Get constants and defs for the QEP */
#include <speed_fr.h> /* Get constants and defs for the SPEED_MEAS Obj */
#include <Ilegmeas.h> /* Include header for the ILEG2MEAS object */
#include <foc_ti.h> /* Include header for the FOC_TI object */
#include <drive.h> /* Include header for the DRIVE object */
/*-------------------------------------------------------------------------------
Function Prototypes for the functions implemented in PMSM31.C
-------------------------------------------------------------------------------*/
void RstSystem(void);
void rtmon_init(void);
void interrupt c_int02();
void interrupt c_int04();
void interrupt phantom(void);
#ifndef TRUE
#define FALSE ((Bool)0)
#define TRUE ((Bool)1)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -