General TC > General TC Talk
[SOLVED] TC Max Serial Port Baudrate
Rich:
Hi aj
I spotted those bugs however the result of get clock is only used to print a kernel message and in set clock it is oring the
number 3 in so those two bits are set anyway. In fact, if you look at set clock you'll see the speed parameter is not even
used to set the speed, it's hard coded:
--- Code: ---clock |= WDT_CLOCK_1476000;
--- End code ---
and WDT_CLOCK_1476000 is defined as 3.
aj:
--- Quote from: Rich on June 06, 2013, 05:29:14 PM ---Hi aj
I spotted those bugs however the result of get clock is only used to print a kernel message and in set clock it is oring the
number 3 in so those two bits are set anyway. In fact, if you look at set clock you'll see the speed parameter is not even
used to set the speed, it's hard coded:
--- Code: ---clock |= WDT_CLOCK_1476000;
--- End code ---
and WDT_CLOCK_1476000 is defined as 3.
--- End quote ---
Hi Rich,
What you are saying make sense and I will try your suggestion.
Thanks again for the support
aj:
--- Quote from: Rich on June 06, 2013, 08:19:53 AM ---Hi aj
As a quick test, open the source file, go to the w83627_set_serial routine, and change:
--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
--- End code ---
To:
--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
w83627_set_uart_clock(WDT_CLOCK_2400000,1);
--- End code ---
Recompile the driver and see if ttyS1 can now be programmed to run at the higher speed.
Sorry for the delay. I'm still trying to get a grip on how this driver is supposed to work.
--- End quote ---
Hi Rich
I made the alteration that you suggested and it resulted. Now I can configure the second serial port.
I am grateful for your support
Thanks again :)
Rich:
Hi aj
Good to hear. I figured that would kick up the speed of the second UART. For what it's worth, after loading, all this module
does is program a couple of registers. After that, it just sits in memory occupying space. After modprobing the module
you should be able to unload it again. At this point, both UARTs are running at 8x their normal speed. You could skip
using setserial and use stty to select 155200 and you will have 8 x 115200=921600. All the baud rates stty supports
will be 8x higher.
aj:
--- Quote from: Rich on June 08, 2013, 10:42:31 PM ---Hi aj
Good to hear. I figured that would kick up the speed of the second UART. For what it's worth, after loading, all this module
does is program a couple of registers. After that, it just sits in memory occupying space. After modprobing the module
you should be able to unload it again. At this point, both UARTs are running at 8x their normal speed. You could skip
using setserial and use stty to select 155200 and you will have 8 x 115200=921600. All the baud rates stty supports
will be 8x higher.
--- End quote ---
Hi Rich,
I'm loading the module at OS startup.
Then I use setserial to configure the max baud rate but I appreciate your advice.
Thanks again :)
Navigation
[0] Message Index
[*] Previous page
Go to full version