IMX233 custom baud rates

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMX233 custom baud rates

1,024件の閲覧回数
twdorris
Contributor I

For legacy purposes, I needed to be able to use the "old standard" way of specifying a custom baud rate in Linux.  And example follows.

// configure port to use custom speed instead of 38400
ioctl(port, TIOCGSERIAL, &ss);
ss.flags = (ss.flags & ~ASYNC_SPD_MASK) | ASYNC_SPD_CUST;
ss.custom_divisor = (ss.baud_base + (speed / 2)) / speed;
ioctl(port, TIOCSSERIAL, &ss);

cfsetispeed(&tios, B38400);
cfsetospeed(&tios, B38400);

The IMX23 UART drivers do not support this, however.  So I modified the drivers accordingly and thought I'd post it up.  NOTE: Technically, the driver should also check that baud is set to 38400 in addition to checking the SPD_CUST flag.  But for our purposes, the CUST flag is a sufficient trigger.

This enables custom baud rates on both the application and the debug UARTs.

ラベル(1)
0 件の賞賛
1 返信

617件の閲覧回数
chaoli
Contributor I

I patch it . Now I can configure the buad that I want to be , I measure it by oscilloscope.  And it can send datas , but it cannot receive any datas .

If I open the tty device , then  close it , and open once again,there are some problem !

can you help me ?

0 件の賞賛