println stops after 6 iterations

Status
Not open for further replies.

tonton81

Well-known member
Question, using a teensy 3.6 to test this, does anyone know why the output stops sending after 6 iterations?
commenting out the last Serial1.println statement makes it continue..

Code:
void setup() {
  Serial.begin(115200);
  Serial1.begin(4608000);
}

void loop() {
  static uint32_t myTimer = millis();
  if ( millis() - myTimer > 1000 ) {  // <-- changing the time doesnt affect, always stops after 6 prints.
    myTimer = millis();
    Serial.print(millis());
    Serial.print(" Sent: ");
    Serial.println("Hello World");
    Serial1.println("Hello World"); // <-- comment this out and usb serial will continue printing after 6 iterations
  }
}

Output at 3000 timer:

Code:
3401 Sent: Hello World
6402 Sent: Hello World
9403 Sent: Hello World
12404 Sent: Hello World
15405 Sent: Hello World
18406 Sent: Hello World

Output at 1000 timer:
Code:
1401 Sent: Hello World
2402 Sent: Hello World
3403 Sent: Hello World
4404 Sent: Hello World
5405 Sent: Hello World
6406 Sent: Hello World

Output with Serial1.println commented out:
Code:
1401 Sent: Hello World
2402 Sent: Hello World
3403 Sent: Hello World
4404 Sent: Hello World
5405 Sent: Hello World
6406 Sent: Hello World
7407 Sent: Hello World
8408 Sent: Hello World
9409 Sent: Hello World
10410 Sent: Hello World
11411 Sent: Hello World
12412 Sent: Hello World
13413 Sent: Hello World
14414 Sent: Hello World
15415 Sent: Hello World
16416 Sent: Hello World
17417 Sent: Hello World
18418 Sent: Hello World
19419 Sent: Hello World
20420 Sent: Hello World
21421 Sent: Hello World
22422 Sent: Hello World
23423 Sent: Hello World
24424 Sent: Hello World
25425 Sent: Hello World
26426 Sent: Hello World
27427 Sent: Hello World
etc...
 
No idea...
Ran it on T3.6 default configuration
Code:
1401 Sent: Hello World
2402 Sent: Hello World
3403 Sent: Hello World
4404 Sent: Hello World
5405 Sent: Hello World
6406 Sent: Hello World
7407 Sent: Hello World
8408 Sent: Hello World
9409 Sent: Hello World
10410 Sent: Hello World
11411 Sent: Hello World
12412 Sent: Hello World
13413 Sent: Hello World
14414 Sent: Hello World
15415 Sent: Hello World
16416 Sent: Hello World
17417 Sent: Hello World
18418 Sent: Hello World
19419 Sent: Hello World
20420 Sent: Hello World
21421 Sent: Hello World
22422 Sent: Hello World
23423 Sent: Hello World
24424 Sent: Hello World
25425 Sent: Hello World
26426 Sent: Hello World
27427 Sent: Hello World
28428 Sent: Hello World
29429 Sent: Hello World
30430 Sent: Hello World
31431 Sent: Hello World
...
 
Good evening Kurt, after I saw your reply it puzzled me, so I went back to the IDE settings and seen that I was still on 24MHz testing some ESP stuff. I set it back to 180 now and it seems to be working fine now..
I would have imagined it would just spew garbage if it didnt work, not stop the other Serial.print, not sure if it even halts the loop or just the hardwareserial code..
 
Last edited:
Just to confirm, I can reproduce the problem here. Works fine at 96 MHz or higher, fails at 72 MHz or lower.

I've put this on my list of bugs to investigate. Realistically, soonest I can really look at this will be sometime next week. But my gut feeling is this very likely will turn out to be a bug in configuring the baud rate when something much faster than the hardware can actually do is requested.
 
thanks paul, unintentionally hit that by accident, i really hate the ESP UNSTABLE half duplex command sequenced SPI, which spews garbage whenever it pleases more than it can see the data, i decided to go UART instead and i know frank or others had 4Mbit running okay, so ill be writing a teensy protocol for it, but thatll take a bit of time to accomplish
 
Status
Not open for further replies.
Back
Top