CMI Instrumentation Library API Reference Guide
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator
CMI Instrumentation Library API Reference Guide Documentation

The CMI Library provides a CMI Module programming API. This library also provides CMI specific STM logging capabilities.

CMI Library Revision History
Revision Date Notes
0.3 5/21/2009 Combined PMI/CMI Library Release
0.4 6/07/2009 Fixed PCMI_ModuleClockEnable() to poll module status and added _STMLogging build option
1.0 8/10/2010 Modified:
  • CMI_OpenModule to use a config structure
  • Eliminated CMI_SetSampleWindow from API
  • CMI_GetSampleWindow modified to return both components of the sampel window
1.2 9/26/2013 Support for DRA7xx
1.3 9/29/2014 Added missing CCS project files
Note: The PMI and CMI Libraries share version numbers since there are shared elements between the libraries.

\par Conventions
The following public naming conventions are used by the API
\li CMI_ - Prefix for public CMI Library functions
\li eCMI - Prefix for public CMI enumerations 
\li ePCMI - Prefix for public shared enumerations used by both PMI and CMI Libraries.

\par Build Notes
The CMI Library supports the following pre-defined symbols that if defined
enable the functionality at compile time.  
\li _OMAP4430 - Include device specific parameters.
\li _CMI - Compile for CMI specific instance of shared components (verses a PMI build).
\li _STMLogging - If defined the following APIs, that require the library be opened with a valid STM Library handle,
    are included in the build:
    - CMI_LogMsg()
\li _NoMark - May be defined to exclude the mark functions. 
     These functions require _STMLogging and _OMAP4430 to also be defined. 
    - CMI_MarkClockDomainStateChange()
    - CMI_MarkClockDividerRatioChange()
    - CMI_MarkClockSourceSelectionChange()
    - CMI_MarkDPLLSettingChange()
\li _UsingTITools - Includes TI specific pragmas that may not be compatible with other build tools such as gcc. 
     Not defining this symbol will simply exclude the use of TI specific pragmas in the library.
     The following sections are created with pragmas:
    - Code                           => .text:PCMILibrary
    - Error strings                  => .dataImageErrStrings:PCMILib
    - Internal STM message strings   => .dataImageMsgStrings:PCMILib  
    \n Note: The Internal STM messages strings can be placed in non-existent memory. 
    Only pointers to these strings are transferred over the STM.  

\par CMI Export Notes
If you are using CCS to capture STM data (with either a trace enabled emulator or ETB)
you should enable the CMI module's STM messages through the CSS 4.x Breakpoint view by
creating a Trace job and settings the following Trace Properties:
\li Trace Type: System
\li STM Trace Type: Trace Export Configuration
\li Enable HW Message Sources:
\li CM1 Event Profiling: True
\li CM2 Event Profiling: True
Note that CM1 and CM2 Event Profiling by default are disabled. PMI Event Profiling is enabled by default.

If you are working remotely from CCS and using the ETB to capture STM data 
then you must provide your own application code to enable the CMI module's STM messages.