资源简介
自己从ccs3.3版本移植到ccs6.2版本的工程。导入到ccs6.0以上版本时,选择import 3.3pro即可。可能需要稍微改动一下工程属性。给刚刚接触dsp28335的朋友们吧。下载器使用的是xds100v2,工程里可以修改

代码片段和文件信息
// TI File $Revision: /main/4 $
// Checkin $Date: July 30 2007 14:15:53 $
//###########################################################################
//
// FILE: DSP2833x_Adc.c
//
// title: DSP2833x ADC Initialization & Support Functions.
//
//###########################################################################
// $TI Release: DSP2833x Header Files V1.01 $
// $Release Date: September 26 2007 $
//###########################################################################
#include “..\INCLUDE\DSP2833x_Device.h“ // DSP2833x Headerfile Include File
#include “..\INCLUDE\DSP2833x_Examples.h“ // DSP2833x Examples Include File
#define ADC_usDELAY 5000L
#define ADC_CKPS 0xf // ADC module clock = HSPCLK/(15*2) = 2.5MHz
#define ADC_SHCLK 0x4 // S/H width in ADC module periods = 5 ADC cycle(1路ADC频率为2.5MHz/6=416KHz)
//#define CPU_CLK 150e6
#define TIM_CLK 375e5 //定时器时钟四分频
#define PWM_HZ 2000 //频率 HZ
#define SP TIM_CLK/PWM_HZ/2 //
//#define SP 3750//一个周期记录个数
#define DR 50//占空比
//实际采样为8路,采用并发采样,则频率为(2.5MHz/5/4=125KHz)
//---------------------------------------------------------------------------
// 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时钟 HSPCLK输入ADC模块
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_CLOCK_SPEED define statement in the DSP2833x_Examples.h file must
// contain the correct CPU clock period in nanoseconds.
//ADCClock=HSPCLK/ADCTRL3(ADCCLKPS)/(ADCTRL1[7](CPS)+1)
//HSPCLK=75MHz
AdcRegs.ADCTRL3.all = 0x00E0; // Power up bandgap/reference/ADC circuits 上电,ADCTRL3(ADCCLKPS)=0未分频
DELAY_US(ADC_usDELAY); // Delay before converting ADC channels
AdcRegs.ADCTRL1.bit.ACQ_PS = ADC_SHCLK; // 采集窗口大小(ACQ_PS+1)个ADCLK周期数
AdcRegs.ADCTRL3.bit.ADCCLKPS = ADC_CKPS;//ADC内核时钟分频器 ADC module clock = HSPCLK(75MHz)/30=
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 135 2014-11-24 11:31 x_Dsp28335_Template\cc_build_Debug.log
文件 3947 2014-11-24 11:31 x_Dsp28335_Template\CMD\28335_RAM_lnk.cmd
文件 8438 2014-11-24 11:31 x_Dsp28335_Template\CMD\DSP2833x_Headers_nonBIOS.cmd
文件 4855 2014-11-24 11:31 x_Dsp28335_Template\CMD\F28335.cmd
文件 7218 2014-11-24 12:17 x_Dsp28335_Template\Debug\39VF1601.obj
文件 120734 2014-11-24 11:31 x_Dsp28335_Template\Debug\AD.obj
文件 10609 2014-11-24 12:17 x_Dsp28335_Template\Debug\Butterworth_IIR.obj
文件 30365 2014-11-24 12:17 x_Dsp28335_Template\Debug\Can.obj
文件 41872 2014-11-24 12:17 x_Dsp28335_Template\Debug\Can_Read.obj
文件 116837 2014-11-24 11:31 x_Dsp28335_Template\Debug\Cap_Init.obj
文件 113299 2014-11-24 11:31 x_Dsp28335_Template\Debug\CKalmanFilter.obj
文件 8595 2014-11-24 12:17 x_Dsp28335_Template\Debug\DA_Out.obj
文件 1407 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_ADC_cal.obj
文件 1725 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_CodeStartBranch.obj
文件 6098 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_CpuTimers.obj
文件 34973 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_DefaultIsr.obj
文件 121501 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_GlobalVariableDefs.obj
文件 6053 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_PieCtrl.obj
文件 17931 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_PieVect.obj
文件 16567 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_SysCtrl.obj
文件 1416 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_usDelay.obj
文件 16341 2014-11-24 13:20 x_Dsp28335_Template\Debug\DSP2833x_Xintf.obj
文件 112350 2014-11-24 11:31 x_Dsp28335_Template\Debug\EPwm.obj
文件 28756 2014-11-24 13:20 x_Dsp28335_Template\Debug\Gotten_DA_AD.map
文件 133057 2014-11-24 13:20 x_Dsp28335_Template\Debug\Gotten_DA_AD.out
文件 43415 2014-11-24 12:19 x_Dsp28335_Template\Debug\Init.obj
文件 10536 2014-11-24 12:17 x_Dsp28335_Template\Debug\Kalman.obj
文件 13668 2014-11-24 13:20 x_Dsp28335_Template\Debug\main.obj
文件 4432 2014-11-24 12:17 x_Dsp28335_Template\Debug\PID.obj
文件 17210 2014-11-24 12:17 x_Dsp28335_Template\Debug\SCI.obj
............此处省略88个文件信息
相关资源
- DSP28335程序片内FLASH搬运至RAM运行的
- 基于DSP28335的直流电机闭环调速
- 超详细CCS6.2使用方法说明
- 永磁同步电机无位置传感器DSP28335代码
- TIDSP28335CAN中文使用手册.pdf
- DSP28335的PMSM的SVPWM电机代码
- dsp28335各外设
- DSP28335串口二阶BOOT源码
- DSP28335中文手册
- 用于DSP28335的编程例程 主要是用于有
- DSP28335TI例程
- ucos ii 在DSP28335上的移植
- dsp28335数据手册 中文版
- ucos2.52在DSP28335上的移植程序,RAM版
- 基于DSP28335的SVPWM,CCS6.0
- dsp28335官方例程
- DSP28335 SYS/BIOS
- DSP28335控制单相逆变器双闭环控制程序
- TI dsp28335浮点运算库
- DSP28335+AD7656+CPLD完整PCB图4层板
- DSP28335最小系统原理图以及PCB文件
- DSP28335+AD7606 SVPWM 电路原理和PCB
- DSP28335开发攻略.pdf
- CCS6.2器,CC6最新版,免破解
- DSP28335-步进电机
- DSP28335例程以及手把手教你学DSP28335
- TMS320F28335DSP原理与开发编程
- 手把手教你学DSP2812书籍 配套资料光盘
- Vivado 2015.4 DDR 模板工程
- dsp28335最小系统原理图
评论
共有 条评论