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

📄 pwm.h

📁 用freescale公司的DSP56F8013芯片实现的PMSM的SVPWM 驱动
💻 H
📖 第 1 页 / 共 2 页
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : PWM.H
**     Project   : PMSM
**     Processor : 56F8013VFAE
**     Beantype  : PWMMC
**     Version   : Bean 01.491, Driver 01.27, CPU db: 2.87.089
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 2008-1-24, 下午 01:45
**     Abstract  :
**         This bean "PWMMC" implements 6-channel center-aligned or 
**         edge-aligned pulse-width modulator for AC motor control, which 
**         is presented on chip. The device is capable of controlling most 
**         motor types: AC induction motors (ACIM), both brushless (BLDC) 
**         and brush DC motors (BDC), switched (SRM) and variable reluctance  
**         motors (VRM),and stepper motors.
**         Another possibility of using this bean is as a pulse-width modulation 
**         generator that generates 6 signals with variable duty and fixed cycle.
**     Settings  :
**         Used output pins            :
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       29            |  GPIOA0_PWM0
**                       28            |  GPIOA1_PWM1
**                       23            |  GPIOA2_PWM2
**                       24            |  GPIOA3_PWM3
**                       22            |  GPIOA4_PWM4_FAULT1_T2
**                       20            |  GPIOA5_PWM5_FAULT2_T3
**             ----------------------------------------------------
**
**         Device                      : PWM_Timer [15-bit]
**
**         Counter                     : PWM_PMCNT [61508]
**         Mode register               : PWM_PMCFG [61520]
**         Run register                : PWM_PMCTL [61504]
**         Prescaler                   : PWM_PMCTL [61504]
**         Modulo register             : PWM_PWMCM [61509]
**         Compare 0 register          : PWM_PWMVAL0 [61510]
**         Compare 1 register          : PWM_PWMVAL1 [61511]
**         Compare 2 register          : PWM_PWMVAL2 [61512]
**         Compare 3 register          : PWM_PWMVAL3 [61513]
**         Compare 4 register          : PWM_PWMVAL4 [61514]
**         Compare 5 register          : PWM_PWMVAL5 [61515]
**         Fault Control register      : PWM_PMFCTL [61505]
**         Fault Status register       : PWM_PMFSA [61506]
**         Fault Acknowledge register  : PWM_PMFSA [61506]
**         Output Control register     : PWM_PMOUT [61507]
**         Dead-Time register          : PWM_PMDEADTM0 [61516]
**         Dead-Time 1 register        : PWM_PMDEADTM1 [61517]
**         Disable Mapping register  1 : PWM_PMDISMAP1 [61518]
**         Disable Mapping register  2 : PWM_PMDISMAP2 [61519]
**         Channel Control register    : PWM_PMCCR [61521]
**         Port register               : PWM_PMPORT [61522]
**         Internal Corr. Control reg. : PWM_PMICCR [61523]
**         PWM Source Control register : PWM_PMSRC [61524]
**
**         Interrupt name              : INT_PWM_Reload
**         Interrupt enable reg.       : PWM_PMCTL [61504]
**         Priority                    : 1
**         User handling procedure     : PWM_OnReload
**         This event is called every 1 PWM cycle
**
**
**     Initialization:
**          Align                      : center-aligned mode
**          Mode of PWM pair 0         : complementary
**          Mode of PWM pair 1         : complementary
**          Mode of PWM pair 2         : complementary
**          Top-side PWM pair 0 polarity : negative
**          Top-side PWM pair 1 polarity : negative
**          Top-side PWM pair 2 polarity : negative
**          Bottom-side PWM pair 0 polarity : negative
**          Bottom-side PWM pair 1 polarity : negative
**          Bottom-side PWM pair 2 polarity : negative
**          Write protect              : no
**          Output                     : Disabled
**          Enable in Wait mode        : no
**          Enable in EnOnCE mode      : no
**          Reload                     : every 1 PWM cycle
**          Half cycle reload          : yes
**          Hardware acceleration      : enabled
**          Load Mode                  : mode 1
**          Improved Swap and Mask     : Enhanced
**          Swap channel 0 and 1       : no
**          Swap channel 2 and 3       : no
**          Swap channel 4 and 5       : no
**
**          Dead Time
**          High speed mode
**              Prescaler              : divide-by-32
**              Clock                  : 1000000 Hz
**              Xtal ticks             : 8
**              microseconds           : 1
**              seconds (real)         : 0.0000010
**
** Output control channel 0            : Disabled
** Output control channel 1            : Disabled
** Output control channel 2            : Disabled
** Output control channel 3            : Disabled
** Output control channel 4            : Disabled
** Output control channel 5            : Disabled
**
** Correction
**   Correction method                 : method 1
**   PWM pair 0                        : top
**   PWM pair 1                        : top
**   PWM pair 2                        : top
**
**   Channel masks
**     Mask channel 0                  : no
**     Mask channel 1                  : no
**     Mask channel 2                  : no
**     Mask channel 3                  : no
**     Mask channel 4                  : no
**     Mask channel 5                  : no
**
**
** Mask fault pins
** Channel 0
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
** Channel 1
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
** Channel 2
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
** Channel 3
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
** Channel 4
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
** Channel 5
**   Mask fault 1                      : yes
**   Mask fault 2                      : yes
**   Mask fault 3                      : yes
**   Mask fault 4                      : yes
**
**  Device                             : Enabled
**  Event                              : Enabled
**  High speed mode
**    Prescaler                        : divide-by-1
**    Clock                            : 32000000 Hz
**    Unit                              Xtal ticks
**      Period                         : 400
**      Channel 0 pulse width          : 200
**      Channel 1 pulse width          : 200
**      Channel 2 pulse width          : 200
**      Channel 3 pulse width          : 200
**      Channel 4 pulse width          : 200
**      Channel 5 pulse width          : 200
**    Unit                              microseconds
**      Period                         : 50
**      Channel 0 pulse width          : 25
**      Channel 1 pulse width          : 25
**      Channel 2 pulse width          : 25
**      Channel 3 pulse width          : 25
**      Channel 4 pulse width          : 25
**      Channel 5 pulse width          : 25
**    Unit                              seconds (real)
**      Period                         : 0.0000500
**      Channel 0 pulse width          : 0.0000250
**      Channel 1 pulse width          : 0.0000250
**      Channel 2 pulse width          : 0.0000250
**      Channel 3 pulse width          : 0.0000250
**      Channel 4 pulse width          : 0.0000250
**      Channel 5 pulse width          : 0.0000250
**
**     Contents  :
**         Enable           - byte PWM_Enable(void);
**         Disable          - byte PWM_Disable(void);
**         EnableEvent      - byte PWM_EnableEvent(void);
**         DisableEvent     - byte PWM_DisableEvent(void);
**         SetPeriod        - byte PWM_SetPeriod(word period);
**         SetDuty          - byte PWM_SetDuty(byte channel,int duty);
**         SetDutyPercent   - byte PWM_SetDutyPercent(byte channel,byte duty);
**         Load             - void PWM_Load(void);
**         OutputPadEnable  - void PWM_OutputPadEnable(void);
**         OutputPadDisable - void PWM_OutputPadDisable(void);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2006
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __PWM
#define __PWM

/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
/* Include inherited beans */

#include "Cpu.h"

/* MODULE PWM. */

#ifndef __BWUserType_TChannels
#define __BWUserType_TChannels
  typedef struct {
    byte channel0  : 1;                                           /* Channel 0 bit */
    byte channel1  : 1;                                           /* Channel 1 bit */
    byte channel2  : 1;                                           /* Channel 2 bit */
    byte channel3  : 1;                                           /* Channel 3 bit */
    byte channel4  : 1;                                           /* channel 4 bit */
    byte channel5  : 1;                                           /* channel 5 bit */
  } TChannels;                         /* Structure contains bit informations for 6 channels, one bit for each channel. */
#endif
#ifndef __BWUserType_TChannelPairs
#define __BWUserType_TChannelPairs
  typedef struct {
    byte pair0 : 1;                                               /* PWM pair 0 */

⌨️ 快捷键说明

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