Just got a Teensy 4.0 today, Yay! But already found an issue ;-(
I started with the code from here: https://github.com/benkrasnow/T4_USB_speedtest
Specifically the T4_send_data. If I program this to the Teensy, then run on my Mac:
This will hang after some amount of data. I simplified the code to the following:
After somewhere between 5 and 10 megabytes of transfer, it hangs. Sometimes as much as 40 MB will transfer.
ctrl-c and then re-run will work. Resetting the Teensy is not necessary. Verified on two different Macs. One 10.14.6 one 10.13.4.
I started with the code from here: https://github.com/benkrasnow/T4_USB_speedtest
Specifically the T4_send_data. If I program this to the Teensy, then run on my Mac:
Code:
$ cat /dev/cu.usbmodem64919501 |hexdump
This will hang after some amount of data. I simplified the code to the following:
Code:
// USB Virtual Serial Receive Speed Benchmark
//
// This program sends data as rapidly as possible
// use one of these to define
// the USB virual serial name
//
#define USBSERIAL Serial // Arduino Leonardo, Teensy, Fubarino
//#define USBSERIAL SerialUSB // Arduino Due, Maple
char buf[64];
void setup() {
USBSERIAL.begin(9600);
USBSERIAL.setTimeout(0);
for(int i=0;i<64;i++)
{
buf[i] = i;
}
}
void loop() {
while (1) {
USBSERIAL.write(buf, 64);
}
}
After somewhere between 5 and 10 megabytes of transfer, it hangs. Sometimes as much as 40 MB will transfer.
ctrl-c and then re-run will work. Resetting the Teensy is not necessary. Verified on two different Macs. One 10.14.6 one 10.13.4.