C281x SCI Receive

Receive data on target via serial communications interface (SCI) from host

Library

c281xdspchiplib in Target Support Package™ TC2 software

Description

The C281x SCI Receive block supports asynchronous serial digital communications between the target and other asynchronous peripherals in nonreturn-to-zero (NRZ) format. This block configures the C281x DSP target to receive scalar or vector data from the COM port via the C28x target's COM port.

Dialog Box

SCI module

SCI module to be used for communications.

Additional package header

This field specifies the data located at the front of the received data package, which is not part of the data being received, and generally indicates start of data. The additional package header must be an ASCII value. You may use any string or number (0–255). You must put single quotes around strings entered in this field, but the quotes are not received nor are they included in the total byte count.

Additional package terminator

This field specifies the data located at the end of the received data package, which is not part of the data being received, and generally indicates end of data. The additional package terminator must be an ASCII value. You may use any string or number (0–255). You must put single quotes around strings entered in this field, but the quotes are not received nor are they included in the total byte count.

Data type

Data type of the output data. Available options are single, int8, uint8, int16, uint16, int32, or uint32.

Data length

How many of Data type the block will receive (not bytes). Anything more than 1 is a vector. The data length is inherited from the input (the data length originally input to the host-side SCI Transmit block).

Initial output

Default value from the C281x SCI Receive block. This value is used, for example, if a connection time-out occurs and the When connection timeout field is set to "Output the last received value", but nothing yet has been received.

When connection timeout

Specify what to output if a connection time-out occurs. If "Output the last received value" is selected, the last received value is what is output, unless none has been received yet, in which case the Initial output is considered the last received value.

If "Output customized value" is selected, a field for specifying a custom value is added to the dialog box (as shown in the following figure).

Sample time

Sample time, Ts, for the block's input sampling. To execute this block asynchronously, set Sample Time to -1, and refer to Asynchronous Interrupt Processing for a discussion of block placement and other necessary settings.

Output receiving status

When this field is checked, the C281x SCI Receive block adds another output port for the transaction status, and appears as shown in the following figure.

Error status may be one of the following values:

Enable receive FIFO interrupt

If this option is selected, an interrupt is posted when FIFO is full, allowing the subsystem to take some sort of action (for example, read data as soon as it is received). If this option is cleared, the block stays in polling mode. If the block is in polling mode and not blocking, it checks the FIFO to see if there is data to read. If data is present, it reads and outputs. If no data is present, it continues. If the block is in polling mode and blocking, it waits until data is available to read (when data length is reached).

Receive FIFO interrupt level

This parameter is enabled when the Enable receive FIFO interrupt option is selected. Select an interrupt level from 0 to 16. The default level is 0.

References

For detailed information on the SCI module, see TMS320x281x, 280x DSP Serial Communication Interface (SCI) Reference Guide, Literature Number SPRU051B, available at the Texas Instruments™ website.

See Also

C281x SCI Transmit, C281x Hardware Interrupt

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS