Good day everyone.
Might be a dumb question, but I did search here and google for couple of days now, but couldn't find precise answer/solution.
I'm having weird data loss/corruption issues with data transfer over USB serial from Teensy 4.0 & 4.1.
I generate test data pattern from teensy 4.0 (same issue 4.1) using simple sketch:
On receiving end I use TeraTerm with enabled option to save data to binary log file.
While investigating received dump with HxD, I can spot some garbage "inclusions" of garbage data.
I can only explain it as some sectors on my disk allocated to file were not overwritten due to usb lock-up and it's my old junk data ?).
Here's pic
It's random-ish, location and size of those chunks differs from attempt to attempt.
I'm assuming, it may have to do with lack of "handshake" between TX/RX or some flags?
I appreciate for any help and sorry for my possibly noob-ish question.
P.S. I love Teensy, it is a little BEAST.
Might be a dumb question, but I did search here and google for couple of days now, but couldn't find precise answer/solution.
I'm having weird data loss/corruption issues with data transfer over USB serial from Teensy 4.0 & 4.1.
I generate test data pattern from teensy 4.0 (same issue 4.1) using simple sketch:
Code:
#define BUFF_SIZE 512 // I've played here with different sizes
#define TOTAL_TRANSACTIONS 16384 // Total dump file size: 16384 * 512 = 8388608 B
void setup()
{
}
void loop()
{
delay(10000);
unsigned char buff[BUFF_SIZE] = {0}; // Buffer to send
unsigned int i, j;
for (i = 0; i < TOTAL_TRANSACTIONS; i++) // Loop to send multiple transactions
{
for (j = 0; j < BUFF_SIZE; j++) // Loop to shape buffer for transcation (test data)
{
buff[j] = 0x55;
}
Serial.write(buff, BUFF_SIZE);
delayMicroseconds(100);
}
exit(0);
}
On receiving end I use TeraTerm with enabled option to save data to binary log file.
While investigating received dump with HxD, I can spot some garbage "inclusions" of garbage data.
I can only explain it as some sectors on my disk allocated to file were not overwritten due to usb lock-up and it's my old junk data ?).
Here's pic
It's random-ish, location and size of those chunks differs from attempt to attempt.
I'm assuming, it may have to do with lack of "handshake" between TX/RX or some flags?
I appreciate for any help and sorry for my possibly noob-ish question.
P.S. I love Teensy, it is a little BEAST.