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

📄 f281xpwm_res.h

📁 TI公司28XDSP控制永磁同步电机(PMSM)
💻 H
字号:
/* ==================================================================================
File name:        F281XPWM_RES.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments
Description:  
Header file containing data type and object definitions and 
initializers. Also contains prototypes for the functions in F281XPWM_RES.C.

Target: TMS320F281x family

=====================================================================================
 History:
-------------------------------------------------------------------------------------
 04-15-2005	Version 3.20: Using DSP281x v. 1.00 or higher 
---------------------------------------------------------------------------------- */

#ifndef __F281XPWM_RESOLVER_H__
#define __F281XPWM_RESOLVER_H__

#include "f281xbmsk.h"

/*----------------------------------------------------------------------------
Initialization constant for the F281X Timer TxCON for PWM Generation. 
Sets up the timer to run free upon emulation suspend, continuous up-down mode
prescaler 1, timer enabled.
----------------------------------------------------------------------------*/
#define PWM_RESOLVER_INIT_STATE  (FREE_RUN_FLAG +         \
                                  TIMER_CONT_UPDN +        \
                                  TIMER_CLK_PRESCALE_X_1 + \
                                  TIMER_ENABLE_BY_OWN    + \
                                  TIMER_ENABLE )

/*----------------------------------------------------------------------------
Initialization constant for the F281X ACTRx register for Resolver drive. 
Sets up PWM7/8 polarities.
----------------------------------------------------------------------------*/
#define ACTRB_PWM_RESOLVER_INIT_STATE ( COMPARE1_AL + \
                                        COMPARE2_AH + \
                                        COMPARE3_FL + \
                                        COMPARE4_FL + \
                                        COMPARE5_FL + \
                                        COMPARE6_FL )

/*-----------------------------------------------------------------------------
Define the structure of the RESOLVER_PWM Driver Object 
-----------------------------------------------------------------------------*/
typedef struct {   
        int16 RefSignal;       // Input: Excitation reference signal (Q15)
        Uint16 PeriodMax;      // Parameter: PWM Half-Period in CPU clock cycles (Q0)
        void (*init)();        // Pointer to the init function 
     	void (*update)();      // Pointer to the update function
        } RESOLVER_PWM ;

/*-----------------------------------------------------------------------------
Define a RESOLVER_PWM_handle
-----------------------------------------------------------------------------*/
typedef RESOLVER_PWM *RESOLVER_PWM_handle;

/*------------------------------------------------------------------------------
Default Initializers for the F281X RESOLVER_PWM Object 
------------------------------------------------------------------------------*/
#define F281X_EV2_RESOLVER_PWM {0,4000, \
                               (void (*)(Uint32))F281X_EV2_Resolver_PWM_Init,  \
                               (void (*)(Uint32))F281X_EV2_Resolver_PWM_Update,  \
                               }

#define RESOLVER_PWM_DEFAULTS 	F281X_EV2_RESOLVER_PWM
/*------------------------------------------------------------------------------
 Prototypes for the functions in F281X_RESOLVER.C
------------------------------------------------------------------------------*/
void F281X_EV2_Resolver_PWM_Init(RESOLVER_PWM_handle);
void F281X_EV2_Resolver_PWM_Update(RESOLVER_PWM_handle);

#endif  // __F281XPWM_RESOLVER_H__

⌨️ 快捷键说明

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