Asynchronous Scheduling

This example shows how to use the c28x peripherals and Hardware Interrupt blocks to control the execution of function-call subsystems in an asynchronous fashion.

Required Hardware:

Available versions of this example:

Contents

Model

The following figure shows the example model.

Description

The EV Timer blocks are used to configure timer interrupts to be raised on period match. Hardware Interrupt block installs the ISRs for the timer interrupts as well as for an eCAN message receive interrupt. The ISRs in turn call function-call subsystems connected to the Hardware Interrupt block output ports.

The outputs of first two subsystems are running counters. Their sum is used to control the duty cycle of the PWMB for F2812 or ePWM2 for F2808/F28335. The PWM waveform duty cycle increases linearly from 0 to 100 %.

The third subsystem contains an eCAN Rcv block whose message output drives a PWM block (PWMA for F2812 or ePWM1 for F2808/F28335) to control its duty cycle. The duty cycle varies from 0 to 100 % as the eCAN messages are received from an eCAN Xmt block.

NOTE: The Self-Test mode of eCAN_A is enabled to connect eCAN_A transmitter and receiver internally to avoid external connection between transmitter and receiver. Disabling the Self-Test mode for eCAN_A requires transmitter and receiver to be connected together externally.

How to Run the Example on the Board

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\ for CCS Installation
  2. C:\ti\ccsv5\tools\compiler\c2000\ for Code Generation Tools
  3. C:\ti\bios_5_41_11_38\ for DSP/BIOS Installation

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