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.

MSPM0G3507: ADC cyclic measurement from Timer

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Hi!

Is that even possible to run ADC measurement from timer cyclically without re-arming ADC manually or via DMA?

I see only examples for one-shot measurement for timer.

I try to configure it myself and:
- when ADC is in Repeated Mode I have measurement (ADC12_0_INST_IRQHandler called) every 76uS, so ADC runs by itself after first Zero event;
- when ADC is not in Repeated Mode I have only single measurement from Timer Zero event. 

Here is examples of SysCfg and the code: examles.zip

In Repeated Mode bit ENC is always "1", so ADC is running by itself after first trigger.
In Non-Repeated Mode ENC bit is cleared after first measurement so next measurement can't start.

  • Hi Serhii,

    Is that even possible to run ADC measurement from timer cyclically without re-arming ADC manually or via DMA?

    Yes, this is appliable.

    For ADC, there need additional setting for the trigger requirement:

    When select valid trigger, then it requires next timer event to start next ADC (there is MEM 0).

    B.R.

    Sal

  • In this case to measure 4 channels I need to wait 4 timer triggers.
    I expect to have one timer event --> Measure all channels in sequence.

    So next case is impossible at all?
    - Timer event;
    - ADC measures Ch1 --> ... --> Ch N;
    - ADC stops until next timer event.

    It is pretty typical usecase for the most other microcontrollers.

  • Hi Serhii,

    In this case to measure 4 channels I need to wait 4 timer triggers.

    That's not true. You only need 1 timer event trigger to finish all four channels with the setting I shared.

    If you take a look in the sysconfig configruation of each memory, you will find that every memory can be set individually. So, If you set every memory channel with the valid triiger method, then it requires 4 event trigger.

    B.R.

    Sal

  • Yes, thanks, you are absolutely right!

    I checked this option for all channels so each was started from separate trigger, my bad.
    Now I get it and how it work.