MSPM0G3519: MSPM0G3519 - ADC conversion channel topic

Part Number: MSPM0G3519


Hi TI team,

Currently I'm configuring ADC for my project. In this project, I use 3 ADC channel (A0_0, A0_5 and A0_7). Therefore, I use 3 MEMCTL register (MEMCTL0,MEMCTL1,MEMCTL3), the same for MEMRES. The configuration for MEMCTL is :

-Disable window comparator.

-Next conversion is automatic.

-Disable burn out current source.

-Select SCOMP0 as source of sample timer period

-VRSEL to VDDA reference 

My question is when I start the ADC conversion, I need to wait until all 3 MEMCTL channel completed, right ? Does this mean that when I configure more channel, it will take more longer time ? Is it possible that I start conversion for 1 channel only and get the result from it only ?

  • Hi,

    You can enable MEMO0 result loaded interrupt. That's mean you have get the first result.

  • I checked the datasheet again and I found this sequence on page (988)

    My assumption would be that: 

    Whenever I want to start ADC conversion for 1 channel only, I will set STARTADD in CLT2 to the corresponding MEMCTL (for example, If I want to read ADC at A0_1 - this pin assigned to MEMCTL1 => Then I will set STARTADD in CTL2 to MEMCTL1, and ENDADD in CTL2 as default. Then I will enable ADC conversion and start conversion like normal. If I want to read ADC at another pin, for example A0_5 (assigned to MEMCTL2), then I only need to set STARTADD in CTL2 to MEMCTL2 again and repeat. Then with the result loaded interrupt, I will get the first result. 

    Is that correct ?

  • Hi,

    STARTADD is used for ADC initialize not and is not recommended to change while running. I still recommend that you don't modify the sequence start address. Sample from all four channels each time, and only read the MEMX you need.

    Regards,

    Zoey

  • Can you give more hint about change while running? From the datasheet, I understand that after a completed conversion for single channel, the SC bit in CTL1 and ENC bit in CTL0 will be automatically cleared. After that moment, can I reconfigure the STARTADD of CTL2 again ?

  • Yes, you can, but I recommend configuring the ADC's sequence mode and its start and end addresses during initialization. In actual application code, try not to change it. This is simply because it will make your code more complex, but logically it's feasible.

    Why do you insist on converting only once? Given this, why not choose signal mode? From a time perspective, the time it takes to modify registers using code and the time it takes to complete the sequence conversion are roughly the same.

  • A good hint. I will discuss this point with my team again. If I have any question, I will ask

  • Let me close this thread. If you have new question, you can create a new thread. Thank you!