Software Serial on Giga

You are right, it is working. I let myself mislead from a different thread that I found here:

My solution:

An Arduino Mega (with Voltage regulator) (Rx0 and Tx0) is sending something to the serial1 interface of the GIGA (Rx0 and Tx0). The connection is like this: Mega Rx0 -> Giga Tx0; Mega Tx0 -> Giga Rx0.

Code of the mega:

void setup() {
  Serial.begin(19200);
}

void loop() {
  Serial.print("Hello World!");
  Serial.println(random());
  delay(500);
}

For the M7 Core, the code is:

#include "RPC.h"

//M7 sketch

void setup() {
  
  // Start Serial (USB) to communicate with the PC
  Serial.begin(19200);
    while (!Serial) {
    ; // Wait for USB connection
  }
  Serial.println("M7 of Giga: Ready to forward M4 data.");
  RPC.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  if (RPC.available()) {
    char incomingByte = RPC.read();  // Read byte from RPC
    Serial.write(incomingByte);  // Forward the byte to Serial (USB)
  }
}

And for the M4 core the code is:

#include "RPC.h"

//M4 sketch

void setup() {
  RPC.begin();
  Serial1.begin(19200);
  while (!Serial1) {
    ; // Wait for Serial connection
  }
  RPC.println("M4 of Giga: Ready to forward Serial1 data.");
}

void loop() {
    if (Serial1.available()) {
    char incomingByte = Serial1.read();  // Read byte from Serial1
    RPC.write(incomingByte);  // Forward the byte to RPC
  }
}

So, as the documentation is saying: the uart is working (at least for me for serial1).

Thank you, but the problem is with the timing. While doing the ethernet/wifi connection and saving/loading to an SD card the sensor reading would be halted. In order to have no interrupt in the measurement cycle, the M4 would be able to continue communicating with the sensor and the M7 is reading it when it is not busy doing the other stuff.