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

📄 bldcdrv.h

📁 菲斯卡尔无传感器无刷控制方案。具体说明文档和程序都在压缩包内。
💻 H
字号:
/*******************************************************************************
* Freescale Inc.
* (c) Copyright 2005 Freescale, Inc.
* ALL RIGHTS RESERVED.
*******************************************************************************/

/*******************************************************************************
* FILE NAME         :   bldcdrv.h
*
* DESCRIPTION       :   Zero Crossing constant and mask definitons for Brushless
*                       DC driver.
*                       Masks defined here are related with the hardware used.
*******************************************************************************/

#ifndef __BLDCDRV_H
#define __BLDCDRV_H

#include "types.h"
#include "arch.h"
#include "pwm.h"

#ifdef __cplusplus
extern "C" {
#endif

/******************************************************************************/
/** Zero Crossing Mask definitions for Brushless DC Sensorless Application   **/
/******************************************************************************/															   

/* Constant Definitions */
#define MAX_STEP_CMT        5
#define MIN_STEP_CMT        0

#ifdef MP_BOARD

/* Warning : This mask definitions should be defined according to the ADC sample definitions */
#define ADCZC_PHASE_A_ANY     0x3000       /* ADC sample2 ZC for any transition          */
#define ADCZC_PHASE_A_POS_NEG 0x1000       /* ADC sample2 ZC from Positive to Negative   */
#define ADCZC_PHASE_A_NEG_POS 0x2000       /* ADC sample2 ZC from Negative to Positive   */
#define ADCZC_PHASE_B_ANY     0x0C00       /* ADC sample1 ZC for any transition          */
#define ADCZC_PHASE_B_POS_NEG 0x0400       /* ADC sample1 ZC from Positive to Negative   */
#define ADCZC_PHASE_B_NEG_POS 0x0800       /* ADC sample1 ZC from Negative to Positive   */
#define ADCZC_PHASE_C_ANY     0x0300       /* ADC sample0 ZC for any transition          */
#define ADCZC_PHASE_C_POS_NEG 0x0100       /* ADC sample0 ZC from Positive to Negative   */
#define ADCZC_PHASE_C_NEG_POS 0x0200       /* ADC sample0 ZC from Negative to Positive   */
#define ADCZC_ALL_DISABLE     0x0000       /* ADC ZC all disabled                        */

#define INDEX_ZC_PHASE_C           0       /* phase (selection) index phase C */
#define INDEX_ZC_PHASE_B           1       /* phase (selection) index phase B */
#define INDEX_ZC_PHASE_A           2       /* phase (selection) index phase A */

#else

/* Warning : This mask definitions should be defined according to the ADC sample definitions */
#define ADCZC_PHASE_C_ANY     0x3000       /* ADC sample2 ZC for any transition          */
#define ADCZC_PHASE_C_POS_NEG 0x1000       /* ADC sample2 ZC from Positive to Negative   */
#define ADCZC_PHASE_C_NEG_POS 0x2000       /* ADC sample2 ZC from Negative to Positive   */
#define ADCZC_PHASE_B_ANY     0x0C00       /* ADC sample1 ZC for any transition          */
#define ADCZC_PHASE_B_POS_NEG 0x0400       /* ADC sample1 ZC from Positive to Negative   */
#define ADCZC_PHASE_B_NEG_POS 0x0800       /* ADC sample1 ZC from Negative to Positive   */
#define ADCZC_PHASE_A_ANY     0x0300       /* ADC sample0 ZC for any transition          */
#define ADCZC_PHASE_A_POS_NEG 0x0100       /* ADC sample0 ZC from Positive to Negative   */
#define ADCZC_PHASE_A_NEG_POS 0x0200       /* ADC sample0 ZC from Negative to Positive   */
#define ADCZC_ALL_DISABLE     0x0000       /* ADC ZC all disabled                        */

#define INDEX_ZC_PHASE_A           0       /* phase (selection) index phase A */
#define INDEX_ZC_PHASE_B           1       /* phase (selection) index phase B */
#define INDEX_ZC_PHASE_C           2       /* phase (selection) index phase C */

#endif

/*****************************************************************************/
/** Commutation table for sensorless control                                **/
/** Independent PWM mode                                     	            **/
/*****************************************************************************/
extern const mc_tPWMSignalMask  BldcZC_Cmt_StepTableInd[];

/*****************************************************************************/
/** Commutation table for sensorless control                                **/
/** Complemetary PWM mode                                       	        **/
/*****************************************************************************/
extern const mc_tPWMSignalMask  BldcZC_Cmt_StepTableComp[];
extern const mc_tPWMSignalMask  BldcZC_Cmt_SwapTableComp[];

/******************************************************************************/
/** Zero Crossing Table definitions for Brushless DC Sensorless Application  **/
/******************************************************************************/
extern const UWord16 SetADC_ZCInp_Tab [ MAX_STEP_CMT+1 ] [ 2 ];
extern const Word16 ZC_Phase_Tab [];
extern const int Expect_ZCInpFlag_Tab [ MAX_STEP_CMT+1 ] [2];

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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