I2C Receive Block Description
This block supports the I2C peripheral interface in Receive mode. It is used to directly receive a data stream by the microcontroller (acting as Master) from a peripheral device (Slave). The block sends the device address with a read request and writes the received bytes to its output port.

Table of Contents
Inputs
There are no inputs in this operating mode.
Outputs
| Output Name | Type | Description |
|---|---|---|
| Status | uint8 | Transmission status. Returns:1 transmission successful0 transmission failed |
| RX data[ ] | uint8[ ] | Data received via the I2C interface. The size of the output depends on the value of the Receive size parameter. |
Block Parameters
| Parameter | Description |
|---|---|
| I2C Number | I2C module number (for a single MCU I2C, this should be set to 0) |
| Slave address | Address of the slave device |
| Mode | Block operating mode |
| Receive size | Size of the data to be received. Determines the amount of data returned by the RX Data output. |
| Timeout | How long the system will wait for the block execution |
| Sample time [s] | Function refresh rate |

CubeMX Configuration for a Given MCU
The configuration for the interface can be found on the subpage CubeMX Configuration for a Given MCU.
See also
Last updated on