SPRAD62 February   2023 TMS320F280023C , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038C-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DK-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Serial Port Design Methodology
    1. 2.1 Step 1: Understand Design Requirements
    2. 2.2 Step 2: Identify Required Inputs to the CLB Tile
      1. 2.2.1 GPIO Input Qualification
      2. 2.2.2 CLB Input Settings
    3. 2.3 Step 3: Identify Required Outputs from CLB Logic
      1. 2.3.1 Synchronizing Outputs Signals
      2. 2.3.2 Output Signal Conditioning
    4. 2.4 Step 4: Design the CLB Logic
      1. 2.4.1 Resource Allocation
      2. 2.4.2 Exchanging Data Between CLB FIFOs and MCU RAM
      3. 2.4.3 CLB Logic Status and Trigger Flags
        1. 2.4.3.1 Status/Flag Bits
        2. 2.4.3.2 Trigger Bits
    5. 2.5 Step 5: Simulate the Logic Design
    6. 2.6 Step 6: Test the CLB Logic
  5. 3Example A: Using the CLB to Input and Output a TDM Stream in Audio Applications
    1. 3.1 Example Overview
    2. 3.2 Step 1: Understand Design Requirements
    3. 3.3 Step 2: Identify Required Inputs to the CLB Tile
    4. 3.4 Step 3: Identify Required Outputs from CLB Logic
    5. 3.5 Step 4: Design the CLB Logic
      1. 3.5.1 Resource Allocation
      2. 3.5.2 TDM Word Counter
      3. 3.5.3 FSYNC and DATA1 Output Synchronization
    6. 3.6 Step 5: Simulate the Logic Design
    7. 3.7 Step 6: Test the CLB Logic
      1. 3.7.1 Hardware Setup and Connections
      2. 3.7.2 Software Setup
      3. 3.7.3 Testing Output Setup and Hold Times
      4. 3.7.4 Testing Data Integrity
  6. 4Example B: Using the CLB to Implement a Custom Communication Bus for LED Driver in Lighting Applications
    1. 4.1 Example Overview
    2. 4.2 Step 1: Understand Design Requirements
    3. 4.3 Step 2: Identify Required Inputs to the CLB Tile
    4. 4.4 Step 3: Identify Required Outputs From CLB Logic
    5. 4.5 Step 4: Design the CLB Logic
      1. 4.5.1 TX Tile Logic
      2. 4.5.2 RX Tile Logic
      3. 4.5.3 Data Clocking
    6. 4.6 Step 5: Simulate the Logic Design
    7. 4.7 Step 6: Test the CLB Logic
      1. 4.7.1 Hardware Setup and Connections
      2. 4.7.2 Software Setup
      3. 4.7.3 Testing Output Setup and Hold Times
  7. 5References

Software Setup

Two CCS projects are available in C2000ware to test this CLB example. The path to the TDM projects are:

  • <C2000WARE_INSTALL>/driverlib/f28002x/examples/clb
  • <C2000WARE_INSTALL>/driverlib/f2838x/examples/c28x/mcbsp

The following software packages are required to build and run the software:

First, setup the F280025C by following these steps in CCS:

  1. In the CCS menu, click 'Project -> Import CCS Projects...'.
  2. Enter the path to the CLB example projects in the ‘Select search-directory’.
    1. Path: <C2000WARE_INSTALL>/driverlib/f28002x/examples/clb
  3. Click ‘Refresh’.
  4. Select the ‘clb_ex31_tdm_serial_port’ project.
    GUID-20221017-SS0I-QHK0-TDDJ-RQQPDFXMLSWK-low.png Figure 3-13 Importing CLB TDM Example Project
  5. Check ‘Copy projects into workspace’.
  6. Click 'Finish' to complete importing the project into the workspace.

    Optional: Click 'Project -> Build Configurations -> Set Active -> CPU1_FLASH' to build the code for flash execution. Set the TMDSCNCD280025C controlCARD to boot from flash (see the TMS320F28388D controlCARD Information Guide).

  7. In the CCS menu, click 'Project -> Build Project' to build the example project.
  8. Click 'Run -> Debug' to load the executable to the F280025C target device.
  9. Lastly, click 'Run -> Resume' in the CCS Debug perspective to run the code.

Second, setup the F28388D to generate the test TDM stream by following these steps in CCS:

  1. In the CCS menu, click 'Project -> Import CCS Projects...'.
  2. Enter the path to the McBSP example projects in the ‘Select search-directory’.
    1. Path: <C2000WARE_INSTALL>/driverlib/f2838x/examples/c28x/mcbsp
  3. Click ‘Refresh’.
  4. Select the ‘mcbsp_ex7_tdm8_test’ project.
    GUID-20221017-SS0I-7HC2-NQMH-JLS1RV2DRMMR-low.png Figure 3-14 Importing McBSP TDM Example Project
  5. Check ‘Copy projects into workspace’.
  6. Click 'Finish' to complete importing the project into the workspace.
    1. Optional: Click 'Project -> Build Configurations -> Set Active -> CPU1_FLASH' to build the code for flash execution. Set the TMDSCNCD28388D controlCARD to boot from flash (see controlCARD user's guide).
  7. In the CCS menu, click 'Project -> Build Project' to build the example project.
  8. Click 'Run -> Debug' to load the executable to the F28388D target device.
    1. Optional: Add the following global variables to the Expressions window: txData, rxData, testWordDetected, and errCountGlobal.
  9. Lastly, click 'Run -> Resume' in the CCS Debug perspective to run the code.