View Issue Details

IDProjectCategoryView StatusLast Update
0000015HomeAutomation SystemGeneralpublic2012-08-12 14:56
ReporterAnders Sandblad Assigned ToAnders Sandblad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0000015: Speed up USB gateway
Description1. Baudrates. 1Mb/s > 38400b/s
2. Uart double speed, may make it possible to go for 56kb/s or even 115kb/s
3. Lower FTDI latency to 1ms, see additional information
4. Fill FTDI buffer of 62 bytes to force sending

Implementing 1 may need implementing 4 since 1ms will make a big impact otherwise.
Additional Informationhttp://www.spinics.net/lists/linux-usb/msg37973.html
/sys/bus/usb-serial/devices/ttyUSB0/latency_timer
ASYNC_LOW_LATENCY flag

http://projectgus.com/2011/10/notes-on-ftdi-latency-with-arduino/
http://stackoverflow.com/questions/10718693/set-low-latency-flag-on-a-serial-port-on-windows-in-c
http://arduino.cc/forum/index.php?topic=96.0
TagsNo tags attached.

Activities

Anders Sandblad

Anders Sandblad

2012-08-02 20:48

administrator   ~0000013

Uncomment the following line in config.h to test UART DOUBLE SPEED according 2. above.
#define SERIAL_DOUBLE_SPEED 1
Anders Sandblad

Anders Sandblad

2012-08-02 21:13

administrator   ~0000014

With SERIAL_DOUBLE_SPEED active a speed of 76800 can be reached with an error of 0.2% (same error as 38400).

250k, 500k and 1M can be reached with an error of 0% but for 1M SERIAL_DOUBLE_SPEED must be active.
Anders Sandblad

Anders Sandblad

2012-08-02 21:59

administrator   ~0000015

Tests with baudrate of 1Mb/s gives about 900b/s at reprogramming (not scientific measured).
Anders Sandblad

Anders Sandblad

2012-08-02 22:09

administrator   ~0000016

Changed default baudrate to 1Mb/s and activated SERIAL_DOUBLE_SPEED with http://websvn.auml.se/HomeAutomation/?op=revision&rev=2151
Anders Sandblad

Anders Sandblad

2012-08-02 22:37

administrator   ~0000017

More optimization is possible but current fix is good enough.
Anders Sandblad

Anders Sandblad

2012-08-12 14:56

administrator   ~0000023

Closing after verifying that 1Mbit/s works. More optimization possible but unnecessary. Open again or create new issue if needed.

Issue History

Date Modified Username Field Change
2012-08-01 23:27 Anders Sandblad New Issue
2012-08-02 20:48 Anders Sandblad Note Added: 0000013
2012-08-02 21:13 Anders Sandblad Note Added: 0000014
2012-08-02 21:59 Anders Sandblad Note Added: 0000015
2012-08-02 22:09 Anders Sandblad Note Added: 0000016
2012-08-02 22:37 Anders Sandblad Note Added: 0000017
2012-08-02 22:37 Anders Sandblad Status new => resolved
2012-08-02 22:37 Anders Sandblad Resolution open => fixed
2012-08-02 22:37 Anders Sandblad Assigned To => Anders Sandblad
2012-08-12 14:56 Anders Sandblad Note Added: 0000023
2012-08-12 14:56 Anders Sandblad Status resolved => closed