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

📄 f2407bldcpwm.h

📁 TI公司的DSP(LF2407A)编写的有霍尔位置传感器的无刷直流电机控制程序,内含子程序说明
💻 H
字号:
/* ==================================================================================
File name:        F2407BLDCPWM.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments
Description:  
This file defines handy constants for object initializations and
contains prototypes for the functions in F2407BLDCPWM1.C and F2407BLDCPWM2.ASM
and has definitions of structs etc.
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 9-15-2000	Release	Rev 1.00  
 7-20-2006	Release	Rev 2.00  修改PWM斩波频率20KHz为10KHz                                                
---------------------------------------------------------------------------------- */

#ifndef __F2407_BLDCPWM_H__
#define __F2407_BLDCPWM_H__

#include <F2407BMSK.H>

/*----------------------------------------------------------------------------
Initialization constant for the F2407 Timer TxCON for PWM Generation. 
----------------------------------------------------------------------------*/
#define BLDCPWM_INIT_STATE  (FREE_RUN_FLAG +       \
                        TIMER_CONT_UP +        \
                        TIMER_CLK_PRESCALE_X_1 + \
                        TIMER_ENABLE)

/*-----------------------------------------------------------------------------
Define the structure of  BLDC3_PWM_DRV
-----------------------------------------------------------------------------*/

typedef struct {

   int CmtnPointer; /* Commutation(or switching) state pointer input[Q0] */
   int MfuncPeriod;     /* Duty ratio of the PWM outputs[Q15]                */
   int PeriodMax;  /* Maximum period                                    */
   int DutyFunc;      /* PWM period modulation input[Q15]                  */

   void (*init)();   /* Function pointer to INIT function             */
   void (*update)(); /* Function pointer to UPDATE function           */
   } PWMGEN;

/*-----------------------------------------------------------------------------
Define a PWMGEN_handle
-----------------------------------------------------------------------------*/

typedef PWMGEN  *PWMGEN_handle;

/*------------------------------------------------------------------------------
Default Initializers for the F2407 PWMGEN Object
------------------------------------------------------------------------------*/

#define F2407_PWMGEN_DEFAULTS       {0x0,    \
                                     0x7fff, \
                                     0x07d0, \
                                     0x0 ,   \
                                     (void (*)(int))F2407_BLDC_PWM_Init,      \
                                     (void (*)(int))F2407_BLDC_PWM_Update     \
                                    }

#define PWMGEN_DEFAULTS F2407_PWMGEN_DEFAULTS

/*------------------------------------------------------------------------------
 Prototypes for the functions in F2407BLDCPWM1.C , F2407BLDCPWM2.ASM
------------------------------------------------------------------------------*/

void F2407_BLDC_PWM_Init(PWMGEN_handle);
void F2407_BLDC_PWM_Update(PWMGEN_handle);


#endif     /* __F2407_BLDCPWM_H__ */




⌨️ 快捷键说明

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