Skip to content

Very slow baud rates available for FDTI output #88

@bdlabitt

Description

@bdlabitt

According to the FTDI spec, the TTL-234X-3V3-WE adapter can operate at 3000000 baud. Can the baud rates in \tytools\libhs be modified to allow higher baud rates? Currently TyCommander is limited to a maximum rate of 230400 baud, which is a mere 7.7% of the available FTDI bandwidth.

The current values in tytools\libhs\serial.h in the enum are as follows:
enum hs_serial_rate {
/** 110 bps. /
HS_SERIAL_RATE_110 = 110,
/
* 134 bps. /
HS_SERIAL_RATE_134 = 134,
/
* 150 bps. /
HS_SERIAL_RATE_150 = 150,
/
* 200 bps. /
HS_SERIAL_RATE_200 = 200,
/
* 300 bps. /
HS_SERIAL_RATE_300 = 300,
/
* 600 bps. /
HS_SERIAL_RATE_600 = 600,
/
* 1200 bps. /
HS_SERIAL_RATE_1200 = 1200,
/
* 1800 bps. /
HS_SERIAL_RATE_1800 = 1800,
/
* 2400 bps. /
HS_SERIAL_RATE_2400 = 2400,
/
* 4800 bps. /
HS_SERIAL_RATE_4800 = 4800,
/
* 9600 bps. /
HS_SERIAL_RATE_9600 = 9600,
/
* 19200 bps. /
HS_SERIAL_RATE_19200 = 19200,
/
* 38400 bps. /
HS_SERIAL_RATE_38400 = 38400,
/
* 57600 bps. /
HS_SERIAL_RATE_57600 = 57600,
/
* 115200 bps. /
HS_SERIAL_RATE_115200 = 115200,
/
* 230400 bps. */
HS_SERIAL_RATE_230400 = 230400
};
Most of the rates below 9600 are on technologies that are from the 70's, 80's and 90's. Can TyCommander be modified to offer higher baud rates? I'd prefer to operate over 2Mbaud, preferably 3Mbaud, to assist in diagnostic logging. I'm controlling a lathe and am finding that USB based data logging is breaking the machine control. The machine is losing sync which causes parts to be scrapped.

Teensyduino USB libraries unfortunately globally blank all interrupts in operation. Significantly longer than they should. This wreaks havoc on control algorithms which are interrupt driven. The standard serial library does not do long global interrupt blanking and obeys interrupt priorities. USB serial does not behave well and can blank for 100's of us. I've experienced much longer blanking. Standard HW serial is better behaved.

Is it possible to modify libhs with other and higher values for baud rate? For my applications, I'd NEVER be interested in baud rates below 9600. Can some of the low values be updated with more modern and higher speeds?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions