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.

MSPM0G3107: ADC single shot polling

Part Number: MSPM0G3107
Other Parts Discussed in Thread: MSPM0G3507, SYSCONFIG

Tool/software:

Hello,

We are trying to use the ADC module in single shot mode with polling and we notice that after the first conversion the ADC will not work for a second time. The code that worked for us looks like this:

We need to perform the conversion periodically, and the following code is called in a cyclic task.

We noticed that if we initialize the ADC before the code sequence and deinit The ADC after Adc_ReadGroup(ADC_GROUP_ID_0,&result_buffer) the conversion works. Is it ok? Do you have a different handling for ADC single shot on polling?

Also we want to have a lower current consumption for out project, and we notice the ADC module is always active. We would like to have is turned of after the conversion is finished and there are no functions available to do so. Do you plan to have an update for this matter?

  • Hello Ariana,

    1). You can import an example code of ADC "adc12_single_conversion_LP_mspm0g3507" into CCS;

    2). You can find the configuration of ADC in sysconfig.

    If you don't enable the "repeat mode", the ADC will stop conversion after the first time of single/ sequence conversion completed.

    So if you want to let the ADC start conversion again, you should use these two instrcutions:
    DL_ADC12_enableConversions(ADC12_0_INST);

    DL_ADC12_startConversion(ADC12_0_INST);

    Or you can try to use the repeat mode.

    3). About the low power. If you enter into low power mode even though the ADC is powered (just powered, not work), I think that the current won't be large. If you want to set the power down behavior, you can refer to the chapter 10.2.7 Power down behavior. Which can also be found in the sysconfig.

    And about the enable power and disable power instruction, you can refer to the related code in ti_msp_dl_config.c 

    If you have usage issues about our M0, using the SDK and reading the TRM or we called user guide is a good idea. 

    Best Regards,

    Janz Bai