Pin Connect

From Texas Instruments Wiki
Jump to: navigation, search

Pin Connect

To end the interrupt simulation:

  • Click on the pin name that you wish to disconnect.
  • Click on the Disconnect button or double-click on the Pin name.

The pin is disconnected from your data file. Notice that the Filename column displays the status "Not Connected".

Specifying Interrupt Intervals

Setting up Your Input File

To simulate external interrupts, you must first create a data file that specifies interrupt intervals. Interrupt intervals are expressed as a function of CPU clock cycles. Simulation begins at the first clock cycle. An interrupt will occur at each specified clock cycle. Your data file must contain a CPU clock cycle parameter in the following format:

clock cycle [rpt { n| EOS}]


clock-cycle - The CPU clock cycle parameter specifies the intervals at which interrupts will occur. Clock cycles can be specified as absolute or relative.
rpt - Repeat the same pattern a fixed number of times.
n - A positive integer value, specifying the number of times to repeat.
EOS - Repeat the same pattern until the end of simulation.

Absolute Clock Cycle

To use an absolute clock cycle, your cycle value must represent the actual CPU clock cycle where you want to simulate an interrupt. For example:

12 34 56

Interrupts are simulated at the 12th, 34th, and 56th CPU clock cycles. No operation is performed on the clock cycle value; the interrupt occurs exactly as the clock cycle value is written.

Relative Clock Cycle

You can also select a clock cycle that is relative to the time at which the last event occurred. A plus sign (+) before a clock cycle adds that value to the total clock cycles preceding it. For example:

12 +34 55

In this example, a total of three interrupts are simulated at the 12th, 46th (12 + 34), and 55th CPU clock cycles. You can mix both relative and absolute values in your data file.

Repetition of Patterns for a Specified Number of Times

You can format your data file to repeat a particular pattern for a fixed number of times. For example:

5 (+10 +20) rpt 2

The values inside the parentheses represent the portion that is repeated. Therefore, an interrupt is simulated at the 5th CPU cycle, then the 15th (5 + 10), 35th (15 + 20), 45th (35 + 10), and 65th (45 + 20) CPU clock cycles.

Repetition to the End of Simulation

To repeat the same pattern throughout the simulation, add the string EOS to the line. For example:

10 (+5 +20) rpt EOS

Interrupts are simulated at the 10th CPU cycle, then the 15th (10 + 5), 35th (15 + 20), 40th (35 + 5), 60th (40 + 20), 65th (60 + 5), and 85th (65 + 20) CPU cycles, continuing in that pattern until the end of simulation.

Configuring an Interrupt

Connecting a Data File

After creating your data file, you must connect the file to an external interrupt pin. To Connect a Data File to an External Interrupt Pin

  • Select Tools->Pin Connect from the Code Composer Studio menu bar. The Pin Connect tool appears. The available external interrupt pins are listed in the Pin Name column.
  • Click on the Pin Name that you wish to use. Notice that the Filename column displays the status "Not Connected".
  • Click the Connect button (or double-click on the selected Pin Name). The Open Pin File dialog box appears.
  • Specify the name of your data file in the File name field.
  • Click the Open button.

The selected pin is connected to your data file. Notice that the selected data file is now listed in the Filename column.

Ending Interrupt Simulation

Disconnecting a Data File From an Interrupt

To end the interrupt simulation:

  • Click on the pin name that you wish to disconnect.
  • Click on the Disconnect button or double-click on the Pin name.

The pin is disconnected from your data file. Notice that the Filename column displays the status "Not Connected".

Additional Information

  • Training presentation on Pin Connect - link.

Pin Connect Recording

  • Pin connect presentation recording on CCSv4 - link