Serial Receive
Libraries:
Simulink Support Package for Arduino Hardware /
Advanced /
SAMD
Description
Use the Serial Receive block to receive a variable-length array of data on the Arduino® SAMD21 core serial port and configure a serial communication interface on hardware using a SERCOM channel.
To use the SERCOM interrupts for serial reception, configure the Hardware Interrupt block for SAMD boards. This block allows you to enable and manage SERCOM receiver interrupts, such as receive complete and receive error interrupts.
During simulations without hardware, the Serial Receive block receives zeros. If you use this block in a model that has the Standard Servo Read, Standard Servo Write, or Continuous Servo Write block, specify longer sample times to avoid overruns.
Note
The Serial Receive block supports C/C++ code generation using Embedded Coder®.
Warning
Do not connect the serial port pins to an RS-232 serial interface, such as the DE-9M connector on a computer, without limiting the input voltage. The RS-232 standard allows higher voltages that can damage your hardware. For more information, read the documentation for your Arduino hardware.
Supported Arduino Boards
Arduino MKR 1000
Arduino MKR Wi-Fi® 1010
Arduino MKR Zero
Arduino Nano 33 IoT
Examples
Ports
Output
Parameters
Extended Capabilities
Version History
Introduced in R2026a

