User’s GuideVersion 1Embedded Target for theTI TMS320C2000™ DSP PlatformFor Use with Simulink®
1 Getting Started1-6Note For up-to-date information about system requirements, refer to the system requirements page, available in the products area
LF2407 eZdsp3-58• DSPChip- CAN — Parameters that affect the control area network (CAN) module. Most of these parameters affect the CAN bit timing. The
LF2407 eZdsp3-59and twice before at a distance of TQ/2. A majority decision is made from the three points.SBG — Sets the message resynchronization tri
LF2407 eZdsp3-601 TQSYNCSEGNominal bit timeSJWSJWTSEG1TSEG2TransmitpointSamplepointCAN Bit Timing
LF2407 eZdsp3-61Dialog BoxSee AlsoC24x ADC, C24x CAN Receive, C24x CAN Transmit, C24x PWM
Magnitude IQN3-623Magnitude IQNPurpose Calculate the magnitude of two IQ numbersLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription Thi
Saturate IQN3-633Saturate IQNPurpose Saturate an IQ value to specified limitsLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription This b
Square Root IQN3-643Square Root IQNPurpose Calculate the square root or inverse square rootLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDesc
Trig Fcn IQN3-653Trig Fcn IQNPurpose Calculate the sine, cosine, or arc tangentLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription This
Trig Fcn IQN3-66
Index-1IndexAAbsolute IQN block 3-7ADC blocksC24x 3-9C28x 3-22 analog-to-digital converterSee ADC blocksapplicationsTI C2000 1-2Arctangent IQN block
Embedded Target for TI C2000 and Code Composer Studio1-7Embedded Target for TI C2000 and Code Composer StudioTexas Instruments (TI) facilitates develo
IndexIndex-2EERT code generation 1-20event manager timer 3-16FF2812 eZdsp block 3-36fixed-point numbers 2-3Float to IQN block 3-44floating-point numbe
IndexIndex-3LLF2407 eZdsp block 3-54linker options 3-37MMagnitude IQN block 3-62mailbox 3-11math blocksSee also IQ Math libraryMathWorks software 1-4
IndexIndex-4software requirements 1-4Square Root IQN block 3-64startup c2000lib 1-14Ttarget configurationexample 3-36F2812 eZdsp 1-19LF2407 eZdsp 3-54
1 Getting Started1-8Scheduling and TimingA timer interrupt is used to run generated code in real time on the C2000 DSP. Each iteration of the model so
Scheduling and Timing1-964 0.1048 N/A128 0.2097 N/AMaximum Sample Times (Continued)TimerClockPrescaler SettingC24x Maximum Sample Time (seconds)C28x M
1 Getting Started1-10Overview of Creating Models for TargetingAfter you have installed the supported development board, start MATLAB. At the MATLAB co
Overview of Creating Models for Targeting1-11Notes About Selecting Blocks for Your ModelsMany blocks in the blocksets communicate with your MATLAB wor
1 Getting Started1-12Setting Simulation ParametersTo set the simulation parameters manually, with your model open, select Simulation Parameters from t
Overview of Creating Models for Targeting1-13language compiler documentation. For a complete discussion of S-functions, refer to your documentation ab
1 Getting Started1-14Using the c2000lib BlocksetThis section uses an example to demonstrate how to create a Simulink model that uses the Embedded Targ
Using the c2000lib Blockset1-15The libraries are• C2800 DSP Core Support (c2800dsplib) — Blocks to configure the codec on the F2812 eZdsp DSK or on th
How to Contact The MathWorks:www.mathworks.com Webcomp.soft-sys.matlab [email protected] Technical [email protected] Product e
1 Getting Started1-16For more information on each block, refer to its reference page.Setting Up the ModelPreliminary tasks for setting up a new model
Using the c2000lib Blockset1-17Click Yes to allow automatic setup. The following simulation parameters are set:The default Target configuration - Syst
1 Getting Started1-18Select Simulation Parameters from the Simulation menu to verify and set the simulation parameters for this model. Parameters you
Using the c2000lib Blockset1-19The ERT options apply to the embedded targets and appear when you select an ERT TI C2000 target, such as ti_c2000_ert.t
1 Getting Started1-20General code generation options — Real-Time Workshop uses the general code generation options during the build process to tailor
Using the c2000lib Blockset1-21Linker OptionsCreateMAPFileTrueKeepOBJFilesTrueLinkerCMDFileFull_memory_mapRunTime OptionsBuildActionBuild_and_executeO
1 Getting Started1-22eCANBitRatePrescaler10EnhancedCANModeTrueSAMSample_one_timeSBJOnly_falling_edgesSJW2SelfTestModeFalseTSEG18TSEG26DSPBoard Options
Using the c2000lib Blockset1-23
1 Getting Started1-24Adding Blocks to the Model1 Double-click the C2800 DSP Chip Support Library to open it.2 Drag the C28x ADC block into your model.
Using the c2000lib Blockset1-253 Drag the C28x PWM block into your model. Double-click the PWM block in the model and set the following parameters. Re
iContents1Getting StartedWhat Is the Embedded Target for the TI TMS320C2000 DSP Platform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Getting Started1-26PWM1 control logicActive highPWM2 control logicActive lowUse deadband for PWM1/PWM2selectedDeadband prescaler16Deadband period12F
Using the c2000lib Blockset1-274 Type Simulink at the MATLAB command line to start the Simulink Library browser. Drag a Gain block from the Math Opera
1 Getting Started1-285 Connect the ADC block to the Gain block and the Gain block to the PWM block as shown.Generating Code from the ModelThis section
Using the c2000lib Blockset1-29You start the automatic code generation process from the Simulink model window by clicking Build in the Real-Time Works
1 Getting Started1-30
2Using the IQmath LibraryAbout the IQmath Library (p. 2-2) Introduces the IQmath LibraryFixed-Point Numbers (p. 2-3) Representation of fixed-point nu
2 Using the IQmath Library2-2About the IQmath LibraryThe blocks in the C28x IQmath Library correspond to functions in the Texas Instruments C28x IQmat
Fixed-Point Numbers2-3Fixed-Point NumbersIn digital hardware, numbers are stored in binary words. A binary word is a fixed-length sequence of binary d
2 Using the IQmath Library2-4Two’s complement is the most common representation of signed fixed-point numbers and is used by TI digital signal process
Fixed-Point Numbers2-5in this notation. This is (1 sign bit) + (m = 0 integer bits) + (n = 15 fractional bits) = 16 bits total in the data type. In Q
ii2Using the IQmath LibraryAbout the IQmath Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Common Characteristics . . . . . .
2 Using the IQmath Library2-6to 7 bits with sign extension, the number becomes 1111101 and the value of the number remains the same.One bit is the des
Building Models2-7Building ModelsYou can use IQmath Library blocks in models along with certain core Simulink, Fixed-Point Blockset, and other blockse
2 Using the IQmath Library2-8functionality that the IQmath Library block does not support, but you will generate code that is less optimized.
3Block ReferenceBlocks — By Library (p. 3-2) Provides tables that list each block in the Embedded Target for C2000 DSP by libraryBlocks — Alphabetica
3 Block Reference3-2Blocks — By LibraryC2400 DSP Chip Support Library (c2400dspchiplib)C2800 DSP Chip Support Library (c2800dspchiplib)Block Descripti
Blocks — By Library3-3Target Preferences Library (c2000tgtpreflib)C28x IQmath Library (tiiqmathlib)C28x From Memory Retrieve data from specific memory
3 Block Reference3-4IQN to Float Convert an IQ number to a floating-point numberIQN x int32 Multiply an IQ number and a long integerIQN x IQN Multiply
Blocks — Alphabetical List3-5Blocks — Alphabetical List 3Absolute IQN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 3-6
Absolute IQN3-73Absolute IQNPurpose Calculate the absolute value of an IQ numberLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription Thi
1Getting StartedThis chapter describes how to use the Embedded Target for TI C2000 DSP to create and execute applications on Texas Instruments C2000
Arctangent IQN3-83Arctangent IQNPurpose Calculate the four-quadrant arc tangentLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription This
C24x ADC3-93C24x ADCPurpose Generate code to configure the C24x analog-to-digital converterc2400dspchiplib in Embedded Target for TI C2000 DSPDescript
C24x ADC3-10Dialog BoxSee AlsoC24x PWM
C24x CAN Receive3-113C24x CAN ReceivePurpose Configure a CAN mailbox to receive messages from the CAN pins and output received messages at specified s
C24x CAN Receive3-12Sample time — Frequency with which the mailbox is polled to determine if a new message has been received. A new message causes a
C24x CAN Transmit3-133C24x CAN TransmitPurpose Configure a CAN mailbox to transmit messages to the CAN pinsLibrary c2400dspchiplib in Embedded Target
C24x CAN Transmit3-14Dialog BoxSee AlsoC24x CAN Receive
C24x From Memory3-153C24x From MemoryPurpose Generate code that retrieves data from any valid memory address on the board, internal or externalLibrary
C24x PWM3-163C24x PWMPurpose Generate code that configures the event manager (EV) modules to generate PWM waveformsLibrary c2400dspchiplib in Embedded
C24x PWM3-17Symmetric. The following illustration shows the difference between the two types of waveforms.Enable PWM#/PWM# — Check to select the PWM
1 Getting Started1-2What Is the Embedded Target for the TI TMS320C2000 DSP Platform?The Embedded Target for the TI TMS320C2000™ DSP Platform integrate
C24x PWM3-18Show additional parameters — Check to display the dialog box with additional PWM parametersPWM# control logic — Control logic trigger
C24x PWM3-19Dialog BoxSee AlsoC24x ADC
C24x To Memory3-203C24x To MemoryPurpose Generate code that writes data to any valid memory address on the board, internal or externalLibrary c2400dsp
C24x To Memory3-21Dialog BoxSee AlsoC24x From Memory
C28x ADC3-223C28x ADCPurpose Generate code to configure the ADC to output data streamsLibrary c2800dspchiplib in Embedded Target for TI C2000 DSPDescr
C28x ADC3-23Dialog BoxSee AlsoC28x PWM
C28x eCAN Receive3-243C28x eCAN ReceivePurpose Configure an eCAN mailbox to receive messages from the eCAN pins and output received messages at specif
C28x eCAN Receive3-25Sample time — Frequency with which the mailbox is polled to determine if a new message has been received. A new message causes a
C28x eCAN Transmit3-263C28x eCAN TransmitPurpose Configure an eCAN mailbox to transmit a message to the board’s CAN bus pinsLibrary c2800dspchiplib in
C28x eCAN Transmit3-27See Also C28x eCAN Receive
Setting Up and Configuring1-3Setting Up and ConfiguringPlatform Requirements — Hardware and Operating SystemTo run the Embedded Target for the TI TMS3
C28x From Memory3-283C28x From MemoryPurpose Generate code that retrieves data from any valid memory address on the board, internal or externalLibrary
C28x PWM3-293C28x PWMPurpose Generate code that configures the event manager (EV) modules to generate PWM waveformsLibrary c2800dspchiplib in Embedded
C28x PWM3-30Symmetric. The following illustration shows the difference between the two types of waveforms.Use PWM#/PWM# — Check to select the PWM pair
C28x PWM3-31Show additional parameters — Check to display the dialog box with additional PWM parametersPWM# control logic — Control logic trigger for
C28x PWM3-32Dialog BoxSee AlsoC28x ADC
C28x To Memory3-333C28x To MemoryPurpose Generate code that writes data to any valid memory address on the board, internal or externalLibrary c2800dsp
C28x To Memory3-34Dialog BoxSee AlsoC28x From Memory
Division IQN3-353Division IQNPurpose Divide two IQ numbersLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription This block divides two nu
F2812 eZdsp3-363F2812 eZdspPurpose Set the build, link, and board code generation preferences for F2812 eZdsp™ DSK targetsLibrary c2000tgtpreflib in E
F2812 eZdsp3-37BuildOptions — LinkerOptions• Create MAP File — Whether the linker produces a map of the input and output sections, including null area
1 Getting Started1-4Refer to the documentation provided with your hardware for information on setting up and testing your target board. Note You do n
F2812 eZdsp3-38Full_memory_map. Note that your program might run more slowly than if you use the internal map option. BuildOptions — RunTimeOptions• B
F2812 eZdsp3-39- Continue — Ignore overruns encountered while running the model. This is the default.-Halt — Stop program execution.CCSLink• CCS Handl
F2812 eZdsp3-40• DSP Chip- DSP Chip Label — DSP chip model. Select the DSP chip installed on your target. The chip model is fixed for the F2812 eZdsp.
F2812 eZdsp3-41SAM — Number of samples used by the CAN module to determine the CAN bus level. Selecting Sample_one_time samples once at the sampling p
F2812 eZdsp3-421 TQSYNCSEGNominal bit timeSJWSJWTSEG1TSEG2TransmitpointSamplepointCAN Bit Timing
F2812 eZdsp3-43Dialog BoxSee AlsoC28x ADC, C28x eCAN Receive, C28x eCAN Transmit, C28x PWM
Float to IQN3-443Float to IQNPurpose Convert a floating-point number to an IQ number Library tiiqmathlib in Embedded Target for TI C2000 DSPDescriptio
Fractional part IQN3-453Fractional part IQNPurpose Return the fractional portion of an IQ numberLibrary tiiqmathlib in Embedded Target for TI C2000 DS
Fractional part IQN x int323-463Fractional part IQN x int32Purpose Multiply an IQ number with a long integer and return the ractional part of the resu
Integer part IQN3-473Integer part IQNPurpose Return the integer portion of an IQ numberLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescript
Setting Up and Configuring1-5In addition to the TI software, you need one or more TMS320F2812 eZdsp DSP Starter Kits or TMS320LF2407 eZdsp DSP Starter
Integer part IQN x int323-483Integer part IQN x int32Purpose Multiply an IQ number with a long integer and return the integer part of the resultLibrar
IQN to Float3-493IQN to FloatPurpose Convert an IQ number to a floating-point numberLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription
IQN x int323-503IQN x int32Purpose Multiply an IQ number with a long integer and return an IQ numberLibrary tiiqmathlib in Embedded Target for TI C200
IQN x IQN3-513IQN x IQNPurpose Multiply two IQ numbersLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescription This block multiplies two IQ
IQN1 to IQN23-523IQN1 to IQN2Purpose Convert an IQ number to a different Q format Library tiiqmathlib in Embedded Target for TI C2000 DSPDescription T
IQN1 x IQN23-533IQN1 x IQN2Purpose Multiply two IQ numbers that are in different Q formatsLibrary tiiqmathlib in Embedded Target for TI C2000 DSPDescr
LF2407 eZdsp3-543LF2407 eZdspPurpose Set the build, link, and board code generation preferences for LF2407 eZdsp™ DSK targetsLibrary c2000tgtpreflib i
LF2407 eZdsp3-55BuildOptions — LinkerOptions• Create MAP File — Whether the linker produces a map of the input and output sections, including null are
LF2407 eZdsp3-56Full_memory_map. Note that your program might run more slowly than if you use the internal map option. BuildOptions — RunTimeOptions•
LF2407 eZdsp3-57- Continue — Ignore overruns encountered while running the model. This is the default.-Halt — Stop program execution.CCSLink• CCS Hand
Komentarze do niniejszej Instrukcji