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: Start ADC sampler with rising edge and stop it with Falling Edge

Part Number: MSPM0C1104
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I would like to sample ADC sequence (2 channels) based on timer values in compare register, but I would like to start the timer with rising edge on GPIO and stop the timer or sampling on falling edge.  I think I need to use the event to propagate the event from GPIO to the timer, but using the sysconfig I did not see how to enable the start or stop of the timers.   Is that doable in this family ? and how to do it.

Also, how many clock cycle will take from the rising edge to the start the ADC conversion by the event channel.

Thanks

  • Hi Ayman,
    You can do it through different instances of the stopCounter and startCounter in your code and re-loading the counter to whatever value you need. You can do this through events or interrupts from the GPIO. For clock cycle, it will take the amount of time the ISR gets called (which should be a few of clock cycles.)

    Best Regards,

    Diego Abad

  • Does the hardware support this function without CPU intervention through either DMA or Event system or Timer system without software intervention.  My goal is to reduce the lag between the GPI event and Start sampling.   If this uC can not support it do you have anther low cost solution that can support it from the hardware side.

  • Hi Ayman,

    The GPIO should be able to start the timer from an event (which if configured right can start the ADC.) As for lower cost MCUs, the c devices are our lowest MCU family we offer. 

    Best Regards,

    Diego Abad