Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

LP-MSPM0G3519: .

Part Number: LP-MSPM0G3519
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Dear TI Support Team,

I am writing to inquire about the behavior of the ADC module on the LP-MSPM0G3519 using TI's AUTOSAR 4.3.1-based source code package, version 1.1.0. I have configured the ADC for single-channel, one-shot mode with software triggering and no group priorities. DMA is used to transfer the converted ADC values. I have attached the relevant XDM EB Tresos configuration file for your review.
Expected Behavior:
After software initialization and starting the conversion for a specific group ID, I expect Adc_StartGroupConversion() to trigger an ADC conversion each time it is called.
Current Behavior:
The ADC conversion only occurs once after software initialization. Subsequent calls to Adc_StartGroupConversion() do not trigger new conversions.
Investigation Findings:
My investigation suggests that Adc_StartGroupConversion() only sets the SC bit in the CTL1 register. It does not enable conversions (ENC bit in CTL0), which appears to be handled exclusively by ADC12_enableConversions() within the Adc_Init() function.
Currently, the only workaround I have found is to initialize the ADC, start the conversion, and then deinitialize and reinitialize the ADC after retrieving the data. This is necessary because no public interface is provided to enable conversions (set ENC in CTL0) besides ADC12_enableConversions(), which is called internally only by Adc_Init().
Questions:

  • Given my configuration (single-channel, one-shot, software trigger, DMA), what is the expected behavior of Adc_StartGroupConversion()? Should it trigger a conversion on each call, or only after reinitialization?

 

  • What modifications are needed to achieve the desired behavior of triggering a new conversion every time Adc_StartGroupConversion() is called?

 

  • Does this require an update to the TI source code package, or can the issue be resolved with a different technique on the application side?



Thank you for your time and assistance.

  • Hi Mohamed,

    I think it is because every time the ADC conversion finished, the ADC conversion will be disable automatically. So you may need to enable repeat mode in sysconfig, in which mode the enable bit (ENC) will keep after conversion. 

    Best Regards,

    Pengfei

  • Hello Pengfei
    I don't have such configurations in my package 
    also I'm using eb tresos in the package provided by TI 

    thanks and regards 

  • Hi Mohamed,

    Could I take a view of the menu these two items?

      

    Best Regards,

    Pengfei

  • Hi 
    Here they are 

  • Hi Mohamed,

    Please select AdcGroupConversionMode as ADC_CONV_MODE_CONTINUOUS and test again.

    And I'm not sure whether you could see register value from your side when debugging. And if could, please share the value ADC CTL1 register after ADC initial. 

    Best Regards,

    Pengfei

  • Hi Again Pengfei
    I need to select also AdcGroupAccessMode  to ADC_ACCESS_MODE_STREAMING to be able to generate cfg files 
    here is the value of CTRL0,1

    Idea is I can SC by caling Adc_StartGroupConversion but to get the conversion results I need to set ENC to 1 at CTRL0 and the function doing so is ADC12_enableConversions this function enable the conversion the the source code provided by TI call it only once at initialization at Adc_Init() and I violated by using ADC12_enableConversions and that works but I can not directly use the API as it's static and not provided to the application as external interface 

  • One more thing ENC is set to zero after the first calling of adc startconvention and no provided interface to enable the converaion unless ADC12_enableConversions which I cannot use as per the previously mentioned reasons 

  • Hi Mohamed,

    I know what you mean. Let me explain some mechanism of MSPM0 ADC: there is a "repeat mode" in MSPM0 ADC, and in this mode, the ADC conversion enable bit (ENC) will not be clear after each conversion completed. So I want to check whether you could configure this mode from your side in ADC initial.

    And according to the CONSEG filed in your picture, it seems  AdcGroupAccessMode doesn't be selected to ADC_ACCESS_MODE_STREAMING? This field is expected to configured as 2 or 3 when repeat mode enabled.

    Best Regards,

    Pengfei

  • Hi Pengfei 
    You are totally right I have checked this section but as you see I only have section 1 and 3 there is no repeat mode and as per the current provided cfgs I'm sure of that even after the new cfgs we did now ENC is cleared after the first conversion and it's cleared by HW as function ADC12_disableConversions is only called at Adc_DeInit API 

  • Hi Mohamed,

    I assume that the AdcGroupConversionMode is used to configure the "repeat mode" ,and the AdcGroupAccessMode is used to configure "sequence mode", according to their drop-down menu name, but it seems this is not the case?  What is the differences if you choose ADC_CONV_MODE_CONTINUOUS or ADC_CONV_MODE_ONESHOT in AdcGroupConversionMode?

    Regards,

    Pengfei

  • Hello Pengfei,
    what do you mean by what is the difference?
    for me the behavior is the same in both cases.
    regarding the cfgs if you are ADC_CONV_MODE_ONESHOT you can select AdcGroupAccessMode ADC_ACCESS_MODE_SINGLE or ADC_ACCESS_MODE_STREAMING
    but if you select ADC_CONV_MODE_CONTINUOUS you must select AdcGroupAccessMode ADC_ACCESS_MODE_STREAMING otherwise error.

    Also, in our application, we need to yes it as single mode and we should be able to use repeated single conversion mode with the single  as per datasheet snapshot   

  • Hi Mohamed,

    I think it is a little strange that getting the same result when using ADC_CONV_MODE_CONTINUOUS and ADC_CONV_MODE_ONESHOT parameter from my side. I assume this argument in GUI is designed for repeat sampling function.

    Could you please tell where you download "AUTOSAR 4.3.1-based source code package", because as I know, we don't directly provide AUTOSAR software for MSPM0. 

    Best Regards,

    Pengfei

**Attention** This is a public forum