A system-on-chip, SoC, having two or more high-speed serial interfaces, the SoC comprising: a camera serial interface, CSI, receiver adapted to receive sensor data via a first serial interface and to generate a data packet that includes a payload; a loopback buffer connected to the CSI receiver, said buffer having a depth, wherein the CSI receiver is adapted to write the payload into the loopback buffer; and a CSI transmitter connected between a second serial interface and the loopback buffer, characterized in that: the SoC is adapted to determine a threshold capacity of the loopback buffer based on the depth of the loopback buffer, said threshold capacity being a point to which the buffer may be filled without causing an overflow; the data packet generated by the CSI receiver further includes a packet header, the packet header including a data identifier, a word count and an error correction code, the word count specifying a size of the payload; the CSI transmitter is configured to: receive the packet header from the CSI receiver; identify the size of the payload using the packet header; determine whether the size of the payload stored in the loopback buffer is equal to the size of the payload identified from the size information by comparing the identified size with an amount of the payload stored in the loopback buffer or is equal to the threshold capacity of the loopback buffer; read the payload from the loopback buffer when at least one of the threshold capacity of the loopback buffer is reached and the payload is received completely by the loopback buffer; and transmit the read payload over the second serial interface. a camera serial interface, CSI, receiver adapted to receive sensor data via a first serial interface and to generate a data packet that includes a payload; a loopback buffer connected to the CSI receiver, said buffer having a depth, wherein the CSI receiver is adapted to write the payload into the loopback buffer; and a CSI transmitter connected between a second serial interface and the loopback buffer, characterized in that: the SoC is adapted to determine a threshold capacity of the loopback buffer based on the depth of the loopback buffer, said threshold capacity being a point to which the buffer may be filled without causing an overflow; the data packet generated by the CSI receiver further includes a packet header, the packet header including a data identifier, a word count and an error correction code, the word count specifying a size of the payload; the SoC is adapted to determine a threshold capacity of the loopback buffer based on the depth of the loopback buffer, said threshold capacity being a point to which the buffer may be filled without causing an overflow; the data packet generated by the CSI receiver further includes a packet header, the packet header including a data identifier, a word count and an error correction code, the word count specifying a size of the payload; the CSI transmitter is configured to: receive the packet header from the CSI receiver; identify the size of the payload using the packet header; determine whether the size of the payload stored in the loopback buffer is equal to the size of the payload identified from the size information by comparing the identified size with an amount of the payload stored in the loopback buffer or is equal to the threshold capacity of the loopback buffer; read the payload from the loopback buffer when at least one of the threshold capacity of the loopback buffer is reached and the payload is received completely by the loopback buffer; and receive the packet header from the CSI receiver; identify the size of the payload using the packet header; determine whether the size of the payload stored in the loopback buffer is equal to the size of the payload identified from the size information by comparing the identified size with an amount of the payload stored in the loopback buffer or is equal to the threshold capacity of the loopback buffer; read the payload from the loopback buffer when at least one of the threshold capacity of the loopback buffer is reached and the payload is received completely by the loopback buffer; and transmit the read payload over the second serial interface.