Serial port (com1) baud rate oddity

Richard P. Williamson richard.williamson at u4eatech.com
Mon Mar 22 08:12:11 PST 2004


Hello,

I'm using 4.8 Release on an embedded pentium class device,
and I'm having trouble with the serial (console) port.

 From a development machine, I can 'tip com1' and get contact,
but the data is coming out as 
@@@ @ @@@ @@@   @@@  @@@@@@@@@@@ @@@ @@@@@@  @@@@@ @  @ @@@
@ @@    @@@ @ @ @@@@@ @ @@@@ @@@@@@ @ @@@ @@ @ @@@@ @@@@@  @
@@    @ @ @ @ @@@@@ @ @@@  @ @  @@@ @@@ @@ @ @@@@ @@@@@@@   @
@@@@ @@@ @ @ @@@@@ @@@ @@@@ @@@@@@@ @@@ @@ @ @@@@@@@@@ @@@@@   
@@@@@@    @@@ @ @ @@@@ @@@@      @@@ @@@ @@ @ @@  @@ @@@   @@   
@  @@    @   @ @ @@@@ @ @@@@  @@@@@ @@@ @@ @ @@@@ @@@  @@   
etc

If I connect the serial output to a windows box (hyperterminal)
it 'autoconnects' and tells me I'm talking at '7E1' (7 bit, even
parity, 1 stop bit).  

If I telnet into the device, and do stty, I get:
blah# stty -a -f /dev/ttyd0
speed 1355 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
        -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
        -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
        -brkint -inpck -ignpar -parmrk
oflags: -opost onlcr -ocrnl oxtabs onocr onlret
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb -crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
        lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
        status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
blah#

which shows a very odd baud rate, and 8n1 instead.  That is the 
main problem.  Why would the baud rate be so wrong, and how can 
I change it back?  Does this have something to do with an incorrectly
selected clock, possibly?

Also minor problem, is this the reason why I can't talk out com3:
"sio2: configured irq 5 not in bitmap of probed irqs 0"
and if so, how do I add irq 5 to the bitmap of probed irqs.

And because I know someone will ask for it:
ffpro# dmesg
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.8-RELEASE #0: Mon Mar 22 15:42:35 GMT 2004
    root at centauri:/usr/src/sys/compile/MINI_TSC
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 1266715955 Hz
CPU: Intel(R) Pentium(R) III CPU family      1266MHz (1266.72-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x6b1  Stepping = 1
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 268369920 (262080K bytes)
avail memory = 208560128 (203672K bytes)
Preloaded elf kernel "kernel" at 0xc3296000.
Preloaded mfs_root "/mfsroot" at 0xc32960a8.
Pentium Pro MTRR support enabled
md0: Preloaded image </mfsroot> 50331648 bytes at 0xc0294528
md1: Malloc disk
Using $PIR table, 9 entries at 0xc00fdee0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
isab0: <VIA 82C686 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA100 controller> port 0xe000-0xe00f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: <VIA 83C572 USB controller> at 7.2 irq 10
pci0: <unknown card> (vendor=0x1106, dev=0x3057) at 7.4
fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xd400-0xd43f mem 0xe7200000-0xe72fffff,0xe7302000-0xe7302fff irq 11 at device 8.0 on pci0
fxp0: Ethernet address 00:30:64:01:86:ff, 10Mbps
fxp1: <Intel Pro 10/100B/100+ Ethernet> port 0xd800-0xd83f mem 0xe7000000-0xe70fffff,0xe7301000-0xe7301fff irq 5 at device 9.0 on pci0
fxp1: Ethernet address 00:30:64:01:94:00, 10Mbps
fxp2: <Intel Pro 10/100B/100+ Ethernet> port 0xdc00-0xdc3f mem 0xe7100000-0xe71fffff,0xe7300000-0xe7300fff irq 12 at device 10.0 on pci0
fxp2: Ethernet address 00:30:64:01:94:01, 10Mbps
pcib2: <DEC 21152 PCI-PCI bridge> at device 13.0 on pci0
pci2: <PCI bus> on pcib2
pcib3: <PCI to PCI bridge (vendor=8086 device=b154)> at device 15.0 on pci2
pci3: <PCI bus> on pcib3
fxp3: <Intel Pro 10/100B/100+ Ethernet> port 0xc000-0xc03f mem 0xe6000000-0xe60fffff,0xe6201000-0xe6201fff irq 10 at device 12.0 on pci3
fxp3: Ethernet address 00:30:64:01:81:18
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp4: <Intel Pro 10/100B/100+ Ethernet> port 0xc400-0xc43f mem 0xe6100000-0xe61fffff,0xe6200000-0xe6200fff irq 11 at device 13.0 on pci3
fxp4: Ethernet address 00:30:64:01:81:19
inphy1: <i82555 10/100 media interface> on miibus1
inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vt0 on isa0
vt0: mda, mono, 8 scr, unknown kbd, [R3.20-b24]
vt0: driver is using old-style compatability shims
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: MDA <16 virtual consoles, flags=0x100>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A, console
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
sio2: configured irq 5 not in bitmap of probed irqs 0
vga0: <Generic ISA VGA> at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff on isa0
ad0: 30MB <SanDisk SDCFB-32> [490/4/32] at ata0-master PIO1
Mounting root from ufs:/dev/md0c



-- 
Richard Williamson           richard.williamson at u4eatech.com
U4EA Technologies Ltd                   +44 (0) 117 373 6760
Bristol, UK   BS1 6PL                                  x5030  



More information about the freebsd-questions mailing list