I am very interested in maximum GPIO speed for teensy 3 series.
I am aware from previous posts, that digitalWriteFast() can be extremely fast on teensy 3
I came across an interesting comparison of GPIO speeds of various MCUs, in this site:
http://fab.cba.mit.edu/classes/865.15/people/sam.calisch/9/index.html
It shows that even using digitalReadFast()/digitalWriteFast() for the teensy case, max speed is ONLY 266 Khz max (??)
In fact "optimized" teensy code is MUCH SLOWER compared to all other boards (STM32, LPC) & even arduino !!!
Here is the code:
#define PIN_OUT 2
#define PIN_IN 3
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3 , INPUT);
digitalWriteFast(2, LOW);
}
void loop() {
digitalWriteFast(2, !digitalReadFast(3));
}
I confirmed the same results with my teensy 3.1, which is really WEIRD !!
So, could anybody explain this SLOW performance ??
I am aware from previous posts, that digitalWriteFast() can be extremely fast on teensy 3
I came across an interesting comparison of GPIO speeds of various MCUs, in this site:
http://fab.cba.mit.edu/classes/865.15/people/sam.calisch/9/index.html
It shows that even using digitalReadFast()/digitalWriteFast() for the teensy case, max speed is ONLY 266 Khz max (??)
In fact "optimized" teensy code is MUCH SLOWER compared to all other boards (STM32, LPC) & even arduino !!!
Here is the code:
#define PIN_OUT 2
#define PIN_IN 3
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3 , INPUT);
digitalWriteFast(2, LOW);
}
void loop() {
digitalWriteFast(2, !digitalReadFast(3));
}
I confirmed the same results with my teensy 3.1, which is really WEIRD !!
So, could anybody explain this SLOW performance ??