2. Getting Started¶
This section is a roadmap for getting started using various resources such as workshops, examples and system use cases. The recommended sequence is:
- Study the workshops.
- Experiment with examples.
- Review the Frequently Asked Questions and Debugging Tips.
- Refer to the System Use Cases for application specific examples of leveraging the CLA.
2.1. Workshops¶
- If you are new to C2000 MCUs, start with the C2000 Device Workshops
- Review the training material in the CLA Hands-On Workshop
- Review Chapter 9, Control Law Accelerator in the TMS320F28004x Microcontroller Workshop (pdf). Refer to C2000™ F28004x Microcontroller Workshop for the overall workshop.
Warning
New features may have been added to more recent devices or to the Compiler tools. Refer to the device-specific documents for the latest device (Identifying Device-Specific CLA Features) and compiler features (Development Tools).
Although the concepts taught in the workshops are applicable to all C2000 devices with the CLA, the projects may require older versions of the TI hardware and C2000 software. The workshop will list which hardware and software is supported.
2.2. Development Tools¶
The CLA is supported by TI’s Code Composer Studio (CCS). Using CCS, both the C28x and CLA code can be developed and debugged within one integrated development environment.
2.2.1. Compiler and Assembly Tools¶
TI provides the CLA compiler as part of the C2000 Code Generation Tools. The CLA compiler and assembler are invoked automatically for CLA code. The Code Generation Tools are bundled in Code Composer Studio and can also be downloaded from: C2000 code generation tools - compiler.
CLA firmware can be written using C code or assembly. The recommendation is to use C code in your firmware as much as possible. If further optimizations are necessary, then assembly code can also be used.
Features of the CLA tools can be found in the following User’s Guides:
TMS320C28x Optimizing C/C++ Compiler User’s Guide
Describes the CLA compiler, its features and restrictions
TMS320C28x Assembly Language Tools User’s Guide
Describes the extensions the assembler creates to support the CLA code. For example, command file sections and scratchpad sections.
2.2.2. MathWorks Embedded Coder Support¶
Visit the MathWorks website for information. MathWorks offers examples specifically for the CLA
2.3. Examples¶
Download the latest version of C2000Ware. For those new to C2000ware, refer to the C2000Ware chapter in the C2000™ Software Guide and this training video: Introduction to C2000Ware
Select an example project
- Basic math examples: included with the CLAMath Library in \libraries\math\CLAmath
- Device-specific examples: in the driverlib or device_support directories
Review concepts presented in the Hands on Workshop while working with the project
- Configuration and CLA initialization performed by the C28x
- Set and remove breakpoint(s) in CLA code
- Single step CLA code and observe changes in memory or registers
- Observe how data is shared between the C28x and CLA (see also How is data shared between the CLA and C28x?)
2.4. FAQs and Debugging Tips¶
Refer to the Frequently Asked Questions for answers to commonly asked questions.
The Debugging Tips section provides help for common problems encountered when developing and debugging CLA code. Before using the information in this section, it is strongly recommended that you review the information in the CLA Hands-On Workshop.
2.5. System Use Cases¶
- The DigitalPower Software Development Kit (SDK) lists TI reference designs that leverage the CLA in the Features section.
- Refer to CLA Usage in Valley Switching Boost Power Factor Correction (PFC) Reference Design for a training video describing the usage of CLA in TIDM-1022.