Main Content

Serial Transmit

Send an [MxN] array of data to the UART

Add-On Required: This feature requires the Simulink Coder Support Package for NXP FRDM-KL25Z Board add-on.

Library

Simulink Coder Support Package for NXP FRDM-KL25Z Board/FRDM-KL25Z

  • Serial Transmit block

Description

Send an [MXN] array of data to the selected UART.

You can change the Baud Rate and also select the Tx pin for the UARTx Serial Interface from Configuration Parameters > Hardware Implementation pane > UARTx.

During simulations without the hardware, this block does nothing.

Parameters

UART

Select the UART for the serial communication interface.

Make sure not to select UART0 when you use external mode because the External mode uses UART0 for target to host communication.

Send mode

To transmit an array of byte data to the UART, set the Send mode parameter to putc.

Select printf value for debugging purposes. You can send an array of any data type to the terminal.