1

I'm working on a project to implement an attitude controller for a quadcopter. Loop times are extremely important as you can imagine.

I already have tested code for a cascading controller (inner loop does angular rate, outer does attitude) for a single-axis on a see-saw-like physical setup.

My worry was that implementing for 3-axis would slow loop times to lead to system instability. Thus, I purchased a Giga R1 which features two cores to share the load.

One way I could implement the code is to collect all sensor/RC signals on the co-processor, while the main processor does all the PID computation and generates PWM signals for the motors.

This obviously means sharing data between the two cores. I tried using the RPC method the Arduino guide suggests to share data. However, I timed how long a remote call to return an integer takes and I'm getting around 20 milliseconds. This is far too slow.

Is there a faster way to share data between the cores? I'm open to changing how the system is configured (i.e. which core does what) if that helps.

246tnt
  • 21
  • 1

0 Answers0