资源简介
SVPWM.zip

代码片段和文件信息
// TI File $Revision: /main/8 $
// Checkin $Date: April 21 2008 15:41:53 $
//###########################################################################
//
// FILE: Example_2833xEPwmUpDownAQ.c
//
// title: 空间电压矢量产生程序SVPWM
//
// ASSUMPTIONS:
//
// This program requires the DSP2833x header files.
//
// Monitor ePWM1-ePWM3 pins on an oscilloscope as described
// below.
//
// EPWM1A is on GPIO0-------5脚
// EPWM1B is on GPIO1-------6脚
//
// EPWM2A is on GPIO2-------7脚
// EPWM2B is on GPIO3-------10脚
//
// EPWM3A is on GPIO4-------11脚
// EPWM3B is on GPIO5-------12脚
//
//
//###########################################################################
// $TI Release: DSP2833x/DSP2823x Header Files V1.20 $
// $Release Date: August 1 2008 $
//###########################################################################
#include “DSP28x_Project.h“ // Device Headerfile and Examples Include File
// Prototype statements for functions found within this file.
void InitEPwm1Example(void);
void InitEPwm2Example(void);
void InitEPwm3Example(void);
void svpwmGen(void);
interrupt void svpwm_isr(void);
volatile float UalphaUbeta;
volatile float ABC;
volatile float T0T1T2T3T4T5T6;
volatile float TaonTbonTcon;
float UaUbUc;
float Ts;
int abc;
int N= 0sector= 0;
#define TPRD 800
#define Udc 800
void main(void)
{
// Step 1. Initialize System Control:
// PLL WatchDog enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
InitSysCtrl();
// Step 2. Initalize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it‘s default state.
// InitGpio(); // Skipped for this example
// For this case just init GPIO pins for ePWM1 ePWM2 ePWM3
// These functions are in the DSP2833x_EPwm.c file
InitEPwm1Gpio();
InitEPwm2Gpio();
InitEPwm3Gpio();
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
InitPieCtrl();
// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
InitPieVectTable();
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13187 2012-11-27 21:15 SVPWM.c
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论