Configure COM ports for host-side SCI Transmit and Receive blocks
Embedded Coder®/ Embedded Targets/ Host Communication
Standardize COM port settings for use by the host-side SCI Transmit and Receive blocks. Setting COM port configurations globally with the SCI Setup block avoids conflicts (e.g., the host-side SCI Transmit block cannot use COM1 with settings different than those the COM1 used by the host-side SCI Receive block) and requires that you set configurations only once for each COM port. The SCI Setup block is a stand alone block.
Raw data or protocol. Raw data is unformatted and sent whenever the transmitting side is ready to send, whether the receiving side is ready or not. Without a wait state, deadlocks do not occur. Data transmission is asynchronous. With this mode, it is possible the receiving side could miss data, but if the data is noncritical, using raw data mode can avoid blocking processes.
If you specify protocol mode, some handshaking between host and target occurs. The transmitting side sends $SND indicating that it is ready to transmit. The receiving side sends back $RDY indicating that it is ready to receive. The transmitting side then sends data and, when the transmission is completed, it sends a checksum.
Advantages to using protocol mode include
Data is received as expected (checksum)
Data is received by target
Time consistency; each side waits for its turn to send or receive
Note
Deadlocks can occur if one SCI Transmit block is trying to communicate with more than one SCI Receive block on different COM ports when both are blocking (using protocol mode). Deadlocks cannot occur on the same COM port.
Choose from 110, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, or 115200.
Select 1 or 2.
Select none, odd, or even.
Enter values greater than or equal to 0, in seconds. When the COM port involved is using protocol mode, this value indicates how long the transmitting side waits for an acknowledgement from the receiving side or how long the receiving side waits for data. The system displays a warning message if the time-out is exceeded, every n number of seconds, n being the value in Timeout.
Note
Simulink® suspends processing for the length of the time-out. During that time you cannot perform actions in Simulink. If the time-out is set for a long period of time, it may appear that Simulink has frozen.