Other Parts Discussed in Thread: CCSTUDIO
Dear C2000 team
We used download by CCStudio debugger to RAM which is not problem.
However , We used download Flash(Rom) when is having problem that ADC result is 0 value always.
We set up as a below
|
/* ================================================================================== File name: F2833XILEG_VDC.H Target : TMS320F2833X family
===================================================================================*/
#ifndef __F2833XILEG_VDC_H__ #define __F2833XILEG_VDC_H__
/*------------------------------------------------------------------------------ ADC Initialization Macro Definition ------------------------------------------------------------------------------*/
extern void DSP28x_usDelay(unsigned long Count); extern void ADC_cal(); #define CPU_CLOCK_SPEED 15.000L // 10.000L for a 100MHz CPU clock speed #define ADC_usDELAY 50000L #define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_CLOCK_SPEED) - 9.0L) / 5.0L)
#define ADC_MACRO_INIT(ChSel,MaxChNum,ACQPS) \ \ EALLOW; \ SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; \ ADC_cal(); \ EDIS; \ \ AdcRegs.ADCTRL3.all = 0x00E0; /* Power up bandgap/reference/ADC circuits*/ \ DELAY_US(ADC_usDELAY); /* Delay before converting ADC channels*/ \ \ AdcRegs.ADCTRL1.bit.ACQ_PS = ACQPS; \ AdcRegs.ADCTRL1.bit.CONT_RUN = 0; \ AdcRegs.ADCTRL1.bit.CPS = 0; \ AdcRegs.ADCTRL3.bit.ADCCLKPS = 0;
|
Can you help me?
If have any question. anytime contact me?
Best Regards
Gerald
