2:49 am
February 2, 2022
Dear all:
I have successfully deployed the compiled code to RPI PICO, which provide better performance compares to UNO.
I noticed PICO provides two core with it's MCU RP2040, I wonder if it is possible to access the second core?
The multi-core example in arduino is kinda simple, we only have to use such setup:
void setup() {
Serial.begin(115200);
delay(5000);
}
void loop() {
Serial.printf("C0: Blue leader standing by...
");
delay(1000);
}
// Running on core1
void setup1() {
delay(5000);
Serial.printf("C1: Red leader standing by...
");
}
void loop1() {
Serial.printf("C1: Stay on target...
");
delay(500);
}
But LVACC only generate one setup even if I put two parallel loop in my main program, is there any thing I can do to enable setup1/loop1 function?
I know there are many issues to deal with when it comes to dual-core, like resource locking or corss-core date accessing and so on, but I need to communication with host, sensor reading, LCD drawing and digital input response. Most of these work are not performance hunger, but to maintain a reasonable display result I need some more process power for LCD drawing.
Many thanks!
5:09 pm
March 10, 2015
Unfortunately the Compiler does not support multi-threading or parallel loops. It does not officially support targets with multi-cores. Take a look at the "Parallel Loops and Multi Threading" description in the "Important Considerations" section of the manual. Best thing to do would be to develop using the Arduino IDE if the second core is required.
5
1 Guest(s)