Send Serial Input from M7 to M4 Giga R1

Hi Everyone

Currently working on a new project using Giga R1 where my main code is located on M4 and my communication on M7. everything is working as planned and code running smoothly.

However i cant find any details on Inputing a character into serial input on core M7 and transferring that to M4 to action a task for example change the state of the loop running on M4.

Before anyone states you cannot use serial on M4 , i know this and im not trying to, i simply want to take a serial input on M7 and use this input on M4 to action a task. the code below is example on another project using a Mega.

void State_Inputs(){
  if (Serial.available()) {
  Inputs = Serial.read();
  if (Inputs == 'A') {
  SystemState=0;
  }
  if (Inputs== 'B') {
  SystemState=1;
  }
  if (Inputs == 'C') {
  SystemState=2;
  }
  if (Inputs == 'D') {
  SystemState=3;
  }
  if (Inputs == 'E') {
  SystemState=4;
  }
  if (Inputs == 'F') {
  SystemState=5;
  }
  if (Inputs== 'G') {
  SystemState=6;
  }
  if (Inputs == 'H') {
  SystemState=7;
  }
  if (Inputs == 'I') {
  SystemState=8;
  }
  if (Inputs == 'J') {
  SystemState=9;
  }
  if (Inputs == 'K') {
  SystemState=40;
  }
    }
      }

Im assuming there is a way to send a SerialRPC.write() SerialRPC.read() to M4 so i can achieve the above.

Any thoughts?

Thanks in advance.

Sorry I am not familiar with those functions. You can use CAN to communicate with them as an Idea. There is a MCP2515 module available from china for less then a buck that has both the CAN controller and Drive on board. It works with SPI. Post an annotated schematic showing how these are connected and not any wires over 10"/25cm in length.

This is for the STM32H747XI its a dual core processors M7 & M4 cores, not two separate boards

Check guide: https://docs.arduino.cc/tutorials/giga-r1-wifi/giga-dual-core/#rpc-library-api
Note print does not work, but println does.

That information was missing in the original question.

Superstar , cant believe i missed that, cant tell you how many times iv read that link.

All confirmed and working

1 Like