Re: ttyS0 at wrong baudrate
Russell King - ARM Linux <[email protected]>
| Newsgroups | gmane.linux.ports.arm.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 25, 2009 at 08:43:25AM +0200, Erazem Polutnik wrote: > Dear all, > I'm having PXA270 toradex board running kernel 2.6.23. kernel console is set > to ttyS0,115200n8. > In program we are also using ttyS0 and we initalize it to 4800,8,n,1. > We output an NMEA stream on ttyS0 and everything is working ok. > However, if PXA270 receive few characters from outer world at different > baudrate than 4800, > program crash with out of memory. This is the classic case of "Doctor, Doctor, it hurts when I do X." "Don't do X then." Basically, don't do this - the system is doing precisely what you're asking it to do, which is: 1. to have the kernel console on ttyS0 2. sysrq support to be enabled (so break + character invokes sysrq action) 3. lowered the baud rate of the console (which will halt the system while console output occurs) 4. receiving characters at a different baud rate which can be interpreted as break + character. The golden rule here is: don't run the kernel console on the same port that you're going to use for your application. > [ 322.240000] SysRq : Manual OOM execution > [ 322.250000] SysRq : HELP : loglevel0-8 reBoot tErm Full kIll saK showMem > Nice showPc show-all-timers(Q) unRaw Sync showTasks Unmount > shoW-blocked-tasks Two sysrq-invoked events. ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php