2010-07-05 13:37:02     how to set non-standard console baud rate ?

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-07-05 13:37:02     how to set non-standard console baud rate ?

Howard Gordon (UNITED STATES)

Message: 90920   

 

I have been unable to set a non-standard console baud rate such as 921600 or 2500000 via uboot env variables -

 

    setenv console=ttyBF0, xxxxxx

 

I imagine this is due to some limitations in the parsing of the env variables in the linux startup.  Any suggestions on where to look in the kernel code so that we might remove this limitation ?

QuoteReplyEditDelete

 

 

2010-07-05 14:54:18     Re: how to set non-standard console baud rate ?

Mike Frysinger (UNITED STATES)

Message: 90923   

 

try or-ing the value with 010000

QuoteReplyEditDelete

 

 

2010-07-06 12:05:52     Re: how to set non-standard console baud rate ?

Howard Gordon (UNITED STATES)

Message: 90967   

 

Mike -

 

I changed 921600 (0xE1000) to 987136 (0xF10000), and that caused the baud rate to revert to a default 38400.

QuoteReplyEditDelete

 

 

2010-07-06 12:09:17     Re: how to set non-standard console baud rate ?

Howard Gordon (UNITED STATES)

Message: 90968   

 

Typo - 0xF1000 not 0xF10000.  987136 is that actual rate that was set without success.

QuoteReplyEditDelete

 

 

2010-07-06 12:16:03     Re: how to set non-standard console baud rate ?

Mike Frysinger (UNITED STATES)

Message: 90969   

 

38400 is how non-standard baud rates are reported, but console= probably doesnt support it

 

try first booting a standard rate and then see if you can change it on the fly.  see the FAQ about high baud rates:

  docs.blackfin.uclinux.org/doku.php?id=faq

QuoteReplyEditDelete

 

 

2010-07-11 20:07:55     Re: how to set non-standard console baud rate ?

Howard Gordon (UNITED STATES)

Message: 91149   

 

Okay - I didn't have much luck with supported baud rates, even though 2500000 is on the termios.h list, but managed to set a baud rate of 2500000 by using the setserial and stty commands, as the UART divisor we use for that speed is '3'.

 

setserial -a /dev/ttyBF0 divisor 3 spd_cust

 

stty -F /dev/ttyBF0 38400

 

So the worst case scenario is to put this into /etc/rc.  Could you suggest a cleaner approach that might be configured from u-boot ?

QuoteReplyEditDelete

 

 

2010-07-11 20:27:02     Re: how to set non-standard console baud rate ?

Mike Frysinger (UNITED STATES)

Message: 91150   

 

if it doesnt work via the command line with console=, then no, /etc/rc is your best bet

 

and for the future, work on extending the command line options

Attachments

    Outcomes