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.

CCS/CC3220SF-LAUNCHXL: ADC FIFO and DMA header files and examples.

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF, CC3200

Tool/software: Code Composer Studio

I am new to this API and need some help.

I would like to use the API library functions that are described in the technical reference manual www.ti.com/lit/ug/swru465/swru456.pdf on pages 431 and following. Section 13.6 on page 456 describes functions that are included allow the ADC converter to use FIFOs and DMA to transfer data to memory.  The overview paragraph in section 13.6.1 indicates that an API has been built that exposes this functionality. I am  interested in the functions listed in 13.6.4, specifically, functions: 

unsigned char ADCFIFOLvlGet (unsigned long ulBase, unsigned long ulChannel)

unsigned long ADCFIFORead (unsigned long ulBase, unsigned long ulChannel)

 void ADCDMAEnable (unsigned long ulBase, unsigned long ulChannel)

and other functions that interface to the FIFO and DMA system. I have not been able to locate examples or the appropriate header files in the SDK. I am using simplelink_cc32xx_sdk_1_60_00_04. Is this the correct library? Are there examples that illustrate the use of these functions?

I understand that the CC3220 has "Driverlib" embedded into the ROM. Is the API exposed, and if so, what is the appropriate way to call the functions within the library?

Thank you very much for your help.

Doug

  • Hi Doug,

    The ADC headers and source files are located within the SDK at the following directory: C:\ti\simplelink_cc32xx_sdk_1_60_00_04\source\ti\drivers

    Looks like you have ADC.c, ADC.h, ADCCC32XX.c, and ADCCC32XX.h

    There's an ADC driver project at: C:\ti\simplelink_cc32xx_sdk_1_60_00_04\examples\rtos\CC3220SF_LAUNCHXL\drivers\adcsinglechannel

    Information on the API functions can also be found within the SDK, see the below html files:

    /C:/ti/simplelink_cc32xx_sdk_1_60_00_04/docs/tidrivers/doxygen/html/_a_d_c_8h.html
    /C:/ti/simplelink_cc32xx_sdk_1_60_00_04/docs/tidrivers/doxygen/html/_a_d_c_c_c32_x_x_8h.html

    Hope this helps,
    Kevin
  • Thank you very much for your quick response. I do appreciate it. Unfortunately this did not resolve the issue. The API described in the _a_d_c8h.html and the _a_d_c__c32_x_x_8h documents do not contain the bindings to functions such as "unsigned char ADCFIFOLvlGet (unsigned long ulBase, unsigned long ulChannel)" , unsigned long ADCFIFORead (unsigned long ulBase, unsigned long ulChannel), and void ADCDMAEnable (unsigned long ulBase, unsigned long ulChannel) which are referenced in section 13 of the swru456.pdf document.

    The closest that I can find are functions from the CC3200 driverlib library. An implemetation is available at github.com/.../adc.h, ...adc.c. These functions *do* match the documentation in the swru456 doucment.

    This begs the question, is the implementation from the cc3200 processor compatable with the cc3220sf processor. Is the code for these functions burnt into the ROM of the cc3220sf processor, and is the API for driverlib exposed?

    The big picture: I would like to get time-stamped ADC data from multiple channels dma transferred into the processor. The documentation suggests that this can be done. Unfortunately the examples and documentation that I have seen in the SDK use a single shot polling mode. This includes the two versions of adc.c, and adc.h that you reference above.

    I am working with the example located at
    C:\ti\simplelink_cc32xx_sdk_1_60_00_04\examples\rtos\CC3220SF_LAUNCHXL\drivers\adcsinglechannel\freertos, and the documentation that you reference. Please note that in the examples, both threads do a "single shot" adc conversion. One thread does a single shot conversion, displays the results and exits, while the other thread loops through 10 single shot conversions on a different channel, displays the results and returns.


    Thank you very much for your help.

    Doug
  • I have been able to find the documentation that I need. It turns out that driverlib is described in \docs\cc3320\CC3220_ROM_services.html, and the functions are prototyped in sourc/ti/devices/cc32xx/driverlib/rom.h, rom_map.h and rom_patch.h.

    Thank you for your help on this.

    Doug