SBAA288A July   2018  – January 2019 ADS7142

 

  1.   TM4C1294 interface to ADS7142 software library
    1.     Trademarks
    2. 1 Introduction
    3. 2 Hardware
    4. 3 Software
      1. 3.1 Header Files
      2. 3.2 ADS7142 Device Functional Modes Overview
      3. 3.3 Software Functions
    5. 4 Using the Software
      1. 4.1 Prerequisites
      2. 4.2 Getting Started
      3. 4.3 Using the Library
    6. 5 Main Routines and Test Data
      1. 5.1 Manual Mode
      2. 5.2 Autonomous Mode With Pre-Alert
      3. 5.3 Autonomous Mode With Post-Alert
      4. 5.4 Autonomous Mode With Start Burst Data
      5. 5.5 Autonomous Mode With Stop Burst Data
      6. 5.6 High Precision Mode
    7. 6 References
  2.   Revision History

Getting Started

Follow these steps to get the ADS7142 device functional modes firmware up and running:

  1. Install Code Composer Studio version 7.4.0.00015.
  2. In order to reach TivaWare, go to the MSP430Ware page and click on the Start Development button to download the MSP430Ware-cloud tool and the TI Resource Explorer will open in your browser.
  3. On the left hand side of the screen under Software click on TM4C ARM Cortex-M4F MCU - v:2.1.3.156.
  4. Under Libraries click on Driver Library.
  5. Click on the Download all button on the right hand side of the screen to download both the user's guide and driverlib files.
  6. After the driver files have been downloaded, move them to the workspace folder. This folder should be located in C://Users/workspacev7.
  7. Download the ADS7142 device functional modes firmware from ti.com, located under Software. Unzip the files into your working Code Composer Studio Directory. Your working directory is normally located under C://Users/workspacev7.
  8. Open Code Composer Studio and start a new project by clicking on File → New → CCS Project.
    1. Name the project as desired. At the top of this window, ensure that the Target device is selected to be the Tiva TM4C1294NCPDT.
    2. Right click on the project in the project explorer and click on Add Files.
    3. Select all of the files that were downloaded into the workspace from ti.com and click Open.
  9. Right click the project name in the workspace window and click on Properties. A window should appear.
    1. Under General options, select the TIVA TM4C1294NCPDT. In the Connection drop down menu select the Stellaris In-Circuit Debug Interface.
    2. Under Tool-Chain select the appropriate device endianness little for the TM4C1294NCPDT. In the Linker command file field browse your directory for the .cmd file for your device. In this case, this file is tm4c1294ncpdt.cmd.
    3. On the left hand side there is a side menu. Click on the expansion arrow next to Build. Click on ARM Compiler.
      1. Under Include Options click on the paper icon with a green plus to add an include directory. Add the directory in which the TivaWare_C_Series-2.1.4.178 folder is located.
      2. Under Predefined Symbols click on the paper icon with a green plus to add the appropriate predefined NAMEs for your target device. Add TARGET_IS_TM4C129_RA0 and PART_TM4C1294NCPDT exactly as shown.
    4. Click on File Search Path. Add a library that points to the driverlib.lib file within the TivaWare_C_Series - 2.1.4.178 folder. This path should be C://Users/workspacev7/TivaWare_C_Series-2.1.4.178/driverlib/ccs/Debug/driverlib.lib.
  10. Click OK to close the Project Properties window.
  11. Select Project → Build Project.
  12. Delete the main.c file that was created when the project was created.
  13. Choose one device functional mode C file you would like to build. There should be three C files included in the project build: TM4C1294_ADS7142_Functions.c, tm4c1294ncpdt_startup_ccs.c, and your desired ADS7142 functional mode C file. The ADS7142RegisterMap.h file should also be included in the project build. Select all undesired functional mode C files and once highlighted, right click then click on Exclude from build.
  14. Rebuild the project and only warnings should appear.
  15. As illustrated in Figure 3, connect the ADS7142BoosterPack to the TM4C1294 target board.