-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timing issue on GIGA on M4 #726
Comments
@pedromsousalima I investigated the issue and indeed there's a problem lurking in the M4 "variant sharing". In the meantime, let me suggest to avoid adding links to internal documentation when posting on public github, since they are useless for people that may want to help in the investigation. For reference, here's the code to show the issue #include "Arduino.h"
#include "SerialRPC.h"
#ifdef CORE_CM4
void setup() {
SerialRPC.begin(115200);
}
void loop() {
SerialRPC.println(millis());
SerialRPC.println(micros());
delay(1000);
}
#endif
#ifdef CORE_CM7
void setup() {
Serial.begin(115200);
SerialRPC.begin();
}
void loop() {
String data = "";
while (SerialRPC.available()) {
data += (char)SerialRPC.read();
}
if (data != "") {
Serial.write(data.c_str(), data.length());
}
data = "";
while (Serial.available()) {
data += (char)Serial.read();
}
if (data != "") {
SerialRPC.write(data.c_str(), data.length());
}
}
#endif |
It was noticed that the GIGA is inconsistent tracking time across different cores. This was seen on multiple GIGA boards until now we have found no exception.
When using functions like micros() and tracking time on both cores separately a significant discrepancy is noticeable. Specifically, the M7 core seems to be ticking quicker than real-time.
This was not replicable on Portenta boards.
The text was updated successfully, but these errors were encountered: