Closed chromhelm closed 5 years ago
Can one of the admins verify this patch?
ok to test
On Tue, Mar 12, 2019 at 4:26 PM chipKIT Bot notifications@github.com wrote:
Can one of the admins verify this patch?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-core/pull/447#issuecomment-472187657, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbeCEkfTY75oeClmTTGqvvnC12UPjkqks5vWBtrgaJpZM4br6Py .
This looks good to me. About 850k/s with two CDCACMs loaded going to Minicom.
Vote to merge.
Hold up - on the Lenny I'm seeing some data loss. Using Paul S's USB test code I get about 550k/s on a WiFire. But on the Lenny I see this:
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fas Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
USB Fast Serial Transmit Bandwidth Test, capture this text.
Every so often there's a letter missing from the data.
Hold on merge for now
OK, good to know. We'll hold until the data loss issue is solved.
The test code used:
// USB Serial Transmit Bandwidth Test
// Written by Paul Stoffregen, paul@pjrc.com
// This benchmark code is in the public domain.
//
// Within 5 seconds of opening the port, this program
// will send a message as rapidly as possible, for 10 seconds.
//
// To run this benchmark test, use serial_read.exe (Windows) or
// serial_listen (Mac, Linux) program can read the data efficiently
// without saving it.
// http://www.pjrc.com/teensy/serial_listen.c
// http://www.pjrc.com/teensy/serial_read.c
// http://www.pjrc.com/teensy/serial_read.exe
//
// You can also run a terminal emulator and select the option
// to capture all text to a file. However, some terminal emulators
// may limit the speed, depending upon how they update the screen
// and how efficiently their code processes the imcoming data. The
// Arduino Serial Monitor is particularly slow. Only use it to
// verify this sketch works. For actual benchmarks, use the
// efficient receive tests above.
//
// Full disclosure: Paul is the author of Teensyduino.
//
// Results can vary depending on the number of other USB devices
// connected. For fastest results, disconnect all others.
//#define USBSERIAL Serial // for Leonardo, Teensy, Fubarino
#define USBSERIAL SerialUSB // for Due, Maple
USBFS usbDevice;
USBManager USB(usbDevice, 0xf055, 0x1234);
CDCACM SerialUSB;
void setup()
{
USB.addDevice(SerialUSB);
USB.begin();
USBSERIAL.begin(115200);
}
void loop()
{
// wait for serial port to be opened
while (!USBSERIAL) ;
// give the user 5 seconds to enable text capture in their
// terminal emulator, or do whatever to get ready
for (int n=5; n; n--) {
USBSERIAL.print("10 second speed test begins in ");
USBSERIAL.print(n);
USBSERIAL.println(" seconds.");
if (!USBSERIAL) break;
delay(1000);
}
// send a string as fast as possible, for 10 seconds
unsigned long beginMillis = millis();
do {
USBSERIAL.print("USB Fast Serial Transmit Bandwidth Test, capture this text.\r\n");
} while (millis() - beginMillis < 10000);
USBSERIAL.println("done!");
// after the test, wait forever doing nothing,
// well, at least until the terminal emulator quits
while (USBSERIAL) ;
}
The problem possibly stems from #446 as I am getting random "1" inserted with this test code on that PR.
Yep, that's fixed it. I think we're good to go with this PR now.
Hi This change enables the CDCACM to send with around 1M. With -Os the buffer send should be at lest around 32byte- With -O3 already with 4 bytes 1M is reached. It is only reached when there is only one USB device registers in the USBManager. It depents on PR #446