Skip to Main Content Skip to Search
Product Documentation

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

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C281x

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.

    Note   Any additional packager header or terminator must match the additional package header or terminator specified in the host SCI Transmit block.

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.

    Note   Any additional packager header or terminator must match the additional package header or terminator specified in the host SCI Transmit block.

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 Action taken when connection timeout field is set to "Output the last received value", but nothing yet has been received.

Action taken 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 you select "Output custom value", use the "Output value when connection times out" field to set the custom value.

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:

  • 0: No errors

  • 1: A time-out occurred while the block was waiting to receive data

  • 2: There is an error in the received data (checksum error)

  • 3: SCI parity-error flag — Occurs when a character is received with a mismatch between the number of 1s and its parity bit

  • 4: SCI framing-error flag — Occurs when an expected stop bit is not found

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 Web site.

See Also

C281x SCI Transmit

C281x Hardware Interrupt

SCI_A, SCI_B, SCI_C

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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