2009-01-28 14:15:55 Getting uClinux to 921k on SRV-1 board (bf537 + matchport)
Tom Parker (UNITED KINGDOM)
Message: 68489
I've been recently trying to speed up the serial link on uClinux from the usually considered maximum of 115k, as we needed to get more images out of the camera faster, and I know the default SRV-1 firmware was capable of a much faster rate than we're seeing right now. Using a 2.6.22.18 kernel (with the 2008R1 release of uClinux), I tried just setting the command line so it's now set to "console=ttyBF0,921600 root=/dev/mtdblock0 rw" and bizarrely enough this seems to work along with the Matchport also set to 921600 and flow control switched off.
However, this doesn't appear to have actually speeded anything up at all. I'm still getting a data rate indicative of 115k, and I think the problem is flow control i.e. 921k is being attempted, but without flow control there's too many dodgy bits being retransmitted and it doesn't actually go any faster. I tried enabling RTS/CTS flow control in the kernel (CTS pin set to 38, RTS to 32, which appears from the circuit diagrams to be the right ones for port 0), but I then saw a variety of issues including the kernel not starting at all in some instances, and also stopping after a "dma init" (I think, have to double-check that).
Has anyone else tried this? Does anyone have any suggestions for things I could do to try and debug this?
(I've also queried the SRV-1 boards directly, but they tend to be less focused on uClinux, and so I figure you guys might have more of a clue about this)
Thanks,
Tom Parker
QuoteReplyEditDelete
2009-01-28 14:23:04 Re: Getting uClinux to 921k on SRV-1 board (bf537 + matchport)
Mike Frysinger (UNITED STATES)
Message: 68490
you should try the latest 2008R1.5 branch for the kernel ... there have been a bunch of fixes to the serial driver since the last release, including ones related to software flowcontrol via gpios.
QuoteReplyEditDelete
2009-01-29 14:07:42 Re: Getting uClinux to 921k on SRV-1 board (bf537 + matchport)
Tom Parker (UNITED KINGDOM)
Message: 68530
I've just tried with the kernel at svn://sources.blackfin.uclinux.org/linux-kernel/branches/2008R1 (which I think is the 2008R1.5 HEAD), and it starts up ok, but the shell stops responding immediately i.e. no data from the console after msh starts up.
Full startup log is attached, and I'm going to have a shot with the trunk kernel as well just in case that works any better...
uclinux-log
QuoteReplyEditDelete
2009-01-29 14:12:36 Re: Getting uClinux to 921k on SRV-1 board (bf537 + matchport)
Mike Frysinger (UNITED STATES)
Message: 68531
yes, the 2008R1.5 release was made from the 2008R1 branch
i think you need to tell the kernel you want flow control with the console= option ... i see you havent done that. checkout linux-2.6.x/Documentation/serial-console.txt.
QuoteReplyEditDelete
2009-01-29 15:43:41 Re: Getting uClinux to 921k on SRV-1 board (bf537 + matchport)
Tom Parker (UNITED KINGDOM)
Message: 68538
Yay :-) This appears to have at least re-enabled console support. Thanks! I'm unsure what the speed increases are yet, as my test app tied into the camera (blackfin_cam with an ov9655) and that appears to now be not creating a /dev/video0 (tried manual creation as well, but can't be opened). I seem to remember seeing an early issue with the camera and RTS/CTS, as without setting the RTS/CTS pins correctly, the default values for them clashed with the pins used for the camera interface, so this might be related, although I'm not seeing the error reports in dmesg that I did last time....