<< Chapter < Page | Chapter >> Page > |
Also test the serial communications portion of the thru6.asm application. This can be done by starting a provided terminal emulator package (such as Teraterm Pro orHyperTerminal), configuring it to communicate at 38400 bps, with no parity, eight data bits, and one stop bit, andattaching the correct serial port on the computer to the TI TMS320C54x EVM. A serial port is a 9-pin D-shell connector;it is located on the DSP EVM next to the power connector. Typically, there will be two matching D-shell connectors on your computer, often labeled COM1 and COM2;make sure you connect your serial cable to the right one!
Once you have started the terminal emulator, and the emulator has been correctly set to communicate with the DSPboard, reload and rerun the thru6.asm application. Once it is running, you should be able to communicate with the DSP by typing text into the terminalemulator's window. Characters that you type should be echoed back; this indicates that the DSP has received andretransmitted the characters. If the DSP is not connected properly or not running, nothing will be displayed as youtype. If this happens, check the connections and the terminal emulator configuration, and try again. Due to aterminal emulation quirk, the "Enter" key does not work properly.
After you have verified that the EVM is communicating with the PC, close the terminal window.
Because the DSP has separate program and data spaces, you would expect for the program and data memory to beindependent. However, for the DSP to run at its maximum efficiency, it needs to read its code from on-chip RAM insteadof going off-chip; off-chip access requires a one- or two-cycle delay whenever an instruction is read. The 32Kwords of on-chip RAM, however, are a single memory block; we cannot map one part of it into program space and another partof it into data space. It is possible to configure the DSP so that the on-chip RAM is mapped into both program space anddata space, allowing code to be executed from the onboard memory and avoiding the extra delay. shows the DSP's memory map with the DSP's on-chip memory mapped into program space.
Because the same on-chip RAM is mapped into both program and
data space, you must be careful not to overwrite your codewith data or vice versa. To help you, the linker will place
the code and data in different parts of the memory map. If youuse the
.word
or
.space
directives
to inform the linker of all of your usage of data memory, youwill not accidentally try to reuse memory that has been used
to store code or other data. (Remember that
.word
allocates one memory location and
initializes it to the value given as itsparameter.
.space 16*<words>
allocates
<words>
words of uninitialized storage.)
Avoid using syntaxes like
stm #2000h,AR3
to point
auxiliary registers to specific memory locations directly, asyou may accidentally overwrite important code or
data. Instead, use syntaxes like
stm #hold,AR3
,
where
hold
is a label for memory explicitly
declared by
.word
or
.space
directives.
Notification Switch
Would you like to follow the 'Digital signal processing laboratory (ece 420)' conversation and receive update notifications?