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.

MSP432E401Y: ADCBuf_convertCancel on multiple sequencers on same ADC Module only stops conversion for one sequencer

Part Number: MSP432E401Y

When using two sequencers on the same adc module, I am able to sample continuous data similar to adcBufMultiSequencer example.  However, once I call ADCBuf_convertCancel I notice that only sequencer 0 stops conversion and thus does not generate any further call backs to adcBufCallback function.  The second sequecer 1 continues to generate callbacks.

This is the code for the convertCancel function:

    //Stops all conversions in progress (stops callback also)
    if(ADCBuf_convertCancel(adcBuf)!= ADCBuf_STATUS_SUCCESS) {
            /* Did not stop conversion process correctly. */
            while(1);
        }

This takes the adcBuf handle which is the same for both sequencer 0 and sequencer 1 as they are on the same ADC module.

How do I stop conversions, and thus the adcCallBacks, from the sequencer 1?

 I can determine which sequencer is making the call back as the parameter "completedChannel" specifies the channel that is completed making the call backs.

  • Hi,

    I have to reproduce this on my side. Can you send me the ADC settings you are using?

    Thanks,

  • Here are the settings:

        ADCBuf_Params_init(&adcBufParams);
        adcBufParams.callbackFxn = adcBufCallback;
        adcBufParams.recurrenceMode = ADCBuf_RECURRENCE_MODE_CONTINUOUS;
        adcBufParams.returnMode = ADCBuf_RETURN_MODE_CALLBACK;
        adcBufParams.samplingFrequency = 10000;
        adcBuf = ADCBuf_open(Board_ADCBUF0, &adcBufParams);
    
        /* Configure HW Averaging */
        ADCHardwareOversampleConfigure(ADC0_BASE,2);
    
    

    I setup the continousconversions struct (code not shown.)  Then start each sequencer as such:

        /* Start converting ADC0 sequencer 0. */
        if (ADCBuf_convert(adcBuf, continuousConversion_ADC0Seq0, 8) !=
            ADCBuf_STATUS_SUCCESS) {
            /* Did not start conversion process correctly. */
            while(1);
        }
    
        /* Start converting ADC0 sequencer 1. */
        if (ADCBuf_convert(adcBuf, continuousConversion_ADC0Seq1, 2) !=
            ADCBuf_STATUS_SUCCESS) {
            // Did not start conversion process correctly.
            while(1);
        }


    Then when I want to stop conversion I call this function:

        //Stops all conversions in progress (stops callback also)
        if(ADCBuf_convertCancel(adcBuf)!= ADCBuf_STATUS_SUCCESS) {
                /* Did not stop conversion process correctly. */
                while(1);
            }

    I also went back and edited my original question since I accidentally put two sequencers on same channel.  To be clear I have two sequencers on different channels but are using the same ADC Module.

    Thanks.

  • Hi,


    Were you able to duplicate this issue or do you need any additional information?

    Thanks,


    Sean

  • Hi Sean,

    I was able to replicate the issue and am looking into this.

    Thanks,

  • Hi Sean,

    I have asked MSP432 experts to look into this.

    Thanks

  • Thank you.

**Attention** This is a public forum