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.

RTOS/MSP432E411Y: How to enable hardware averaging

Part Number: MSP432E411Y

Tool/software: TI-RTOS

Dear Ti-Expert,

I try to learn how to use the "TI Driver" for the ADCs of an MSP432E411Y.

There are quite some examples in TiREX' SimpleLink path und doxygen documention like ADCBuf and ADCBufMSP432E4, but I couldn't find, how to use the "Hardware Sample Averaging Circuit".

Is it supported by "TI Driver"?

If not:The driverlib seems to offer a function called "ADCHardwareOversampleConfigure". Can I use it instead? How to use it in the "TI Driver" context?

  • Hello Sven,

    The "Hardware Sample Averaging" is not supported with the TI-Drivers.

    Looking at the driverlib APIs and the TI-Driver implementation, it might be alright to call the API "ADCHardwareOversampleConfigure" in the Application after the ADC TI-Driver is initialized.

    I will check with the development team to see if my understanding is correct and if there is any other thing to keep in mind.

    Thanks,
    Sai
  • Hello Sai,
    any news about the "Hardware Sample Averaging"?
    I made a try on my own, but it seems not to work fine. I modified "adcbufmultichannel_MSP_EXP432E401Y_tirtos_ccs" by adding a 1000 sample buffer in the adcBufCallback function and almost disabling the uart communication. I added a breakpoint at the end of the callback function to inspect the buffer in the debugger.
    After
    adcBuf = ADCBuf_open(Board_ADCBUF0, &adcBufParams);
    I added
    MAP_ADCHardwareOversampleConfigure(ADC0_BASE,2);

    For small averaging numbers (0 or 2) the samples look OK, but for large numbers (32 or 64) the buffer content seems no longer fine because channels are mixed.

    Any idea?

  • Hello Sai,

    I worked on the issue and I think I came to a solution.
    I added the two function calls
    /* define ADC clock as 16MHz -> 1MSps at fPLL = 480MHz (480/16 = 30) */
    ADCClockConfigSet(ADC0_BASE, ADC_CLOCK_SRC_PLL | ADC_CLOCK_RATE_FULL, (480/16));
    ADCHardwareOversampleConfigure(ADC0_BASE,32);

    after
    adcBuf = ADCBuf_open(Board_ADCBUF0, &adcBufParams);

    in the example adcbufmultichannel_MSP_EXP432E401Y_tirtos_ccs.

    My confusion was due to the data sheet SLAU723, p. 710:
    "Throughput is decreased proportionally to the number of samples in the
    averaging calculation."

    Thus I assumed, that I have to increase the sample rate accordingly to get the same output data rate.
    Actually the hardware oversampling of N samples does not average the measurements of N consecutive triggers, but takes N measurements for one trigger at the ADC conversion rate (here 1MHz).
    Therefore the sample rate needs not to be changed, because it defines the number of trigger events per second in the TI Driver implementation - not the ADC conversion rate.

**Attention** This is a public forum