Configuration Settings to interface TMS320F28027F with Matlab

Software Requirements

TMS320F28027F Flash API

TMS320F28027F C/C++ Header Files

☞CCSV4 Software

☞Matlab R2012a Software

Install the files from Texas Instruments using the following links. The Flash API file is downloaded from the following link http://www.ti.com/tool/sprc848 and the C/C++ Header Files are downloaded from the link http://www.ti.com/tool/sprc832.

Environment Variables Settings

☞Open Matlab and type checkEnvSetup(‘ccsv4′,’f28027′,’check’) in command window.

☞Following details are displayed in the command window as shown in the below screenshot.

Fig 3.1 Screenshot of Matlab Command window

☞If the directory path is not installed for DSP2802x_INSTALLDIR and FLASH_2802x_API_INSTALLDIR then configure the environment variables settings. To set the environment variable settings follow the steps below.

☞Click on Start Menu -> Right Click on My Computer -> Select properties -> Advanced System Settings -> Environment Variables.

Fig 3.2 Screenshot of Environment Variables

☞In User Variable, Click on New -> add variable name (as selected from matlab command window) and add Variable value (C:tidcs\C28\ DSP2802z\v126). Click Ok.

Fig 3.3 Screenshot to Add New User Variable name

☞In System Variable, Click on New -> add variable name (as selected from matlab command window) and add Variable value (C:\tidcs\c28\ Flash28_API\Flash2802x_API_V200_using_CCS4.0v). Click Ok.

Fig 3.4 Screenshot to Add New User Variable Value

☞Restart the Matlab.

xMakeFileSetup Configurations

☞Type xmakefilesetup in matlab command window and press enter.

☞XMakefile User Configuration windows appear, as shown in fig 3.5

Choose:

☞Template – gmake

☞Configuration – ticcs_c2000_ccsv4 and uncheck the Display operational configurations

Fig 3.5 Screenshot of XMakefile User Configuration

☞Now click on tool directories.

☞If you couldn’t find out Tool Directories tab, click Apply and Ok. A small window appear, choose CCSv4 folder in Texas Instruments. C:/Program Files/Texas Instruments\CCSv4.

☞Type xmakefilesetup in command window. Now tool Directories appeared.

☞Click on Tool Directories, choose the CCS Installation, Code Generation Tools and DSP/BIOS Installation path.

Fig 3.6 Selection of XMakefile User Configuration/Tool Directories

☞Click on New, enter ticcs_c2000_ccsv4_clone and ok.

☞In configuration, select ticcs_c200_ccsv4_clone as shown in below Fig.

Fig 3.7 Selection of XMakefile User Configuration/Clone Configuration

☞In Execute,

☞Arguments,

ARG1

Execute Tool -> C:\Program Files\Texas Instruments\ccsv4\ scripting\bin\dss.bat

 “C:\Program Files\MATLAB\R2012a\toolbox\idelink\extensions\ticcs\ccsdemos\runProgram.js”  ,This may vary based on your installation path.

ARG2

“C:\Users\Admin\user\CCSTargetConfigurations\NewTargetConfiguration.ccxml”, This may vary based on your installation path.

ARG3

“[|||MW_XMK_GENERATED_TARGET_REF[E]|||]”

☞The Arguments look -> “ARG1””ARG2””ARG3”

☞The ARG1 is selected from Matlab installing location. ARG3 is typed as shown in above .

The NewTargetConfiguration path in ARG2 is selected from Code Composer studio. Open Code Composer Studio, Click on Target -> New Target Configuration. Copy the location as shown in below Fig.

Fig 3.8 Screenshot of New Target Configuration

☞Click Finish.

Target Preference Configuration

☞ File – New – Model

☞ Open the Simulink and select Embedded Coder.

Choose:

☞Embedded Target – Right click the Target Preference and to the untitled model file.

☞Double Click the Target and set as the following figure.

☞Click yes.

Fig 3.9 Screenshot of Target Preference Configuration

☞Embedded Target – Processor – Texas Instruments C2000 – C281x – add the Digital Input and Digital Output block.

☞Double the individual block set as in the following respective figure and

☞Click ok.

Fig 3.10 Screenshot of Digital Input and Digital Output Block

Configuration Parameter Settings

☞Go to Simulation – Configuration parameter – IDE Link keep the setting as in below figure.

☞Click ok.

Fig 3.11 Screenshot of Configuration Parameter Settings

☞File – Save – filename.mdl [save it in matlab default path]. Click Incremental build   icon  .

In Matlab command window print the text as status about the make file generation for TMS320F28027F.

Fig 3.12 Screenshot of the status in Matlab Command window

☞Close Matlab

Pantech:
Leave a Comment

This website uses cookies.