开关磁阻电机电流斩波控制程序


本程序在我们实验室的7.5kw的srm上测试,其波形和王洪华的《开关磁阻电机调速控制技术》上的相关波形是一致的。
资源截图
代码片段和文件信息
// TI File $Revision: /main/5 $
// Checkin $Date: October 23 2007   13:34:09 $
//###########################################################################
//
// FILE: DSP2833x_Adc.c
//
// title: DSP2833x ADC Initialization & Support Functions.
//
//###########################################################################
// $TI Release: DSP2833x/DSP2823x C/C++ Header Files V1.31 $
// $Release Date: August 4 2009 $
//###########################################################################

#include “DSP2833x_Device.h“     // DSP2833x Headerfile Include File
#include “DSP2833x_Examples.h“   // DSP2833x Examples Include File

#define ADC_usDELAY  5000L

//---------------------------------------------------------------------------
// InitAdc:
//---------------------------------------------------------------------------
// This function initializes ADC to a known state.
//
void InitAdc(void)
{
    extern void DSP28x_usDelay(Uint32 Count);


    // *IMPORTANT*
// The ADC_cal function which  copies the ADC calibration values from TI reserved
// OTP into the ADCREFSEL and ADCOFFTRIM registers occurs automatically in the
// Boot ROM. If the boot ROM code is bypassed during the debug process the
// following function MUST be called for the ADC to function according
// to specification. The clocks to the ADC MUST be enabled before calling this
// function.
// See the device data manual and/or the ADC Reference
// Manual for more information.

    EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
ADC_cal();
EDIS;




    // To powerup the ADC the ADCENCLK bit should be set first to enable
    // clocks followed by powering up the bandgap reference circuitry and ADC core.
    // Before the first conversion is performed a 5ms delay must be observed
// after power up to give all analog circuits time to power up and settle

    // Please note that for the delay function below to operate correctly the
// CPU_RATE define statement in the DSP2833x_Examples.h file must
// contain the correct CPU clock period in nanoseconds.

    AdcRegs.ADCTRL3.all = 0x00E0;  // Power up bandgap/reference/ADC circuits
    DELAY_US(ADC_usDELAY);         // Delay before converting ADC channels
}

//===========================================================================
// End of file.
//===========================================================================

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-01-11 10:22  SRM_Crrent_Feed_Back
     文件        3480  2015-01-11 10:07  SRM_Crrent_Feed_Backcc_build_Debug.log
     目录           0  2015-01-11 10:22  SRM_Crrent_Feed_Backcmd
     文件        7326  2009-08-04 13:04  SRM_Crrent_Feed_Backcmd28335_RAM_lnk.cmd
     文件        8645  2009-08-04 13:04  SRM_Crrent_Feed_BackcmdDSP2833x_Headers_BIOS.cmd
     文件        8623  2009-08-04 13:04  SRM_Crrent_Feed_BackcmdDSP2833x_Headers_nonBIOS.cmd
     文件        9569  2009-08-04 13:04  SRM_Crrent_Feed_BackcmdF28335.cmd
     目录           0  2015-01-11 10:22  SRM_Crrent_Feed_BackDebug
     文件        1572  2015-01-11 10:07  SRM_Crrent_Feed_BackDebug.lkf
     文件      112547  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_Adc.obj
     文件        1112  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_ADC_cal.obj
     文件        1391  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_CodeStartBranch.obj
     文件      113913  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_CpuTimers.obj
     文件         753  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_CSMPasswords.obj
     文件        1028  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_DBGIER.obj
     文件      154714  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_DefaultIsr.obj
     文件        1103  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_DisInt.obj
     文件      137121  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_DMA.obj
     文件      117595  2015-01-06 09:23  SRM_Crrent_Feed_BackDebugDSP2833x_ECan.obj
     文件      114933  2015-01-06 09:23  SRM_Crrent_Feed_BackDebugDSP2833x_ECap.obj
     文件      120604  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_EPwm.obj
     文件      113680  2015-01-06 09:24  SRM_Crrent_Feed_BackDebugDSP2833x_EQep.obj
     文件      122440  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_GlobalVariableDefs.obj
     文件      112390  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_Gpio.obj
     文件      112544  2015-01-06 09:24  SRM_Crrent_Feed_BackDebugDSP2833x_I2C.obj
     文件      121452  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_Mcbsp.obj
     文件      112286  2014-12-22 16:22  SRM_Crrent_Feed_BackDebugDSP2833x_MemCopy.obj
     文件      112901  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_PieCtrl.obj
     文件      119804  2015-01-11 10:07  SRM_Crrent_Feed_BackDebugDSP2833x_PieVect.obj
     文件      113827  2015-01-06 19:13  SRM_Crrent_Feed_BackDebugDSP2833x_Sci.obj
     文件      113014  2015-01-06 09:24  SRM_Crrent_Feed_BackDebugDSP2833x_Spi.obj
............此处省略80个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)