Greetings,
I am trying to get the maximum conversion rate of 12.5 MSPS from the ADC on an F28335 using the C2000 Microcontroller Development Kit which is running at 150 MHz. The DMA is being used to transfer 2048 samples to memory. The correct amount of data is being transferred, but instead of taking 163us (2048 samples * 80ns/sample), it is taking 326 us to finish.
The setup has been written per spru812a page 26 Table 1-7. It has been assumed that ‘HSPCP’ in the table should really be ‘HISPCP’. In the routines below, AdcHwInit is called when the code is starting, and AdcSetupCapture is called just before the burst is to begin. I have tried sending the SOCs from the PWM and also by having the code force them. The result is the same either way.
Any help would be much appreciated.
void AdcHwInit()
{
InitAdc();
// The following setup is to achieve the maximum conversion rate of 12.5 MSPS.
// It is taken from spru812a (ADC document) page 26 (Table 1-7).
EALLOW;
SysCtrlRegs.HISPCP.all = 3;
EDIS;
AdcRegs.ADCTRL1.bit.ACQ_PS = 0;
AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;
AdcRegs.ADCTRL1.bit.CONT_RUN = 1;
AdcRegs.ADCTRL2.bit.EPWM_SOCB_SEQ = 1;
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1;
AdcRegs.ADCTRL3.all = 0xE0;
AdcRegs.ADCMAXCONV.all = 15;
}
void AdcSetupCapture()
{
AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1;
AdcRegs.ADCCHSELSEQ1.all = ADCCHSELSEQ_SETUP_NORMAL;
AdcRegs.ADCCHSELSEQ2.all = ADCCHSELSEQ_SETUP_NORMAL;
AdcRegs.ADCCHSELSEQ3.all = ADCCHSELSEQ_SETUP_NORMAL;
AdcRegs.ADCCHSELSEQ4.all = ADCCHSELSEQ_SETUP_NORMAL;
}
// Registers just before the burst starts
ADC_ADCTRL1 0x0050
ADC_ADCTRL2 0x8800
ADC_ADCMAXCONV 0x000F
ADC_ADCCHSELSEQ1-4 0x0000
ADC_ADCASEQSR 0x0000
ADC_CTRL3 0x0E00
ADC_ADCST 0x0000 0000 0000
ADC_ADCRESULT0-15 0x0000
ADC_ADCREFSEL 0x1F28
ADC_ADCOFFTRIM 0x711D