This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F6777A reading adc sequence channel total conversion completed time

Hi,

How can I calculate total conversion time for all channels. My calculation is like that.

 

AD10OSC = 5mhz,

divider = 2,

sampling = 16 cycle , 

conversion = 13 cycle, 

There are 6 channels from a5 to a0. 

So my calc. is like that. 

1 cycle = 1/5mhz (div2) = 1/2.5mhz = 0.4us

total conversion completed time for one channel = 1 cycle * (16 +13) = 29 cycle = 2.4us

for all channels is 29 * 6  = 174 cycle = 69.6us so DMAISR will trigger after each 69.6us. 

My calculation is right? 

Code is the below.

void adc_init(void)
{   
    ADC10_A_init(ADC10_A_BASE,
                 ADC10_A_SAMPLEHOLDSOURCE_SC,
                 ADC10_A_CLOCKSOURCE_ADC10OSC,
                 ADC10_A_CLOCKDIVIDER_2);

    ADC10_A_enable(ADC10_A_BASE);

    ADC10_A_setupSamplingTimer(ADC10_A_BASE,
                               ADC10_A_CYCLEHOLD_16_CYCLES,
                               ADC10_A_MULTIPLESAMPLESENABLE);

    ADC10_A_configureMemory(ADC10_A_BASE,
                            ADC10_A_INPUT_A5,
                            ADC10_A_VREFPOS_AVCC,
                            ADC10_A_VREFNEG_AVSS);

    //Initialize and Setup DMA Channel 0
    DMA_initParam param = {0};
    param.channelSelect = DMA_CHANNEL_0;
    param.transferModeSelect = DMA_TRANSFER_REPEATED_SINGLE;
    param.transferSize = 6;
    param.triggerSourceSelect = DMA_TRIGGERSOURCE_24; //ADC10 interrupt flag
    param.transferUnitSelect = DMA_SIZE_SRCWORD_DSTWORD;
    param.triggerTypeSelect = DMA_TRIGGER_RISINGEDGE;
    DMA_init(&param);
   
    DMA_setSrcAddress(DMA_CHANNEL_0,
            ADC10_A_getMemoryAddressForDMA(ADC10_A_BASE),
            DMA_DIRECTION_UNCHANGED);

    DMA_setDstAddress(DMA_CHANNEL_0,
                      (uint32_t)adc_table,
                      DMA_DIRECTION_INCREMENT);

    //Enable DMA channel 0 interrupt
    DMA_clearInterrupt(DMA_CHANNEL_0);
    DMA_enableInterrupt(DMA_CHANNEL_0);

    //Enable transfers on DMA channel 0
    DMA_enableTransfers(DMA_CHANNEL_0);
    ADC10_A_startConversion(ADC10_A_BASE, ADC10_A_SEQOFCHANNELS);
}

**Attention** This is a public forum