CCS5.5 C6713-Project en
CCS5.5 C6713-Project en
If CCS does not start with the CCS Edit Perspective (see Fig. 1), open this via Window Open Perspective
Other… and doubleclick on CCS Edit (Fig. 2).
from D:\ti_work5\DSK6713\Lab_support_DSK6713:
1. get_started.c (C-Source Code)
2. C6713dsk_AIC23.cmd (Link command file)
3. DSK_vectors_AIC23.asm
4. c6713dskinit.h
By refreshing the perspective via <F5> the files appear in the CCS Project Explorer. Remove via right mouseclick the
automatically inserted file main.c from the project.
1
Note the colored labeling: in case of differences, description is blue for DSK6713, green for DUETT.
Kup 02.15
Digital Signal Processing Lab
Now, three Build Options has to be set. After right mouseclick on the project in CCS Edit Perspective, choose
Properties, in section Build, subsection C6000 Compiler:
I. at Advanced Options → Predefined Symbols and via the red encircled button on the right, add: “CHIP_6713”:
II. at Advanced Options → Runtime Model Options choose „far“ for the „Data access model“:
Connect the DSK6713- and DUETT-Board respectively via USB. Select now Run Debug (<F11>).
By this command
• the inserted files will be compiled,
• linked, while the linker is interpreting the file C6713dsk_AIC23.cmd
• and an executable file will be created.
• The target hardware (DSK6713, DUETT) will be initialised and connected,
• the executable file ..\get_started\Debug\get_started.out will be loaded to the board.
• The program will be started and stopped at the row main().
The „Problems“ window should not show any error or warning and should not be opened respectively.
20.02.2015
2/5
Digital Signal Processing Lab
After that, you‘re automatically switched to the Debug Perspective. You can return to the CCS Edit-Perspective via the
buttons on the right top (Fig. 4, encircled in red).
Run Resume or <F8> or the corresponding button (Fig. 4, left green arrow in the blue encircled area) starts the
program on the DSP. You’ll be asked for input in the „Console“ window.
The desired samplerate has to be set in the variable fs. The following values can be set (Samplerate at the end of the
strings): DSK6713_AIC23_FREQ_8KHZ DSK6713_AIC23_FREQ_32KHZ
DSK6713_AIC23_FREQ_16KHZ DSK6713_AIC23_FREQ_44KHZ
DSK6713_AIC23_FREQ_24KHZ DSK6713_AIC23_FREQ_48KHZ
In fact, „DSK6713_AIC23_FREQ_44KHZ“ workes with Fs=44,1 kHz.
The samplerate has to be set by dividers for 36621 Hz. The default case, div_TIMER0 = 1 and div_TIMER1 = 1 let
work both McBSP at 36,621 kHz. This allocation has to be carried out previous to:
fs_act = SampleRates_DUETT(fs, div_TIMER0, div_TIMER1);
The function MCBSP_read reads 32 bit integer from the ADC, so both channels together. These are buffered in an
union.
Via union_name.both you have access to the whole 32 Bit. An access to each single channel is delivered in
union_name.channel[]. union_name.channel[1] contains the left channel data, the data from the right channel
are stored in union_name.channel[0]. Correspondingly, function MCBSP_write outputs 32 bit integer to the DAC
of the Codec.
The DUETT version contains two interrupt service routines for both CODECs of PCM3003.
20.02.2015
3/5
Digital Signal Processing Lab
Set a breakpoint right before the line you want to stop the program: place the cursor in front of the line number and
double-click (or mark the line , right mouseclick, BreakpointBreakpoint). A blue dot shows the breakpoint. The
program in Fig. 6 run up to the breakpoint. View Breakpoints shows all breakpoints in a window.
Right mouseclick on the breakpoint, then Breakpoint Properties opens a new window. You can choose as Action,
whether the program should stop (Remain Halted) or e.g. run to the breakpoint again and again and refresh the windows
choosing Update View or Refresh All Windows. This application is needed for graphical displays.
You can set any number of breakpoints in all C or assembler code. Remember that the current position is marked with a
blue arrow. In this way you can run the program piecewise. Individual breakpoints can be removed by double-clicking
on the blue dot. Toggle Breakpoint in the menu (open with right mouseclick), sets or removes the breakpoint,
Disable/Enable Breakpoint can be useful, setting a breakpoint always in the same line.
You can see the Disassembly window (View Disassembly) in the lower right part of Fig. 6. In this window you can
observe assembly single steps. One or more (in case of parallel processing of statements) blue arrows show the current
position of the program counter.
20.02.2015
4/5
Digital Signal Processing Lab
To monitor a variable, mark it, right mouseclick, then Add Watch Expression…. Alternatively call
View Expressions, add the variable in the opening window, see. Fig. 7.
You have to suspend the program, if you want to change the variables content.
Right mouseclick on „Type“ allows changing the „Number Format“, e.g. to „hex“.
You can also check the value of a variable without using the Expressions window: simply place the mouse arrow on the
variable, and its value (and the start address respectively, if it is a function) is displayed.
View the content of a memory location with View → Memory Browser. The Memory Browser opens. Here you can
enter the address like „&a” in the example in figure 8, click on <Go> and choose the data format, e.g. „Hex 32 Bit – C
Style“.
20.02.2015
5/5