MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
Configuring Communications Channels
Communications channels to the target do not exist until you open and enable them through the MATLAB Link for Code Composer Studio and CCS IDE. Opening channels consists of opening and configuring each channel for reading or writing, and enabling the channels.
In the open
function, you provide the channel names as strings for the channel name property. The channel name you use is not random. The channel name string must match a channel defined in the executable file. If you specify a string that does not identify an existing channel in the executable, the open operation fails. In this tutorial, two channels exist on the target--ichan
and ochan
. Although the channels are named ichan
for input channel and ochan
for output channel, neither channel is configured for input or output until you configure them from MATLAB or CCS IDE. You could configure ichan
as the output channel and ochan
as the input channel. The links would work just the same. For simplicity, the tutorial configures ichan
for input and ochan
for output. One more note--read and write are defined as seen by the target. When you write data from MATLAB, you write to the channel that the target reads, ichan
in this case. Conversely, when you read from the target, you read from ochan
, the channel that the target writes to:
ichan
' for the channel name and 'w
' for the mode. Either 'w
' or 'r
' fits here, for write or read.
ccsdsp
applies a default timeout value of 10 s. In some cases this may not be enough.
timeout
property value is now 20 s and that your link has the correct configuration for the rest of the tutorial.
![]() | Creating the Links | Running the Application | ![]() |