This is actually two-part thing.
1. BLHOST ignores baud rate setting. Here is a snippet from serial.c (KBOOT 2.0)
speed = B9600;
speed = B38400;
speed = B115200;
speed = B57600;
Quite obviously the requested baud rate is being simply ignored in favor of 57600
This was supposed to be
2. Even worse - the baud rate is then overwritten in serial_set_read_timeout
memset(&tty, 0x00, sizeof(tty));
set a bunch of flags (but not speed)
if (tcsetattr(fd, TCSAFLUSH, &tty) < 0)
For this to work properly it needs to be:
Since most testing at Freescale has been obviously done on FRDM boards which use cdc_acm driver, this has not been an issue since cdc_acm driver ignores invalid baud rate (0 is invalid). However CP210x driver (Silicon Labs) assumes 300 bps (FTDI defaults to 9600). This results in time required to flash a small 50KB image being about 1hr.