NilRTOS - A Fast Tiny Preemptive RTOS

pito,

I can't reproduce your problem so I don't know what to do. I only do the Serial.begin(115200) change with 1.5.1r2 on an Uno and get.

type any character to begin
type any character to end
Done
Maximum SD write latency: 65008 usec
Unused Stack: 57 454

I get the same result with all line endings.

To see the performance of printField(), run the PrintBenchmark example with the new SdFat. You should get something like this:

Test of println(uint16_t)
Time 10.09 sec
File size 128.89 KB
Write 12.78 KB/sec
Maximum latency: 62460 usec, Minimum Latency: 176 usec, Avg Latency: 497 usec

Test of printField(uint16_t, char)
Time 3.26 sec
File size 128.89 KB
Write 39.60 KB/sec
Maximum latency: 67240 usec, Minimum Latency: 60 usec, Avg Latency: 156 usec

The two files are identical but printField() runs three times faster.

Edit: Try making the stack for thread 1 larger like this:

NIL_WORKING_AREA(waThread1, 100);