AnsweredAssumed Answered

BF506F EZ-Kit Lite Sample_ADC_ACM_Control - low sampling rate?

Question asked by MBHeitec on Apr 4, 2014
Latest reply on May 5, 2014 by VineethaThomas

Hello,

I'm new to DSP-programming and tried to adapt the Sample_ADC_ACM_Control example, that comes with the VisualDSP++, to fit my requirements. I need an ADC samling rate of about 1MHz (1MS/s) and 3 channels. The example program works fine now and i understand the code.

The problem is that i can not sample very fast. The fastest possible sampling rate at the moment is about 1kHz. Where is the problem? If I shorten the event time to get higher sampling rate, the buffer will not be filled anymore and the program is waiting to receive samples. Via pll I have set a CCLK frequency of 400MHz and a SCLK frequency of 80MHz. So why do i can not sample any faster?

The fastest possible working conditions are the following:

 

/*=============  D E F I N E S  =============*/

/* ACM Device number to control ADC*/

#define     ADC_TEST_ACM_DEV_NUM            0

/* SPORT Device number connected to ADC */

#define     ADC_TEST_SPORT_DEV_NUM          1

/* SPORT Device DMA Bus width (16 bits) */

#define     ADC_TEST_SPORT_DMA_BUS_WIDTH    2

/* ADC Clock (ACLK) frequency in Hertz */

#define     ADC_TEST_ACLK_FREQ              40000000u

/* Number of ACM events per trigger (Max value = 16) */

#define     ADC_TEST_NUM_ACM_EVENTS         3

/* Time get the first ADC Sample (ACM First event time) */

#define     ADC_TEST_ACM_EVENT_BASE_TIME    0

/* Interval between ADC samples (Interval between ACM events) */

#define     ADC_TEST_ACM_EVENT_INTERVAL     8000

/* GP Timer to trigger ACM */

#define     ADC_TEST_ACM_TGR_GP_TIMER       ADI_TMR_GP_TIMER_7

/* ACM Trigger Timer Period */

#define     ADC_TEST_ACM_TGR_TMR_PERIOD     (ADC_TEST_ACM_EVENT_INTERVAL * ADC_TEST_NUM_ACM_EVENTS)

/* ACM Trigger Timer Width */

#define     ADC_TEST_ACM_TGR_TMR_WIDTH      8000

 

/* ADC Serial data mode */

#define     ACM_TEST_SERIAL_DATA_MODE       ADI_BF506FADC1_DATA_DOUT_A_ONLY

 

/* Number of Samples to receive */

#define     ADC_TEST_NUM_SAMPLES            3

....

....

....

in the main function i changed the event parameter array:

 

/* Populate ACM Event Parameter array */

    for (i = 0;

         i < ADC_TEST_NUM_ACM_EVENTS;

         i++)

    {

        /* Event Number */

        aoAcmEventParams[i].nEventNumber = i;

        /* Enable event */

        aoAcmEventParams[i].bEnable = true;

        /* ADC Channel select - between 0 and 2 */

        aoAcmEventParams[i].nAdcCannelSelect = (i % 3);

        /* ADC Range select - 0 for even numbered events, 1 for odd numbered events */

        aoAcmEventParams[i].nRange = 0;/*(i % 2);*/

        /* ADC Logic select - 0 for even numbered events, 1 for odd numbered events */

        aoAcmEventParams[i].nLogic = 1;/*(i % 2);*/

        /* ADC Event Time */

        aoAcmEventParams[i].nTime = ADC_TEST_ACM_EVENT_BASE_TIME + (i * ADC_TEST_ACM_EVENT_INTERVAL);

    }

 

For the complete code, check the attached file please.

Outcomes