CAN Calibration Protocol and External Mode

This example shows how to use the CAN Calibration Protocol (CCP) block. CCP allows you to monitor signals and tune parameter values in the application code running on the target. Use either external mode or a third party calibration tool to interact with the real-time application running on the target processor. Parameters can be loaded in Flash and copied to RAM during initialization for tuning.

Required hardware:

Available versions of this example:

Contents

Model

The following figure shows the example model.

Scope Snapshots

Description

This example shows how to use the c28x CCP block. During code generation for this model, an ASAP2 file is generated. The ASAP2 file contains symbol and memory address information. Either external mode or a third party calibration tool can use the generated ASAP2 file to log signals and update parameters on the real-time application.

How to Run the Example

The following sections explain how to configure, build, and deploy the executable.

With Code Composer Studio v3.3 (CCSv3.3) - Default

With Code Composer Studio v4 (CCSv4)

CCSv4 support is provided via a makefile based approach. This requires running xmakefilesetup to set the environment. You can ignore the following if you have already gone through these steps. For more information, please refer to the Xmakefile Documentation

  1. C:\Program Files\Texas Instruments\ccsv4\ for CCS Installation
  2. C:\Program Files\Texas Instruments\ccsv4\tools\compiler\C2000\ for Code Generation Tools
  3. C:\Program Files\Texas Instruments\bios_5_41_10_36\ for DSP/BIOS Installation

Code Generation and Creation of an .out file using CCSv4:

With Code Composer Studio v5 (CCSv5)

CCSv5 support is provided via a makefile based approach. This requires running xmakefilesetup to set the environment. You can ignore the following if you have already gone through these steps. For more information, please refer to the Xmakefile Documentation

  1. C:\ti\ccsv5\ to set CCS Installation
  2. C:\ti\ccsv5\tools\compiler\c2000\ to set Code Generation Tools
  3. C:\ti\bios_5_41_11_38\ to set DSP/BIOS Installation

Code Generation and Creation of an .out file using CCSv5

Signal Logging and Parameter Tuning with External Mode

The model c28x_ccp.mdl contains a variety of signals and parameters that can be logged or changed while the application is executing in real-time. Parameter tuning and signal logging are enabled by the CCP block included in the model. Additionally, when the model is built, it must be configured to generate an ASAP2 file. The ASAP2 file contains information about the signals and parameters that are available for logging or tuning in the real-time application.

The model contains a simple counter with parameterized step size, STEP_PARAM.

For this example, a custom storage class package labelled tic2000demospkg has been created.

STEP_PARAM takes advantage of a custom storage class package labelled tic2000demospkg to load parameters in Flash and run them from RAM for calibration using the ramfuncs section available in the memory map. Run cscdesigner -advanced tic2000demospkg to view the definition of the tic2000demospkg package.

This example is compatible with both standalone execution from flash and RAM execution. In both the cases, STEP_PARAM will be stored in the ramfuncs section available in the memory map. You can update the parameter STEP_PARAM and log the output of the counter, COUNTER_SIGNAL. Additional signals available for logging are SINE_SIGNAL, PULSE_SIGNAL, and the RANDOMx signals.

Before running the model in external mode, you must have Vector-Informatik CAN hardware installed on your host computer.

To run the model c28x_ccp.mdl in external mode:

Signal Logging and Parameter Tuning with a Third Party Calibration Tool

As an alternative to the external mode, you can use a third party calibration tool for signal logging and parameter tuning. The same signals and parameters that are available with external mode may be logged or updated using third party calibration tool. While using a third party calibration tool. Make sure that your tool is set in compliance with the word addressable nature of TI C2000 processors (16-bit addressable).