Send N-by-1 array of data to UART
Simulink Coder Support Package for BBC micro:bit / Basic
Simulink Coder Support Package for STMicroelectronics Nucleo Boards / Common
Simulink Coder Support Package for STMicroelectronics Discovery Boards / STM32F746G-Discovery
Simulink Coder Support Package for STMicroelectronics Discovery Boards / STM32F769I-Discovery
The SCI Write block sends an N-by-1 array of data to the selected Universal Asynchronous Receiver Transmitter (UART), where N is the length of data to be read. The block inherits the data type from the signal at the input port. You can change the Baudrate and select the Transmit pin for the UART Serial Communication Interface (SCI) from Configuration Parameters > Hardware Implementation pane > SCI.
During external mode simulation, the block outputs the simulation results returned from the executable running on the target hardware. During simulation in all other modes, the block outputs zeroes.
Tx— Data sent to UART
The data from your model sent to the UART port.
Status— Status of write operation
When the length of data received is greater than or equal to the
length specified in the Data length (N) parameter,
the output is
0. Otherwise, the output is a nonzero
value, indicating that the length of data available is less than the
length specified in the Data length (N)
0 indicates a successful write operation.
For example, when the length of data received is 9 and
N = 8, the Status port
0 indicating a successful write operation.
When the length of data received is 9 and N = 10, the
Status port outputs
indicating that data is not available.
|Length of Data Received = 9|
|Port||Data Type||Data Length|
|N = 8||N = 9||N = 10|
To enable the port, select the Output status parameter.
SCI module— SCI module used for communications
0(default) | Any integer value
SCI module that corresponds to the group of SCI pins that communicate with the SCI device.
In external mode, the SCI0 module is reserved for external mode communication and cannot be used by the SCI Write block.
Output status— Option to display the status of write operation
Select this parameter to enable the Status port.
The port outputs
0 for a successful write