📄 pwm_sync.h
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : PWM_sync.H
** Project : Iadc
** Processor : 56F8346
** Beantype : PWMMC
** Version : Bean 01.402, Driver 01.23, CPU db: 2.87.097
** Compiler : Metrowerks DSP C Compiler
** Date/Time : 2009-2-10, 11:21
** 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
** ----------------------------------------------------
** 34 | PWMB0
** 35 | PWMB1
** 36 | PWMB2
** 39 | PWMB3
** 40 | PWMB4
** 41 | PWMB5
** ----------------------------------------------------
**
** Device : PWM_B [15-bit]
**
** Counter : PWMB_PMCNT [61796]
** Mode register : PWMB_PMCFG [61807]
** Run register : PWMB_PMCTL [61792]
** Prescaler : PWMB_PMCTL [61792]
** Modulo register : PWMB_PWMCM [61797]
** Compare 0 register : PWMB_PWMVAL0 [61798]
** Compare 1 register : PWMB_PWMVAL1 [61799]
** Compare 2 register : PWMB_PWMVAL2 [61800]
** Compare 3 register : PWMB_PWMVAL3 [61801]
** Compare 4 register : PWMB_PWMVAL4 [61802]
** Compare 5 register : PWMB_PWMVAL5 [61803]
** Fault Control register : PWMB_PMFCTL [61793]
** Fault Status register : PWMB_PMFSA [61794]
** Fault Acknowledge register : PWMB_PMFSA [61794]
** Output Control register : PWMB_PMOUT [61795]
** Dead-Time register : PWMB_PMDEADTM [61804]
** Disable Mapping register 1 : PWMB_PMDISMAP1 [61805]
** Disable Mapping register 2 : PWMB_PMDISMAP2 [61806]
** Channel Control register : PWMB_PMCCR [61808]
** Port register : PWMB_PMPORT [61809]
** Internal Corr. Control reg. : PWMB_PMICCR [61810]
**
** Interrupt name : INT_PWMB_Reload
** Interrupt enable reg. : PWMB_PMCTL [61792]
** Priority : 1
** User handling procedure : PWM_sync_OnReload
** This event is called every 4 PWM cycle
**
** Interrupt name : INT_PWMB_Fault
** Interrupt enable reg. : PWMB_PMFCTL [61793]
** Priority : 1
** User handling procedure : PWM_sync_OnFault0
** This event is called when fault 0 occurs
** Interrupt name : INT_PWMB_Fault
** Interrupt enable reg. : PWMB_PMFCTL [61793]
** Priority : 1
** User handling procedure : PWM_sync_OnFault1
** This event is called when fault 1 occurs
** Interrupt name : INT_PWMB_Fault
** Interrupt enable reg. : PWMB_PMFCTL [61793]
** Priority : 1
** User handling procedure : PWM_sync_OnFault2
** This event is called when fault 2 occurs
** Interrupt name : INT_PWMB_Fault
** Interrupt enable reg. : PWMB_PMFCTL [61793]
** Priority : 1
** User handling procedure : not specified
**
** 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 : positive
** Top-side PWM pair 1 polarity : positive
** Top-side PWM pair 2 polarity : positive
** 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 4 PWM cycle
** Half cycle reload : no
** Hardware acceleration : disabled
**
** Dead Time
** High speed mode
** Prescaler : divide-by-12
** Clock : 5000000 Hz
** Xtal ticks : 2
** microseconds : 0
** seconds (real) : 0.0000002
**
** 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
**
** Fault device 1
** clearing mode : automatic
** pin : FAULTB0
** Fault device 2
** clearing mode : automatic
** pin : FAULTB1
** Fault device 3
** clearing mode : automatic
** pin : FAULTB2
**
** 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 : 60000000 Hz
** Unit Xtal ticks
** Period : 250
** Channel 0 pulse width : 125
** Channel 1 pulse width : 125
** Channel 2 pulse width : 125
** Channel 3 pulse width : 125
** Channel 4 pulse width : 125
** Channel 5 pulse width : 125
** Unit microseconds
** Period : 31
** Channel 0 pulse width : 16
** Channel 1 pulse width : 16
** Channel 2 pulse width : 16
** Channel 3 pulse width : 16
** Channel 4 pulse width : 16
** Channel 5 pulse width : 16
** Unit seconds (real)
** Period : 0.0000313
** Channel 0 pulse width : 0.0000156
** Channel 1 pulse width : 0.0000156
** Channel 2 pulse width : 0.0000156
** Channel 3 pulse width : 0.0000156
** Channel 4 pulse width : 0.0000156
** Channel 5 pulse width : 0.0000156
**
** Contents :
** Enable - byte PWM_sync_Enable(void);
** Disable - byte PWM_sync_Disable(void);
** SetDuty - byte PWM_sync_SetDuty(byte channel,int duty);
** Load - void PWM_sync_Load(void);
** SetRatio16 - byte PWM_sync_SetRatio16(byte channel,word ratio);
** SetRatio15 - byte PWM_sync_SetRatio15(byte channel,int ratio);
** OutputPadEnable - void PWM_sync_OutputPadEnable(void);
** OutputPadDisable - void PWM_sync_OutputPadDisable(void);
**
** (c) Copyright UNIS, spol. s r.o. 1997-2005
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
#ifndef __PWM_sync
#define __PWM_sync
/*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"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -