if I run the code below, I get the following output. Can someone explain why the 'delta' value degenerates like that? I am missing something, obviously.
I thought I'd try the other extreme, so here is the result with the Baud rate at 2400:
(I tried lower rates than 2400 but they don't work at all on the Nano Every)
I think that confirms that the serial port becoming blocked with queued data is the cause of what you are seeing. Compare the last result at 2400 Baud: delta 58212, which is 58 milliseconds, to the last result at 230400 Baud: delta 512, which is half a millisecond.
I note that 14 characters are being printed each time and the delta at 9600 Baud is about 14 milliseconds, which compares well to it taking about 1 millisecond to transmit 1 character at 9600 Baud.
No, you've nailed it, Perry. The buffer is full. It's not a matter of cranking the baud up, unfortunately, because that just fills the buffer faster. If you drop a 20 ms delay in the main loop the OP posted, no over flow happens.
@kmanuele You do understand what's happening, correct? If this is an artificial test, just file away the knowledge. If you need to time the processor activities, you'll need to find a smarter way to communicate the results.