C28x SCI Receive

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

  • Library:
  • Embedded Coder Support Package for Texas Instruments C2000 Processors / C2802x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C2803x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C2805x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C2806x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C280x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C281x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C2833x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / C2834x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / F2807x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / F2837xD

    Embedded Coder Support Package for Texas Instruments C2000 Processors / F2837xS

    Embedded Coder Support Package for Texas Instruments C2000 Processors / F2838x

    Embedded Coder Support Package for Texas Instruments C2000 Processors / F28004x

    Embedded Coder Support Package for Texas Instruments C2000 F28M3x Concerto Processors / F28M35x / C28x

    Embedded Coder Support Package for Texas Instruments C2000 F28M3x Concerto Processors / F28M36x / C28x

Description

The SCI Receive block supports asynchronous serial digital communication between the processor and other asynchronous peripherals. This block receives scalar or vector data using the specified SCI hardware module.

A model can only contain one SCI Receive block for each module. The C28x processor has three SCI modules — A, B, and C. You can configure the SCI modules by navigating to Hardware Implementation > Target hardware resources. Verify that these settings meet the requirements of your application.

Ports

Output

expand all

The data received from the serial communication bus.

Data Types: int8 | uint8 | int16 | uint16 | int32 | uint32 | single

Indicates the status of the received serial data:

  • 0 — No errors.

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

  • 2 — The received data contains an error (checksum error).

  • 3 — SCI parity error flag: occurs when a character is received with a mismatch.

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

  • 5 — SCI overrun error flag: occurs when a character is transferred to the receive registers before reading the previous character.

  • 6 — SCI break-detect flag: occurs when SCI receiver data line (SCIRXD) remains continuously low for at least ten bits.

Dependencies

This port appears only when you select Output receiving status.

Data Types: uint16

Parameters

expand all

The SCI module used for communication. The number of SCI modules supported varies across different C2000™ processors.

The data located at the front of the received data package, which is not part of the data being received, and indicates the start of data. The additional package header must be represented using ASCII characters. You can use a string or a number (0–255). You must add single quotes around strings entered for this parameter, but the quotes are not received or included in the total byte count. To specify a null value (no package header), enter two single quotes only.

Note

Match additional package headers or terminators with those specified in the host SCI Transmit block.

The data located at the end of the received data package, which is not part of the data being received, and indicates the end of data. The additional package terminator must be represented using ASCII characters. Use a string or a number (0–255). You must add single quotes around strings entered for this parameter, but the quotes are not received or included in the total byte count. To specify a null value (no package terminator), enter two single quotes only.

The data type of the output data.

The number of Data type the block receives (not bytes). If this parameter is set to more than 1, the output will be a vector. Ensure that the data length specified is same as that of the SCI Transmit block from which data is received.

The default value output from the SCI Receive block. This value is output, for example,when the Action taken when connection timeout parameter is set to Output the last received value and a connection time-out occurs before data is received.

Specifies what to output when a connection time out occurs. If Output the last received value is selected, the block outputs the last received value. If a value has not been received, the block outputs the Initial output value.

If you select Output custom value, use the Output value when connection times out parameter to set the custom value.

Set the custom time out value.

Sample time for the block in seconds. To execute this block asynchronously, set this parameter to -1.

Creates a Status block output that provides the status of serial communication.

If this option is selected, an interrupt is posted when the FIFO is full, allowing the subsystem to perform any action. For example, you can use the C28x Hardware Interrupt block for triggering the SCI Receive block to read the data as soon as it is received.

If the option is not selected, the SCI Receive block is in polling mode and checks the FIFO for data. If data is present, the block reads and outputs the data. If data is not present, in blocking mode, the block waits until data is available. In non-blocking mode, the block continues with the execution of the algorithm without waiting for data.

The receive FIFO generates an interrupt when the number of data bytes in the receive FIFO is greater than or equal to the value selected for this parameter.

Dependencies

This parameter appears only when you select the Enable receive FIFO interrupt option.