defragster
Senior Member+
I have two Teensy's connected Serial1 [ T_3.6 ] to Serial1 [ T_3.0 ] and they work at 2,000,000 baud when running at 48, 180 or 240 MHz.
When I compile at 24 MHz on the T_3.6 with the T_3.0 code unchanged - the T_3.0 acting as PROXY to a second USB (for Serial1 debug) it no longer gets valid data.
Is 2 Mbaud mathematically possible on T_3.6 at 24 MHz? Or is there a problem in the core math?
Here is a Sketch to output Serial1 data at 2Mbaud that works at 48 MHz on T_3.6 (compiled Fastest with TD_1.41b4) , but shows USB garbage through PROXY Teensy:
Here is what I see for 'garbage' in TyComm - the micros printed are at 48 MHz - then garbage when recompiled at 24 MHz:
SerMon version of the garbage is this: "⸮⸮⸮4⸮⸮⸮⸮⸮⸮⸮⸮۴G۴G8⸮۴G۴G⸮G۴G۴G;⸮۴G۴GGG۴G۴G<⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"
If I had a logic analyzer I'd hook that up to see what is happening.
The PROXY code in use { I posted here } it is this:
When I compile at 24 MHz on the T_3.6 with the T_3.0 code unchanged - the T_3.0 acting as PROXY to a second USB (for Serial1 debug) it no longer gets valid data.
Is 2 Mbaud mathematically possible on T_3.6 at 24 MHz? Or is there a problem in the core math?
Here is a Sketch to output Serial1 data at 2Mbaud that works at 48 MHz on T_3.6 (compiled Fastest with TD_1.41b4) , but shows USB garbage through PROXY Teensy:
Code:
#define PROXY_SER Serial1
#define PROXY_BAUD 2000000
void yield() {}; // Void yield() to bypass default PJRC yield overhead
void setup() {
// serial to display data
PROXY_SER.begin( PROXY_BAUD );
Serial.begin(115200);
PROXY_SER.println("\n"__FILE__" "__DATE__" "__TIME__);
Serial.println("\n"__FILE__" "__DATE__" "__TIME__);
pinMode(LED_BUILTIN, OUTPUT);
while (!Serial && millis() < 4000 );
}
elapsedMillis foo;
void loop() {
if ( foo >= 1000) {
PROXY_SER.println( micros() );
Serial.println( micros() );
foo -= 1000;
}
}
Here is what I see for 'garbage' in TyComm - the micros printed are at 48 MHz - then garbage when recompiled at 24 MHz:
19400002
20400002
21400002
4Ä���ۄ������4�D�tÄôG���
SerMon version of the garbage is this: "⸮⸮⸮4⸮⸮⸮⸮⸮⸮⸮⸮۴G۴G8⸮۴G۴G⸮G۴G۴G;⸮۴G۴GGG۴G۴G<⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮"
If I had a logic analyzer I'd hook that up to see what is happening.
The PROXY code in use { I posted here } it is this:
Code:
#define PROXY_SER Serial1
#define PROXY_BAUD 2000000
void yield() {}; // Void yield() to bypass default PJRC yield overhead
void setup() {
Serial.begin(9600);
while (!Serial && millis() < 4000 );
PROXY_SER.begin( PROXY_BAUD );
}
void loop() {
char inChar;
if ( Serial.available() )
PROXY_SER.print( inChar = Serial.read() );
if ( PROXY_SER.available() )
Serial.print( inChar = PROXY_SER.read() );
}
Last edited: