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.

MSPM0L2228: Trigger ADC "selected" Channel (choose one and read one channel) to read by Software

Part Number: MSPM0L2228

Tool/software:

Dear expert, 

We do have different sample mode, like single and sequence.

If there are 3 channels ADC, and the customer would like to read the target channel (one channel at a time) by software.

Does our device able to do that with sequence mode, or we can do it with single mode and change the channel during runtime?

Can you show me how to do that? 

Such as which function should I call or setup.

Best Regards,

Eric Chen

  • Hi Eric,

    Do you mean that you want to read three different channels one by one. And use software as trigger.

    Yes you can use sequence. You can add 3 ADC conversion, and set the trigger mode to 'Valid trigger will step to next memory conversion register'

    Then you can use DL_ADC12_startConversion(ADC12_0_INST) to trigger ADC sample in the code.

    Thanks,

  • Dear Yuhao, 

    According to what you mean, our ADC will only sample "one channel" at every DL_ADC12_startConversion(ADC12_0_INST),

    then switch to another channel and wait for another DL_ADC12_startConversion(ADC12_0_INST).

    After sending the second DL_ADC12_startConversion(ADC12_0_INST), I will get the second channel of ADC.

    Is my understanding correct?

    Best Regards,

    Eric Chen

  • Yes, you are right. Because the trigger mode of 'Valid trigger will step to next memory conversion register', 3 conversions will be triggered one by one,