Hi, I was playing around with Serial0 and Serial1 and I've noticed that for some reason Serial1 is much much slower than Serial0.
I'm quite new to teensy but this seems a little strange, unless I'm missing something?
Basically I print 9999 entries through Serial0 and it takes 17ms,
however the same code on Serial1 takes around 14000ms .... I'm not sure whats happening there ?
Something blocking?
Thanks for you replies.
code:
I'm quite new to teensy but this seems a little strange, unless I'm missing something?
Basically I print 9999 entries through Serial0 and it takes 17ms,
however the same code on Serial1 takes around 14000ms .... I'm not sure whats happening there ?
Something blocking?
Thanks for you replies.
code:
Code:
char data[17] = { "12345670HelloWd" };
unsigned long time1, time2, time3;
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
delay(1000);
}
void loop() {
time1=millis();
runloop1();
gettime();
Serial.println(time3);
time1=millis(); //update time
runloop2();
gettime();
Serial.println(time3);
delay(5000);
}
void gettime() {
time2=millis();
time3=time2-time1;
}
void runloop1(){
for (int i = 0; i < 9999; i++)
{
Serial.println(data);
} // end of for loop
}
void runloop2(){
for (int i = 0; i < 9999; i++)
{
Serial1.println(data);
}
}