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.

MSPM0C1104-Q1: Timer -> ADC Event Trigger M0C1104

Part Number: MSPM0C1104-Q1

When using the event trigger from a timer, if I set the SAMPMODE (CTL1 bit 20) bit to AUTO, when the ADC gets the trigger signal it samples the ADC forever, never stopping conversions.  It does not do it once every trigger event.  If I set the bit to MANUAL, the trigger only happens at the first EVENT, nvere triggering again.  What's a mother to do?  Here is my setup configuration:

 /* ADC12_0 Initialization */
static const DL_ADC12_ClockConfig gADC12_0ClockConfig = {
    //.clockSel       = DL_ADC12_CLOCK_SYSOSC,
    .clockSel       = DL_ADC12_CLOCK_ULPCLK,
    .divideRatio    = DL_ADC12_CLOCK_DIVIDE_8,
    .freqRange      = DL_ADC12_CLOCK_FREQ_RANGE_20_TO_24,
};

    DL_ADC12_setClockConfig(ADC12_0_INST, (DL_ADC12_ClockConfig *) &gADC12_0ClockConfig);
   
    DL_ADC12_initSingleSample(ADC12_0_INST,
                                DL_ADC12_REPEAT_MODE_ENABLED,
                                DL_ADC12_SAMPLING_SOURCE_AUTO,
                                ADC12_CTL1_TRIGSRC_EVENT,
                                DL_ADC12_SAMP_CONV_RES_12_BIT,          //12 bit resolution
                                DL_ADC12_SAMP_CONV_DATA_FORMAT_UNSIGNED);  
    DL_ADC12_configConversionMem(ADC12_0_INST,
                                ADC12_0_ADCMEM_0,
                                DL_ADC12_INPUT_CHAN_1,     /*DL_ADC_INPUT_CHAN_x - sets x as ADC ch.*/
                                DL_ADC12_REFERENCE_VOLTAGE_INTREF,
                                DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP0,
                                DL_ADC12_AVERAGING_MODE_DISABLED,
                                DL_ADC12_BURN_OUT_SOURCE_DISABLED,
                                DL_ADC12_TRIG_SRC_EVENT,    // 1 = hardware = Event trigger
                                DL_ADC12_WINDOWS_COMP_MODE_DISABLED);
   
   
    DL_ADC12_setPowerDownMode(ADC12_0_INST,DL_ADC12_POWER_DOWN_MODE_MANUAL);
    DL_ADC12_setSampleTime0(ADC12_0_INST,375);
    DL_ADC12_setSubscriberChanID(ADC0,ADC12_0_INST_SUB_CH);  //set Subscriber Chan ID
    //DL_ADC12_setSubscriberChanID(ADC0,1);  //set Subscriber Chan ID
    gADCOffset = DL_ADC12_getADCOffsetCalibration(ADC12_0_ADCMEM_0_REF_VOLTAGE_V);
   
    /* Enable ADC12 interrupt */

    DL_ADC12_clearInterruptStatus(ADC12_0_INST,(DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED));
    DL_ADC12_enableInterrupt(ADC12_0_INST,(DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED));  
    NVIC_EnableIRQ(ADC12_0_INST_INT_IRQN);
   
    DL_ADC12_enableConversions(ADC12_0_INST);
    DL_VREF_enablePower(VREF);
    delay_cycles(POWER_STARTUP_DELAY);
   
static const DL_VREF_ClockConfig gVREFClockConfig = {
    .clockSel = DL_VREF_CLOCK_BUSCLK,
    .divideRatio = DL_VREF_CLOCK_DIVIDE_1,
};