Main Content

C28x-SCI_A, C28x-SCI_B, C28x-SCI_C, C28x_SCI_D

You can set the following parameters for serial communications interface (SCI):

Enable loopback

Enable the loopback function for self-test and diagnostics. When this function is enabled, a C28x DSP Tx pin is internally connected to its Rx pin, and the DSP can transmit data from its output port to its input port to check the integrity of the transmission.

Suspension mode

The type of suspension to be used while debugging your program with Code Composer Studio™. When your program encounters a breakpoint, the suspension mode determines whether to perform the program instruction. The available options are:

  • Hard_abort—Stops the program immediately.

  • Soft_abort—Stops when the current receive/transmit sequence is complete.

  • Free_run—Continues running regardless of the breakpoint.

Number of stop bits

Specify the number of stop bits transmitted.

Parity mode

The type of parity to be used. The available options are:

  • None—Disables parity.

  • Odd—Sets the parity bit to one if you have an odd number of ones in your bytes, such as 00110010.

  • Even—Sets the parity bit to one if you have an even number of ones in your bytes, such as 00110011.

Character length bits

Length in bits of each transmitted or received character. The default value is 8.

Desired baud rate in bits/sec

Specify the desired baud rate.

Baud rate prescaler (BRR = (SCIHBAUD << 8) | SCILBAUD)

The value using which SCI baud rate is scaled. This value is based on LSPCLK.

Closest achievable baud rate (LSPCLK/(BRR+1)/8) in bits/sec

The closest achievable baud rate calculated based on LSPCLK and BRR.

Communication mode

Raw data is unformatted and sent whenever the transmitting side is ready to send, regardless of whether the receiving side is ready or not. Without a wait state, deadlock conditions do not occur and data transmission is asynchronous. With this mode, the receiving side could miss data, but if the data is noncritical, using raw data mode can avoid blocking processes.

When you select protocol mode, handshaking between the host and the processor occurs. The transmitting side sends $SND to indicate it is ready to transmit. The receiving side sends back $RDY to indicate it is ready to receive. The transmitting side then sends data and, when the transmission is completed, it sends a checksum.

Advantages of using protocol mode are:

  • Avoids deadlock

  • Determines whether data is received without errors (checksum)

  • Determines whether data is received by the processor

  • Determines time consistency; each side waits for its turn to send or receive

Note

  • Deadlocks can occur if an SCI Transmit block tries to communicate with multiple SCI Receive blocks on different COM ports while both transmit and receive blocks are in blocking mode. Deadlocks cannot occur on the same COM port.

  • Support for Communication mode as Protocol will be removed in a future release of MATLAB.

  • Protocol mode is supported only for Data length option as Length via dialog.

Post transmit FIFO interrupt when data is transmitted

If this option is selected, an interrupt is posted when the available data in transmit FIFO is less than or equal to Transmit FIFO interrupt level, allowing the subsystem to perform any action. For example, you can use the C28x Hardware Interrupt block for triggering the SCI Transmit block to write data as soon as the FIFO is available for transmitting data.

If the option is not selected, the SCI Transmit block is in polling mode and checks if the FIFO is available. If the FIFO is not full, the block writes data into the FIFO. If the FIFO is full, in blocking mode, the block waits until the FIFO is available. In non-blocking mode, the block continues with the execution of the algorithm without waiting for the availability of the FIFO.

Transmit FIFO interrupt level

The Transmit FIFO generates an interrupt when the number of data bytes in the transmit FIFO is less than or equal to the value selected for this parameter. The transmits FIFO interrupt level ranges between 1 to 16.

To configure this parameter, select the Post transmit FIFO interrupt when data is transmitted parameter.

Post receive FIFO interrupt when data is transmitted

If this option is selected, an interrupt is posted when the data available in receive FIFO is greater than or equal to Receive FIFO interrupt level, 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.

Enable receive FIFO interrupt option also enables RXERRINTENA (SCI receive error interrupt enable) interrupt. Enabling RXERRINTENA interrupt will trigger receive interrupt if RX ERROR bit is set due to errors in receiving the data.

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.

Receive FIFO interrupt level

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. The receive FIFO interrupt level ranges between 1 to 16.

To configure this parameter, select the Post receive FIFO interrupt when data is transmitted parameter.

Data byte order

Select an option to match the endianness of the data being moved.

Pin assignment (Tx)

Assign the SCI transmit pin to be used with the SCI module.

Pin assignment (Rx)

Assign the SCI receive pin to be used with the SCI module.

Note

All SCI modules are not available for all TI C2000 processors.

Related Topics