AnsweredAssumed Answered

Using Multiple ADCs or Channels Simultaneously and Scheduling events of an ADC

Question asked by rishijain on Jul 10, 2015
Latest reply on Aug 26, 2015 by Prashant

We are trying to Sample inputs from various Channels simultaneously and by scheduling them :-

1)      Simultaneous Sampling of ADC’s

                    a)For this we tried using the Simultaneous Sampling Option and made the argument true but the issue comes when selecting the Interfaces using the same instance.

ADI_ADCC_EVENT_CFG  EventCFG = {

                                      0,                                        /* Event number */

                                      0x0D,                                     /* Event control word (channel 0, VAL = 1, Convert = 1 ) */

                                      ADI_ADCC_ADCIF0,                          /* ADC Interface */

                                      ADI_ADCC_TIMER0,                          /* Timer ID */

                                      true,                                    /* No simultaneous sampling */

                                      0,                                        /* Memory offset within a frame */

                                      2                                         /* Event time */

                                    };

 

                    b) Tried to implement this by declaring EventCFG variable as a 2 dimension array but were unsuccessful with that.

  ADI_ADCC_EVENT_CFG  EventCFG[2] = {

                                      {0,                                        /* Event number */

                                      0x0D,                                     /* Event control word (channel 0, VAL = 1, Convert = 1 ) */

                                      ADI_ADCC_ADCIF0,                          /* ADC Interface */

                                      ADI_ADCC_TIMER0,                          /* Timer ID */

                                      false,                                    /* No simultaneous sampling */

                                      0,                                        /* Memory offset within a frame */

                                      2 /* Event time */},

                                    

                                      {1,                                        /* Event number */

                                      0x0D,                                     /* Event control word (channel 0, VAL = 1, Convert = 1 ) */

                                      ADI_ADCC_ADCIF1,                          /* ADC Interface */

                                      ADI_ADCC_TIMER0,                          /* Timer ID */

                                      false,                                    /* No simultaneous sampling */

                                      0,                                        /* Memory offset within a frame */

                                      2 /* Event time */},

                                    };

   

                    c) Also tried declaring 2 instances of EventCfg (EventCfg1 and EventCfg2) which also did not work.

                    d) Also tried executing ConfigureADCC() in a loop which also did not work.

       for(int i=0;i<2;i++){

      

        /* Configure TRU for ADCC trigger */

        if(ConfigTRU() != EXAMPLE_PASSED)

        {

            break;

        }

      

        /* Configure the GP timer for trigger */

        if(ConfigGPTimer() != EXAMPLE_PASSED)

        {

            break;

        } 

        

        /* Configure the ADCC */

        if(ConfigureADCC(ctrlwd) != EXAMPLE_PASSED)

        {

            break;

        }

     

        if(AcquireSamples() != EXAMPLE_PASSED)

        {

            break;

        }

 

                        Will be great if you could throw light on this

                                

   

2)      Scheduling events of ADC

We tried to accomplish this by giving multiple instances of EventCfg and Changing the Event Number, event time , interfaces and timer but all in vain.

Outcomes