資源簡(jiǎn)介
基于28335的spwm

代碼片段和文件信息
//###########################################################################
//
//?FILE: DSP2833x_Adc.c
//
//?title: DSP2833x?ADC?Initialization?&?Support?Functions.
//
//###########################################################################
//?$TI?Release:?F2833x/F2823x?Header?Files?and?Peripheral?Examples?V140?$
//?$Release?Date:?March??4?2015?$
//?$Copyright:?Copyright?(C)?2007-2015?Texas?Instruments?Incorporated?-
//?????????????http://www.ti.com/?ALL?RIGHTS?RESERVED?$
//###########################################################################
#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.
//===========================================================================
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-04?22:13??SPWM\
?????文件?????????550??2015-06-20?12:32??SPWM\.ccsproject
?????文件???????22039??2015-06-20?12:32??SPWM\.cproject
?????目錄???????????0??2016-06-04?21:52??SPWM\.launches\
?????文件????????4774??2015-06-21?17:01??SPWM\.launches\SPWM.launch
?????文件?????????834??2015-06-18?12:19??SPWM\.project
?????目錄???????????0??2016-06-04?21:52??SPWM\.settings\
?????文件??????????62??2015-06-18?12:19??SPWM\.settings\org.eclipse.cdt.codan.core.prefs
?????文件?????????123??2015-06-18?12:19??SPWM\.settings\org.eclipse.cdt.debug.core.prefs
?????文件?????????208??2015-06-18?12:26??SPWM\.settings\org.eclipse.core.resources.prefs
?????文件????????7270??2015-06-18?12:19??SPWM\28335_RAM_lnk.cmd
?????目錄???????????0??2016-06-04?21:52??SPWM\Debug\
?????文件?????????738??2016-06-04?21:52??SPWM\Debug\ccsObjs.opt
?????文件????????5085??2015-06-20?12:33??SPWM\Debug\DSP2833x_Adc.pp
?????文件????????5253??2015-06-20?12:33??SPWM\Debug\DSP2833x_CpuTimers.pp
?????文件????????5344??2015-06-22?10:02??SPWM\Debug\DSP2833x_DefaultIsr.pp
?????文件????????5085??2015-06-20?12:33??SPWM\Debug\DSP2833x_DMA.pp
?????文件????????5113??2015-06-20?12:33??SPWM\Debug\DSP2833x_ECan.pp
?????文件????????5113??2015-06-20?12:33??SPWM\Debug\DSP2833x_ECap.pp
?????文件????????5113??2015-06-20?12:33??SPWM\Debug\DSP2833x_EPwm.pp
?????文件????????5113??2015-06-20?12:33??SPWM\Debug\DSP2833x_EQep.pp
?????文件????????4163??2015-06-20?12:33??SPWM\Debug\DSP2833x_GlobalVariableDefs.pp
?????文件????????5113??2015-06-20?12:33??SPWM\Debug\DSP2833x_Gpio.pp
?????文件????????5085??2015-06-20?12:33??SPWM\Debug\DSP2833x_I2C.pp
?????文件????????5141??2015-06-20?12:33??SPWM\Debug\DSP2833x_Mcbsp.pp
?????文件????????3921??2015-06-20?12:33??SPWM\Debug\DSP2833x_MemCopy.pp
?????文件????????5197??2015-06-20?12:33??SPWM\Debug\DSP2833x_PieCtrl.pp
?????文件????????5197??2015-06-20?12:33??SPWM\Debug\DSP2833x_PieVect.pp
?????文件????????5085??2015-06-20?12:33??SPWM\Debug\DSP2833x_Sci.pp
?????文件????????5085??2015-06-20?12:33??SPWM\Debug\DSP2833x_Spi.pp
?????文件????????5197??2015-06-20?12:33??SPWM\Debug\DSP2833x_SysCtrl.pp
............此處省略45個(gè)文件信息
評(píng)論
共有 條評(píng)論