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.

RTOS/MSP432P401R: Documentation of Examples

Part Number: MSP432P401R

Tool/software: TI-RTOS

Hi,

I've recently purchased an MSP_EXP432P401R board, so I'm working with the ti-rtos examples. I've found them using the Resource Explorer, in the category "SimpleLink MSP432P4 SDK - v:1.60.00.12"

Now I'm studing an example called adcbufcontinuous_MSP_EXP432P401R_tirtos_ccs. My question is: the drivers contained in this example are part of the DriverLib Library? because I can't find documentation for the ADCBuf Module for example. The functions in "MSP432_DriverLib_Users_Guide-MSP432P4xx-4_10_02_00.pdf" manual are very different from the ones used in the TI-RTOS examples.

Thanks a lot.

  • Hello Frederico

    Your point is extremely valid. There is no single document like the DriverLib User Guide which documents every TI driver model. There is a Doxygen page under the SimpleLink installation at the path "docs/tidrivers/doxygen/html/index.html"

    Your feedback is well taken and we shall endeavor to improve the documentation. In the meantime if there is any further support required on the use of the ADCBuf Module, please do let us know
  • Ok thanks a lot. I've been reading the doxygen docs and helped a lot

    But there're some things that are not clear for me. For example, I can't find how to set the source for the timing of the SHI signal. I see that there's a "samplingFrequency" field in the ADCBuf_Params_ Struc, but I don't know how is this managed, which timer is used.

    Another question is if I need to configure more than one channel, have I to repeat the procedure to initialise the ADCBuf struct for each ADC channel?

    And the last one, is the DMA used to copy from the ADC peripheral to the buffer? if is not, how can I configure it?

    thanks a lot again!

  • Hello Frederico

    1. In the MSP_EXP432P401R.c file there is a parameter for adcbufMSP432HWAttrs called adcTimerTriggerSource which can be used to change the timer selected for ADC trigger. You can click on the value to see the possible values that can be assigned

    2. For multiple channels you need to change ADCBuf_Conversion continuousConversion to an array like ADCBuf_Conversion continuousConversion[3] (in this case I am assuming 3 channels). Then you need to initialize the continuousConversion array for each of the channels followed by the call ADCBuf_convert(adcBuf, continuousConversion, 3) for conversion

    3. The current mechanism is to use the CPU. However the DMA mechanism is available (via ADCBufMSP432_HWAttrs ) but I would need to double check the working model and create an example to better assist you. The CPU mechanism is tested and working well, so that you may try to use the same.
  • Thanks a lot Amit. That was all I was searching for.
    The last question is, the only difference between ADC and ADCBuf api is the buffer management struc?
    thanks again
  • Sorry, I couldn't find the way to configure DMA mechanism through a field of the ADCBufMSP432_HWAttrs struct. How is the way to work with it?
  • Hello Frederico

    The ADCBuf manages the features specific to the MSP432P4x device family e.g. use of DMA, configuration of channels, clocks, etc which are not available in the ADC TI driver.

    Also as an added note, we found some issues with the ADCBuf driver in 1.60 SDK release, that are being fixed for the next SDK release. In a short summary

    1. Allowing for any Analog channel to be mapped into the ADCMCTLx
    2. Power Driver management
  • I've been working with the ADCBufMSP432_HWAttrs struct, but I can't find the way to configure the DMA. Neither I can't find the way to look into the functions like "convertFxn" or "openFxn" pointer. My hope was to enter into that functions and see if I can configure DMA channel, but I can't find the way.
    How should I work with this?
    best regards
  • Hello Frederico

    In the MSP_EXP432P401R.c file if you search for the ADCBufMSP432_HWAttrs you will see that the structure has two parameters "useDMA" and "dmaIntNume" set as NULL. The only change you need to is to make "useDMA" as 1 and dmaIntNum as the Interrupt channel on which the interrupt on DMA Done will be asserted for readback of the data.
  • Maybe I've another version of the TI library,  I'm working with the adcbufcontinuous_MSP_EXP432P401R_tirtos_ccs example. THe ADCBufMSP432_HWAttrs is like this:

    typedef struct ADCBufMSP432_HWAttrs {
        uint32_t intPriority;                 /*! ADC interrupt priority */
        ADCBufMSP432_Channels *channelSetting; /*! ADC channel specific setting */
        ADCBufMSP432_Timer_Reference_Source adcTimerTriggerSource;    /*! ADC Timer Trigger Source */
    
    } ADCBufMSP432_HWAttrs;

    Is there a way to view into the TI Lib functions? In the case I need to customize something.

  • Hello Frederico,

    It seems that you are using MSP432P4 SDK 1.50. I checked my local copies and in the MSP432P4 SDK 1.60 the new parameters are provided
  • Yes! that was the problem.
    Is there a way to view into the TI Lib functions? In the case I need to customize something.
  • Hello Frederico

    You can go to source/ti/drivers/adcbuf to look at the functions. However setting a break point may not always worked as the files are pre-compiled.
  • Amit, one more question.

    I'm now working with the SDK 1.6.

    The ADCBufMSP432_HWAttrs adcbufMSP432HWAttrs[MSP_EXP432P401R_ADCBUFCOUNT], must have one entrance for each ADC channel?

    The definition :

        {
            .intPriority =  ~0,
            .channelSetting = adcBuf0MSP432Channels,
            .adcTimerTriggerSource = ADCBufMSP432_TIMERA1_CAPTURECOMPARE2,
            .useDMA = 0,
            .dmaIntNum = DMA_INT0,
            .adcTriggerSource = ADCBufMSP432_TIMER_TRIGGER,
            .timerDutyCycle = 50,
            .clockSource = ADCBufMSP432_ADC_CLOCK
        }

    Is only for one channel, am I right? I must repeat it for each channel.

    Thanks a lot

  • Hello Frederico

    No, it is one for multiple channels.
  • And how does only one DMA channel performs data transfer from ADC contiguous memory to separated buffers for each ADC channel? does it uses the Memory Scatter-Gather Cycle Type? (slau356f 9.2.3.4.5)
  • Hello Frederico,

    Currently the DMA operates in Basic mode. So at a time only one channel can be used for conversion with DMA and it's data stored in the memory. The provision for multiple channel with peripheral scatter gather is something we are working on.
  • ok Thanks a lot Amit!

**Attention** This is a public forum